a command line interface for preparing image models
Reason this release was yanked:
Deprecated
Project description
Image Tools CLI 🖼️
Command line interface for pre-processing images for model training.
Features
-
Download all images from a url
-
Convert HEIC images to PNG
-
Chunk large images into smaller squares
Example: You may want to train on this image but need to split it into smaller squares for training.
Put it through the chunker and you get this:
chunk 1 | chunk 2 | chunk 3 | ||
---|---|---|---|---|
- Remove images with more than one person
Example: If your input images have more than one person, the image will be deleted:
Example: This image will not be deleted:
Installation
create a virtual environment and imgtools-cli through pip:
python3 -m venv venv
source venv/bin/activate
pip install imgtools-cli
Usage
Help
python -m imgtools_cli -h
Download all images from a website
python -m imgtools_cli -D https://www.gutenberg.org/cache/epub/67098/pg67098-images.html
Convert HEIC to PNG
python -m imgtools_cli -P /Users/ootie/heic_files
Chunk large images into squares
Easily take large images and split them into smaller squares for training.
python -m imgtools_cli -C 512 /Users/ootie/input /Users/ootie/output
Hassa People Remover
Uses face detection to remove images with more than one person. Helpful for cleaning source images to be used for Stable Diffusion training.
Sample images to test with: https://github.com/hassan-sd/people-remover/tree/main/images
python -m imgtools_cli -R /Users/ryguy/Documents/github/image-tools/images/
Ported from: https://github.com/hassan-sd/people-remover
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for imgtools_cli-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2d9e873bb1dfda9bce67664ae4129514b2d557a121f31ac6cbaba2138890939 |
|
MD5 | 423fcfcd15f915c97ecd3759f698fe2a |
|
BLAKE2b-256 | e97c4904a972f9fa21e468c1fe2596db3402144980ee84e14d18eec8d31a84a0 |