argusswift / YOLOv4-pytorch

This is a pytorch repository of YOLOv4, attentive YOLOv4 and mobilenet YOLOv4 with PASCAL VOC and COCO
1.68k stars 329 forks source link

Issues while training. #105

Open bobbilichandu opened 3 years ago

bobbilichandu commented 3 years ago

I am using crowdhuman dataset to train the model from scratch. I generated text files as mentioned in readme file.

line in txt file [sample]

./crowdhumandata/Images/273275,e99d80007220d4b6.jpg 352,311,461,534,0 455,320,557,527,0 927,486,1065,712,0 824,501,938,696,0 754,423,870,583,0 741,454,840,614,0 883,587,1021,801,0 566,498,748,812,0 500,489,621,704,0

directory structure: yolov4-pytorch

  - crowdhumandata
         - Images(all jpg files)
         - Annotations 
              - test_annotation.txt
              - train_annotation.txt

Set paths correctly in yolov4_config.py DATA_PATH = "./crowdhumandata/Images" PROJECT_PATH = "./crowdhumandata/Annotations/" DETECTION_PATH = "../"

Got this error File "/home/yolov4/utils/datasets.py", line 207, in __creat_label label[i][yind, xind, iou_mask, 0:4] = bbox_xywh IndexError: index 38 is out of bounds for axis 1 with size 38

What might be the possible issue for this?

jingtianyilong commented 3 years ago

Check your bboxes. They should not come outside of the image

kuaileyuandi commented 3 years ago

请问你的问题如何解决的

jingtianyilong commented 3 years ago

请问你的问题如何解决的

Some of your bbox comes out of the image. Clip the box and you are good to go.

ElHouas commented 2 years ago

@jingtianyilong Could you explain the process? I ve tried using custom anchors as you suggested and it doesn't work

thanks