Auto Image Labeler is an application that performs object detection on images, simplifies labeling processes, and helps create datasets in YOLO format.
- Installation
- Main Screen
- Image Loading and Navigation
- Manual Labeling
- Automatic Labeling
- Saving Annotations
- Dataset Splitting
-
Install required dependencies:
pip install -r requirements.txt
-
Launch the application:
python main.py
The application consists of the following sections:
- Image Area: Main area used for viewing and labeling images.
- Control Panel: Control buttons and settings located on the right side.
- Navigation Buttons (Previous/Next)
- Open Folder
- Save Annotations
- Clear Annotations
- Class Management
- Model Management
- Dataset Management
- Format Selection
- Open Folder: Click the "Open Folder" button to select a folder containing image files.
- Navigate Between Images:
- Use "Next" and "Previous" buttons to navigate between images.
- Alternatively, use right/left arrow keys.
-
Drawing Rectangles:
- Click and drag with the mouse on the image to draw a new rectangle.
- Must be at least 5x5 pixels in size.
-
Editing Rectangles:
- Click on an existing rectangle to select it.
- Drag the selected rectangle with the mouse to move it.
- Resize by dragging from edges and corners.
- Delete the selected rectangle with the DELETE key.
-
Class Management:
- Select an existing class from the "Classes" section.
- Add new classes with the "Add Class" button.
- Change the class of the selected rectangle with the "Set Class to Selected" button.
-
Loading Model:
- Click "Open folder" button in the "Model Management" section to select a YOLOv8 model (.pt).
- Adjust the confidence threshold (default: 0.5).
-
Labeling:
- Single Image: Click "Auto label current image" button to perform automatic object detection on the displayed image.
- Batch Processing: Use "Simple Auto label all image" button to automatically label all images in the folder.
-
Format Selection:
- Select your desired format from the "Output Format" section:
- YOLO Format (class_id, x_center, y_center, width, height) - normalized
- Standard Format (x, y, width, height, class_id) - pixel values
- Select your desired format from the "Output Format" section:
-
Saving:
- Click "Save Annotations" button to save the annotations.
- Annotations are saved to a subfolder named "annotations" in the folder containing the images.
- Class information is stored in "classes.json" file.
You can split your dataset into train, validation, and test sets for YOLO training:
-
Setting Ratios:
- Set percentage ratios for train, validation, and test from the "Data splitter" section.
- The sum of ratios must equal 100.
-
Splitting:
- Click the "Split dataset" button.
- Select the output folder.
- When the process is complete, it automatically:
- Creates train, validation, and test subfolders.
- Creates data.yaml file.
- Packages the entire dataset as a zip file.
- Right/Left Arrow: Navigate to next/previous image
- DELETE: Delete selected