Roboflow Plugin
Object detection using Roboflow's hosted inference API for vision-agents.
Installation
uv add "vision-agents[roboflow]"
# or directly
uv add vision-agents-plugins-roboflow
Quick Start
from vision_agents.plugins import roboflow
from vision_agents.core import Agent
# A Roboflow processor for cloud inference and
# pre-trained models from Roboflow Universe https://universe.roboflow.com/.
processor = roboflow.RoboflowCloudDetectionProcessor(
api_key="your_api_key", # or set ROBOFLOW_API_KEY env var
api_url="https://detect.roboflow.com", # or set ROBOFLOW_API_URL env var
model_id="football-players-detection-3zvbc/20",
classes=["player"],
conf_threshold=0.5,
fps=3,
)
# You can also use a Roboflow processor with local inference and RF-DETR models.
processor = roboflow.RoboflowLocalDetectionProcessor(
model_id="rfdetr-seg-preview",
conf_threshold=0.5,
classes=["person"],
fps=3,
# You can pass a custom model as "model" parameter here.
# The model must be an instance of `rfdetr.RFDETR()` class.
# model=MyRF_DETRModel()
)
# Use in an agent
agent = Agent(
processors=[processor],
llm=your_llm,
# ... other components
)
Full Example
See example/roboflow_example.py for a complete working example with a video call agent that uses Roboflow detection.
RoboflowCloudDetectionProcessor Configuration
model_id: Roboflow Universe model id. Example -"football-players-detection-3zvbc/20".api_key: Roboflow API key. If not provided, will useROBOFLOW_API_KEYenv variable.api_url: Roboflow API url. If not provided, will useROBOFLOW_API_URLenv variable.conf_threshold: Confidence threshold for detections (0 - 1.0). Default -0.5.fps: Frame processing rate. Default -5.classes: an optional list of class names to be detected. Example -["person", "sports ball"]Verify that the classes a supported by the given model. Default -None(all classes are detected).annotate: if True, annotate the detected objects with boxes and labels. Default -True.dim_background_factor: how much to dim the background around detected objects from 0 to 1.0. Effective only whenannotate=True. Default -0.0(no dimming).client: an optional custom instance ofinference_sdk.InferenceHTTPClient.
RoboflowLocalDetectionProcessor Configuration
-
model_id: identifier of the model to be used. Available models are: "rfdetr-base", "rfdetr-large", "rfdetr-nano", "rfdetr-small", "rfdetr-medium", " rfdetr-seg-preview". Default -"rfdetr-seg-preview". -
conf_threshold: Confidence threshold for detections (0 - 1.0). Default -0.5. -
fps: Frame processing rate. Default -10. -
classes: optional list of class names to be detected. Example:["person", "sports ball"]Verify that the classes a supported by the given model. Default -None(all classes are detected). -
annotate: if True, annotate the detected objects with boxes and labels. Default - True. -
dim_background_factor: how much to dim the background around detected objects from 0 to 1.0. Effective only whenannotate=True. Default -0.0(no dimming). -
model: optional instance ofRFDETRModelto be used for detections. Use it provide a model of choosing with custom parameters.
Testing
# Run all tests
pytest plugins/roboflow/tests/ -v
# Run specific tests
pytest plugins/roboflow/tests/test_roboflow.py -v
Dependencies
vision-agents- Core frameworknumpy>=2.0.0- Array operationsrfdetr>=1.3.0- RF-DETR models for local object detectioninference-sdk>=0.26.1- Roboflow SDK for cloud inference
Links
Metadata
Release files for vision-agents-plugins-roboflow 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vision_agents_plugins_roboflow-0.6.9.tar.gz | 11.6 kB | Without provenance | Details for vision_agents_plugins_roboflow-0.6.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vision_agents_plugins_roboflow-0.6.9-py3-none-any.whl | Python 3 | none | any | Details for vision_agents_plugins_roboflow-0.6.9-py3-none-any.whl |
Total release size: 24.4 kB
Release files / vision_agents_plugins_roboflow-0.6.9.tar.gz
| Download URL | vision_agents_plugins_roboflow-0.6.9.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ca882afb3b0429b383af27958ba669caa5594e3b9bbd3000804700291a21347
|
|
BLAKE2b-256 checksum How to use checksums |
62c354a9f14add378d64dc880151bca06227129d2908379c8fe376a692d7a325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vision_agents_plugins_roboflow-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_roboflow-0.6.9-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b446d8f1ff978a82c9c4356fa5952169dc8d58ac18f82d1ffd1fc42aba07f16a
|
|
BLAKE2b-256 checksum How to use checksums |
f5909a39a8dcc11dc7cfd2ec507e4e1e14556488b347ab4b5263f798c900c66e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for vision-agents-plugins-roboflow 0.6.9
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.