Skip to main content

OpenDetect

PyPI version Python versions Documentation Status License: Apache-2.0

OpenDetect header

Open-source object detection for production Python applications.
Commercial-use friendly. Python API + CLI.

opendetect gives you one consistent interface for modern ONNX detectors across CPU and accelerated runtimes.

Why OpenDetect

  • Unified API across detector families
  • Runtime-aware acceleration with ONNX Runtime
  • Stable OpenCV/NumPy-first workflow for real video/image pipelines
  • Built-in model registry, auto-download, and caching
  • First-class CLI for inference, benchmarking, and model management

Install

pip install opendetect

Optional extras:

pip install "opendetect[cpu]"
pip install "opendetect[gpu]"
pip install "opendetect[tensorrt]"

Quickstart (Python)

import cv2
from opendetect import Detector

detector = Detector(model="rfdetr-m")

image = cv2.imread("input.jpg")
detections = detector.predict(image, color="bgr")
annotated = detector.annotate(image, detections, color="bgr")

cv2.imwrite("output.jpg", annotated)

File helpers:

from opendetect import Detector

detector = Detector(model="yolox-s")
detector.infer_image_file("input.jpg", output_path="output.jpg")
detector.infer_video_file("input.mp4", output_path="output.mp4", max_frames=300)

Quickstart (CLI)

opendetect-infer --image input.jpg --model-id rfdetr-m --output output.png
opendetect-infer --video input.mp4 --model-id yolox-s --tensor-rt --output output.mp4
opendetect-benchmark --model-id rfdetr-l --mode dummy --warmup 20 --iterations 200
opendetect-models list

Runtime Support

OpenDetect uses ONNX Runtime execution providers and selects the best available runtime automatically:

  • CPU
  • CoreML (Apple Silicon / macOS)
  • CUDA
  • TensorRT
  • DirectML
  • OpenVINO
  • ROCm / MIGraphX

TensorRT note:

  • opendetect[tensorrt] installs Python dependencies only.
  • A compatible system TensorRT/CUDA stack is still required.

Model Families

Family Year License
RF-DETR 2026 Apache-2.0
ByteTrack Detector 2022 MIT
RTMDet 2022 Apache-2.0
YOLOX 2021 Apache-2.0

Documentation

Hosted docs:

Full guides are in docs/:

  • Start here: docs/index.md
  • Installation and runtimes: docs/getting-started/installation.md, docs/getting-started/runtimes.md
  • Python and CLI usage: docs/getting-started/python.md, docs/getting-started/cli.md
  • Benchmarks: docs/guides/benchmarks.md

Build docs locally:

pip install -r docs/requirements.txt
make -C docs html

License

Apache License 2.0 (LICENSE).

Metadata

Release files for opendetect 0.2.0

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

Source distribution (sdist)

Source distribution for opendetect 0.2.0
File Size Uploaded Provenance Actions
opendetect-0.2.0.tar.gz 36.3 kB With provenance Details for opendetect-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opendetect 0.2.0
File Interpreter ABI Platform Actions
opendetect-0.2.0-py3-none-any.whl Python 3 none any Details for opendetect-0.2.0-py3-none-any.whl

Total release size: 82.3 kB

Release files / opendetect-0.2.0.tar.gz

Download URL opendetect-0.2.0.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
080438b56ee44b396d1e1c33d6e20973ece67d53ffbc549ff3e8a3a4388793d5
BLAKE2b-256 checksum
How to use checksums
4a8c7988d3ec598de6366d2186133387ffa24918268bdeb84bf924960902159f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / opendetect-0.2.0-py3-none-any.whl

Download URL opendetect-0.2.0-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc2f3e62c376a01cf2ae8a95c90860f97f444d05e9bb4675f91fe8e9358da195
BLAKE2b-256 checksum
How to use checksums
32eef2ba898118099becc7394de0097a1d74a986793c459eb2cc8b97376279a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for opendetect 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for opendetect-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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