YOLOv4-pytorch icon indicating copy to clipboard operation
YOLOv4-pytorch copied to clipboard

Issues while training.

Open bobbilichandu opened this issue 4 years ago • 4 comments

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?

bobbilichandu avatar Dec 07 '20 05:12 bobbilichandu

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

jingtianyilong avatar Dec 07 '20 12:12 jingtianyilong

请问你的问题如何解决的

kuaileyuandi avatar Dec 18 '20 12:12 kuaileyuandi

请问你的问题如何解决的

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

jingtianyilong avatar Dec 21 '20 05:12 jingtianyilong

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

thanks

ElHouas avatar Feb 28 '22 13:02 ElHouas