This article was automatically translated from Japanese using AI. The Japanese version is the authoritative version.
When doing object clustering, you may sometimes want to use your own trained model rather than just the models that already exist.
YOLO is a well-known tool for object clustering, and labelImg (written LABELIMG in capitals) 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)
How to install
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 can recognize it, but here we will use “labelimg_env”.
Run the following command in the Anaconda prompt.
conda create -n labelimg_env python=3.9
Here I am installing with Python 3.9, but any version from 3.6 onward should be fine.
Next, update pip and setuptools.
Doing this should prevent 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, the installation was successful.
Launching
First, activate the virtual environment.
conda activate labelimg_env
Then launch labelImg.
labelImg
If a separate window opens, you’re all set!!
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.
In general, the latest version should work fine.
