4K 2700 Real Class Images + Auto Cropping Script (Patreon)
Downloads
Content
Use this updated dataset for both man and woman > https://www.patreon.com/posts/87700469
Join discord and tell me your discord username to get a special rank : SECourses Discord
19 August Update
- download_man_reg_imgs.sh file will download all of the reg images and automatically extract them into the RunPod /workspace/regimages folder. That can be used for Unix and possibly for MacOs systems as well. Don't forget to comment the links that you don't want to download and change folder paths if you wish.
- Upload into workspace folder of RunPod and execute below command
- cd /workspace
- chmod +x download_man_reg_imgs.sh
- ./download_man_reg_imgs.sh
10 July 2023 : face cropper added. it has different requirements.txt and cropper file.
The video for this post released : https://youtu.be/QTYX0tgA5ho
Please read carefully
Auto cropping script cropper.py will take your raw images and crop the subject (person) based on predefined aspect ratios with maximum efficiency. This tool is amazing to prepare training images for both classification and training.
Cropping script can be used for other objects as well such as cars. For cars here the code (line 46) : car = next((x for x in results.xyxy[0] if int(x[5]) == 2), None)
I have spent like a full day to code this script from scratch.
I am working on a new workflow to generate amazing quality realistic images. They will be beyond studio quality. For this task I needed real pictures. Therefore, I have prepared 2700 4K resolution real images for "man" class.
I have collected the images from https://unsplash.com/
They are free to use even for commercial purposes
Majority of the images had like 4000x6000 pixels original resolution.
Watch the above video to learn more about the dataset
I have manually picked the images. Images were portrait orientation. Which is the part of my new workflow. Hopefully I will make a new video where I will show my new amazing training workflow.
Then I used the attached script to extract subject into the following aspect ratios
(512, 512), (512, 768), (768, 512), (640, 960), (960, 640), (768, 1024), (1024, 768)
Then I used automatic1111 to resize them to these resolutions with focusing face. Because since the orientation was portrait, some of the images had to be cropped to be downscaled to this resolution
Below all of the images links. Each one is a zip file and the password of the zip file is:
secourses
Just plain secourses nothing else is the password
I also have uploaded the original raw images if anyone needs
These images can be used as classification / regularization images during training with DreamBooth or LoRA. They can be even used for fine-tuning training.
These images would likely to work best for realism training. For styling it may not work best. Need to be further tested
The class would be man for these images or photo of man
I use this Realistic vision (v5) model for realism (4 GB) : https://huggingface.co/SG161222/Realistic_Vision_V5.1_noVAE/resolve/main/Realistic_Vision_V5.1.safetensors
Raw images (7.54 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/raw_2735_imgs.zip
512x512 (0.91 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/512x512_2734_imgs.zip
512x768 (1.32 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/512x768_2734_imgs.zip
768x512 (1.25 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/768x512_2735_imgs.zip
768x768 (1.94 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/768x768_2734_imgs.zip
640x960 (1.99 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/640x960_2733_imgs.zip
960x640 (1.89 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/960x640_2735_imgs.zip
768x1024 (2.51 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/768x1024_2724_imgs.zip
1024x768 (2.43 GB) : https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/1024x768_2734_imgs.zip
1024x1024 (3.38 GB): https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/1024x1024_2734_imgs.zip
To use these files unrunpod
You need to install 7zip
- yes | apt-get install p7zip-full
Download with
wget
e.g. :
- wget https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/1024x768_2734_imgs.zip
- or another one
- wget https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/1024x1024_2734_imgs.zip
Then use this command to extract them
- 7z x 1024x768_2734_imgs.zip
- or another one
- 7z x 1024x1024_2734_imgs.zip
It will ask you password
type
- secourses
typing will be invisible
type again and it works
How to use face cropper
Download requirements_face.txt and cropper_face.py
Set your face crop percentage