π Installation β’ π¦ Packages β’ π Webapps β’ π Documentation β’ π License
This mono repo consists of modular packages for implementing and visualizing multi-object tracking using various tracking algorithms and models:
sinapsis-cotrackersinapsis-supervisionsinapsis-rf-trackers
Install using your package manager of choice. We encourage the use of uv
Warning
cotracker dependency is required to install sinapsis-cotracker
Install cotracker in your working environment as follows:
uv pip install git+https://github.com/facebookresearch/co-tracker.gitthen install sinapsis-cotracker
uv pip install sinapsis-cotracker --extra-index-url https://pypi.sinapsis.techInstall cotracker in your working environment as follows:
pip install git+https://github.com/facebookresearch/co-tracker.gitthen install sinapsis-cotracker
pip install sinapsis-cotracker --extra-index-url https://pypi.sinapsis.techInstall sinapsis-supervision
uv pip install sinapsis-supervision --extra-index-url https://pypi.sinapsis.techInstall sinapsis-supervision
pip install sinapsis-supervision --extra-index-url https://pypi.sinapsis.techInstall sinapsis-rf-trackers
uv pip install sinapsis-rf-trackers --extra-index-url https://pypi.sinapsis.techInstall sinapsis-rf-trackers
pip install sinapsis-rf-trackers --extra-index-url https://pypi.sinapsis.techImportant
Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:
uv pip install sinapsis-cotracker[all] --extra-index-url https://pypi.sinapsis.tech
uv pip install sinapsis-supervision[all] --extra-index-url https://pypi.sinapsis.tech
uv pip install sinapsis-rf-trackers[all] --extra-index-url https://pypi.sinapsis.techor with raw pip:
pip install sinapsis-cotracker[all] --extra-index-url https://pypi.sinapsis.tech
pip install sinapsis-supervision[all] --extra-index-url https://pypi.sinapsis.tech
pip install sinapsis-rf-trackers[all] --extra-index-url https://pypi.sinapsis.techTip
You can also install all the packages within this project:
uv pip install sinapsis-trackers[all] --extra-index-url https://pypi.sinapsis.techThis repository is organized into modular packages, each designed for specific integration with different tracking models, including CoTracker and ByteTrack. These packages provide ready-to-use templates for applications like object tracking, multi-object tracking, and result visualization in real-time or offline.
Below is an overview of the available packages:
Sinapsis Cotrackers
This sinapsis package provides a robust implementation for multi-object tracking with the Facebook Research's Co-Tracker model. It includes:
- Templates for multi-object tracking using Co-Tracker, offering flexible offline, online, and visualization modes.
- Efficient processing and visualization of tracking results directly on video frames for clear output.
- Tools for handling dynamic tracking across frames, including padding, line width, and trace settings.
For specific instructions and further details, see the README.md.
Sinapsis Supervision
This Sinapsis package provides a comprehensive solution for object tracking with the ByteTrack algorithm. It includes:
- A template for object tracking using ByteTrack, designed to handle real-time multi-object tracking in videos.
- Detection processing and updates with configurable parameters for track activation, matching, and occlusion handling, improving accuracy and stability.
For more details, see the README.md.
Sinapsis RF Trackers
This Sinapsis package provides robust templates for multi-object tracking, leveraging the trackers library. It integrates powerful algorithms like SORT and DeepSORT into the Sinapsis ecosystem.
- SORT Tracker: A simple and efficient motion-based tracker ideal for high-speed applications.
- DeepSORT Tracker: An advanced tracker that enhances SORT by incorporating appearance features using a configurable Re-Identification (Re-ID) model. This makes it more robust against occlusions and helps maintain object identities in complex scenes.
- Flexible Configuration: Offers extensive attributes to fine-tune tracker behavior, including support for various Re-ID models via the timm library.
For specific instructions and further details, see the README.md.
For more details, see the official documentation
The webapps included in this project showcase the modularity of the templates, in this case for multi-object tracking and visualization tasks.Important
To run the app, you first need to clone this repo:
git clone git@github.com:Sinapsis-ai/sinapsis-trackers.git
cd sinapsis-trackersNote
If you'd like to enable external app sharing in Gradio, export GRADIO_SHARE_APP=True
Note
Agent configuration can be updated through the AGENT_CONFIG_PATH environment var. You can check the available configurations in each package configs folder.
π³ Docker
IMPORTANT: This Docker image depends on the sinapsis-nvidia:base image. For detailed instructions, please refer to the Sinapsis README.
- Build the sinapsis-trackers image:
docker compose -f docker/compose.yaml build- Start the container:
For sinapsis-cotracker
docker compose -f docker/compose_tracker.yaml up sinapsis-cotracker-gradio -dFor sinapsis-supervision with default bytetrack-ultralytics demo
docker compose -f docker/compose_tracker.yaml up sinapsis-supervision-gradio -dFor sinapsis-supervision with bytetrack-dfine demo
export DFINE_CONFIG_DOWNLOAD=True
export AGENT_CONFIG_PATH=/app/sinapsis_supervision/configs/bytetrack_dfine_demo.yml
docker compose -f docker/compose_tracker.yaml up sinapsis-supervision-gradio -d- Check the status:
For sinapsis-cotracker
docker logs -f sinapsis-cotracker-gradioFor sinapsis-supervision
docker logs -f sinapsis-supervision-gradio- The logs will display the URL to access the webapp, e.g.,:
Running on local URL: http://127.0.0.1:7860NOTE: The local URL can be different, please check the logs
- To stop the app:
docker compose -f docker/compose_tracker.yaml downπ¦ UV
To run the webapp using theuv package manager, please:
- Create the virtual environment and sync the dependencies:
uv sync --frozen --extra cotracker- Install the sinapsis-trackers package:
uv pip install sinapsis-trackers[all] --extra-index-url https://pypi.sinapsis.tech- Run the webapp:
For demo running default cotracker-online agent config.
uv run webapps/tracking_demo.pyFor demo running bytrack-ultralytics agent config.
export AGENT_CONFIG_PATH="packages/sinapsis_supervision/src/sinapsis_supervision/configs/bytetrack_ultralytics_demo.yml"
uv run webapps/tracking_demo.pyFor demo running bytetrack-dfine agent config.
export DFINE_CONFIG_DOWNLOAD=True
export AGENT_CONFIG_PATH="packages/sinapsis_supervision/src/sinapsis_supervision/configs/bytetrack_dfine_demo.yml"
uv run webapps/tracking_demo.py- The terminal will display the URL to access the webapp, e.g.:
Running on local URL: http://127.0.0.1:7860NOTE: The local URL can be different, please check the output of the terminal.
Documentation is available on the sinapsis website
Tutorials for different projects within sinapsis are available at sinapsis tutorials page
This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.
For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.