G
G
gibsonen2018-07-26 01:07:24
Java
gibsonen, 2018-07-26 01:07:24

How to sort photos by similarity (by faces)?

There are many Java libraries that use neural networks: tensorflow, opencv wrapper, Google Cloud Vision API . For example, recognizing faces is not a problem. I have several photos in my folder and I need to sort them by similarity (for example, by faces). How can I sort them? What library can be used? Can be explained in words.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2018-07-26
@D3Nd3R

To sort by faces, you can apply the following algorithm:
1. Finding a face in the image (take something from the tf detection API or from openCV, there is now YOLOv2 and SSD or haar cascades, maybe something else was added, like there is in dlib something else).
2. Calculation of descriptors (from openCV: sift, surf, etc., although there are neurons specifically for calculating the feature vector for faces, I don’t remember the names).
3. Choice of measure of similarity (Euclidean distance, Hamming distance...).
4. Classification, such as knn, (having previously trained on a sample) or clustering.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question