{"id":24425882,"url":"https://github.com/3ee-games/image-tools","last_synced_at":"2025-04-12T08:33:51.264Z","repository":{"id":65146818,"uuid":"578345322","full_name":"3ee-Games/image-tools","owner":"3ee-Games","description":"Imaging tools CLI for preprocessing datasets before model training.","archived":false,"fork":false,"pushed_at":"2023-01-09T22:08:42.000Z","size":1757,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T16:07:41.442Z","etag":null,"topics":["ai-art","artificial-intelligence","dreambooth","generative-art","hypernetwork","image","image-chunker","image-downloader","image-processing","image-scraper","img2img","linux","macos","python","stable-diffusion","textual-inversion","txt2img","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3ee-Games.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"3eegames","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-12-14T20:52:50.000Z","updated_at":"2024-10-22T07:49:04.000Z","dependencies_parsed_at":"2023-02-08T14:31:17.555Z","dependency_job_id":null,"html_url":"https://github.com/3ee-Games/image-tools","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ee-Games%2Fimage-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ee-Games%2Fimage-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ee-Games%2Fimage-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ee-Games%2Fimage-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3ee-Games","download_url":"https://codeload.github.com/3ee-Games/image-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248540635,"owners_count":21121390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-art","artificial-intelligence","dreambooth","generative-art","hypernetwork","image","image-chunker","image-downloader","image-processing","image-scraper","img2img","linux","macos","python","stable-diffusion","textual-inversion","txt2img","windows"],"created_at":"2025-01-20T11:14:15.135Z","updated_at":"2025-04-12T08:33:51.219Z","avatar_url":"https://github.com/3ee-Games.png","language":"Python","funding_links":["https://ko-fi.com/3eegames"],"categories":[],"sub_categories":[],"readme":"# Image Tools CLI 🖼️\n    \n[![PyPI version](https://badge.fury.io/py/imgtools-cli.svg)](https://badge.fury.io/py/imgtools-cli)\n[![Downloads](https://pepy.tech/badge/imgtools-cli)](https://pepy.tech/project/imgtools-cli)\n[![Downloads](https://pepy.tech/badge/imgtools-cli/month)](https://pepy.tech/project/imgtools-cli)\n[![Downloads](https://pepy.tech/badge/imgtools-cli/week)](https://pepy.tech/project/imgtools-cli)\n\nCommand line interface for pre-processing images for model training.\n\n## Features\n\n- Download all images from a url\n\n- Convert images to PNG\n\n- Resize and crop images\n\n- Chunk large images into smaller squares\n\n- Remove images with more than one person\n\n\n## Installation\n\ncreate a virtual environment and imgtools-cli through pip:\n\n```bash\n\npython3 -m venv venv\n\nsource venv/bin/activate\n\npip install imgtools-cli\n```\n\n## Usage\n\n### ℹ️ Help\n\n```bash\npython -m imgtools_cli -h\n```\n\n### ⏬ Download all images from a website\n\n```-D {url}, {output directory}```\n\n```bash\npython -m imgtools_cli -D https://www.gutenberg.org/cache/epub/67098/pg67098-images.html /Users/ootie/images\n```\n\n### ✨ Convert images to PNG files\n\n```-I {input directory}```\n\n```bash\npython -m imgtools_cli -I /Users/ootie/image_files\n```\n\n### ✂️ Resize / Crop images\n\n```-r {input directory}, {width}, {height}, {crop_focal_point}, {dnn_model_path}```\n\nUsing crop focal point:\n\n```bash\npython -m imgtools_cli -r /Users/ootie/images 512 512 True None\n```\n\nPassing in a haar xml to focal crop faces:\n\n```bash\npython -m imgtools_cli -r /Users/ootie/images 512 512 True /Users/ootie/models/haarcascade_frontalface_default.xml\n```\n\n### ➗ Chunk large images into squares\n\nEasily take large images and split them into smaller squares for training.\n\n_Example:_ You may want to train on this image but need to split it into smaller squares for training.\n![Chunk Images](https://github.com/3ee-Games/image-tools/blob/main/examples/long.jpg) \n\nPut it through the chunker and you get this:\n\n| chunk 1                                                                                              | chunk 2                                                                                                | chunk 3                                                                                                 |   |   |\n|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|---|---|\n| ![ Chunked Image Example ]( https://github.com/3ee-Games/image-tools/blob/main/examples/long_0_0.png ) | ![ Chunked Image Example ]( https://github.com/3ee-Games/image-tools/blob/main/examples/long_0_512.png ) | ![ Chunked Image Example ]( https://github.com/3ee-Games/image-tools/blob/main/examples/long_0_1024.png ) |   |   |\n\n\n\n```-C {dimensions}, {input_directory}, {output_directory}```\n\n```bash\npython -m imgtools_cli -C 512 /Users/ootie/input /Users/ootie/output\n```\n\n### 🫂 Hassan People Remover\n\nUses face detection to remove images with more than one person. Helpful for cleaning source images to be used for Stable Diffusion training.\n\n_Example:_ If your input images have more than one person, the image will be deleted:\n\n![ Face Detection]( https://github.com/3ee-Games/image-tools/blob/main/examples/faces1.jpg )\n\nSample images to test with: https://github.com/hassan-sd/people-remover/tree/main/images\n\n```-R {input_directory}, {path_to_cascade_xml}```\n\n```bash\npython -m imgtools_cli -R /Users/ootie/image-tools/images/ /Users/ootie/image-tools/examples/haarcascade_frontalface_default.xml\n```\n\nPorted from: https://github.com/hassan-sd/people-remover\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3ee-games%2Fimage-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3ee-games%2Fimage-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3ee-games%2Fimage-tools/lists"}