Object Detection (D-FINE)
This function block performs real-time object detection on images using a configurable D-FINE model. It is designed for easy visual inspection and filtering of detected objects, letting you balance speed and accuracy through simple UI controls.
π₯ Inputs (sockets)
Image
Provide the image you want to analyze. Accepts color or grayscale images.
π€ Outputs (sockets)
Result
Annotated image with bounding boxes and labels (if Draw Boxes is enabled).
Boxes
List of bounding box coordinates for each detection (format: [x1,y1,x2,y2]).
Labels
List of detected class names for each detection.
Scores
List of confidence scores for each detection.
πΉοΈ Controls
Model
Choose the D-FINE model size. Options trade off speed vs. accuracy (examples: Nano β fastest, Small β balanced, XLarge β best accuracy).
Select Classes
Pick which object classes to keep. If none selected, the block will report all detected classes.
Draw Boxes
Toggle visualization of bounding boxes and labels on the output image.
Score Thresh
Set the confidence threshold (0β100) used to filter detections. Higher values reduce low-confidence detections.
π― Features
Multiple model sizes for speed/accuracy tuning via the
Modelcontrol.Class filtering so you only receive results for classes that matter to your scenario.
Optional on-image visualization using the
Draw Boxescontrol with clear color-coded boxes and labels.Outputs provide both visual feedback (
Result) and structured data (Boxes,Labels,Scores) for downstream processing.
π How to use
Provide an image into the
Imagesocket.Choose a model with
Modeldepending on your performance needs.Optionally pick specific classes using
Select Classesto reduce irrelevant detections.Set
Score Threshto filter out low-confidence detections.Enable
Draw Boxesif you want a visual preview on theResultoutput.Use the outputs (
Boxes,Labels,Scores) to drive further logic or logging.
π What happens when it runs
When executed, the block analyzes the provided image and returns: an annotated preview image (optional), a list of bounding boxes, the corresponding class names, and confidence scores filtered by the chosen threshold and selected classes.
π‘ Tips and Tricks
For visual checks, connect the
Resultoutput to the Show Image block to preview detections in a larger viewer (use the Show Image block).If the input images are very large, add Image Resizer or Image Resizer block before this block to speed up inference and reduce memory usage.
For small or distant objects, try higher-accuracy models (select via
Model) but expect slower processing. For live or low-latency applications prefer faster models like Nano or Small.To focus detection on a region, crop the input with Image ROI Select or Image ROI before feeding the image. This reduces false positives and speeds up detection.
If you want to track detections across frames, send
Boxes/Labelsto Object_Detection_Tracker to obtain stable IDs and tracking history.For clearer visuals or multi-step pipelines, route
Resultinto Draw Detections or into Image Logger / Image Write to save annotated frames for audits.Combine with Image Resizer and Blur/Contrast blocks for preprocessing to improve detection stability under difficult lighting or noisy scenes.
π οΈ Troubleshooting
No detections: lower the
Score Threshslightly and ensure the object class is included inSelect Classes. Also verify the input image is clear and focused.Many false positives: increase the
Score Threshand restrictSelect Classesto the classes you care about. Cropping the area of interest with Image ROI Select also helps.Slow performance or high memory use: pick a smaller
Model, reduce image size with Image Resizer, or skip visualization by turning offDraw Boxes.Inconsistent detections across frames: use Object_Detection_Tracker to stabilize results and obtain persistent IDs.
If you need to preserve results for later review, connect Boxes/Labels/Scores to logging or export blocks such as Image Logger, Image Write, or CSV Export.
Last updated
Was this helpful?