Yolo_Label/README.md

159 lines
5.9 KiB
Markdown
Raw Permalink Normal View History

2021-06-15 06:55:17 +03:00
# Yolo_Label
2018-10-29 07:49:17 +03:00
2021-02-26 17:21:36 +03:00
## Advertisement
2021-02-26 17:21:21 +03:00
2021-02-28 10:34:41 +03:00
[plotbbox](https://github.com/developer0hye/plotbbox) : A Python package to plot pretty bounding boxes on image
2021-02-26 17:21:21 +03:00
[YOLOv3Tiny](https://github.com/developer0hye/YOLOv3Tiny) : PyTorch based YOLOv3Tiny implementation
2018-10-29 07:49:17 +03:00
## WHAT IS THIS?!
2019-04-11 09:05:40 +03:00
Reinventing The Wheel?!!!!
2018-10-29 07:49:17 +03:00
2018-10-29 08:38:26 +03:00
![1_hfyjxxcfingbcyzcgksaiq](https://user-images.githubusercontent.com/35001605/47629997-b47aa200-db81-11e8-8873-71ae653563e0.png)
2019-04-11 09:05:40 +03:00
In the world, there are many good image-labeling tools for object detection. -e.g. , ([Yolo_mark](https://github.com/AlexeyAB/Yolo_mark), [BBox-Label-Tool](https://github.com/puzzledqs/BBox-Label-Tool), [labelImg](https://github.com/tzutalin/labelImg)).
2018-10-29 07:49:17 +03:00
2019-04-11 09:05:40 +03:00
But... I've reinvented one...
2018-10-29 08:38:26 +03:00
2018-10-29 10:36:50 +03:00
## WHY DID YOU REINVENT THE WHEEL? ARE YOU STUPID?
2018-10-29 08:38:26 +03:00
2019-04-11 09:05:40 +03:00
When I used the pre-existing programs to annotate a training set for YOLO V3, I was sooooooooooo bored...
2018-10-29 08:38:26 +03:00
2019-04-11 13:41:25 +03:00
So I thought why it is so boring??
2018-10-29 09:09:07 +03:00
2019-04-11 09:05:40 +03:00
And I found an answer.
2018-10-29 07:49:17 +03:00
2018-10-29 10:15:13 +03:00
The answer is that pre-existing programs are not **sensitive**.
2018-10-29 07:49:17 +03:00
2019-04-11 09:05:40 +03:00
So I decided to make a **sensitive** image-labeling tool for object detection.
2018-10-29 10:15:13 +03:00
2019-04-11 09:05:40 +03:00
## SHOW ME YOUR SENSITIVE IMAGE-LABELING TOOL!!
2018-10-29 10:15:13 +03:00
2019-04-11 09:05:40 +03:00
It's the **SENSITIVE** image-labeling tool for object detection!
2018-10-29 11:48:20 +03:00
2018-10-29 19:02:41 +03:00
![image](https://user-images.githubusercontent.com/35001605/47644151-bd369c80-dbb0-11e8-9505-d7ada78911c2.png)
2018-10-29 08:38:26 +03:00
2018-10-30 06:00:08 +03:00
![ezgif-5-85c0613befb3](https://user-images.githubusercontent.com/35001605/47693025-3d094900-dc3b-11e8-9d96-ea2f7e37cf7a.gif)
![ezgif-5-c57fe634145b](https://user-images.githubusercontent.com/35001605/47693028-3f6ba300-dc3b-11e8-9e22-70c448d59398.gif)
2018-10-29 10:31:00 +03:00
## HMM... I SAW THIS DESIGN SOMEWHERE
2019-04-11 09:27:54 +03:00
I refer to [the website of Joseph Redmon](https://pjreddie.com/darknet/
2018-10-29 11:44:52 +03:00
) who invented the [YOLO](https://www.youtube.com/watch?v=MPU2HistivI).
2018-10-29 12:21:42 +03:00
2018-10-29 10:36:08 +03:00
![redmon2](https://user-images.githubusercontent.com/35001605/47635529-a1270100-db98-11e8-8c03-1dcea7c77d1d.PNG)
2018-10-29 12:30:26 +03:00
# TUTORIAL / USAGE
2018-11-18 18:16:25 +03:00
2021-02-05 06:53:27 +03:00
## Install and Run
2018-11-18 18:16:25 +03:00
2021-02-05 06:53:27 +03:00
1. Download this project
2018-11-18 18:16:25 +03:00
2021-02-05 06:53:27 +03:00
### For Windows
2018-11-18 18:16:25 +03:00
2021-06-06 09:00:02 +03:00
2. Download [YOLOLabel_20210606_v3.2](https://drive.google.com/file/d/1h_7LRm-dYX3D653A1Sb6Mq0iWxjzugNw/view?usp=sharing)
2018-11-18 18:16:25 +03:00
2021-02-05 06:53:27 +03:00
3. Unzip
4. Run YoloLabel.exe
2018-11-18 18:16:25 +03:00
2021-03-15 15:17:57 +03:00
![image](https://user-images.githubusercontent.com/35001605/111152300-e74b5680-85d3-11eb-8df7-178148548c12.png)
2018-11-18 18:16:25 +03:00
2021-02-05 06:53:27 +03:00
### For macOS
2021-02-05 06:50:36 +03:00
2021-02-05 06:53:27 +03:00
2. Clone or download the source code of this repository
2021-02-05 06:50:36 +03:00
2021-02-05 06:53:27 +03:00
3. Open terminal and type command in the downloaded directory.
2021-02-05 06:50:36 +03:00
```console
yourMacOS:Yolo_Label you$ qmake
yourMacOS:Yolo_Label you$ make
```
2021-02-05 06:53:27 +03:00
4. Run YoloLabel.app/Contents/MacOS/YoloLabel in terminal or double click YoloLabel.app to run
2021-02-05 06:50:36 +03:00
```console
yourMacOS:Yolo_Label you$ ./YoloLabel.app/MacOS/YoloLabel
```
2021-02-05 06:53:27 +03:00
## Prepare Custom Dataset and Load
2019-04-11 09:27:54 +03:00
1. Put your .jpg, .png -images into a directory
2018-10-29 13:23:44 +03:00
(In this tutorial I will use the Kangarooo and the Raccoon Images. These images are in the 'Samples' folder.)
2018-10-29 12:21:42 +03:00
2018-10-30 11:10:43 +03:00
![dataset](https://user-images.githubusercontent.com/35001605/47704306-8e7afd80-dc66-11e8-9f28-13010bd2d825.PNG)
2018-10-29 12:21:42 +03:00
2019-04-11 09:38:29 +03:00
2. Put the names of the objects, each name on a separate line and save the file( .txt, .names).
2018-10-29 12:21:42 +03:00
2018-10-30 11:10:43 +03:00
![objnames](https://user-images.githubusercontent.com/35001605/47704259-75724c80-dc66-11e8-9ed1-2f84d0240ebc.PNG)
2018-10-29 10:15:13 +03:00
2019-04-11 09:27:54 +03:00
3. Run Yolo Label!
2018-10-29 08:38:26 +03:00
2018-10-29 19:02:41 +03:00
![image](https://user-images.githubusercontent.com/35001605/47644151-bd369c80-dbb0-11e8-9505-d7ada78911c2.png)
2019-04-11 09:38:29 +03:00
4. Click the button 'Open Files' and open the folder with the images and the file('*'.names or '*'.txt) with the names of the objects.
2018-10-30 06:37:00 +03:00
![image](https://user-images.githubusercontent.com/35001605/47694149-d20e4100-dc3f-11e8-9d97-fba87a6e1b5a.png)
2018-11-18 17:53:14 +03:00
5. And... Label!... Welcome to Hell... I really hate this work in the world.
2018-11-07 09:40:20 +03:00
2018-11-18 17:51:53 +03:00
This program has adopted a different labeling method from other programs that adopt **"drag and drop"** method.
2018-11-07 09:40:20 +03:00
2018-11-18 17:53:14 +03:00
To minimize wrist strain when labeling, I adopted the method **"twice left button click"** method more convenient than
**"drag and drop"** method.
2018-10-30 10:25:24 +03:00
2018-11-18 17:49:38 +03:00
**drag and drop**
2018-11-18 17:50:03 +03:00
2018-11-18 17:49:38 +03:00
![draganddrop](https://user-images.githubusercontent.com/35001605/48674135-6fe49400-eb8c-11e8-963c-c343867b7565.gif)
2018-11-18 17:51:53 +03:00
**twice left button click**
2018-11-18 17:50:03 +03:00
2018-11-18 17:49:38 +03:00
![twiceleftbuttonclickmethod](https://user-images.githubusercontent.com/35001605/48674136-71ae5780-eb8c-11e8-8d8f-8cb511009491.gif)
2018-10-30 10:25:24 +03:00
![ezgif-5-805073516651](https://user-images.githubusercontent.com/35001605/47698872-5bc80980-dc54-11e8-8984-e3e1230eccaf.gif)
6. End
2018-10-30 11:10:43 +03:00
![endimage](https://user-images.githubusercontent.com/35001605/47704336-a6528180-dc66-11e8-8551-3ecb612b7353.PNG)
2018-10-31 12:45:48 +03:00
## SHORTCUTS
2018-10-30 10:25:24 +03:00
| Key | Action |
|---|:---:|
2018-12-17 09:05:38 +03:00
| `A` | Save and Prev Image |
2018-12-17 09:05:29 +03:00
| `D, Space` | Save and Next Image |
2018-10-30 10:57:45 +03:00
| `S` | Next Label <br> ![ezgif-5-f7ee77cd24c3](https://user-images.githubusercontent.com/35001605/47703190-d3049a00-dc62-11e8-846f-5bd91e98bdbc.gif) |
| `W` | Prev Label <br> ![ezgif-5-ee915c66dad8](https://user-images.githubusercontent.com/35001605/47703191-d39d3080-dc62-11e8-800b-986ec214b80c.gif) |
2018-10-30 10:43:51 +03:00
| `Ctrl + S` | Save |
2018-10-31 12:45:48 +03:00
| `Ctrl + C` | Delete all existing bounding boxes in the image |
2020-10-02 16:26:19 +03:00
| `Ctrl + D` | Delete current image |
2018-10-30 10:25:24 +03:00
2018-10-30 10:50:00 +03:00
| Mouse | Action |
|---|:---:|
2018-10-31 12:45:48 +03:00
| `Right Click` | Delete Focused Bounding Box in the image <br> ![ezgif-5-8d0fb51bec75](https://user-images.githubusercontent.com/35001605/47706913-c20d5600-dc6d-11e8-8a5c-47065f6a6416.gif) |
2018-10-30 12:49:17 +03:00
| `Wheel Down` | Save and Next Image |
| `Wheel Up` | Save and Prev Image |
2018-10-30 12:16:35 +03:00
2018-12-14 08:04:40 +03:00
## Button Events
### Remove
![ezgif-2-90fb8205437e](https://user-images.githubusercontent.com/35001605/49983945-fbddb600-ffa8-11e8-9672-f7b71e4e603b.gif)
2018-10-31 12:45:48 +03:00
## ETC
2018-12-14 07:46:26 +03:00
You can access all image by moving horizontal slider bar. But when you control horizontal slider bar, the last processed image will not be saved automatically. So if you want not to lose your work, you should save before moving the horizontal slider bar.
2018-10-30 12:33:12 +03:00
![ezgif-5-53abf38b3387](https://user-images.githubusercontent.com/35001605/47708528-97bd9780-dc71-11e8-94f1-5ee23776d5fe.gif)
2018-10-31 12:45:48 +03:00
# CONCLUSIONS
2018-10-30 13:25:50 +03:00
I've reinvented the wheel.
2018-10-30 12:40:43 +03:00
![dont-reinvent-the-wheel](https://user-images.githubusercontent.com/35001605/47709289-46160c80-dc73-11e8-8ef6-6af3a3c52403.jpg)
2018-11-08 12:32:14 +03:00
# TO DO LISTS
2018-11-18 18:18:01 +03:00
Upload binary file for easy usage for windows and ubuntu
2018-12-16 15:44:33 +03:00
deployment for ubuntu
Image zoom