W
W
weranda2020-09-17 09:09:34
Image processing
weranda, 2020-09-17 09:09:34

How to group / sort photos by similarity?

Greetings.
There are many photos and for certain purposes I would like to sort them, for example, by color similarity or other visual feature, as if by a smooth gradient, so that you can take several consecutive photos from anywhere in the list and they would be similar to each other.

Let me give you a simple example to understand.
There are photos of cats:
5f62fd40c7da6633076143.png
Sort them and get them sorted by color of cats:
5f62fd546a20a795192380.png
What programs are there for this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Mirilaczvili, 2020-09-17
@2ord

Are you looking for a ready-to - use taxologizer or would you like to create your own?
If the latter, then analyze the images:

  1. find dominant color
    How to find dominant color in opencv?
    https://stackoverrun.com/ru/q/7910222
  2. light level
    https://opencv-python-tutroals.readthedocs.io/en/l...
  3. get a description of the main object with an advanced algorithm
    https://www.pyimagesearch.com/2017/09/11/object-de...

And cluster according to the obtained characteristics.
https://api-2d3d-cad.com/ident_by_color_texture/
https://habr.com/ru/post/321216/

K
kocherman, 2020-09-18
@kocherman

There are simple ways. For example, batch compress all pictures to a resolution of, say, 3x3 or 5x5 pixels (depending on the number of pictures). Then you write out the numbers, first the central pixels, the middle ones, and lastly the extreme ones. Next, convert each pixel from RGB to HSL or HSV, writing the value of each channel to a separate number for each channel. As a result, each picture will correspond to three long numbers by which pictures can be sorted, and they will be similar in color. Pictures where three numbers are the same can be considered similar duplicates. If I wrote not sensibly enough, write a comment, I can chew the algorithm schematically.
UPD I
also remembered the utility for comparing images, included with ImageMagick. Even in the bookmarks, a small guide has been preserved on it . But, at one time I didn’t work with it, because it worked too slowly and the quality of the magic provided was no better than the scripts that I wrote myself. But maybe everything has changed and it's worth trying the tool in action again...

O
Otrivin, 2020-09-18
@Otrivin

The DeepFaceLab package has a batch file that correlates photos by similarity. Works, it seems, through xnView. You can view

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question