Mono repo with packages for inference and training with object detection models
Project description
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
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
Change the name of the package for the one you want 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
Change the name of the package accordingly.
[!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 training and inference with the D-FINE model, enabling advanced object detection tasks. It includes:
- DFINETraining: A template that implements the training pipeline for the D-FINE model, including logic for initializing configurations, downloading weights, and setting up the training solver.
- DFINEInference: A template designed for performing inference on a set of images using the different D-FINE architectures available.
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 thedemo.ymlfile inside theconfigsdirectory of thesinapsis-dfinepackage 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.
- Build the sinapsis-dfine image:
docker compose -f docker/compose.yaml build
- Start the app container:
docker compose -f docker/compose_apps.yaml up sinapsis-dfine-gradio -d
- Check the status:
docker logs -f sinapsis-dfine-gradio
- The logs will display the URL to access the webapp, e.g.:
NOTE: The url can be different, check the output of logs
Running on local URL: http://127.0.0.1:7860
- To stop the app:
docker compose -f docker/compose_apps.yaml down
💻 UV
To run the webapp using the uv package manager, please:
- Create the virtual environment and sync the dependencies:
uv sync --frozen
- Install the sinapsis-object-detection package:
uv pip install sinapsis-object-detection[all] --extra-index-url https://pypi.sinapsis.tech
- Run the webapp:
uv run webapps/detection_demo.py
- The terminal will display the URL to access the webapp, e.g.:
NOTE: The url can be different, check the output of the terminal
Running on local URL: http://127.0.0.1:7860
📙 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sinapsis_object_detection-0.1.0.tar.gz.
File metadata
- Download URL: sinapsis_object_detection-0.1.0.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b265699d0f21b7d1135a1f7e3afd7362ccb344a8728592b41d1d7e8276aa5bc7
|
|
| MD5 |
38d0010469008b3a0ef12738de9ec617
|
|
| BLAKE2b-256 |
701d200a9fc7fdaa26c99bfeaa4dc96d52c074764cf83211c81ed246a447af32
|
File details
Details for the file sinapsis_object_detection-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sinapsis_object_detection-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2add8fd63b58e9d7447b666bc97c0fbd61ee2bd1cbb482e0f36116030638216d
|
|
| MD5 |
ade2c8d0af1fa021314fdee66127144d
|
|
| BLAKE2b-256 |
334db53409b2b238d2f406975dbdb51280a1e380488ef674bfa6f2919ffc4e8c
|