Algorithm for sorting images by relevance

I am developing a function on the forum site that will allow you to include a link and another type of content in the message (to clarify a question or answer).

In connection with the implementation of the link function, I have a few things to work on:

  • Confirm the entered URI (well-formed, valid scheme, etc.).
  • Confirm that a remote resource exists
  • Retrieving Images from a Remote Page
  • Show the user a set of images and let him choose one

There is a challenge . Before step 4, it would be great to sort this set of images in order of "relevance." I know that this goal is rather ambiguous :-), but I can explain what I experienced with the results in step 4, and you will find out why I am dealing with this solution.

Many times I get things like this in a set of images:

  • Images used for page layout (tiny and useless)
  • Banners and Advertising
  • Image pseudo-duplication (original and modified)
  • Anarchist order of typing (logo in last position, etc.)

I decide to clear this mess by deleting tiny images and sorting them by size, but I know that it will be far from a good solution.

Any ideas on this

Many thanks!

+3
2

( , ), " " - " " .

- ( , ), :

  • ,
  • ( )
  • , ( CDN!) URL-

, (, 8x8 4x4), (er) .

+2

- , - . , .

0

Source: https://habr.com/ru/post/1751904/


All Articles