LabelImg Tutorial

 

AI Made Simple: User-Friendly, Step-by-Step LabelImg Tutorials
This guide offers a clear, step-by-step walkthrough of LabelImg, enriched with detailed instructions and illustrative images. Whether you are entirely new to labeling or just getting started with AI datasets, you can follow along at your own pace, quickly gaining practical skills while enjoying the satisfaction of visible progress and achievement.
1. Use PyPI (The Python Package Index) to install LabelImg.

pip install labelimg

2. In GitHub, download Labelimg repo, this version is for the custom version.
3. Navigate to the folder:

cd labelimg


4. Launch the tools:
python labelimg.py



5. The following window should appear:

6. Use Open Dir (開啟目錄) to label images in a folder or Open File (開啟檔案) for a single image.

7. After opening the folder, thumbnails appear at the bottom right, and the current image appears at the center.
8. Enable Auto Save Mode (自動儲存模式) under the View (V) tab in the top-left menu.


9. Set the annotation mode to YOLO format (YOLO 格式).


10. Click Create RectBox (創建區塊) to start labeling.
11. Use the cursor (displayed as a cross) to draw bounding boxes.


12. For custom labels like Helmet or Coverall, manually enter and confirm them.

🖊️Note
You must finish labeling all objects in one image before moving to the next, or you cannot return to previous images.




13. All labeled items will appear in the box list on the right side.
14. Save the data.
  • Path: D:\labelImg\data
  • File: predefined_classes.txt 



15. Add label names to this file for quick label access during annotation.


16. Once labeling is done, click Next Image (下一張圖片).


17. In the terminal, you will see lines like:

Image:C:\Users\Ryan\Desktop\output\frame_0000.png -> Annotation:frame_0000.txt

This means frame_0000.png was labeled and saved as frame_0000.txt.



18. You are now in “Annotation Mode”! Already used labels will auto-complete from the menu.


❗Notice

To maintain copyright, if you use RoboFlow, Kaggle, or any other dataset, please do not forget to cite the original author and dataset.

留言

這個網誌中的熱門文章

YOLOv8 Tutorial

Install NVIDIA GPU Driver