LabelCraft - A modern graphical image annotation tool based on labelImg
Project description
LabelCraft - Intelligent Image Annotation Tool
Version 2.0.0 - A modern image annotation tool with project management, developed based on labelImg
LabelCraft is a professional graphical image annotation tool with advanced project management capabilities. It's designed for efficient data preparation in deep learning tasks such as object detection and image classification.
This project is a major evolution of the open-source project labelImg, adding project-based workflow, multi-format support, and intelligent annotation features. Special thanks to the original author TzuTa Lin for his pioneering work.
✨ Key Features
🎯 Core Annotation
- Rectangle bounding box annotation
- Polygon annotation (coming soon)
- Real-time preview and editing
- Undo/Redo support
📁 Project Management (v2.0 New!)
- Create and manage annotation projects
- Project configuration persistence (.labelcraft files)
- Recent projects quick access
- Automatic annotation directory management
- Project metadata tracking
🔄 Multi-Format Support
Support 5 major annotation formats with seamless conversion:
- PASCAL VOC (XML) - Traditional format for Faster R-CNN, SSD, etc.
- YOLO (TXT) - For YOLO series models (v5, v8, v10)
- CreateML (JSON) - For Apple CreateML framework
- COCO (JSON) - Microsoft COCO dataset standard
- CSV (CSV) - Universal format for data analysis
🌐 Advanced Internationalization
Dynamic language switching without restart:
- English
- 简体中文 (Simplified Chinese)
- 繁體中文 (Traditional Chinese)
- 日本語 (Japanese)
- Deutsch (German)
- Français (French)
⚡ Smart Workflow
- Pending annotation queue management
- Completed annotations list
- Auto-save mode
- Default label for batch annotation
- Verification mode for quality control
- Copy previous frame annotations
🛠️ Developer Tools
- Built-in format converter (all 5 formats)
- Command-line interface
- Python API for integration
- Customizable shortcuts
- Brightness adjustment
📸 Screenshot
🚀 Quick Start
Installation via pip (Recommended)
pip install labelcraft
Launch from command line:
labelcraft
Or specify an image directory:
labelcraft /path/to/images
One-Click Launch (From Source)
Linux/macOS:
chmod +x start.sh
./start.sh
Windows:
start.bat
The script will automatically:
- Check Python environment
- Create virtual environment
- Install dependencies
- Compile resources
- Launch application
Manual Installation
# Clone repository
git clone https://github.com/syd168/LabelCraft.git
cd LabelCraft
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Compile resources (Linux/macOS)
make pyside6
# or Windows
pyside6-rcc -o libs/resources.py resources.qrc
# Run
python main.py
📖 Usage Guide
Standard Workflow (Project-Based)
Step 1: Create a New Project
- Menu:
File → New Projector pressCtrl+N - Fill in project information:
- Project Name: Your project name
- Project Location: Directory to store project files
- Output Format: Choose annotation format (VOC/YOLO/CreateML/COCO/CSV)
- Labels: Add your object categories
- Click "Create Project"
The system will automatically create:
- Project file:
{project_name}.labelcraft - Annotations directory:
{project_dir}/annotations/
Step 2: Add Images to Project
- Menu:
File → Open Diror pressCtrl+U - Select the directory containing your images
- Images will be loaded into the pending queue
You can also:
- Drag and drop images directly
- Use
File → Add Imagesto add specific files
Step 3: Annotate Images
- Click "Create RectBox" button or press
W - Draw bounding box on the object
- Enter label name (or use default label)
- Press Enter to confirm
- Save with
Ctrl+Sor enable auto-save
Tips:
- Use arrow keys to fine-tune box position
- Hold
Ctrlwhile drawing for perfect squares - Right-click box to edit properties
- Use verification mode (Space) to mark completed images
Step 4: Manage Annotations
View Status:
- Left panel: Pending images queue
- Right panel: Current image annotations
- Window title shows progress:
(5/100)
Navigation:
- Next image:
Dor→ - Previous image:
Aor← - Jump to specific image from file list
Step 5: Export & Convert
Export Annotations:
- Menu:
File → Export Annotations - Choose export location and format
Convert Formats: Use the built-in converter programmatically:
from libs.annotation_converter import AnnotationConverter
converter = AnnotationConverter()
# Convert entire project from VOC to YOLO
converter.convert(
input_dir='path/to/voc_annotations',
input_format='voc',
output_format='yolo',
output_dir='path/to/yolo_output'
)
Or via command line:
python -m libs.annotation_converter \
--input /path/to/input \
--input_format voc \
--output_format yolo \
--output /path/to/output
Legacy Mode (Quick Annotation)
For simple tasks without project management:
# Open single image
python main.py image.jpg
# Open directory directly
python main.py /path/to/images
# With predefined labels
python main.py /path/to/images data/predefined_classes.txt
⌨️ Keyboard Shortcuts
File Operations
| Shortcut | Action |
|---|---|
Ctrl+N |
New Project |
Ctrl+O |
Open Project |
Ctrl+U |
Open Directory |
Ctrl+S |
Save Annotation |
Ctrl+E |
Edit Project |
Ctrl+Shift+C |
Close Project |
Annotation
| Shortcut | Action |
|---|---|
W |
Create RectBox |
Ctrl+J |
Edit Mode |
Delete |
Delete Selected Box |
Ctrl+D |
Duplicate Box |
Ctrl+V |
Copy Previous Frame |
Space |
Verify Image |
Navigation
| Shortcut | Action |
|---|---|
D / → |
Next Image |
A / ← |
Previous Image |
Ctrl++ |
Zoom In |
Ctrl+- |
Zoom Out |
Ctrl+F |
Fit Window |
Ctrl+Shift+F |
Fit Width |
View
| Shortcut | Action |
|---|---|
Ctrl+T |
Toggle Toolbar |
Ctrl+H |
Hide All Boxes |
Ctrl+A |
Show All Boxes |
Ctrl+Shift++ |
Increase Brightness |
Ctrl+Shift+- |
Decrease Brightness |
Ctrl+Shift+= |
Reset Brightness |
🔧 Advanced Configuration
Predefined Labels
Create a text file with one label per line:
person
car
dog
cat
bicycle
Load at startup:
python main.py data/predefined_classes.txt
Or at runtime: File → Load Predefined Classes (Ctrl+Shift+L)
Custom Settings
Settings are automatically saved to system config:
- Recently used directories
- Window size and position
- Default annotation format
- Brush colors
- Language preference
Command Line Arguments
python main.py [IMAGE_PATH] [PREDEFINED_CLASSES] [SAVE_DIR]
Examples:
# Open specific image
python main.py images/test.jpg
# With predefined classes
python main.py images/ data/classes.txt
# Specify save directory
python main.py images/ classes.txt annotations/
🏗️ Project Structure
LabelCraft/
├── main.py # Application entry point
├── labelcraft_ui.py # Main UI implementation
├── libs/ # Core libraries
│ ├── project.py # Project management
│ ├── canvas.py # Drawing canvas
│ ├── shape.py # Shape classes
│ ├── annotation_converter.py # Format converter
│ ├── i18n_engine.py # Internationalization
│ ├── pascal_voc_io.py # VOC format I/O
│ ├── yolo_io.py # YOLO format I/O
│ ├── create_ml_io.py # CreateML I/O
│ ├── coco_io.py # COCO I/O
│ └── csv_io.py # CSV I/O
├── locales/ # Translation files
│ ├── en.json
│ ├── zh-CN.json
│ ├── zh-TW.json
│ ├── ja-JP.json
│ ├── de-DE.json
│ └── fr-FR.json
├── resources/ # Icons and assets
├── doc/ # Documentation
│ ├── tutorial.md
│ ├── tutorial_zh-CN.md
│ └── TRANSLATION_GUIDE.md
└── build-tools/ # Build scripts
🌍 Adding New Language
- Create new file in
locales/(e.g.,es-ES.json) - Copy existing JSON as template
- Translate all values (keep keys unchanged)
- Restart application - new language auto-detected
See TRANSLATION_GUIDE.md for details.
❓ FAQ
Q: What's the difference between v1.x and v2.0?
A: Version 2.0 introduces:
- ✅ Project-based workflow (vs. file-based in v1.x)
- ✅ Support for COCO and CSV formats
- ✅ Built-in format converter
- ✅ Dynamic language switching
- ✅ Enhanced UI with better organization
- ✅ Improved annotation management
Q: Can I still use it without creating a project?
A: Yes! You can use legacy mode by opening directories directly. However, projects provide better organization and persistence.
Q: How do I convert my existing annotations?
A: Use the built-in converter:
from libs.annotation_converter import AnnotationConverter
converter = AnnotationConverter()
converter.convert('old_annotations/', 'voc', 'yolo', 'new_annotations/')
Q: Where are my annotations saved?
A:
- With Project: In
{project_dir}/annotations/ - Without Project: Same directory as images
- Filename matches image with appropriate extension (.xml, .txt, .json, .csv)
Q: Can I change the output format mid-project?
A: Yes! Edit project (Ctrl+E) and change the format. Existing annotations will be migrated if needed.
Q: How do I backup my project?
A: Simply copy the entire project directory including:
.labelcraftproject fileannotations/directory- Your images (if stored in project)
Q: Is there an API for programmatic use?
A: Yes! You can integrate LabelCraft into your Python code:
from libs.project import Project
from libs.annotation_converter import AnnotationConverter
# Create project
project = Project(name="MyProject", project_dir="/path/to/project")
project.save("/path/to/project/myproject.labelcraft")
# Convert formats
converter = AnnotationConverter()
converter.convert("input/", "voc", "yolo", "output/")
🤝 Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Development Setup
# Clone and setup
git clone https://github.com/syd168/LabelCraft.git
cd LabelCraft
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run tests
python -m pytest tests/
# Compile resources after UI changes
pyside6-rcc -o libs/resources.py resources.qrc
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- labelImg - Original project by TzuTa Lin
- All contributors who improved LabelCraft
- The open-source community for inspiration and support
📮 Contact & Support
- Project Homepage: https://github.com/syd168/LabelCraft
- Issue Tracker: https://github.com/syd168/LabelCraft/issues
- Documentation: See
doc/directory - Email: syd168@users.noreply.github.com
Happy Annotating! 🎉
Made with ❤️ for the computer vision community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file labelcraft-2.0.4.tar.gz.
File metadata
- Download URL: labelcraft-2.0.4.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1cb88b5db96eac4297b477b57258e684841789448bf89efe86bd37c8f70abca
|
|
| MD5 |
5124190ea13d8237004490589e755771
|
|
| BLAKE2b-256 |
a603f3cd0dac5dcca3e8be85285722535b7c822a3dfcb48c634af80a5bd3162c
|
File details
Details for the file labelcraft-2.0.4-py2.py3-none-any.whl.
File metadata
- Download URL: labelcraft-2.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 777.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f39d4b75c96d680f4b3a3910f0a6b45ceb77ab11525c4092116171a49f297f52
|
|
| MD5 |
a7c67ea0b3ed28d3018919495dfbcaf2
|
|
| BLAKE2b-256 |
8c2461cd19b16599240128666004710e505d2e3ecc01b8ce4943f014f2b6ac36
|