Installation
Latest version
pupil_recording_interface can be installed via pip
:
$ pip install git+https://github.com/vedb/pupil_recording_interface.git
or via conda
from our own channel:
$ conda install -c vedb -c conda-forge pupil_recording_interface
Optional dependencies
The library requires several optional dependencies for features like streaming video from the Pupil Core cameras, recording data or special algorithms such as pupil detection.
Many of these dependencies are non-trivial to install, especially on Windows. Therefore, we recommend installing the library in a conda environment since conda provides a straightforward way of cross-platform distribution for non-Python dependencies. We are actively working on packaging those dependencies that aren’t already available through conda. At the moment, only packages for Linux x64 and Python versions 3.6 and 3.7 are available.
Example data
To download the test recording used in the examples you need to install pooch:
$ pip install pooch
or:
$ conda install pooch
Streaming
To stream video from the pupil cameras you need to install the PyUVC library.
Linux
A conda package is available for Linux:
$ conda install -c vedb -c conda-forge pyuvc
Set these udev rules to access the cameras as a normal user:
$ echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", MODE="0664"' | sudo tee /etc/udev/rules.d/10-libuvc.rules > /dev/null
$ sudo udevadm trigger
Windows and MacOS
For these operating systems, follow the instructions on the PyUVC GitHub page.
Recording
To record video you need to install ffmpeg. This can be done via conda on all operating systems:
$ conda install ffmpeg x264
H.265 encoding (Linux)
On Linux it is also possible to record videos using the H.265/HEVC standard.
The x265
implementation of the codec can be installed via conda along
with an ffmpeg
package build with support for the library:
$ conda install -c loopbio ffmpeg x265
If you also need support for FLIR cameras (see FLIR cameras), you
will need to install our own ffmpeg
package instead:
$ conda install -c loopbio -c vedb ffmpeg=3.4.2 x265
Pupil detection
Pupil detection is implemented based on Pupil Labs’ pupil-detectors package.
Linux
A conda package is available for Linux:
$ conda install -c vedb -c conda-forge pupil-detectors
Windows and MacOS
Install via pip:
$ pip install pupil-detectors
On MacOS, you will probably need to install some build dependencies. Please refer to the pupil-detectors GitHub pages for details.
RealSense T265
Motion and video data from an Intel RealSense T265 tracking camera can be
streamed by installing the RealSense SDK and pyrealsense2
:
$ pip install pyrealsense2
Linux and MacOS
The RealSense SDK can be installed through conda:
$ conda install -c conda-forge librealsense
Windows
Follow the instructions on the RealSense SDK GitHub page.
FLIR cameras
PySpin
and simple-pyspin
are required for FLIR camera support.
Linux
We provide a simple-pyspin
conda package with all dependencies for Linux:
$ conda install -c vedb -c conda-forge simple-pyspin
Windows and MacOS
For PySpin
download the latest Spinnaker SDK.
simple-pyspin
can be installed via pip
:
$ pip install simple-pyspin
Export
Install the netcdf4
library in order to export data to the netCDF format:
$ pip install netcdf4
or with conda:
$ conda install netcdf4