En cliquant sur "Accepter ", vous acceptez que des cookies soient stockés sur votre appareil afin d'améliorer la navigation sur le site, d'analyser son utilisation et de contribuer à nos efforts de marketing. Consultez notre politique de confidentialité pour plus d'informations.
How-to

How to use LabelMe: our complete guide

Written by
Nanobaly
Published on
2024-09-03
Reading time
0
min

In the world of artificial intelligence and machine learning, accurate data labeling is a key component (this is the “Data” part of the triptych). “Data” + “Compute” + “Models” = “AI”). Among the multitude of data annotation platforms available on the market, LabelMe stands out as a powerful tool for creating complete datasets.

LabelMe is a versatile graphical image annotation application with features such as image annotation and interface customization. This open-source tool offers a user-friendly interface to annotate images, facilitating the creation of high quality datasets. Its use of the JSON format to store annotations makes it compatible with numerous machine learning frameworks.

📖 This comprehensive guide will help you master LabelMe. First, let's take a look at what LabelMe is and why it's so useful. Then, we'll move on to installing and configuring the tool on your system. We will also explore the basic functions of LabelMe, showing you how to create effective annotations. At the end, you will have all the tools to use LabelMe like a pro in your AI and machine learning projects!

Introduction to LabelMe

What is the LabelMe app?

LabelMe is a powerful open-source tool for image annotation, created by the MIT Computer Science and Artificial Intelligence Laboratory in 2008. It is a tool for building digital image data sets with annotations, freely accessible and allowing users to contribute to its library. Developed in Python with a graphical interface based on Qt, LabelMe offers a simple and user-friendly solution for image annotation for Computer Vision use cases.”

LabelMe, a data annotation platform for AI

An overview of LabelMe, a data annotation platform very popular among Data Scientists

LabelMe features, beyond creating labels for AI

LabelMe offers a range of functionalities to meet the varied needs of image annotation projects:

Versatile annotation

LabelMe allows you to annotate images with surrounding boxes, polygons, rectangles, circles, lines, and points. However, although LabelMe is good for static images, it does not offer video annotation functionality powerful enough to be used for complex use cases.

Image classification

The tool offers the possibility of adding flags for the classification and cleaning of images.

Export formats

LabelMe allows you to export annotated data into commonly used formats such as VOC for semantic/instance segmentation and COCO for instance segmentation.

Customizable interface

The graphical interface can be adapted with predefined labels, automatic registration and validation of labels by quality specialists.

Cross-platform compatibility

LabelMe works on Ubuntu, macOS, and Windows.

Annotation storage

Annotations are saved in a JSON format, making it easy to use them in a variety of machine learning projects.

Advantages and disadvantages

LabelMe has several advantages that make it a popular choice for image annotation:

  • Large bookcase : LabelMe has a vast collection of annotated images, considered by some to be canonical.
  • Flexibility : The tool adapts to different annotation techniques, from object detection to semantic segmentation.
  • Ease of use : Its simple graphical interface makes it accessible to users of all levels.
  • Open-source : LabelMe is free and allows users to contribute to its development.
  • Motto : LabelMe's motto is to provide a simple and effective solution for image annotation, thus reflecting its commitment to quality and usability.

However, LabelMe also has some limitations:

  • Lack of video annotation: Although efficient for static images, LabelMe does not offer video annotation functionality.
  • Complexity for advanced uses: For more advanced uses, it is necessary to refer to the examples provided.

🧐 In summary, LabelMe proves to be a versatile and powerful tool for image annotation, offering a wide range of functionalities adapted to various artificial intelligence and machine learning projects.

Installation and configuration

System requirements

LabelMe is a lightweight and versatile image annotation tool that is compatible with Windows, macOS, and Linux. To install it, it is necessary to have Python 3 on your system. The use of Anaconda, a package and environment manager for Python, is recommended to simplify installation and dependency management.

Installation steps

The installation of LabelMe can be done in several ways, depending on the platform and the preferences of the user.

Installation via Anaconda (recommended):

- Create a new environment

‍conda create --name=labelme python=3

- Activate the environment

For Linux/macOS:

‍source activate labelme

or for Windows:

conda activate labelme

- Install LabelMe

pip install labelme

- Platform-specific installation:

