Closed deepch closed 3 years ago
One of the obvious question it pops up in my mind is by which terms do you want to compare faces? Object detection at the moment is not possible with Pigo, but is on the track (see https://github.com/esimov/pigo#todo). I'm asking because maybe I can advice you in certain direction.
I work with a video stream. And I get 25 frames per second. In real time The idea is to filter out duplicate faces.
To get just 1 person. I thought to use https://github.com/vitali-fedulov/images
but that doesn't fit. You can try to average the color, but this is also not a good solution.
as I understand it in other projects https://github.com/ageitgey/face_recognition
there are functions that make a hash out of a person, which can then be compared with other people and get the difference.
You need to filter out duplicate faces per frame or to filter out duplicate faces during a certain frame interval?
filter out duplicate faces during a certain frame interval
Ideally, I would like to have a faceDistance function
func faceDistance (face1, face2) int {
compares two faces and returns the identity coefficient precent 0-100
Currently there is no such functionality implemented in Pigo, but the basic "ingredients" are there for making it happen. One way this could be achieved is by combining a few techniques together like delaunay triangulation and face morphing, then we can compare the resulted face with the original one and if the coefficient is below a certain threshold the the two faces could be considered identical. Something like here: https://learnopencv.com/average-face-opencv-c-python-tutorial/. Of course this is a first approach which needs to be analyzed more in depth.
However the best option is still the object detection and description towards I'm focusing right now, by implementing the SURF and/or SIFT methods.
These are however long term objectives, which requires some time for integration, so right now I cannot offer you a working solution for your problem. I will investigate other options and keep you updated with my findings, but I would keep this thread open for suggestions and proposals.
Thank you, thanks to your work!
Please tell me where exactly can I get the data for triangulation? Maybe you have some minimal sample that could guide me?
+1) Write landmark Point []float32
+2) Use PIGO found face
+-3) Encode rect to jpeg ;( and use dlib (slow) found face landmark
+4) Use Avx avx.EuclideanDistance(sampleIlia, current) https://en.wikipedia.org/wiki/Euclidean_distance
it work very slow ;) try use https://github.com/esimov/pigo/blob/master/examples/facial_landmark/flploc.go
It's obvious that using dlib for face detection is way slower, since it relies on C bindings. This is a also the case for the Python example you just pointed out, because it's a C binding.
Regarding your question about triangulation, be aware that there are no working solutions and examples currently available for this feature. The one suggested by me is a possible approach which can be followed. I have developed a tool for triangulating images, this could be a logical approach.
Unfortunately currently I do have a busy period and I could not really focus on this request, but as I mentioned the object detection is the next step.
Tell me what is the format of such files lp38 lp42 lp44 lp46? The idea is how can I add custom mark on the face? maybe there is some kind of convector xml to bin?
These are binary formats. What do you mean by adding custom mark on the face? You mean to have your custom classifier?
I wanted to make the jawlines to build a better comparison model.
I am working on face comparison at the moment but not sure if I will have enough points.
yes, custom classifier
Currently only these facial landmark points are encoded into the cascade binary tree.
But can I take the cascade file from opencv and encode it to a binary format?
I'm afraid not, because they have different structure and by encoding into a binary format would not guarantee that the cascade tree structure would be preserved.
I use a stream of images and one of the tasks is to group faces, could you recommend a method for comparing faces.