Export metadata from images to .txt files, sorted into directories by models.
Useful for bulk sorting of generated images into directories named after checkpoint model.
Example output:
- Place the images you want to process in the
images
folder. - Run the script
main.py
. - Images and text files (w/ generation data) will be added to model directories within
output
.
The script supports the following file types:
- .jpg
- .jpeg
- .png
- .bmp
- .gif
- Python 3.x
- Clone git repo.
git clone https://github.com/brndnsmth/generation-data-model-sorter.git
cd generation-data-model-sorter
- Create a Virtual Environment: Utilize Python 3 to create a virtual environment for this project. This step ensures a clean and isolated environment for installing dependencies.
python3 -m venv .venv
- Activate the Virtual Environment: Activate the virtual environment to isolate the project dependencies from other Python installations on your system.
source .venv/bin/activate
- Install Dependencies: While inside the virtual environment, install the required dependencies specified in the requirements.txt file using pip.
pip install -r requirements.txt
- Add Images: Create
images
folder and add images to directory.
mkdir images
- Run the Script: Execute the following command to run the script:
python main.py
- Check Output: Check
output
directory.