A batch face similarity sorting Gradio APP that utilizes DeepFace library - Extremely useful to sort AI generated images according to their
Patreon exclusive posts index to find our scripts easily, Patreon scripts updates history to see which updates arrived to which scripts and amazing Patreon special generative scripts list that you can use in any of your task.
Join discord to get help, chat, discuss and also tell me your discord username to get your special rank : SECourses Discord
Please also Star, Watch and Fork our Stable Diffusion & Generative AI GitHub repository and join our Reddit subreddit and follow me on LinkedIn (my real profile)
=======
Latest zip file : sort_by_similarity_v9.zip
Installer updated and errors fixed
New option Use Best Match (Minimum Distance) added
Printed messages on CMD significantly improved
Multi-threading logic improved
GPU usage logic improved
Now supports RTX 5000 series GPUs too
Now you can sort sub folders too
This APP is based on DeepFace
It is fully multi-threaded and higher batch size increase your processing speed
Make sure to have accurately installed CUDA and cuDNN for TensorFlow library to use your GPU or else it will be ultra slow
It uses minimal amount of VRAM so should work on every GPU pretty much
What this APP does is that, it takes source images folder, target images folder and optionally extracted faces folder
Then it calculates every target image similarity / distance to the source images individually (if multiple source images used it averages them) and at the end sort all target images according to their similarity / distance
When you use more than 1 image in source images folder, it will sort according to the average of the source images but be careful it will increase processing time linearly since each image compared with each target image
If few images gives error at first run, you can run again and it usually fixes error occurred images - i am still not sure why this happens - probably related to DeepFace library
This app can be extremely useful to sort AI generated images according to the original training images to get the best ones comparatively
The images in target folder will be renamed as the followings
Image_Similarity_Rank - Image_Similarity_Score - Older File Name
e.g. image_rock.png will become 33 - 0.55 - image_rock.png
33 is similarity rank, 0.55 is its distance (lesser is more similar)
Following DeepFace models supported but I didn't test them except Facenet512 which is best

Python 3.10, FFmpeg, CUDA 12.4, cuDNN 8.9 and 9.4+ (I am using 9.7 atm), C++ tools and Git
If it doesn't work make sure to below tutorial and install everything exactly as shown in this below tutorial
It should work with above version of CUDA 12.4 and cuDNN 8.9 but haven't tested
First watch above requirements tutorial and follow every step
Extract zip archive into a drive like c:/face_sort
Longer directory path causes issues
Double click and install with Windows_Install.bat and that is it
Then run with Windows_Start_App.bat to start Similarity Sorter SECourses APP
And follow above and below attached screenshot
Please register via this link : https://vm.massedcompute.com/signup?linkId=lp_034338&sourceId=secourses&tenantId=massed-compute
We have a special coupon for all GPUs : SECourses
If you want to learn more about GPUs and prices read this link : https://www.patreon.com/posts/126671823
Select RTX A6000 or Better GPU - like L40S or A6000 ADA or A100 or H100
Then select our image SECourses from Creator dropdown
Then follow Massed_Compute_Instructions_READ.txt
Same as my any other Massed Compute installer script
Example tutorial for learn how to install and use Massed Compute
(Starts at 12:58) : https://youtu.be/KW-MHmoNcqo?si=G1WbG-Qw4ujWvOtG&t=778
Please register via this link : https://get.runpod.io/955rkuppqv4h
Then follow Runpod_Instructions_READ.txt
Same as my any other RunPod installer script
Use the template written in Runpod_Instructions_READ.txt file
Example tutorial for learn how to install and use RunPod
(starts at 22:03) : https://youtu.be/KW-MHmoNcqo?si=QN8X8Sjn13ZYu-EU&t=1323



Hockey
2025-07-25 13:33:55 +0000 UTCHockey
2025-07-22 21:06:20 +0000 UTCHockey
2025-07-22 20:32:11 +0000 UTCHockey
2025-07-22 18:01:21 +0000 UTCFurkan Gözükara
2025-06-23 16:23:34 +0000 UTCHockey
2025-06-23 16:20:51 +0000 UTCFurkan Gözükara
2025-06-18 12:15:12 +0000 UTCHockey
2025-06-18 12:13:38 +0000 UTCFurkan Gözükara
2025-06-17 14:04:47 +0000 UTCMarkus
2025-06-17 05:08:43 +0000 UTCFurkan Gözükara
2025-06-16 22:25:21 +0000 UTCLou
2025-06-16 17:39:29 +0000 UTC