Ubuntu:

sudo apt-get install labelme ou sudo pip3 install labelme

MacOS:

brew install pyqt puis pip install labelme‍

Windows:

Use Anaconda Prompt and follow the installation steps via Anaconda

- Use of standalone executables:

  1. Download the appropriate executable from the releases section on GitHub
  2. These executables are particularly lightweight, with the Windows version weighing only 62 megabytes.

Initial setup

Once LabelMe is installed, a few configuration steps may be required:

  1. Verify the installation by running LabelMe from the command line: Labelme
  2. Customize the graphical interface:
    • Define predefined labels to speed up annotation
    • Set up autosave to avoid data loss
    • Enable label validation to ensure consistent annotations
  3. Familiarization with the features:
    • Explore the various annotation tools: polygons, rectangles, circles, lines, and points
    • Test the annotation of individual images and the batch processing of multiple files
  4. Export format configuration:

💡 By following these steps, users can quickly set up LabelMe and start using it effectively for their image and video annotation projects.

How do I use LabelMe?

User interface

LabelMe offers a user-friendly graphical interface for image annotation. The tool allows images to be annotated for object detection, classification, and segmentation. The main interface includes a sidebar with annotation tools, an area for viewing the image, and a list of files for batch processing.

To start, the user can open a directory containing the images to be annotated. This allows for efficient batch processing of multiple files. The file list at the bottom right makes it easy to select images to annotate.

Creating image annotations

LabelMe offers several versatile annotation tools:

  1. Polygons: Ideal for segmenting complex objects. Annotations can be shared with customers to get feedback and improve data quality.
  2. Rectangles: Perfect for enclosing boxes
  3. Circles: Useful for circular objects
  4. Lines: To annotate linear contours
  5. Points: To mark specific points of interest

To create an annotation:

  1. Click on “Create Polygons” in the sidebar
  2. Select “Edit” in the command bar to choose the type of annotation
  3. Click on the image to define the points of the annotation
  4. Close the shape by clicking on the starting point

For surrounding boxes, click and drag the cursor to draw the rectangle.

After creating an annotation, the user is prompted to select a class for the object. New classes can be added over time, and existing classes can be reused.

Save and export

LabelMe saves annotations in JSON format, making them easy to use in a variety of machine learning projects. To save an annotation:

  1. Press Command + S (macOS) or Control + S (Windows/Linux)
  2. The JSON file will be saved in the same folder as the annotated image

The tool also allows you to export annotations in popular formats:

  • Pascal-VOC format for semantic and instance segmentation
  • COCO format for instance segmentation

These annotations can be exported and used in projects in Germany, where LabelMe is also very popular.

These export formats are compatible with numerous machine learning frameworks, making LabelMe particularly useful for computer vision projects.

Conclusion

LabelMe is proving to be an essential tool for image annotation in the field of artificial intelligence and machine learning. Its flexibility, ease of use and compatibility with various formats make it a preferred choice for computer vision projects. LabelMe's intuitive interface and versatile features allow users to create accurate, high-quality annotations that are essential for training successful AI models.

While LabelMe offers a robust solution for annotating static images, it is important to note its limitations, including the lack of video annotation features. For projects that require more complex or specialized annotations, it may be a good idea to explore other tools or seek professional services. As such, Innovatiana's annotators can create annotations for all your use cases and help you create quality datasets. Ultimately, LabelMe remains a valuable tool that has a significant impact on the development of AI and machine learning projects, by facilitating the creation of annotated datasets that are essential for training accurate and reliable models.

Frequently Asked Questions

LabelMe is an open-source image annotation tool that allows you to create annotations for datasets used in computer vision tasks, including object detection, classification, and segmentation. It supports drawing shapes such as polygons, rectangles, circles, lines, and points.
To install LabelMe, the simplest method is to use pip, assuming Python3 is already installed on your system. Open your command line and type: pip3 install labelImg. Once the installation is complete, you can launch LabelMe by entering labelImg in your command prompt.
Yes, LabelMe is a free and open-source image annotation tool. It was developed using Qt and supports various annotation tools such as polygons, rectangles, circles, lines, and points.
Yes, many researchers, students, and developers in France use LabelMe for various use cases. It’s an efficient and accessible solution.