Skip to main content

Extend opencv haar-cascade detector to filter detections with Non-Maxima Suppression (NMS)

Project description

OpenCV Haar cascade with Non-Maxima Suppression

This simple project provides a Detector class extending the opencv CascadeDetectorclass with a new function: detectAndFilter.
This function performs the detection using the cascade and filter the detections based on the score and their overlap to yield the best detections that do not overlap above the selected overlap-threshold.

For more details about Non-Maxima Suppression, you can refer to my article about Multi-Template Matching, which uses a similar strategy (or other online resources).
Here the NMS shipped with OpenCV is used.

Installation

Using pip:
pip install haar-cascade-nms

Then to use in your scripts:

from haarcascade import Detector
myDetector = Detector(filepathToCascade)
myDetector.detectAndFilter(image, etc...)

See the tutorial notebook for a more detailed documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for haar-cascade-nms, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size haar_cascade_nms-1.1.1-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size haar-cascade-nms-1.1.1.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page