SOTA Subject Cropper and Face Focused Image Resizer Scripts Do Better Training (Patreon)
Downloads
Content
Join discord and tell me your discord username to get a special rank : SECourses Discord
12 January 2024 Update
- Broken auto cropper fixed and updated to latest libraries
- 12_Jan_2024_auto_cropper
25 November 2023 Update
- Resizer updated to 25_Nov_2023_resizer
16 November 2023 Update:
- Face resizer will extract only faces.
- Resize is optional
13 November 2023 Huge Update:
- Re-download resize_images_v4 .zip file
- Do a fresh install into a new folder - so GPU support will be enabled
- Now supports GPU as well. GPU is like 3x faster than 13900K CPU
- Save as PNG option added as a boolean parameter. Default set to False
30 October 2023 Huge Update:
- Full new tutorial video > https://youtu.be/Fbuyu35TkE4
- Please also upvote this Reddit Thread if possible
- Yolo v7 based cropper script updated and now works much better.
- The improvement of cropping quality is huge.
- All of the shared classification / regularization datasets will be also hopefully updated
12 September 2023 Update - Important
It turns out that previously used face detection algorithm in resizer V2 was not good enough.
Updated script to V3. Now we will use RetinaFace library.
Download resize_images_v4 .zip and use it for best quality. It is slower than V2 script but much more accurate to focus faces.
Let me know if you encounter any problem and hopefully I will fix it ASAP. Please read very carefully.
I have updated my previous subject cropper script to Yolo V7 with improved logic. I had explained that script in this video : https://youtu.be/QTYX0tgA5ho
Also I was using Automatic1111 image preprocessing script to resize images into the desired resolution with face focus. However it is broken and not working correctly. Therefore I have written my State Of The Art (SOTA) image resizer script as well.
I used these scripts to process all of the images shared in this amazing regularazation / classification images dataset > https://www.patreon.com/posts/massive-4k-woman-87700469
Hopefully I will make a video to how to use these 2 new scripts. They are pretty easy actually.
How To Use Subject Cropper
Click here to 12_Jan_2024_auto_cropper Zip File. 281 MB and includes necessary model file as well.
It includes install and run . bat files. Install . bat file will make new venv and install everything for you. This won't affect your other installations like Automatic1111.
Then edit cropper_v7 . py and change INPUT_FOLDER & OUTPUT_FOLDER and set your desired ASPECT_RATIOS. This script will crop the subject with maximum resolution while trying to keep desired aspect ratio. It won't crop the parts of the subject. So aspect ratio may not be 100% correct. We will use resizer script to make them perfect size and aspect ratio.
Yolo V7 supports different classes as well. So you can change person into different classes you wish.
names: ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light',
'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow',
'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee',
'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard',
'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple',
'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch',
'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone',
'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear',
'hair drier', 'toothbrush']
How To Use SOTA Image Resizer - Downscaler
Download attached . It includes install and run . bat files. Install . bat file will make new venv and install everything for you. This won't affect your other installations like Automatic1111.
Edit resizer_v4. py file and change folder paths and resolutions that you are looking for. This script will crop the image with focus of a person face if that exists. This is an amazing script to prepare different resolution training images datasets.
This script also uses best downscaling algorithm and save images with best quality. Also the script supports fully multi-threading. It is set to 2 threads. If your CPU is better increase it to like 10.