RFDETRLargeInference
Python template · sinapsis_rfdetr.templates.rfdetr_inference
Overview
A class that handles the inference process for the RFDETRLarge model on a batch of images.
This class extends the `RFDETRInference` 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
An instance of `RFDETRLargeConfig` containing the model parameters for initializing the RF-DETR model. If not provided, default parameters from `RFDETRLargeConfig` will be used.
Optional
Default: null
Optional
Default: true
Optional
Default: "cuda"
Optional
Default: "dinov2_windowed_base"
Optional
Default: 24
Optional
Default: 12
Optional
Default: true
Optional
Default: 3
Optional
Default: 13
Optional
Default: 384
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: 4
Optional
Default: ["P3","P5"]
Optional
Default: "rf-detr-large.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: RFDETRLargeInference
class_name: RFDETRLargeInference
template_input: InputTemplate
attributes:
threshold: 0.5
model_params:
resolution: 560
pretrain_weights: 'path/to/checkpoint'Show schema-based configuration skeleton
templates:
- template_name: "RFDETRLargeInference"
class_name: "RFDETRLargeInference"
attributes:
threshold: 0.5
model_params:
amp: true
device: "cuda"
encoder: "dinov2_windowed_base"
ca_nheads: 24
sa_nheads: 12
two_stage: true
dec_layers: 3
group_detr: 13
hidden_dim: 384
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: 4
projector_scale: ["P3", "P5"]
pretrain_weights: "rf-detr-large.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_inference.RFDETRInferenceEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.