Docs /Templates/ sinapsis-composite-object-detection

CompositeUltralyticsDetect

sinapsis-composite-object-detectionComposite

Python template · sinapsis_composite_object_detection.templates.composite_ultralytics_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 set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-composite-object-detection==1.0.0
uv pip install sinapsis-composite-object-detection==1.0.0
uv add sinapsis-composite-object-detection==1.0.0

Configuration

Effective fields from the inspector schema, including nested Pydantic model fields.

metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
agent_mode
typing.Literal['loop_forever', 'generator', 'single', 'forward']
Optional
Default: "single"
lazy_agent
bool
Optional
Default: false
BBoxDrawer_0
AttributesBaseModel
Optional
Default: {"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"}
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
overwrite
bool
Optional
Default: false
text_style
TextStyle
Optional
Default: null
font

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.

int
Optional
Default: 0
thickness

Thickness of font

int
Optional
Default: 2
font_scale

Scale of font

float
Optional
Default: 0.5
draw_confidence

Flag to determine confidence value is drawn. Defaults to True

bool
Optional
Default: true
randomized_color
bool
Optional
Default: true
draw_extra_labels

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.

bool
Optional
Default: true
draw_classification_label

Flag to determine if a classification label is drawn on the image. Defaults to False.

bool
Optional
Default: false
text_box_to_border_offset

Weight to control offset of text box to image border.

float
Optional
Default: 0.01
classification_label_position

Position of the text box for the classification label. Defaults to "top_right".

typing.Literal['top_left', 'top_right']
Optional
Default: "top_right"
UltralyticsPredict_0
AttributesBaseModel
Optional
Default: {"task":"detect","model":"yolo11s.pt","verbose":false,"metadata":null,"runs_dir":"/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics/runs","model_class":"YOLO","working_dir":"/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics","datasets_dir":"/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics/datasets","predict_params":{"iou":0.7,"conf":0.25,"save":false,"imgsz":640,"bboxes":null,"device":null,"source":"ultralytics/assets","classes":null,"save_txt":false,"agnostic_nms":false},"checkpoint_path":null,"use_detections_as_sam_prompt":false}
task
typing.Optional[typing.Literal['classify', 'detect', 'segment', 'pose', 'obb']]
Optional
Default: null
modelRequired
str | pathlib._local.Path
Required
Default: null
verbose
bool
Optional
Default: false
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
runs_dir
str | pathlib._local.Path
Optional
Default: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics/runs"
model_classRequired
typing.Literal['YOLO', 'YOLOWorld', 'SAM', 'FastSAM', 'NAS', 'RTDETR']
Required
Default: null
working_dir
str | pathlib._local.Path
Optional
Default: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics"
datasets_dir
str | pathlib._local.Path
Optional
Default: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics/datasets"
predict_params

PredictParams containing the parameters required to run inference using an Ultralytics model. If not specified, model predictions will be obtained using default parameters. Detailed description of available predict parameters can be found in: https://docs.ultralytics.com/modes/predict/#inference-arguments

PredictParams
Optional
Default: null
iou
float
Optional
Default: 0.7
conf
float
Optional
Default: 0.25
save
bool
Optional
Default: false
imgsz
int
Optional
Default: 640
bboxes
list[list[float]] | None
Optional
Default: null
device
str | None
Optional
Default: null
source
str | numpy.ndarray | pathlib._local.Path
Optional
Default: "ultralytics/assets"
classes
list[int] | None
Optional
Default: null
save_txt
bool
Optional
Default: false
agnostic_nms
bool
Optional
Default: false
checkpoint_path
str | pathlib._local.Path | None
Optional
Default: null
use_detections_as_sam_prompt
bool
Optional
Default: false

Configuration example

Generated from documented defaults. Replace any placeholders and complete required nested settings before running.

yaml
templates:
  - template_name: "CompositeUltralyticsDetect"
    class_name: "CompositeUltralyticsDetect"
    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"
      UltralyticsPredict_0:
        task: null
        model: "<required>"
        verbose: false
        metadata: null
        runs_dir: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics/runs"
        model_class: "<required>"
        working_dir: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics"
        datasets_dir: "/sinapsis-hub/private/platform/sinapsis-hub/playground/publish/ultralytics/datasets"
        predict_params:
          iou: 0.7
          conf: 0.25
          save: false
          imgsz: 640
          bboxes: null
          device: null
          source: "ultralytics/assets"
          classes: null
          save_txt: false
          agnostic_nms: false
        checkpoint_path: null
        use_detections_as_sam_prompt: false

Inheritance

Immediate parent: sinapsis_sub_agents.templates.composite_template.CompositeTemplate

Environment variables

Environment definitions belong to their canonical Python modules.

No directly related environment variables listed.