# Data Labeling ### LabelImg - Support Yolo - download: https://github.com/HumanSignal/labelImg/releases ### Prepare Dataset When using deep learning to implement image object detection, many images are required for training. The higher the image pixel, the better, the more objects we can be labeled, and the greater the flexibility for subsequent use. In preparing images, we recommend paying attention to image diversity and differences. If we want to use a photo of citrus for identification, We need to pay attention to the following when shooting: - Different environment:Such as greenhouses or outdoor venues, strawberries are grown on elevated or flat ground - Different seasons:Changes in the color of fruits and vegetables - Different time:The difference caused by the change of light and shadow. Direct, oblique or diffuse light - Different climate:Effects of rainy days and dry seasons on the shape of fruits and vegetables - Different growth cycles:The appearance of fruits and vegetable changes in different periods, from germination and long leaves to flowering and fruiting mature...etc ### Create Directory ![image](https://hackmd.io/_uploads/ByFWbPgPp.png) ### Labeling (1/2) • When we open LabelImg the screen will be empty • Click「Open Dir」and choose the images directory we create in the previous step • Click 「Change Save Dir」and choose the labels directory • Next, we can select the image we want to label from the lower pane, and press 「 Create RectBox 」to start labeling ![image](https://hackmd.io/_uploads/B1-ldDgD6.png) ### Labeling (2/2) ![image](https://hackmd.io/_uploads/HymZdwlva.png) ### Reminder • The image name cannot contain Chinese, -, # • After Box labeling, the output file name will be the same as the image. If the image does not have any Box labeling, there will be no output file. • Every time you label an image, you have to save it once. The program will ask you if you don't want to save it. • If you want to label a large number of objects, you can first study The shortcut keys of LabelImg (input method must be English) to speed up the speed of manual labeling(https://github.com/HumanSignal/labelImg#hotkeys) ### Finish Labeling ![image](https://hackmd.io/_uploads/Sy9RcPlvT.png) ### YOLO Format • category number : object-class • object center in X : The ratio of the object center x in the image width • object center in Y : The ratio of the object center y in the image height • object width in X : The ratio of the object width in the image width • object height in Y : The ratio of the object height in the image height ----- # YOLO ### You Only Look Once (YOLO) ![image](https://hackmd.io/_uploads/H1CpZwgPa.png) ### YOLO v1-v8 ![image](https://hackmd.io/_uploads/Hk0CZvgDa.png) ### Use Google Colab • Google Colab has GPUs to use – https://colab.research.google.com/notebooks/intro.ipynb • Open one new Colab • Open one new Notebook ### Copy Colab https://colab.research.google.com/drive/1jcVb-61Lpdw2B_0DgIGdkh8pICz_xmr5#scrollTo=T1jlq7SIxTIN • Select “Save a copy in Drive” to modify ![image](https://hackmd.io/_uploads/ByiC7Dxv6.png) ### Use GPU environment • Change the Hardware accelerator to GPU ![image](https://hackmd.io/_uploads/r1x2jvew6.png) ### Object Detection ![image](https://hackmd.io/_uploads/ryeYXPgwa.png)