I tried this code but what should I do when the person who are not trained, their faces are being recognized forcefully. instead it should be shown "UNKNOWN". so can you please help me out how to avoid that false detection.
My SVM is trying to classify the input face into the trained faces. If you want to add unknown, I suggest you to use “softmax” activation function which return the probability of given face to the trained face. If you give mode the new face, it will return like taylor swift: 0.3 , person B: 0.5. Then you can create conditions that if probability is lower than 0.7 (as example) then it is “unknown”
PLEASE REPLY Very good Video, Thank you for your effort. Make next video on how to stop spoofing so model should not detect faces on images or in videos but only real faces. I have another important question. Can I use Haar Cascade instead of MTCNN for face detection in PART 1? Will it reduce accuracy or have any disadvantages, despite potentially offering better speed than MTCNN? If accuracy will drop if I use Haar Cascade than tell me what should I do as I want to build real world robust face recognition attendance system application for schools, and I don't want to get complaints that software is either not detecting faces or its not recognizing students correctly. In my scenario camera will be on the top of the class's white board and should be able to detect all students of the class from above of the board, class lights may be dimmed or turned of if teacher is teaching using projector.
Dear @abdulrafey, The Haar Cascade accuracy is lower than the MTCNN. Definetely, you can change from MTCNN to Haar Cascade. I believe there are more robust solutions in the github. Check out BlazeFace or Mediapipe library. Use data augmentation before training, or move the input images to normalized space. In fact, it is a bit challenging to make 1 to 10. I hope my response helped you. Have a good day!
Another common issue: Solution: My SVM is trying to classify the input face into the trained faces. If you want to add unknown, I suggest you to use “softmax” activation function which return the probability of given face to the trained face. If you give mode the new face, it will return like taylor swift: 0.3 , person B: 0.5. Then you can create conditions that if probability is lower than 0.7 (as example) then it is “unknown”
Thank you for your video, it's really helpful. I have a question, I trained a model to recognize 2 persons, ex: A and B, and if another appears in front of the webcam, how can my model return "unknown" in this? I look forward to your reply. Thank you so much ^^.
My SVM is trying to classify the input face into the trained faces. If you want to add unknown, I suggest you to use “softmax” activation function which return the probability of given face to the trained face. If you give mode the new face, it will return like taylor swift: 0.3 , person B: 0.5. Then you can create conditions that if probability is lower than 0.7 (as example) then it is “unknown”
My SVM is trying to classify the input face into the trained faces. If you want to add unknown, I suggest you to use “softmax” activation function which return the probability of given face to the trained face. If you give mode the new face, it will return like taylor swift: 0.3 , person B: 0.5. Then you can create conditions that if probability is lower than 0.7 (as example) then it is “unknown”
Bruh I tried executing your method it went really well , but at last i got an error like " global obsensor_uvc_stream_channel.cpp:156 cv::obsensor::getStreamChannelGroup Camera index out of range " how to fix this and bro how to PASS a image as input
getting errors like this please help me WARNING:tensorflow:From C:\Users\AppData\Roaming\JetBrains\PyCharmCE2023.3\light-edit\.venv\Lib\site-packages\keras\src\backend\tensorflow\core.py:174: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead. [ERROR:0@14.564] global obsensor_uvc_stream_channel.cpp:159 cv::obsensor::getStreamChannelGroup Camera index out of range