abhinavsagar / pedestrian-detection

Pedestrian Detection using Non Maximum Suppression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pedestrian-detection

Pedestrian Detection using Non Maximum Suppression

Citing

If you find this code useful in your research, please consider citing the blog:

@misc{sagarpedestrian,
  Author = {Abhinav Sagar},
  Title = {Pedestrian detection using Non Maximum Suppression algorithm},
  Year = {2019},
  Journal = {Towards Data Science},
}

Check out the corresponding medium blog post https://towardsdatascience.com/pedestrian-detection-using-non-maximum-suppression-b55b89cefc6.

Environment and tools

  1. scikit-learn
  2. scikit-Image
  3. numpy
  4. opencv
  5. nms
  6. argparse

Non Maximum Suppression

History of Oriented Gradients(HOG) combined with Support Vector Machines(SVM) have been pretty successful for detecting objects in images but the problem with those algorithms is that they detect multiple bounding boxes surrounding the objects in the image. Hence they are not applicable in our case that is detecting pedestrians on crowded roads. Here's where Non maximum suppression(NMS) comes to rescue to better refine the bounding boxes given by detectors. In this algorithm we propose additional penalties to produce more compact bounding boxes and thus become less sensitive to the threshold of NMS. The ideal solution for crowds under their pipelines with greedy NMS is to set a high threshold to preserve highly overlapped objects and predict very compact detection boxes for all instances to reduce false positives.

To execute

python run.py -i sample_images/p2.jpg

Results

References

  1. https://arxiv.org/abs/1904.03629

  2. https://www.frontiersin.org/articles/10.3389/fnbot.2018.00064/full

  3. https://www.cs.cmu.edu/~efros/courses/LBMV07/Papers/leibe-cvpr-05.pdf

  4. https://www.vision.ee.ethz.ch/publications/papers/proceedings/eth_biwi_01126.pdf

License

MIT License

Copyright (c) 2019 Abhinav Sagar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Pedestrian Detection using Non Maximum Suppression

License:MIT License


Languages

Language:Python 100.0%