HAAR LBP HOG Pedestrian Detection with OpenCV
HAAR LBP HOG pedestrian detection is not a trivial task, especially if you want to perform it on ARM devices. Before using the following cascades read carefully this page to get the best performance and to know the terms of usage.
*NEWS*: since June 2016 vision-ary project joined ARGO Vision, an innovative firm that excels in visual recognition. For inquiry about cascades and more, please contact ARGO Vision.
The following freely available cascades largely outperform the OpenCV built-in HOG detector and the HAAR cascades included in OpenCV. Take a look to the next clip to see a demonstration (91% our cascade precision vs. 51% OpenCV).
In black: manually marked persons.
In green: detections that are considered correct.
In red: detections considered incorrect (false positives).
Full frontal/rear (with partial profiles) pedestrian detector, trained with:
- approx. 47,000 positive samples (randomly sampled)
- approx 1.1B of negative sub-regions containing outdoor and indoor samples (80%-20%)
- Training size w=26 h=74 (aspect ratio ~1:3)
- Features set: 97.200 features
- Training time: ~4 days
- TP: ~ 94.51% of positive training set
- FN: ~ 05.49% of positive training set
- FP: ~ 6.8e-006% of negative training set
HOG: (contact us)
- Features set (approx.) : 100 features
- Training time: ~3 days
- TP: ~ 93.87% of positive training set
- FN: ~ 06.13% of positive training set
- FP: ~ 1e-006% of negative training set
For more info about OpenCV cascades take a look to the introduction on hyper-fast HAAR, LBP, HOG cascades in OpenCV
Hi, I’m a Phd. candidate in KAIST.
I’m working on a detection system suitable for on-vehicle condition. I’ve tried LBP cascade above. It worked really fine, but it seems there is a bug in OpenCV LBP Cascade. The minimum object size doesn’t seems to work well.
Therefore I’m planning to work on with hog descriptor. Will it be possible? If it’s possible please send me the xml file to cmiller2air@kaist.ac.kr . It will be really grateful.
Also, if it’s possible can I also get LBP feature for the vehicle? Since I’m working on on-vehicle camera, vehicle is also one of my research interest. It will be a great opportunity if I can try experiments on vehicle.
Thank you.
Sincerely, Jungyu Kang
Hello Jungyu,
thansk for the feedback, I appreciate my cascade is helping your research.
For what concerning the minimum size, you should provide to me further information. What does it means “The minimum object size doesn’t seems to work well.” ? No detections at all, poor performance, too slow?
For what concerning the HOG cascade a similar one is inside a commercial project, I’m not planning to share it for free until I will close this project.
As noticed in the terms of usage, if you use my cascade in research project please cite this site as source. No commercial usage is allowed without our written permission.
Regards,
Vision-ary team.
Hello Alessandro,
I’m using your LBP cascade for people detection, for a course project. I have to say that the results are largely outperforming the OpenCV built-in HOG detector and the HAAR cascades included in OpenCV. We are getting around 85% precision and 60% recall on some datasets taken from low height (30 cm) – from the camera of a Turtlebot robot.
I wanted to know, if possible, what preprocessing are you doing on the training set, so as to do the same. Right now we are blurring a little and equalizing histogram.
Thanks for sharing your great work.
Regards,
Pablo
Hello Pablo,
thanks for the report!
At the moment we consider our training pre-processing strategical to remain close to the state of the art, we will not disclose any further details on this page. If your project will become commercial in the next months we will interact to find an agreement (or to start a new training with better performance, the cascades on this site are “spares”, not the best ones we have), please send us an email by the contact form.
Regards,
Vision-ary team
Well, that is totally ok and understandable. We are not planning to go further with this project, but well, one never knows. You remain as a reference to us for future work!
Again, thanks team for sharing your work.
Keep it up!
Thanks for your feedback!
Do you have any clip we can show to other users or any web resource to link within this website?
Regards,
Vision-ary team.
It happened that the HOG parameters were wrong, and after corrections the HOG detector using the Default model was better than any cascade. We had optimized the parameters according to the F0.5 measure, that priorizes precision over recall. We could see that your cascade has good recall rates, so maybe our grouping threshold was too thight just because precision.
HOWEVER, it remains true that your cascade outperforms the cascades included in OpenCV. For example, we could get 91% precision and 51% recall with yours but only 51% precision and 9% recall with haarcascade_fullbody.xml. This comparison is just changing the cascade, keeping the other parameters the same. Again, we could have swept the grouping threshold in order to have more recall for that cascade, but anyway it was already outputting more false positives than yours, and relaxing the threshold would just have increased the false positives.
Notes: a good ammount of our images include incomplete persons. Our test sets are not very diverse in colors, clothes, ambiance, lighting, etc. We have marked persons if they were more than 50% visible. Reflections on glossy floor or doors were sometimes detected, as well as shadows on walls.
Some images and videos can be found over here: https://github.com/GERUNSJ/deteccion-de-personas-con-turtlebot-y-opencv-1/tree/master/resultados
More videos (Haar cascade, this LBP cascade and HOG detector) with more info here: https://www.youtube.com/watch?v=mL0oSrWRbu4&list=PLsvvKr5lc8GL_7z07W-cz3wgEu_0JelXX
And more info (in Spanish) if useful for any reader: https://github.com/GERUNSJ/deteccion-de-personas-con-turtlebot-y-opencv-1/raw/master/informe_Aguado_Emder.pdf
Thanks again for sharing your work.
Pablo
It happened that the HOG parameters were wrong, and after corrections the HOG detector using the Default model was better than any cascade. We had optimized the parameters according to the F0.5 measure, that priorizes precision over recall. We could see that your cascade has good recall rates, so maybe our grouping threshold was too thight just because precision.
HOWEVER, it remains true that your cascade outperforms the cascades included in OpenCV. For example, we could get 91% precision and 51% recall with yours but only 51% precision and 9% recall with haarcascade_fullbody.xml. This comparison is just changing the cascade, keeping the other parameters the same. Again, we could have swept the grouping threshold in order to have more recall for that cascade, but anyway it was already outputting more false positives than yours, and relaxing the threshold would just have increased the false positives.
Notes: a good ammount of our images include incomplete persons. Our test sets are not very diverse in colors, clothes, ambiance, lighting, etc. We have marked persons if they were more than 50% visible. Reflections on glossy floor or doors were sometimes detected, as well as shadows on walls.
Some images and videos can be found over here: https://github.com/GERUNSJ/deteccion-de-personas-con-turtlebot-y-opencv-1/tree/master/resultados
More videos (Haar cascade, this LBP cascade and HOG detector) with more info here: https://www.youtube.com/watch?v=mL0oSrWRbu4&list=PLsvvKr5lc8GL_7z07W-cz3wgEu_0JelXX
And more info (in Spanish) if useful for any reader: https://github.com/GERUNSJ/deteccion-de-personas-con-turtlebot-y-opencv-1/raw/master/informe_Aguado_Emder.pdf
Thanks again for sharing your work.
Thank you for sharing with us, I conceive this website really stands out :D.
Very nice article, just what I needed.
Hi Vision-ary team,
I am a student of electronic and computer engineering and I would like to know if you can share the LBP and HOG with me to use it in my research.
Thanks and best regards
Felipe.
Hi Vision-ary team
I am a MS student in UCSD.I am working on a remotely controled surveillance camera project. But this project require pedestrain recognization in automatic mode. You’ve done a quite awesome job. Could you please share your LBP xml file with me. Sincerely thank you! My email address is uestczhangchi@163.com.
Cheers
Chi.
Hello Chi,
thanks for your support!
We will contact soon by email 🙂
Hey,
Thanks for the usefull information! I would like to receive the XML files as we are a group of Msc students trying to detect pedestrians. This is a vital part of our research which concerns automatic driving, if a pedestrian is detected the car needs to brake, therefor a perfect detection of pedestrians is much appreciated!
Hello,
This looks great. I am currently working on a project to autonomously navigate a robot in the school hallways. I would like to use the LBP classifier. Could you please email me the XML file at jaspal.singh62@myhunter.cuny.edu
Thank You
Hi,
for my final thesis I love to use your eye LBP classifier. Could you please email me the xml-file to my email: bernardoluck@outlook.com
Thanks again for sharing your work!
Hello!
I am a graduate student and learning computer vision. Could I get your LBP and HOG detector? Do you also have the code to test TP, FN, FP?
Thank you so much!
Hi! Firstly, great work with the human body detection. I am currently working on a research project to add a mesh on a human body in real time. It would be really helpful if you could share the xml file for your LBP classifier as it can turn out to be an essential part of my project and save a lot of time? You could email it to me at vinay5395@gmail.com.
Thanks!
Hello Vinay,
sorry for the delay in replying to you, we had some issue with spam filtering. Now the blog is again fully working!
Do you still need for the human body cascade? If so, please feel free to contact us via e-mail 🙂
Regards,
Vision-ary Team.
Hello,
I have downloaded you xml files that are available in github page. I am implementing cascade classifier using provided functions of OpenCV in python.
As far as I know, there is no difference loading xml files using opencv in different programming languages because we use OpenCv library.
Currently, I am loading xml file using cv2.CascadeClassifier, but I get error (“input file is empty”). I looked at your source code that is implemented in C++. Also, I have experience of working with OpenCV in C++. xml files can be used in both programming languages python and C++. But I receive error.
I appreciate help me to solve the problem because I am in hurry to implement pedestrian detection using deep net models and non-deep models. I am going to use for my research project at university.
Thank you very much.
can i get the trained xml for HOG
Hello Adil,
send a request by the contact form, please