Continuing from the previous article on model training, today we will focus on labeling images. For this task, we will use a package called labelImg as our image labeling tool.

Click the following GitHub project link and then download it: HumanSignal/labelImg

https://yushaing.vercel.app/assets/images/1-1ab994817d52e1f19c61a6f00219aa15.png

Due to potential package version conflicts with the package used here, we need to create a new, clean environment through Anaconda for the installation (it is strongly recommended not to install under the Yolo environment, as it will lead to numerous errors).

In this case, we will create a new environment named 'label'. The creation of a new environment can be referenced in Yolo v8–Installation.

https://yushaing.vercel.app/assets/images/2-30254d411d6e47b92cbf52d43b59ac8d.png

Open the terminal:

1. conda activate label
2. cd labelIMG
3. pip3 install pipenv
4. pipenv run pip install pyqt5==5.15.2 lxml

If you encounter an error after entering the above, it may appear as shown in the following image:

https://yushaing.vercel.app/assets/images/3-2a2748ef3f18946feaeae44ad957b434.png

pip install --upgrade pyqt5

At this point, the environment and packages are fully installed! Next, we will enter the following in the terminaland you will see the user interface for the labeling package.

python labelImg.py

https://yushaing.vercel.app/assets/images/4-23c7a85e8e311ff0ce73b3f683c13caf.png

Next, click 'Open' and open the image file you want to label.

https://yushaing.vercel.app/assets/images/5-7001dc7fcfd30cc643eced1f61a9e348.png

Here, we use dollars as our labeling target and click 'Create RectBox'.

https://yushaing.vercel.app/assets/images/6-91e962f00c6eca8c48fbe9fe709bceba.png