Object Detection

This function block detects common objects in an image and returns both visual and structured detection results. Use it to locate and count items such as people, vehicles, and many COCO classes. It offers quick configuration for confidence and class selection so you can tailor detection to your scenario.

πŸ“₯ Inputs

  • Image Any This input accepts the image you want to analyze.

πŸ“€ Outputs

  • Image Any Image annotated with detection boxes and labels.

  • Object Count Number of detected objects.

  • Object Center Locations Locations (centers) of detected objects (can be multiple).

  • Object Sizes (w, h) Width/height pairs for each detected object (can be multiple).

  • Object Class Class names for each detected object (can be multiple).

  • Rectangles Bounding rectangle coordinates for each detection (can be multiple).

πŸ•ΉοΈ Controls

  • Confidence Threshold % Slider to set minimum confidence for accepting detections. Raising this will reduce false positives; lowering it may detect more objects but include less certain results.

  • Select Detection Class Dropdown to choose a predefined group of classes (for example: All, Human, Animals, Indoor, Outdoor). Selecting a narrower class group speeds up and focuses detection.

βš™οΈ How it runs

  • When the block runs it processes the incoming image with the internal detector and applies the selected confidence and class filter.

  • The annotated image is returned together with structured outputs: count, center positions, sizes, class names, and rectangle coordinates.

  • If the detector is still loading, the block provides an informative message and waits until the detector is ready before producing results.

🎯 Features

  • Ready-to-use object detection for many common classes.

  • Class-group presets to quickly focus on humans, animals, indoor objects, outdoor objects, or all classes.

  • Annotated visual output plus detailed numeric/structured outputs for automation or logging.

  • Simple controls to balance detection sensitivity and select desired classes.

πŸ“ Usage Instructions

  1. Connect a camera or image source to the Image Any input.

  2. Choose a suitable Select Detection Class preset to limit detection to relevant classes.

  3. Adjust Confidence Threshold % to get the right balance between missing objects and false positives.

  4. Use outputs to drive downstream logic, tracking, visualization, or storage.

πŸ’‘ Tips and Tricks

  • For live camera input use one of the image input blocks such as Camera sources or stream readers to feed the detector: Camera options include Camera USB, Camera IP (ONVIF), Stream Reader, or Load Image for offline testing.

  • To visualize detections in the UI or a dashboard, connect the annotated image output to Show Image or draw overlays with Draw Detections.

  • For tracking objects across frames, feed detection outputs into Object_Detection_Tracker to get stable IDs and trajectories.

  • If you only care about a specific area, crop the input first with Image ROI or Image ROI Select to reduce false detections and improve performance.

  • When working with very large images, use Image Resize or Image Resizer before detection to speed up processing.

  • Save interesting frames or records by piping the annotated image into Image Logger, Multi Image Write, or Record Video when a detection count or specific class appears. Combine with logic blocks (for example, manual Logic Input or threshold checks) to trigger saving only on events.

  • Combine with analysis blocks such as Measure Position Distance or ROI checks like Check Area to build alerts or analytics (for example, count people in a zone or measure spacing).

πŸ› οΈ Troubleshooting

  • If you see too many false positives: increase Confidence Threshold % or narrow Select Detection Class.

  • If detection is slow: resize the input with Image Resize or reduce the number of classes searched by selecting a narrower class group.

  • If the annotated image looks empty but other outputs show detections: verify the display block (for example Show Image) is connected and receiving the annotated image.

Last updated

Was this helpful?