How can I find the recognition rate of my face recognition program and plot a graph?
조회 수: 1 (최근 30일)
이전 댓글 표시
I am doing a project on face recognition using sparse representation. I am getting a desired output. Now,I want to calculate the recognition rate and plot a graph or a histogram. How can I do it?
댓글 수: 0
채택된 답변
John D'Errico
2015년 3월 18일
I'm a bit confused. You have a set of images, some with faces, some with none. You run your program on each. It tells you if and where the face was. You can then verify if it was right.
The recognition rate is simply the number of times your code recognized a face that was there.
There would also be false positive rates, so the fraction of times it saw a face and there was none to be found at that location in that image.
And finally, you would care about a false negative rate, so the fraction of times it missed a face that was there.
But all of these things are simply a ratio: number of events divided by total number of images. So what is the problem?
As for a plot, I'm not sure what you want to plot, but I would think a bar chart of those rates would be of minor interest.
help bar
댓글 수: 3
John D'Errico
2015년 3월 19일
For each image, you know if it has a face (or faces) and where they are, or if there are none. So count the events. Pencil and paper will suffice.
Of those 400 images, some should have faces, some should not, otherwise you are not running a fair test. And some of those images that lack a face, should still have something that is in some way, close to a face. Again, if not, then you are not testing your algorithm. So an image should have a roughly round patch that might be flesh colored, or nearly so. So an image with a pastel pinkish balloon in it would be one good test. An image with a picture of an ape of some sort. Your test set should contain pictures of men with beards, etc.
As for how to take the ration, a ratio is one number divided by another. What is the problem here?
falsePositiveRate = (number of faces seen that were not there)/...
(number of images with no faces)
falseNegativeRate = (number of faces not seen, when there was a face to be seen)/...
(number of images with a face in them)
추가 답변 (3개)
Image Analyst
2015년 3월 19일
You want to construct an "ROC curve". See Wikipedia for more info: http://en.wikipedia.org/wiki/Receiver_operating_characteristic
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174018/image.png)
댓글 수: 3
Image Analyst
2015년 3월 20일
Sorry, I don't have any ROC Curve programs. Maybe you can look in the File Exchange. I think that one of the toolboxes has ROC stuff in it but I don't remember which one - maybe Statistics?
Ragavendran Govindaraj Rangaraj
2015년 3월 30일
I need the same plot. Did you find the way ?, if so please try to help me I have totally 35 set of images and I have run the algorithm and I have taken FNR, FPR, I don't know how to plot the graph.
Meghna Ramsnehi
2017년 2월 26일
I'm doing PCA, i have done implementing algorithm. but i'm confused with plotting this ROC curve. had anyone got that? Can anyone help. Please revert soon.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!