DFINEInference
Python template · sinapsis_dfine.templates.dfine_inference
Overview
Template designed to perform object detection inference on images using D-FINE.
This template handles the entire inference workflow: configuring the model and processor, processing the images from the container, running the model on them, postprocessing the model's outputs and saving the annotations.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-dfine==1.0.0uv pip install sinapsis-dfine==1.0.0uv add sinapsis-dfine==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
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
Example from the Python docstring:
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: DFINEInference
class_name: DFINEInference
template_input: InputTemplate
attributes:
model_path: ustc-community/dfine-small-coco
batch_size: 16
threshold: 0.5
device: cudaShow schema-based configuration skeleton
templates:
- template_name: "DFINEInference"
class_name: "DFINEInference"
attributes:
device: "auto"
threshold: "<required>"
batch_size: 8
model_path: "ustc-community/dfine-nano-coco"
model_cache_dir: "/home/ariel/.cache/sinapsis"
Inheritance
sinapsis_dfine.templates.dfine_base.DFINEBaseEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.