A custom Python-based labeling tool with a modern Tkinter GUI for annotating wildlife images based on species gender, age class, and behavior. This tool integrates image processing (using OpenCV and Pillow) and data management (with Pandas and NumPy) to streamline the labeling process and export data for AI training.
- Intuitive GUI:
Easily select folders, view images, and label images with radio buttons for Sex/Gender, Age_Class, and Behaviour. - Image Processing:
Automatically crops images using a red bounding box and resizes images to fit the display area. - Data Management:
Loads images from a folder and exports labeling data to a CSV file. - Modular Codebase:
Organized into separate modules for GUI, image processing, and data management. - Packaging Support:
Can be built into a standalone executable (.exe) using PyInstaller.
Below is a screenshot of the application's GUI:
Note: Place your screenshot image (e.g., gui_screenshot.png
) in the repository root or update the path accordingly.
LabelingTool/
├── pyproject.toml # Poetry configuration file
├── README.md # This file
├── .gitignore # Files/directories to ignore in git
└── src/
├── __init__.py
├── main.py # Application entry point
├── gui.py # GUI code and layout
├── image_processing.py # Functions for image cropping and resizing
└── data_management.py # Functions for data loading and CSV generation
- Python: Recommended version: 3.12 (supported up to 3.14).
- pyenv: For managing your Python versions.
- Poetry: For dependency management and project isolation.
-
Clone the Repository:
git clone https://github.com/your-username/label-lwf.git cd label-lwf
-
Set the Python Version:
Install and set the local Python version using pyenv:
pyenv install 3.12.0 # if not already installed pyenv local 3.12.0
-
Configure and Install Dependencies:
Install all dependencies (ensure your
pyproject.toml
haspython = ">=3.12,<3.14"
):poetry install
-
Add PyInstaller as a Development Dependency:
poetry add --group dev pyinstaller
-
Activate the Poetry Shell:
poetry shell
With your Poetry environment active, run the application using:
python -m src.main
This command launches the GUI for the labeling tool.
To package the tool as a Windows executable (.exe):
-
From the project root, run:
poetry run pyinstaller --onefile --windowed src/main.py
-
The executable will be created in the
dist
directory (e.g.,main.exe
). -
Test the executable by navigating to the
dist
folder and running:./main.exe
Contributions are welcome! Please open issues or submit pull requests. Follow the project's coding style and add tests as needed.
This project is licensed under the MIT License.
For questions or suggestions, please open an issue or contact writetokarthikeya99@gmail.com.