Content-Length: 255560 | pFad | http://github.com/opencv/opencv/issues/27467

4E Proposal: ObjectDetection utility class for detection + annotation in OpenCV · Issue #27467 · opencv/opencv · GitHub
Skip to content

Proposal: ObjectDetection utility class for detection + annotation in OpenCV #27467

@MONY-STARK

Description

@MONY-STARK

Describe the feature and motivation

Proposal: Add a Utility Class for Object Detection Inference and Annotation

I propose to add a utility class named ObjectDetection under a new or existing module (e.g., objdetect) in OpenCV that simplifies the pipeline for:

Running object detection using a provided model

Annotating the prediction results on images or video

🎯 Key Features:
Accepts a pre-trained model (OpenCV cv2.dnn, ONNX, PyTorch, etc.)

Accepts image(s) or video stream as input

Automatically handles:

Inference

Drawing bounding boxes

Overlaying class labels and confidence scores

Outputs annotated image or video

🧩 Motivation:
Many users (especially beginners or prototyping engineers) perform object detection and then manually write repetitive code to draw results using OpenCV primitives like cv2.rectangle and cv2.putText. A clean abstraction that integrates model inference and result annotation would:

Improve productivity

Encourage best practices (e.g., consistent styling, confidence thresholding)

Reduce boilerplate code in object detection applications

🏗️ Possible Extension:
Built-in color mapping for labels

Optional saving/display of output

Confidence thresholding

Format-agnostic support (accepting detection outputs from YOLO, SSD, etc.)

I’d love to hear your thoughts on whether this feature aligns with OpenCV’s direction. If approved, I’m happy to begin working on a prototype and PR under guidance.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/opencv/opencv/issues/27467

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy