How to Install labelImg [Updated December 2022]

Contents
  1. Environment
  2. Installation
  3. Launching
  4. Afterword

This article was automatically translated from Japanese using AI. The Japanese version is the authoritative version.

When doing object clustering, there are times when you want to use not only the pre-existing trained models but also a model you built yourself.

YOLO is a well-known tool for object clustering, and labelImg (written in all caps as LABELIMG) is extremely useful when creating the training data for it.

Here I introduce how to install labelImg.

Environment

OS: Windows 10 (it also worked on macOS Monterey)
Python: 3.9.7 (3.6 or later)

Installation

I recommend creating a virtual environment with Anaconda and installing it there.
That way, you can install it without affecting your other environments.

The name of the virtual environment can be anything as long as you recognize it, but here we’ll use “labelimg_env”.
Run the following command in Anaconda Prompt.

conda create -n labelimg_env python=3.9

Here I am installing with Python 3.9, but anything from 3.6 onward should be fine.

Next, let’s update pip and setuptools.
Doing this prevents mysterious errors (probably).

python -m pip install --upgrade pip setuptools

Then install labelImg.

pip install labelImg

You can check whether it was installed with the following command.

pip list

If labelImg appears in the list, you’re all set.

Launching

First, activate the virtual environment.

conda activate labelimg_env

Then launch labelImg.

labelImg

If a separate window opens, you’re good to go!

Afterword

LabelImg’s GUI is built with PyQt5.
The reason Python 3.6 or later is preferable is that the current version of PyQt5 requires Python 3.6 or later.

Generally, the latest version should work without any problems.

Previous
Next