deyiwang89 / pytorch-yolov4-deepsort

25 stars 7 forks source link

training yolo-v4 detector #13

Open YHassan002 opened 1 year ago

YHassan002 commented 1 year ago

Thanks for sharing this useful repository! I'm trying to retrain the detector with my own data, in which format should I restructure my data into?

Particularly, how to construct the train.txt file to be compatible with your code?

Thank you,

deyiwang89 commented 1 year ago
  1. Use the VOC format for training.
  2. Before training, put the label file in the Annotation under the VOC2007 folder under the VOCdevkit folder.
  3. Before training, put the image files in JPEGImages under the VOC2007 folder under the VOCdevkit folder.
  4. Use the voc2yolo4.py file to generate the corresponding txt before training.
  5. Run voc_annotation.py in the root directory again. Before running, you need to change the classes to your own classes. Be careful not to use Chinese labels and no spaces in the folder!
  6. At this time, the corresponding 2007_train.txt will be generated, and each line corresponds to its picture position and its real frame position.