ImageLabeler.py
is a Python script designed to simplify the process of labeling images for various applications, such as training machine learning models for image classification. It features a graphical user interface (GUI) for easy navigation and quick labeling of images by pressing designated keys.
- Preparing datasets for machine learning image classifiers.
- Organizing large photo libraries according to specific categories.
- Data preprocessing for computer vision projects.
- Easy-to-use GUI for image browsing.
- Fast labeling with keyboard shortcuts.
- Progress tracking through sequential image loading.
If you prefer using Miniconda (a minimal installer for conda), you can set up your environment using the environment.yml
file provided in this repository.
-
Install Miniconda: Download and install Miniconda from the official site if you haven't already.
-
Create the Conda Environment: Navigate to the cloned repository's directory and run the following command to create a conda environment from the
environment.yml
file:conda env create -f environment.yml
-
Activate the Environment: Once the environment is created, activate it with:
conda activate image_labeler_env
-
Run the Script: With the environment activated, you can run the script as follows:
python ImageLabeler.py
If you prefer using pip, you can set up your environment using the requirements.txt
file.
-
Create a Virtual Environment (optional but recommended):
python -m venv image_labeler_venv
Activate the virtual environment:
- On Windows:
image_labeler_venv\Scripts\activate
- On Unix or MacOS:
source image_labeler_venv/bin/activate
- On Windows:
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Script:
python ImageLabeler.py
Modify the output_folders
dictionary in the script to suit your labeling needs, where each key represents a keyboard shortcut and each value represents a corresponding label/folder name.
Contributions are welcome! Feel free to fork the repo, make changes, and submit pull requests.
This project is open-sourced under the MIT License.
- This tool is designed to assist in the machine learning data preprocessing workflow.