Object Detection

This function block is designed to detect specific objects in an image using a YOLOv4-based object detection model. Users can select the object class they wish to detect and set a confidence threshold for the detection process.

πŸ“₯ Inputs

Image Any The input image in which objects will be detected.

πŸ“€ Outputs

Image Any The output shows the modified image with detected objects highlighted by rectangles.

Object Count This output returns the total number of detected objects in the input image.

Object Center Locations Returns the center points of the detected objects, with the ability to track multiple detections.

Object Sizes (w, h) The sizes of detected objects represented by their widths and heights.

Rectangles Coordinates of rectangles that bound the detected objects, allowing for multiple detections.

πŸ•ΉοΈ Controls

Confidence Threshold % A slider to adjust the confidence threshold for detections. Adjusting this value helps filter out less certain detections.

Select Detection Class A dropdown menu to choose the specific object classes to be detected from the available options.

🎨 Features

Multiple Detection Classes Users can select from predefined classes, such as "All", "Human", "Animals", "Indoor", and "Outdoor".

Dynamic Confidence Adjustment The threshold slider allows for real-time adjustments to the sensitivity of the detection algorithm.

Comprehensive Outputs Multiple outputs giving detailed feedback about detected objects, including image modifications, counts, and bounding rectangle information.

πŸ“ Usage Instructions

  1. Connect Input: Attach an image containing potential objects to the input.

  2. Select Class: Choose a desired class from the Select Detection Class dropdown to specify what the object detection algorithm should search for.

  3. Set Confidence: Adjust the Confidence Threshold % slider to set how confident the model should be to consider an object detected.

  4. Evaluate: Run the block to perform object detection. The modified image and detection results will be provided as outputs.

πŸ“Š Evaluation

When executed, this function block analyzes the input image for the presence of the selected objects, returning modifications of the original image along with quantitative detection data.

πŸ’‘ Tips and Tricks

Choosing Detection Class

Selecting a specific class (like "Animals" or "Human") can significantly reduce false positives, making the detection process more reliable.

Adjusting Confidence Threshold

Lowering the confidence threshold allows for detecting more objects but may introduce false detections. It's a good idea to find a balance based on your specific use case.

Using with Other Blocks

This function block works well in combination with other image processing blocks such as Image ROI or Image Threshold to prepare the image before detection.

Performance Optimization

If running detection in real-time, consider reducing input image size before connecting to this block for faster processing.

πŸ› οΈ Troubleshooting

No Detections

If no objects are detected, ensure valid input images are used and adjust the confidence threshold. You may also want to check if the selected detection class has overlaps with the objects in the image.

Slow Processing Speed

When detecting objects in larger images, consider resizing the image or using a lower-resolution input, which can significantly speed up detection times.

Last updated