Extend opencv haar-cascade detector to filter detections with Non-Maxima Suppression (NMS)
OpenCV Haar cascade with Non-Maxima Suppression
This simple project provides a
Detector class extending the opencv
CascadeDetectorclass with a new function:
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
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 ressources).
Here the NMS shipped with OpenCV is used.
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 detailled documentation.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for haar_cascade_nms-1.1.0-py3-none-any.whl