How wufan-tb/autolabelimg works
Project type and purpose
• This is an open‑source, desktop GUI application for image/video annotation called AutoLabelImg.
• It extends the original labelImg tool by adding:
• Auto‑annotation via a YOLOv5 detector
• Video tracking annotation (OpenCV)
• Auxiliary tools (magnifying lens, data augmentation, search)
• It packages as a standalone Python/PyQt5 app with cross‑platform build scripts.
File structure
• Top level
• labelImg.py – the main entry point
• libs/ – reusable PyQt5 UI modules, data‑model classes, file I/O
• pytorch_yolov5/ – cloned YOLOv5 code (models, utils, weights)
• build-tools/ – shell scripts and helpers to package for macOS, Windows, Linux, PyPI
• data/ – sample XML templates and predefined classes
• tests/ – unit tests for I/O, utilities, Qt wrappers
• setup.py, Makefile, requirements.txt – build, deployment, dependencies
• Pattern: a monolithic desktop app structured around MVC‑style separation
• View: PyQt5 widgets in libs (canvas, toolbars, dialogs)
• Model: annotation data structures and file I/O (pascal_voc_io.py, yolo_io.py)
• Controller/Services: labelImg.py orchestrates user actions, ML inference, tracking, augment
README for additional insights
• Confirms use of PyQt5, YOLOv5, OpenCV
• Steps to prepare weights and compile the Qt resources
• No external database; annotations are saved to disk in XML formats
Essential elements
• Clear component names (e.g., “YOLOv5 Model Loader,” “Canvas Widget”)
• Data flows between GUI, ML engine, file system
• External dependencies (PyQt5, PyTorch, OpenCV)
• Entry point (labelImg.py) and packaging scripts
• Modules under libs/ that implement major functions (auto‑annotation, augment, search)