Ultimate Image Processing APP : Batch Cropping, Zooming In, Resizing, Duplicate Image Removing, Face Extraction, SAM 2 and Yolo Segmentation, Masking for Windows, RunPod, Massed Compute and Free Kaggle Account
🕑 Added 2025-01-19 23:38:33 +0000 UTCInstallers and APP is shared here with instructions : https://www.patreon.com/posts/120352012
APP : https://www.patreon.com/posts/120352012
We have 1-Click installer for Windows, Massed Compute and a Free Kaggle Notebook. Read this post extremely carefully to learn how to use all
Video Tutorial : Hopefully coming soon
Screenshots and How To Use : how_to_use_screenshots.zip
-
Ultimate Batch Image Processing Gradio APP by SECourses
Use Windows_Start_App.bat to start this APP
This APP has the following features. Please look at the full screenshots to understand how it works exactly
Image Cropper
This TAB is extremely useful to zoom in and crop the subjects
It supports YOLO Segmentation and also state of the art Grounded SAM 2
With Grounded SAM 2 you can use any keyword to mask / segment and zoom in subjects like person, ear, lips, tanks, cars, t-shirt, etc.
How this tab works is that you enter your desired aspect ratios - enter your desired resolutions here so that it will generate accurate folder names for batch image resize
After finding the subject in processed image like person, it gets it. And then it starts to expand it in the least possible amount to reach your desired aspect ratio like cropping 1920x1080 image into 1024x1024 aspect ratio with subject focus being person
Then it saves these images with full resolution with crop / zoom in into given folder
The folder structure is extremely important so look very carefully and read the screenshot images - it shows all
This processing will never cut / remove any part of the subject so it won't reach desired aspect ration in every case, the Image Resizer tab will cut the image and obtain desired aspect ratio and resolution exactly
This tab is fully multi-threaded and supports running on multiple GPU as well
Image Resizer
This is the second stage of processing images but of course can be used standalone as well
Give the Output Folder of the image cropping processing
It will then look for subfolders with the exact same names of your desired target resolutions
E.g. you want your images to be 1024x1024 pixel then it will look sub folder named as 1024x1024
Again look at the screenshots very carefully to understand how it works
This tab will crop / cut subject as well to reach the desired target aspect ratio and then it will downscale the image into the desired resolution
When cutting body parts of human, it will focus on face and will not part the direction of the image that contains the face
You can also use Resize without cropping (center image and add white background) option as well
This tab is fully multi-threaded and it runs on CPU
Move Low-Res Files
WIP not tested yet but should be working
Rename Files
WIP not tested yet but should be working
Extract Faces
With this tab you can extract faces from given folder
It will automatically find the face in given image and save it into desired folder
You can also set positive or negative padding depending on your requirement
This tab is fully multi-threaded
Find Duplicates
This tab is extremely useful to find duplicate images in given folder and move them to the target folder
It supports following algorithms and default parameters working decent:
aHash (Average Hash) : How it works: Calculates the average color of the image, then creates a hash based on whether each pixel is brighter or darker than the average.
dHash (Difference Hash): How it works: Similar to aHash but compares the difference in brightness between adjacent pixels.
pHash (Perceptual Hash): How it works: Uses the Discrete Cosine Transform (DCT) to focus on low-frequency components, making it robust to minor changes.
wHash (Wavelet Hash): How it works: Uses Wavelet transform to capture image details at different scales.
ColorHash: How it works: Creates a hash based on the color histogram of the image.
KAZE: How it works: Detects and describes local features in images using non-linear scale spaces, making it robust to scale, rotation, and some level of viewpoint change.
Multi-Hash: How it works: Combines multiple hashing algorithms (aHash, dHash, pHash, wHash, ColorHash, KAZE) to improve overall accuracy.
This tab is fully multi-threaded and it was super hard to code this one as multi-threaded
SAM 2 Batch Segmentation Gradio APP by SECourses
Use Start_Segmenter.bat to start this APP
It is built upon Grounded-SAM-2
This APP is super important to decide your subject finding / masking prompt and Box Threshold and Text Threshold
After finding parameters, you can use them in your Batch Processing APP with SAM 2 prompting box instead of YOLO
It will automatically save every Mask and Segmented Image into outputs folder
It supports fully folder Batch Processing as well
It is fully multi-threaded and supports multi-GPU as well, it was really hard to code in Python
Look and read the screenshots very carefully to learn how to use it
You can use generated Masks in training like in Kohya training as well

Comments
Furkan Gözükara
i didnt understand. can you make a small video of problem and send me it?
cool1
In the batch segment option, if it doesn't find the thing to create a mask for eg. "man." or "woman." at the moment it just doesn't output the image with the mask for that image but couldn't you allow it to still output the image even then and put no white area (masked area) - just black in it, that way it should work better for frame sequences from a video. Otherwise it can be harder to sync the masked frames if there's less of them in the output than in the input batch (because it didn't see the object to be masked sometimes).
Furkan Gözükara
ok i just fresh installed on a different computer that has the following requirements and works perfect 0 issues. so please follow every step of this video and its source patreon post : https://www.youtube.com/watch?v=DrhUHnYfwC0&ab_channel=SECourses
Furkan Gözükara
if you are getting errors there is only 1 reason. you didnt follow this tutorial properly (requirements : https://youtu.be/DrhUHnYfwC0 ). it also has pre-compiled GroundDINO for python 3.10 . i am installing it on a new machine right now to test again
JustDrwIt
Endless errors with this, and at least 50% of everything I try to install from this Patreon. GroundDINO missing, and there's not a suitable version
James Whayman
I suppose it would be a bit long-winded to set-up initially. If I was to do it I'd probably use the webhooks Patreon makes available (https://docs.patreon.com/#webhooks) and use subscription status changes to trigger invite emails or remove users, based on the user's email address - maybe n8n for that. There might already be an integration someone has built for it, which would be ideal. Anyway pontentially a lot of work for some minor QoL improvements.
Furkan Gözükara
ok but how subscribers will access to that repo?
Furkan Gözükara
thank you will look into that
James Whayman
I was thinking that each project you create would be on a private Git repository, on Github for example, if you make any updates you can just commit the changes to the repo and make a new release. That way subscribers can pull from the repo without having to re-download new zip files for each update.
Dmitry
Thank you for the amazing app! I have already enjoyed the previous version and now the new version is ready. Could you add a buttons or drop-down list for selecting Aspect Ratio? So that users don't need to write them down manually every time.
Furkan Gözükara
hi do you know how it can work with private repos? i never made it. like i can add a variable to bat file it can fetch from private repo?
James Whayman
Hey Furkan, any chance of making your resources available as private git repos for subscribers? It would be great just to pull the latest versions rather than downloading fresh zip files for new releases. Thanks for your hard work!
Furkan Gözükara
yes it is next hopefully. first will show how to use in SwarmUI and then how to train with Kohya GUI
Furkan Gözükara
yes it is next hopefully. first will show how to use in SwarmUI and then how to train with Kohya GUI
Hybridizer
I was just wondering the same thing... ;)
Mathilde Leroux
Any HunyuanVideo guides?