Geronymos / Koh

Replace your appearance with that of thousands of people 👤🤳 🔃 👥👥
GNU General Public License v3.0
7 stars 1 forks source link

Improve face-matching algorithm #2

Open Geronymos opened 3 years ago

Geronymos commented 3 years ago

How it works now

Now the faces are matched by calculating the average distance fom a point of the webcam-face to a point of a face of the dataset. This goes on for every point in the face and every face in the dataset. This list of distances then get sorted. The first result (with least distance) gets choosen as a match.

Problem

The sorting may need a lot of time. After we have the match with the least distance, we do not need the other faces in the list.

Solution

Replace the sort-function with replace or even just use a variable and set it if the new comparison has a smaller distance than the one that is in the function.

Geronymos commented 3 years ago

This is linked to #3. The debbunging might show that the sorting may not make a big difference.