Skip to main content

Package for multi-object tracking using advanced algorithms and models.

Project description




Sinapsis Trackers

Mono repo with modular packages for multi-object tracking using advanced algorithms.

🐍 Installation📦 Packages🌐 Webapps📙 Documentation🔍 License

🐍 Installation

This mono repo consists of modular packages for implementing and visualizing multi-object tracking using various tracking algorithms and models:

  • sinapsis-cotracker
  • sinapsis-supervision

Install using your package manager of choice. We encourage the use of uv

sinapsis-cotracker

[!WARNING] cotracker dependency is required to install sinapsis-cotracker

UV instructions

Install cotracker in your working environment as follows:

uv pip install git+https://github.com/facebookresearch/co-tracker.git

then install sinapsis-cotracker

uv pip install sinapsis-cotracker --extra-index-url https://pypi.sinapsis.tech

Raw pip instructions

Install cotracker in your working environment as follows:

pip install git+https://github.com/facebookresearch/co-tracker.git

then install sinapsis-cotracker

pip install sinapsis-cotracker --extra-index-url https://pypi.sinapsis.tech

sinapsis-supervision

UV instructions

Install sinapsis-supervision

uv pip install sinapsis-supervision --extra-index-url https://pypi.sinapsis.tech

Raw pip instructions

Install sinapsis-supervision

pip install sinapsis-supervision --extra-index-url https://pypi.sinapsis.tech

(Optional) Install packages with all additional dependencies

[!IMPORTANT] 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

or 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

[!TIP] You can also install all the packages within this project:

  uv pip install sinapsis-tracker[all] --extra-index-url https://pypi.sinapsis.tech

📦 Packages

This 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.

For more details, see the official documentation

🌐 Webapps

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-trackers

[!NOTE] 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.

  1. Build the sinapsis-trackers image:
docker compose -f docker/compose.yaml build
  1. Start the container:

For sinapsis-cotracker

docker compose -f docker/compose_tracker.yaml up sinapsis-cotracker-gradio -d

For sinapsis-supervision with default bytetrack-ultralytics demo

docker compose -f docker/compose_tracker.yaml up sinapsis-supervision-gradio -d

For 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
  1. Check the status:

For sinapsis-cotracker

docker logs -f sinapsis-cotracker-gradio

For sinapsis-supervision

docker logs -f sinapsis-supervision-gradio
  1. The logs will display the URL to access the webapp, e.g.,:
Running on local URL:  http://127.0.0.1:7860

NOTE: The local URL can be different, please check the logs

  1. To stop the app:
docker compose -f docker/compose_tracker.yaml down
📦 UV To run the webapp using the uv package manager, please:
  1. Create the virtual environment and sync the dependencies:
uv sync --frozen --extra cotracker
  1. Install the sinapsis-trackers package:
uv pip install sinapsis-trackers[all] --extra-index-url https://pypi.sinapsis.tech
  1. Run the webapp:

For demo running default cotracker-online agent config.

uv run webapps/tracking_demo.py

For 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.py

For demo running bytrack-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
  1. The terminal will display the URL to access the webapp, e.g.:
Running on local URL:  http://127.0.0.1:7860

NOTE: The local URL can be different, please check the output of the terminal.

📙 Documentation

Documentation is available on the sinapsis website

Tutorials for different projects within sinapsis are available at sinapsis tutorials page

🔍 License

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.

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

sinapsis_trackers-0.1.0.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

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

sinapsis_trackers-0.1.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file sinapsis_trackers-0.1.0.tar.gz.

File metadata

  • Download URL: sinapsis_trackers-0.1.0.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.16

File hashes

Hashes for sinapsis_trackers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e376e0baed8bde41bfc87ad42d853a8ed709f0c7728ff4a0cf5941f1919327be
MD5 c43ad76aa13d1a6acf1840c519c06399
BLAKE2b-256 dbcc99b9b125288560c2f34637543067183f4a3722f98cfada124805130a282f

See more details on using hashes here.

File details

Details for the file sinapsis_trackers-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sinapsis_trackers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c233fd22088e2a541cde34ecc19c1db18be1d25adee486a497c0ae92300f0cc5
MD5 afa24d9dc94cebd38473e4e8fb9a2a28
BLAKE2b-256 8c5b5436eec84cb36e1fb0388d00a425e24d8ca1cc294fbf8cb3769ee9b1efe1

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