Batch Image Cropping, Zooming Subject, Resizing, Segmenting, Masking, Duplicate Removing APP that utilizes YOLO V11, SAM 2 and Gradio
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 : Ulti_Img_Process_V24.zip
Screenshots zip file : how_to_use_screenshots.zip
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
Libraries updated to Torch 2.8, CUDA 12.9
With pre compiled xFormers, Flash Attention, Sage Attention and groundingdino
For all of the GPUs starting from RTX 1000 series to 5000 series or Cloud GPUs like A100, B200, etc
Python 3.10, FFmpeg, CUDA 12.9, cuDNN 9.12 or above, C++ tools and Git
If it doesn't work make sure to below tutorial and install everything exactly as shown in this below tutorial
Follow tutorial along with this post : https://www.patreon.com/posts/click-to-open-post-used-in-tutorial-111553210
Image batch resize cancel fixed
Some errors regarding batch processing on Linux fixed
Just extract latest zip file and overwrite older files for update
SAM2 based auto cropping logic significantly improved
Now it will zoom into the maximum degree and leave no empty space
Moreover, auto crop section now have pixel or percent based padding, so if it too agressively zoom in, you can set some padding
If you are processing trasnparency having images, uncheck Save as PNG
Now when Save as PNG is unchecked, it will first convert to JPG and then process thus the processing will have 0 errors
Previously when you auto crop transparent pixels having png files, it wanst working properly
New feature implemented upon request : Skip images with no SAM2 detection
yolov11l-face.pt selection in Select Detection Class (YOLO) was not working and fixed
Default selection of Select Detection Class (YOLO) is now set to person
Just overwrite previous files to upgrade from V20
Face Extraction tab improved and now it uses super fast yolov11l-face.pt
Moreover now it supports all Yolo classes and SAM2 segment as well
So you can extract other than faces as well
All with multi-threading support
Run Windows install again, if you get any error delete venv folder and run install again
A bug in SAM based automatic cropping fixed now should work perfect hopefully
Now app supports RTX 5000 series on RunPod and Massed Compute as well
I have compiled groundingdino for Linux to make this happen
Just overwrite older files with newest zip content to update
Negative prompt feature implemented to SAM 2 Batch Segmentation APP by SECourses
Run Start_Segmenter.bat to start this app
The logic of negative prompt fairly simple
For example positive prompt face.
Negative prompt eye.
So you get face masked with eyes being unmasked
It mask the face, mask the eyes, and subtract eyes from face mask
Negative prompt masks auto saved inside generated_negative_masks folder
Extract newest zip file into previous folder for update
Windows Installer updated to support RTX 5000 series fully
I have compiled xFormers and groundingdino with latest official Torch 2.7 for making this work
Also a new amazing feature Generate Tiled Images implemented
This tiled image generation can be used to improve small details of training subject, especially useful for items, objects, products
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
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
First watch above requirements tutorial and follow every step
Extract zip archive into a drive like c:/ulti_process
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 Ultimate Batch Processing APP
To run Segmentation APP run with Start_Segmenter.bat
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
Register Kaggle for free and verify your phone number : https://www.kaggle.com/
Upload the Kaggle notebook file from downloaded attachments
Follow the instructions on the Kaggle notebook
How to Use Kaggle Notebooks General Tutorial
(Starts at 27:34) https://youtu.be/KW-MHmoNcqo?si=vkKTvWHbZVrn4x7h&t=1654



Furkan Gözükara
2025-09-20 07:29:47 +0000 UTCEverlive
2025-09-20 05:10:40 +0000 UTCFurkan Gözükara
2025-09-04 09:39:23 +0000 UTCLou
2025-09-04 09:28:13 +0000 UTCFurkan Gözükara
2025-08-22 12:51:00 +0000 UTCAleksei Goferman
2025-08-22 08:23:03 +0000 UTCFurkan Gözükara
2025-08-21 09:23:14 +0000 UTCCaleb
2025-08-21 03:17:22 +0000 UTCFurkan Gözükara
2025-07-21 01:15:46 +0000 UTCMig Test
2025-07-18 18:06:49 +0000 UTCFurkan Gözükara
2025-07-11 11:48:53 +0000 UTCcool1
2025-07-11 11:06:41 +0000 UTCFurkan Gözükara
2025-07-11 01:58:50 +0000 UTCScipio
2025-07-11 01:55:15 +0000 UTCFurkan Gözükara
2025-07-10 23:55:11 +0000 UTCT. Scott Thompson
2025-07-10 23:24:51 +0000 UTCFurkan Gözükara
2025-07-10 22:56:04 +0000 UTCError_404_unknown
2025-07-10 14:51:57 +0000 UTCFurkan Gözükara
2025-07-05 13:19:56 +0000 UTCOleh 23
2025-07-05 12:53:11 +0000 UTCFurkan Gözükara
2025-05-29 15:34:18 +0000 UTCcool1
2025-05-29 09:14:00 +0000 UTCFurkan Gözükara
2025-05-11 23:28:09 +0000 UTCDan
2025-05-11 15:02:19 +0000 UTCFurkan Gözükara
2025-05-07 21:41:58 +0000 UTCMig Test
2025-05-05 16:44:37 +0000 UTCFurkan Gözükara
2025-05-01 21:28:26 +0000 UTCFurkan Gözükara
2025-05-01 21:28:04 +0000 UTCEnjoyerOfAll
2025-04-30 03:05:25 +0000 UTCHipno
2025-04-29 16:45:15 +0000 UTCFurkan Gözükara
2025-04-27 23:51:58 +0000 UTCHüseyinT
2025-04-27 23:31:59 +0000 UTCFurkan Gözükara
2025-04-27 01:22:00 +0000 UTCFirat Güven
2025-04-25 16:39:06 +0000 UTCEungbin Seo
2025-04-24 13:43:58 +0000 UTCEungbin Seo
2025-04-24 13:43:29 +0000 UTCFurkan Gözükara
2025-03-30 23:15:57 +0000 UTCValentyn Shumakher
2025-03-30 22:36:20 +0000 UTCFurkan Gözükara
2025-01-30 14:30:35 +0000 UTCCasper Smit
2025-01-30 10:18:14 +0000 UTCTobe2d
2025-01-23 23:41:33 +0000 UTCFurkan Gözükara
2025-01-23 21:28:58 +0000 UTCTobe2d
2025-01-23 20:59:44 +0000 UTCFurkan Gözükara
2025-01-23 13:33:48 +0000 UTCMathiasF
2025-01-23 08:09:31 +0000 UTCFurkan Gözükara
2025-01-22 09:41:45 +0000 UTCAlex
2025-01-22 08:54:23 +0000 UTCFurkan Gözükara
2025-01-22 01:37:09 +0000 UTCTobe2d
2025-01-21 18:41:06 +0000 UTCFurkan Gözükara
2025-01-20 09:24:02 +0000 UTCFurkan Gözükara
2025-01-20 09:23:28 +0000 UTCFurkan Gözükara
2025-01-20 09:12:19 +0000 UTCMichele Di Pasquale
2025-01-20 08:41:52 +0000 UTCMathiasF
2025-01-20 08:10:35 +0000 UTCRoland
2025-01-20 02:25:14 +0000 UTC