Skip to main content



Sinapsis Object Detection

Mono repo with packages for training and inference with various models for advanced object detection tasks.

🐍 Installation • 📦 Packages • 🌐 Webapp • 📙 Documentation • 🔍 License

🐍 Installation

[!IMPORTANT] Sinapsis projects requires Python 3.10 or higher.

This repo includes packages for performing object detection using different models:

  • sinapsis-dfine
  • sinapsis-rfdetr
  • sinapsis-ultralytics

Install using your package manager of choice. We strongly encourage the use of uv. If you need to install uv please see the official documentation.

Example with uv:

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

or with raw pip:

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

Replace sinapsis-dfine with the name of the package you intend to install.

[!IMPORTANT] Templates in each package may require extra dependencies. For development, we recommend installing the package with all the optional dependencies:

with uv:

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

or with raw pip:

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

Be sure to substitute sinapsis-dfine with the appropriate package name.

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

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

📦 Packages

This repository is organized into modular packages, each built for integration with different object detection models. These packages offer ready-to-use templates for training and performing inference with advanced models. Below is an overview of the available packages:

Sinapsis D-FINE

The package provides templates for fine-tuning and inference with the D-FINE model, enabling advanced object detection tasks. It includes:

  • DFINETraining: A highly flexible template for fine-tuning D-FINE models on custom data.
  • DFINEInference: A streamlined and efficient template for running trained D-FINE models.

For specific instructions and further details, see the README.md.

Sinapsis RF-DETR

The package provides templates for training, inference, and export with the RF-DETR model, enabling advanced object detection tasks. It includes:

  • RFDETRExport and RFDETRLargeExport: Templates for exporting the RFDETRBase and RFDETRLarge models to ONNX format.
  • RFDETRInference and RFDETRLargeInference: Templates designed to perform inference on a set of images using the RFDETRBase and RFDETRLarge models.
  • RFDETRTrain and RFDETRLargeTrain: Templates for training the RFDETRBase and RFDETRLarge models.

For specific instructions and further details, see the README.md.

Sinapsis Ultralytics

The package provides templates for training, inference, validation, and exporting models with Ultralytics. It includes:

  • UltralyticsTrain: Template for training Ultralytics models.
  • UltralyticsVal: Template for validating Ultralytics models.
  • UltralyticsPredict: Template for generating inference predictions with trained models.
  • UltralyticsExport: Template for exporting models to deployment-ready format.

For specific instructions and further details, see the README.md.

🌐 Webapp

The webapps included in this project demonstrate the modularity of the templates, showcasing the capabilities of various object detection models for different tasks.

[!IMPORTANT] To run the app, you first need to clone this repository:

git clone git@github.com:Sinapsis-ai/sinapsis-object-detection.git
cd sinapsis-object-detection

[!NOTE] If you'd like to enable external app sharing in Gradio, export GRADIO_SHARE_APP=True

[!NOTE] Agent configuration can be changed through the AGENT_CONFIG_PATH env var. You can check the available configurations in each package configs folder.

[!NOTE] When running the app with the D-FINE model, it defaults to a confidence threshold of 0.5, uses CUDA for acceleration, and employs the nano-sized D-FINE model trained on the COCO dataset. These settings can be customized by modifying the demo.yml file inside the configs directory of the sinapsis-dfine package and restarting the webapp.

🐳 Docker

IMPORTANT This docker image depends on the sinapsis-nvidia:base image. Please refer to the official sinapsis instructions to Build with Docker.

  1. Build the sinapsis-object-detection image:
docker compose -f docker/compose.yaml build
  1. Start the app container:
  • For D-FINE:
docker compose -f docker/compose_apps.yaml up sinapsis-dfine-gradio -d
  • For RF-DETR:
docker compose -f docker/compose_apps.yaml up sinapsis-rfdetr-gradio -d
  • For Ultralytics Inference:
docker compose -f docker/compose_apps.yaml up sinapsis-ultralytics-inference -d
  • For Ultralytics Training:
docker compose -f docker/compose_apps.yaml up sinapsis-ultralytics-train -d
  1. Check the logs:
  • For D-FINE:
docker logs -f sinapsis-dfine-gradio
  • For RF-DETR:
docker logs -f sinapsis-rfdetr-gradio
  • For Ultralytics Inference:
docker logs -f sinapsis-ultralytics-inference
  • For Ultralytics Training:
docker logs -f sinapsis-ultralytics-train
  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 url can be different, check the output of logs.

  1. To stop the app:
docker compose -f docker/compose_apps.yaml down
💻 UV

To run the webapp using the uv package manager, follow these steps:

  1. Create the virtual environment and sync the dependencies:
uv sync --frozen
  1. Install the sinapsis-object-detection package:
uv pip install sinapsis-object-detection[all] --extra-index-url https://pypi.sinapsis.tech
  1. Run the webapp:
  • For D-FINE:
uv run webapps/detection_demo.py
  • For RF-DETR:
export AGENT_CONFIG_PATH=packages/sinapsis_rfdetr/src/sinapsis_rfdetr/configs/rfdetr_demo.yml
uv run webapps/detection_demo.py
  • For Ultralytics Inference:
uv run webapps/inference_app.py
  • For Ultralytics Training:
uv run webapps/training_app.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 URL may vary; check the terminal output for the correct address.

📙 Documentation

Documentation for this and other sinapsis packages 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.

Metadata

Release files for sinapsis-object-detection 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinapsis-object-detection 0.4.3
File Size Uploaded
sinapsis_object_detection-0.4.3.tar.gz 46.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-object-detection 0.4.3
File Interpreter ABI Platform
sinapsis_object_detection-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 104.4 kB

Release files / sinapsis_object_detection-0.4.3.tar.gz

Download URL sinapsis_object_detection-0.4.3.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
39bc4483e9271e29d7688e3f7df525f4bee1dc4cacb6532d77c8ef8ef51a234f
BLAKE2b-256 checksum
How to use checksums
a58b6476bacc548c959cbd61f48726844f8c717653f5f27b77986fa2080b93b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release files / sinapsis_object_detection-0.4.3-py3-none-any.whl

Download URL sinapsis_object_detection-0.4.3-py3-none-any.whl
Size 57.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10b1ac79864d5fba0e118f0c611ba5ea24ca40fb5176697c97eb86d605529354
BLAKE2b-256 checksum
How to use checksums
5cca83bd1c207ee1a3dc1547caca94959e29b5d81e8489ecba3d9edbfe981e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page