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

  1. Provide an image to the Image input.

  2. Select a Model Size appropriate for your environment (fast vs accurate).

  3. Optionally pick specific classes via Select Classes to reduce false positives and speed up processing.

  4. Set Threshold to control detection sensitivity. Start around 30 and adjust up or down.

  5. Toggle Draw Boxes to preview detections on the Result output.

πŸ“Š 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 Resize block before this block to reduce image size and increase throughput.

  • For small, low-resolution images, try the Super Resolution block before detection to improve recognition rates.

  • To visualize results in the UI, connect this block to the Show Image block or enable Draw Boxes and view the Result output.

  • For multi-frame workflows where you want to track detections over time, feed Boxes and Labels outputs into the Object_Detection_Tracker block.

  • Save detection images or examples using Image Logger or Image Write to build datasets or for debugging.

  • Export detection metadata (labels, scores, positions) using Data to JSON or CSV Export for reporting or downstream systems.

  • If you only care about specific areas, crop with Image ROI or Image ROI Select before detection to reduce false positives and speed up processing.

πŸ› οΈ Troubleshooting

  • No detections: try lowering the Threshold and/or selecting fewer classes to broaden matching. Also check input image quality; consider Super Resolution or better lighting.

  • Too many false positives: increase the Threshold and restrict Select Classes to relevant classes only.

  • Slow performance: choose a smaller Model Size or add Image Resize to reduce input resolution. If a GPU is available, ensure it is enabled in your environment for faster processing.

  • Visuals missing: ensure Draw Boxes is enabled to get the Result annotated image, or connect outputs to Show Image to preview.

Last updated