RFDETRInference
Python template · sinapsis_rfdetr.templates.rfdetr_inference
Overview
A class that handles the inference process for the RFDETRBase model on a batch of images.
This class extends the `RFDETRModelBase` class and is responsible for processing a `DataContainer` holding image packets, running inference on each image, and updating the annotations with the model's predictions.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-rfdetr==1.0.0uv pip install sinapsis-rfdetr==1.0.0uv add sinapsis-rfdetr==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: null
A threshold for the confidence score used to filter the model's predictions. Default is 0.5.
Optional
Default: 0.5
Optional
Default: null
Optional
Default: true
Optional
Default: "cuda"
Optional
Default: "dinov2_windowed_small"
Optional
Default: 16
Optional
Default: 8
Optional
Default: true
Optional
Default: 3
Optional
Default: 13
Optional
Default: 256
Optional
Default: true
Optional
Default: 300
Optional
Default: 14
Optional
Default: 560
Optional
Default: 90
Optional
Default: 300
Optional
Default: 4
Optional
Default: true
Optional
Default: 2
Optional
Default: ["P4"]
Optional
Default: "rf-detr-base.pth"
Optional
Default: [2,5,8,11]
Optional
Default: true
Optional
Default: false
Optional
Default: 37
The file path to a JSON file containing annotations. If provided, this file will be used to map class IDs to labels.
Optional
Default: ""
Configuration example
Example from the Python docstring:
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: RFDETRInference
class_name: RFDETRInference
template_input: InputTemplate
attributes:
threshold: 0.5
model_params:
resolution: 560
pretrain_weights: 'path/to/checkpoint'Show schema-based configuration skeleton
templates:
- template_name: "RFDETRInference"
class_name: "RFDETRInference"
attributes:
threshold: 0.5
model_params:
amp: true
device: "cuda"
encoder: "dinov2_windowed_small"
ca_nheads: 16
sa_nheads: 8
two_stage: true
dec_layers: 3
group_detr: 13
hidden_dim: 256
layer_norm: true
num_select: 300
patch_size: 14
resolution: 560
num_classes: 90
num_queries: 300
num_windows: 4
bbox_reparam: true
dec_n_points: 2
projector_scale: ["P4"]
pretrain_weights: "rf-detr-base.pth"
out_feature_indexes: [2, 5, 8, 11]
lite_refpoint_refine: true
gradient_checkpointing: false
positional_encoding_size: 37
annotations_path: ""
Inheritance
sinapsis_rfdetr.templates.rfdetr_model_base.RFDETRModelBaseEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.