-
Notifications
You must be signed in to change notification settings - Fork 33
Download and Installation
PyVision requires some standard scientific and computer vision python libraries to run correctly. It is currently tested on Python 2.7 but it will probably work with Python 3.0 and above with only a little modification.
These packages are required:
- Python 2.7
- Numpy
- Scipy
- Pillow
- scikit-learn
- scikit-image
These packages are recommended:
- OpenCV (2.4 or later)
- iPython
- Cython
- sympy
- statsmodels
- pip
There are also some recommended tools for working with python, images, and videos:
- Eclipse with PyDev or Spyder IDE
- ImageMagick
- ffmpeg
$ pip install pyvision_toolkit
$ python -c "import pyvision as pv; pv.test()"
Currently PyVision should be downloaded from github using the command:
$ git clone https://github.com/bolme/pyvision.git
The PyVision src
directory should also be added to your PYTHONPATH
environment variable so that the package pyvision
can be easily imported. At some we would like a working setup.py
script but this has not yet been implemented.
MacPorts is recommended for getting the dependencies needed for PyVision. The following command should install most dependencies:
sudo port install python27 py27-numpy py27-scipy py27-scikit-learn py27-scikit-image py27-Pillow opencv +python27
Recommend packages can also be installed easily with MacPorts.
sudo port install py27-ipython py27-theano py27-statsmodels py27-cython py27-ipyparallel py27-notebook py27-pip py27-sympy ffmpeg ImageMagick
Finally you want to make sure that MacPorts is used by default from the command line.
sudo port select --set python python27
sudo port select --set python2 python27
sudo port select --set cython cython27
sudo port select --set ipython py27-ipython
sudo port select --set ipython2 py27-ipython
sudo port select --set pip pip27
sudo port select --set py-sympy py27-sympy
Note: MacPorts now installs OpenCV 3.1.0. This removes a lot of old OpenCV 1.* functionality that was used by pyvision. To install version 2.4.11 run the following commands:
sudo port deactivate opencv
svn checkout -r 134472 https://svn.macports.org/repository/macports/trunk/dports/graphics/opencv opencv_port
cd opencv_port
sudo port install +python27
Theano and Keras are a good way to easily get started with deep learning and neural networks. Theano should have been installed with the recommend packages. Keras can be installed using pip:
sudo pip install keras
All dependencies can be obtained with the apt package manager in Ubuntu 14.04 LTS. PyVision should also work with most other modern flavors of linux as long as the dependencies are installed correctly.
PyVision works well with PythonXY. The easiest way to get things running is to do a full install which will install all required libraries as well as most recommend libraries. PythonXY also comes with the Spyder development environment.
WinPython also has most dependencies but will require manual installation of the OpenCV library.
PyVision has been tested and runs on the following embedded development boards. Installation is similar to Ubuntu 14.04 LTS:
- Raspberry Pi (Ubuntu)
- Pandaboard (Ubuntu)
- NVidia Jetson Tk1 (Ubuntu)
For PyVision to work correctly the pyvision package needs to be in your python path. Since I actively develop python I typically modify the PYTHONPATH environment variable to point at pyvision/src
in the git repository. It is also possible to copy the pyvision/src/pyvision
directory into your site packages directory.
If it is set up correctly you should be able to open a python interpretor run the following commands to do some simple tests.
import pyvision as pv
pv.test()
You can also try displaying an image to make sure that OpenCV HighGUI is installed correctly.
import pyvision as pv
im = pv.Image(pv.BABOON)
im.show()