There is someone who can direct me to find a lbp cascade classifier for mouth detection?
I looked for but i didn't found anything. I found only haar files, i want to know if someone have a lbp classifier. Haar classifiers are so slow, decrease of 10 fps in my app using haar. Thank you guys.
Hi #Sandeep sorry i changed my S.O. profile so i haven't seen your question. Anyway yes! I managed with classifiers in last times. I can give you a good address.
I worked with haar cascade-classifiers the process is very simple but you need a lot of training data!
Basically you'll need a set of positive samples(that includes the Object that you want to scan) and a set negative samples(that NOT contains the object that you want to scan).
EXAMPLE:
Supposing you want to scan potholes using opencv and an haar cascade-classifier:
you'll need a set of images of streets that contains potholes(positive samples) and a set of image of streets that NOT contains potholes(negative samples).
I leave you a link that helped me so much: http://www.academia.edu/9149928/A_complete_guide_to_train_a_cascade_classifier_filter
This example uses a GitHub project i here's the link: https://github.com/sauhaardac/Haar-Training
Hope to be helpful, bye :D
Related
The problem statement:
Given two images such as the two images of Brad Pitt below, figure out if the image contains the same person or no. The difficulty is that we have only one reference image for each person and what to figure out if any other incoming image contains the same person or no.
Some research:
There are a few different methods of solving this task, these are
Using color histograms
Keypoint oriented methods
Using deep convolutional neural networks or other ML techniques
The histogram methods involve calculating histograms based on color and defining some sort of metric between them and then deciding upon a threshold. One that I have tried is the Earth Mover's Distance. However this method is lacking in accuracy.
The best approach therefore should be some sort of mix between 2nd and 3rd methods, and some preprocessing.
For preprocessing obvious steps to perform are:
Run a face detection such as Viola-Jones and separate the regions containing faces
Convert the said faces to grayscale
Run eye,mouth,nose detection algorithms perhaps using haar_cascades of opencv
Align the face images according found landmarks
All of this is done using opencv.
Extracting features such as SIFT and MSER generate accuracy of between 73-76%. After some additional research I've come across this paper using fisherfaces. And the fact that opencv has now the ability to create fisherface detectors and train them is great and works fantastically, achieving the accuracy promised by the paper on the Yale datasets.
The complication of the problem is that in my case I don't have a database with several images of the same person, to train the detector on. All I have is a single image corresponding to a single person, and given another image I want to understand whether this is the same person or no.
So what I am interested in knowing is`
Has anyone tried anything of the sort? What are some papers/methods/libraries that I should look into?
Do you have any suggestions on how to tackle problem?
Since you have only one image, you can give this method using DLib a try. I have used 3-4 images per person and it is giving good results.
Detect face (sample_face)
Get face descriptor (128 D vector) using dlib compute_face_descriptor (Check link)
Get the new picture in which you want to recognise the face
detect face and compute the descriptor(lets call test_face).
Compute euclidean distance between test_face descriptor and all sample_faces descriptor
assign the test_face with class(person name) with least euclidean distance.
Give this a whirl, you can play with face aligning if you start getting good results.
This is one of the hot topic for computer visin area. To handle as you have written there are many kind of solutions are available.
But i suggest to look OpenFace which has very high accuracy. There is a implementation of that project at Github.
Thanks
You need to understand that machine learning doesn't work that way, there are intensive training carried out before your model can give some good results.
with the single image of a person you just cannot predict that its the same person, cause you need to train your model over different images of the person under different light intensities, angles and many other varying scenarios.
Still i would like to try this link :
http://hanzratech.in/2015/02/03/face-recognition-using-opencv.html
you may find some match for the image atleast.
So what I am interested in knowing is` Has anyone tried anything of
the sort?
Yes. This is 2017 and facial recognition has been researched for decades.
What are some papers/methods/libraries that I should look into?
Anything google throws at you searching "single image/sample face recognition"
Do you have any suggestions on how to tackle problem?
See above
Extracting features such as SIFT and MSER generate accuracy of between 73-76%.
I doubt humans, who's facial recognition is unmatched perform much better with only 1 image as reference. I mean I couldn't tell for sure if that's Brad Pitt or if one is just a look-alike and I have seen him on houndreds of pictures and hours of movies...
I need a collection of sample images to train a Haar-based classifier for plate detection.
I know this question has been asked already, but the source on googlecode is dead.
http://tutorial-haartraining.googlecode.com/svn/trunk/data/negatives/
Where to get background sample images for haar training?
Where to get negative sample images for Haar training?
Maybe this one?
https://github.com/handaga/tutorial-haartraining/tree/master/data/negatives
It says
Automatically exported from code.google.com/p/tutorial-haartraining
I know this is quite old but for those of you who are Reading this and want to know more about how to get more negative and positive images, I suggest you check out Image Net and also This to know how to use it.
Happy Training.
I'm trying to track cars using video from dash cam. Most of the time there is
slight shifting of a vehicle in front of me
on/off brake lights
zoom in when it uses brakes
Zoom out when it accelerates.
What algorithm will be the best for this case? Of course, I can just run open cv, but I want to understand how it works.
Thank you!
I think that for your task you can use the Haar Cascade Classifier. It is a machine learning based approach where a cascade function is trained from a lot of positive and negative images. It is then used to detect objects in other images.
There is a good openCV's implementation, with both the trainer and the detector.
On the web you can even find a lot of .xml files, that are the result of the training part, and use these .xml files to do directly the detection.
Even if i'm not really sure that you can find these files for the detection of the back of a car.
At this link you can learn the bases of the method and you can even understand how to use it in openCV http://docs.opencv.org/master/d7/d8b/tutorial_py_face_detection.html#gsc.tab=0
In this case you don't need the 4 features that you suggested, but maybe you can use that with another algotrithm at the end of the pipeline of the Haar Cascade Classifier for a double check.
I'm new in haar cascade and i would like to know if it is possible to detect children faces by using adult faces as positive samples, or it will need children faces for the positive samples?
You can use adult's face HAAR without problem unless target contains some very little kids(only few days old :P ). All the basic features for kids and adults are same.
And if you are going to make your own HAAR, you can yourself add kids faces also. There shall not be any additional effort. Be sure to cover wide varieties.
PS: Also, You don't need train or make haar for yourself. You can use some-one else' haar and use them directly. OpenCV has one as an example at
/path/to/opencv/data/haarcascades/haarcascade_frontalface_default.xml
You can download more sophisticated haar online. Here is a link:
alereimondo.no-ip.org/OpenCV/34
I assume you have code to execute over this or you can get easily online.
Happy Coding :)
I want to train a new haar-cascade for glasses as I'm not satisfied with the results I'm getting from the cascade that is included in OpenCV.
My main problem is that I'm not sure where to get eyeglasses images. I can manually search and download, but that's not practical for the amount of images I really need. I'm specifically looking for images of people wearing eyeglasses.
As this forum contain many experienced computer vision experts, I hope someone here can guide as to how to obtain images for training.
I'll also be happy to hear other approaches for detecting eyeglasses (on people).
Thanks in advance,
Gil
If you simply want images, it looks like #herhuyongtao pointed you to a good place. Then you can follow opencv's tutorial on training.
Another option is to see what others have trained:
There's a trained data set found here that might be of use, which states simply that it is "better". I'm assuming that it's supposed to be better than opencv.
I didn't immediately see any other places for trained or labeled data.