Accurately labeled data is essential to successful machine learning, and computer vision is no exception.
Looking to Get Started with Annotating Data?
Roboflow provides easy annotation with smart auto-suggested defaults. It's no surprise users annotate faster with Roboflow.
Looking to Use LabelImg Annotations with your model?
Use Roboflow to convert them to whatever format you need.
LabelImg is a free, open source tool for graphically labeling images. It’s written in Python and uses QT for its graphical interface. It’s an easy, free way to label a few hundred images to try out your next object detection project.
LabelImg does require a little bit of technical awareness (like using the command line) to get going.
The easiest way to download and install LabelImg is via pip, and it assumes you’re running Python3. Simply run the following in your command line: `pip3 install
labelImg. Then, launch LabelImg by typing
labelImg in your command line prompt.
If you require more specific instructions based on your machine (e.g. Python 2 on Linux, Windows, MacOS Catalina, or using LabelImg with Anaconda), visit the LabelImg README for detailed instruction on installation.
Labeling Images with LabelImg
LabelImg supports labelling in VOC XML or YOLO text file format. At Roboflow, we strongly recommend you use the default VOC XML format for creating labels. Thanks to ImageNet, VOC XML is a more universal standard as it relates to object detection whereas various YOLO implementations have slightly different text file formats. Moreover, you can always easily convert from VOC XML to any other format using Roboflow, like VOC XML to COCO JSON.
Open your desired set of images by selecting “Open Dir” on the left-hand side of LabelImg
To initiate a label, type w, and draw the intended label. Then, type ctrl (or command) S to save the label. Type d to go to the next image (and a to go back an image).
Labeling Best Practices
When labeling images, there are a few tips to bear in mind. Note that these tips are generally true, but can alter based on the context of your problem. Be sure to read our full deep dive on labeling best practices.
- Label around the entirety of an object. It is best to include a little bit of non-object buffer than it is to exclude a portion of the object with a rectangular label. So, aim to have boxes that tightly mirror the objects you want to label, but do not cut off part of the objects. Your model will understand edges far better this way.
- For occluded objects, label them entirely. If an object is out of view due to another object being in front of it, label the object out of view as if you could see its entirety. Your model will begin to understand the true bounds of objects this way.
- For objects partially out of frame, generally label them. This tip especially depends on your problem, but in general, even a partial object is still an object to be labeled.
- If outsourcing a labeling job, provide crystal clear instructions. If you’re ready to scale up your labeling operations and bring on outside help, be incredibly explicit in your instructions (like mentioning the importance of labeling around an object rather than cutting a portion of the object out of bounds per our first tip!) Note: if you're ready to scale past labeling your own images, Roboflow can help! Get in touch regarding our outsourced labeling service.
While LabelImg has great brand recognition, there are many other computer vision annotation tools. We're partial to Roboflow Annotate, which is we designed to smooth out the rough edges present in many open source labeling tools. But we also cover many other options in our Ultimate Guide to Object Detection.
Once you have a labeled dataset, you can use Roboflow's health check to understand how many labels you have for each of your classes, convert annotation formats between computer vision model frameworks, generate more training data from your already labeled data, and use our model library to get going with deploying your first deep learning model in production. Take a look at our Getting Started Guide for more.