YOLOV4 training its own data set process

Training step
1. This article uses VOC format for training.
2. Before training, put the label file in the Annotation under the VOC2007 folder under the VOCdevkit folder.

3. Use the test.py file to generate the corresponding txt before training.
4. Run voc_annotation.py in the root directory again, you need to change the classes to your own classes before running. Be careful not to use Chinese labels, and no spaces in the folder!

classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]

5. At this time, the corresponding 2007_train.txt will be generated, and each line corresponds to the position of the picture and the position of the real frame.
6. Before training, you need to create a new txt document under model_data, enter the classes to be classified in the document, and point classes_path to the file in train.py. The example is as follows:

classes_path = 'model_data/my_class.txt'    

The content of the model_data/my_class.txt file is:

cat
dog
...

8. Run train.py to start training.

Guess you like

Origin blog.csdn.net/mao_hui_fei/article/details/114006516