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.

Source Distribution

haar-cascade-nms-1.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

haar_cascade_nms-1.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file haar-cascade-nms-1.1.1.tar.gz.

File metadata

  • Download URL: haar-cascade-nms-1.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for haar-cascade-nms-1.1.1.tar.gz
Algorithm Hash digest
SHA256 45048e474875df1548fc33e123c4a9a335c70a3a0aed6897f65f766bd0993081
MD5 69171cae46c6fd21629b0d057c66fd92
BLAKE2b-256 feef68bfda45b2b815bf0d1944b14b9cfd43aaddc3250c52dad560520e853927

See more details on using hashes here.

File details

Details for the file haar_cascade_nms-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: haar_cascade_nms-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for haar_cascade_nms-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc50958b77b3641a7d499b09de54180d99631876b8a8a2c8bbcbb1a95f43211e
MD5 c41c9d0eb62bc5c5654f32d4ca5b3319
BLAKE2b-256 ce35e08b65b9fb1e1ae565e3ef1b9660e2717ed869607ee156965f3ddbc37066

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page