CompositeDFINEDemo
Python template · sinapsis_composite_object_detection.templates.composite_dfine_demo
Overview
Base class to dynamically construct sub-agent based templates composed of one or more existing templates.
Individual template base models are also combined into a unified model.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-composite-object-detection==1.0.0uv pip install sinapsis-composite-object-detection==1.0.0uv add sinapsis-composite-object-detection==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: null
Optional
Default: "single"
Optional
Default: false
Optional
Default: {"metadata":null,"overwrite":true,"text_style":{"font":0,"thickness":2,"font_scale":0.5},"draw_confidence":true,"randomized_color":false,"draw_extra_labels":true,"draw_classification_label":false,"text_box_to_border_offset":0.01,"classification_label_position":"top_right"}
Optional
Default: null
Optional
Default: false
Optional
Default: null
Style of font Available options: FONT_HERSHEY_SIMPLEX = 0. FONT_HERSHEY_PLAIN = 1. FONT_HERSHEY_DUPLEX = 2. FONT_HERSHEY_COMPLEX = 3. FONT_HERSHEY_TRIPLEX = 4. FONT_HERSHEY_COMPLEX_SMALL = 5. FONT_HERSHEY_SCRIPT_SIMPLEX = 6. FONT_HERSHEY_SCRIPT_COMPLEX = 7.
Optional
Default: 0
Thickness of font
Optional
Default: 2
Scale of font
Optional
Default: 0.5
Flag to determine confidence value is drawn. Defaults to True
Optional
Default: true
Optional
Default: true
Flag to determine if extra labels are drawn. Defaults to True text_style (TextStyle) = {font=0, font_scale=0.5, thickness=2}: Dictionary of font properties used to draw label text boxes.
Optional
Default: true
Flag to determine if a classification label is drawn on the image. Defaults to False.
Optional
Default: false
Weight to control offset of text box to image border.
Optional
Default: 0.01
Position of the text box for the classification label. Defaults to "top_right".
Optional
Default: "top_right"
Optional
Default: {"device":"cuda","metadata":null,"threshold":0.5,"batch_size":8,"model_path":"ustc-community/dfine-nano-coco","model_cache_dir":"/home/ariel/.cache/sinapsis"}
Optional
Default: "auto"
Optional
Default: null
Required
Default: null
The number of images to process in a single batch. If set to a non-positive value, all images will be processed in one batch. Defaults to 8.
Optional
Default: 8
Optional
Default: "ustc-community/dfine-nano-coco"
Optional
Default: "/home/ariel/.cache/sinapsis"
Configuration example
Generated from documented defaults. Replace any placeholders and complete required nested settings before running.
templates:
- template_name: "CompositeDFINEDemo"
class_name: "CompositeDFINEDemo"
attributes:
agent_mode: "single"
lazy_agent: false
BBoxDrawer_0:
metadata: null
overwrite: false
text_style:
font: 0
thickness: 2
font_scale: 0.5
draw_confidence: true
randomized_color: true
draw_extra_labels: true
draw_classification_label: false
text_box_to_border_offset: 0.01
classification_label_position: "top_right"
DFINEInference_0:
device: "auto"
metadata: null
threshold: "<required>"
batch_size: 8
model_path: "ustc-community/dfine-nano-coco"
model_cache_dir: "/home/ariel/.cache/sinapsis"
Inheritance
sinapsis_sub_agents.templates.composite_template.CompositeTemplateEnvironment variables
Environment definitions belong to their canonical Python modules.