Skip to main content

Retico Roboflow Detection Transformer Module

A ReTico module for RfDeTr that works with Roboflow's detection models. The webcam captures the user information, which passes through the model and outputs the name of the detectable object. The model contains two different types of constructors, one using the original RfDeTr and another using the new Hugging Face model. The native RfDeTr is recommended due to its reliability compared to the current Hugging Face model.

Installation and requirements

  • Install retico_core: pip install git+https://github.com/retico-team/retico-core.git
  • Install the retico-rfdetr: pip install retico-rfdetr

Modules

RFDETRModule (Native RF-DETR)

Uses Roboflow's rfdetr package. Recommended for real-time webcam use.

Model options: nano, small, medium, large

Segmentation model options: nano, small, medium, large

Arguments:

  • model : Model size to use, defaults to small
  • pretain : Path to custom checkpoint, defaults to COCO weights
  • use_seg : Segmentation model variation, defaults to False
  • show : Displayable output window, defaults to False
  • threshold : Confidence threshold, default to 0.25

HFRFDETRModule (HuggingFace RF-DETR)

Uses HuggingFace transformers to load RF-DETR models from the Roboflow HuggingFace.

Detection model options: medium, large

Segmentation model options: medium, large

Arguments:

  • model : Model size to use, defaults to small
  • pretain : Path to custom checkpoint, defaults to COCO weights
  • use_seg : Segmentation model variation, defaults to False
  • show : Displayable output window, defaults to False
  • threshold : Confidence threshold, default to 0.25

Example

Utilizing the original RfDeTr model

import os, sys

os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
prefix = "/path/to/prefix/"

sys.path.append(prefix + "retico-core")
sys.path.append(prefix + "retico-vision")
sys.path.append(prefix + "retico-rfdetr")

from retico_core import *
from retico_core.debug import DebugModule
from retico_vision.vision import WebcamModule
from retico_rfdetr.rfdetr import RFDETRModule

rfdetr = RFDETRModule(model="large", pretrain=None, use_seg=True, show=True)
webcam = WebcamModule()
debug = DebugModule(print_payload_only=True)

webcam.subscribe(rfdetr)
rfdetr.subscribe(debug)

print(f"RFDETR Model running")

webcam.run()
rfdetr.run()
debug.run()

input()

webcam.stop()
rfdetr.stop()
debug.stop()

Utilizing the Hugging Face RfDeTr model

import os, sys

os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
prefix = "/path/to/prefix/"

sys.path.append(prefix + "retico-core")
sys.path.append(prefix + "retico-vision")
sys.path.append(prefix + "retico-rfdetr")

from retico_core import *
from retico_core.debug import DebugModule
from retico_vision.vision import WebcamModule
from retico_rfdetr.hfrfdetr import HFRFDETRModule

rfdetr = HFRFDETRModule(model="large", use_seg=True, show=True)
webcam = WebcamModule()
debug = DebugModule(print_payload_only=True)

webcam.subscribe(rfdetr)
rfdetr.subscribe(debug)

print(f"RFDETR Model running")

webcam.run()
rfdetr.run()
debug.run()

input()

webcam.stop()
rfdetr.stop()
debug.stop()

Metadata

Release files for retico-rfdetr 0.1.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 retico-rfdetr 0.1.0
File Size Uploaded Provenance Actions
retico_rfdetr-0.1.0.tar.gz 15.7 kB Without provenance Details for retico_rfdetr-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for retico-rfdetr 0.1.0
File Interpreter ABI Platform Actions
retico_rfdetr-0.1.0-py3-none-any.whl Python 3 none any Details for retico_rfdetr-0.1.0-py3-none-any.whl

Total release size: 30.3 kB

Release files / retico_rfdetr-0.1.0.tar.gz

Download URL retico_rfdetr-0.1.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9658c58e5077830c04a82d758f8ff6fa96c4384fe708df10d833331761c33fd1
BLAKE2b-256 checksum
How to use checksums
ce69bf59b77ac8df81fce05121e6f5e2d23dd55dd02c5e5f0f996c67de938059
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / retico_rfdetr-0.1.0-py3-none-any.whl

Download URL retico_rfdetr-0.1.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0fbd17f17f4626a9b222169426b078fbf7f0da98fc187f293a3b6087263b29f
BLAKE2b-256 checksum
How to use checksums
63d948919f498b03b17897718eb92a6dec393ce0aa146c9c04861fc82d73f9e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for retico-rfdetr 0.1.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.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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