Object Detection (D-FINE)
This function block performs real-time object detection with configurable model size, class filtering, confidence threshold and optional visualization. Use it to detect and localize common objects in images and feed detection results to downstream blocks for tracking, logging or visualization.
π₯ Inputs
Image The input image to be analyzed. Accepts color or grayscale images.
π€ Outputs
Result Annotated image with color-coded bounding boxes. Appears when Draw Boxes is enabled.
Boxes List of bounding box coordinates for each detection.
Labels List of detected class names as text strings.
Scores Confidence scores for each detection.
πΉοΈ Controls
Model Size Choose model size to trade off speed and accuracy (examples: Nano / Small / Medium / Large / XLarge). Smaller models run faster; larger models give better localization.
Select Classes Choose which object classes to detect. If no classes are selected, all available classes are considered.
Draw Boxes Toggle whether the output image should show drawn bounding boxes and labels.
Threshold Adjust the confidence threshold (0β100%) used to filter detections. Higher values produce fewer, more confident detections.
π― Key Features
Multiple model sizes to balance latency and detection quality.
Class-level filtering to focus on only the objects you care about.
Confidence thresholding for precision control.
Built-in, easy-to-read visualization with colored boxes and text labels.
Uses available hardware acceleration when possible for faster inference.
π How to Use
Provide an image to the
Imageinput.Select a
Model Sizeappropriate for your environment (fast vs accurate).Optionally pick specific classes via
Select Classesto reduce false positives and speed up processing.Set
Thresholdto control detection sensitivity. Start around 30 and adjust up or down.Toggle
Draw Boxesto preview detections on theResultoutput.
π What the Block Does
When run, the block analyzes the incoming image, returns detected bounding boxes, their labels and confidence scores, and optionally produces a visualization image with boxes and label text.
π‘ Tips and Tricks
If your input images are very large and processing is slow, add the
Image Resizeblock before this block to reduce image size and increase throughput.For small, low-resolution images, try the
Super Resolutionblock before detection to improve recognition rates.To visualize results in the UI, connect this block to the
Show Imageblock or enableDraw Boxesand view theResultoutput.For multi-frame workflows where you want to track detections over time, feed
BoxesandLabelsoutputs into theObject_Detection_Trackerblock.Save detection images or examples using
Image LoggerorImage Writeto build datasets or for debugging.Export detection metadata (labels, scores, positions) using
Data to JSONorCSV Exportfor reporting or downstream systems.If you only care about specific areas, crop with
Image ROIorImage ROI Selectbefore detection to reduce false positives and speed up processing.
π οΈ Troubleshooting
No detections: try lowering the
Thresholdand/or selecting fewer classes to broaden matching. Also check input image quality; considerSuper Resolutionor better lighting.Too many false positives: increase the
Thresholdand restrictSelect Classesto relevant classes only.Slow performance: choose a smaller
Model Sizeor addImage Resizeto reduce input resolution. If a GPU is available, ensure it is enabled in your environment for faster processing.Visuals missing: ensure
Draw Boxesis enabled to get theResultannotated image, or connect outputs toShow Imageto preview.
Last updated