Open mjack3 opened 3 years ago
The width and height should be multiple of 64? I'm not sure.
I think network size needs to be multiples of 32. But when i tried low resolutions with p5, p6 and p7, not all worked. It seems to me that, half and quarters of given resolution works. Eg: p6 (1280x1280) -> 640x640 and 320x320 worked but 416x416 didn't. Couldn't complete the test as my GPU memory was not enough to train the models. I was barely able to load the network.
And it seems they need to be similar. width=height. so in your case you would have to try with 1280x1280 and feed the 1152x800 image. Internally they add padding to the image so that it becomes 1280x1280. i read it somewhere but cannot remember where exactly. check in the main README.md
In yolov4 the width and height must be multiple of 32 because it downsamples 5 times. So you should check how many downsample times in this model, and then you can get right resolution.
@lsd1994 and what is the relation of 32 with the number of downsamples?
2^5=32, so 32 pixels in original image become 1 pixel in last feature map after 5 times downsample.
I got the same issue while trying to retrain yolov4-tiny with 640*360. I then modified 360 to 384 ( to make sure it is multiple of 32) and it worked.
I am using the YOLOv4-P6.cfg and the pre-trained weight for training yolov4-p6.conv.289. I have just one classe so, following the step by step y changed classes=1, filters=24, width=1152 and height=800
Then i run this command
./darknet detector train data/obj_iii.data cfg/scale/yolov4-p6_III.cfg pre-trained/yolov4-p6.conv.289
and i get this errorHowever, i can train the yolov4-p5 (with different width and height)