[PYTHON] Object detection (Single Shot MultiBox Detector) XML file creation GUI for image data

table of contents

--Reference page --Download link --How to use

Reference page

-Dataset creation support tool for object recognition (Faster R-CNN or SSD -[Try using Python Tkinter](https://qiita.com/nnahito/items/ad1428a30738b3d93762#tkinter%E3%81%A7%E8%A1%A8%E7%8F%BE%E3%81%A7 % E3% 81% 8D% E3% 82% 8B% E3% 81% 93% E3% 81% A8) -You can do it with copy and paste! Tkinter -[Python] Specify the range from the image by dragging the mouse

Download link

https://gist.github.com/mozra/5ad2ce73db6b74e2bed9b2f8db6ac8b6

How to use

Operating environment: Ubuntu18.04, Ubuntu20.04

0: Install required libraries

Basically, the libraries used are standard modules other than pyautogui and PIL, so they can be used without installation. puautogui and PIL can be installed with the pip command, so execute pip install as appropriate.

1: Copy and paste the executable file from the download link

Screenshot from 2020-11-24 22-55-16.png

2: Put the copied executable file in an appropriate folder and start the GUI from the terminal

This time, I saved it on the desktop with the file name editor.py, so on the terminal, execute cd desktop → python editor.py. Screenshot from 2020-11-24 23-03-27.png

3: Read image file

Click the [Open] button at the bottom right. Screenshot from 2020-11-25 00-15-11.png Select an image file from the file dialog. Screenshot from 2020-11-25 00-15-34.png The selected image is displayed. Screenshot from 2020-11-25 00-23-55.png

4: Label in the image

A red frame is created by dragging and dropping on the displayed image. The red frame can be moved up, down, left and right with the arrow keys. Screenshot from 2020-11-25 00-27-43.png Enter the object name (train this time) in the text box labeled [object] on the right, and press the [Save] button below to display the blue frame and the entered object name in the image. At this point, the train in the image was labeled "train". Screenshot from 2020-11-25 00-28-09.png Objects in other images can be renamed and labeled in the same way. Screenshot from 2020-11-25 00-29-31.png

Save labeled data as an XML file

Click the [Out] button below to display the file dialog, where you can specify the save destination. Screenshot from 2020-11-25 00-29-41.png All created files are saved as .xml. Screenshot from 2020-11-25 00-30-09.png

Recommended Posts

Object detection (Single Shot MultiBox Detector) XML file creation GUI for image data
TFRecord file creation memorandum for object detection
Computer Vision: Object Detection Part2-Single Shot Multi Detector
Tool for creating training data for object detection in OpenCV