Skip to main content

Customizable and intuitive video acquisition system for real-time animal tracking and behavior quantification

Project description

RataGUI

Customizable and intuitive video acquisition system for real-time animal tracking and behavior quantification

Installation

RataGUI is written entirely in Python and runs on all major platforms. To get started, clone the repository and create a virtual environment with the required dependencies.

Conda Installation (Recommended)

CPU-only environment

conda create -n rataGUI ffmpeg pip python=3.10
conda activate rataGUI
python -m pip install rataGUI

GPU-enabled environment

For real-time model inference, using a GPU is strongly encouraged to minimize latency. If you have a NVIDIA GPU, make sure the latest driver version is installed.

Note: CUDA is automatically installed in the conda environment.

conda create -n rataGUI ffmpeg pip python=3.10 cudnn=8.2 cudatoolkit=11.3 nvidia::cuda-nvcc=11.3
conda activate rataGUI
python -m pip install rataGUI

Pip Installation (CPU-only)

If you don't want to download Anaconda or its lightweight variants (miniconda, miniforge etc.), you can install RataGUI as a standalone pip package in any python>=3.10 environment. However, creating a separate virtual environment is strongly suggested so that RataGUI doesn't conflict with other installed packages.

Note: Unlike conda, pip can't automatically install ffmpeg for video encoding so it needs to be installed through the official download links or using a package manager (e.g. sudo apt install ffmpeg on Debian/Ubuntu, brew install ffmpeg on macOS, etc.).

python -m pip install rataGUI

External Hardware

Spinnaker (FLIR) Cameras

To use RataGUI with Spinnaker (FLIR) cameras, follow the instructions here to download the full Spinnaker SDK for your specific Python version. In the downloaded folder, find the package wheel file (spinnaker_python-\<version\>-\<system-info\>.whl) and run the following command install PySpin into your Python enviornment. Then, restart the environment or reboot your computer to recapture the system and user environment variables.

python -m pip install <PATH-TO-SPINNAKER-WHEEL-FILE>.whl

Basler (Pylon) Cameras

To use RataGUI with Basler cameras, install the python wrapper package for the PyPylon SDK.

python -m pip install pypylon

National Instruments (NI-DAQmx) Devices

To use RataGUI with National Instruments hardware, install the python wrapper package for the NI-DAQmx driver.

python -m pip install nidaqmx

Customization

RataGUI's modular framework was built for easy user customizability and integration. You are encouraged to clone the package repository from Github and add additional camera models or plugins for your specific use case.

git clone https://github.com/BrainHu42/rataGUI.git

Implement Custom Camera Models

Currently, RataGUI has built-in support for FLIR, Basler and OpenCV-compatible cameras. If you need to add another camera model, simply rename and edit the required functions provided in cameras/TemplateCamera.py to fit your camera model's specifications. RataGUI will use these functions to find, initialize, read frames from and close the camera.

Implement Custom Plugins

Currently, RataGUI has built-in support for multi-animal pose estimation with SLEAP and DeepLabCut (DLC) models as well as writing video stream to file or displaying it on screen. Any metadata collected during acquistion can be written directly on the frame or in a csv file using the MetadataWriter plugin. If you need additional functionality, simply rename and edit the required functions provided in plugins/template_plugin.py with the custom processing needed for your use case. RataGUI will use these functions to attach your plugin to an active camera widget's processing pipeline.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rataGUI-0.1.3.tar.gz (668.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rataGUI-0.1.3-py3-none-any.whl (679.2 kB view details)

Uploaded Python 3

File details

Details for the file rataGUI-0.1.3.tar.gz.

File metadata

  • Download URL: rataGUI-0.1.3.tar.gz
  • Upload date:
  • Size: 668.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for rataGUI-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b18f8b32dcebe3e6e3cf0b93e768e56c17902dff9e0e5832b74e49b220b104d8
MD5 c0380ddee43f0a8d840941e2027212a4
BLAKE2b-256 66f33e70c688a3c8f2bdac037c29e1162bb2d35566dc543ba5ef78aae8370b78

See more details on using hashes here.

File details

Details for the file rataGUI-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: rataGUI-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 679.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for rataGUI-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ce163405a397735aa4ced96a8e70ad1b8034f99672276ea41b4f5577112738cd
MD5 01ec108888137887ce8de0e7bee47ecc
BLAKE2b-256 c3555cf98ae3b40a47e9188312dcc3db4314e2ca31e14bd679fef9ad46ee92f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page