Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.46k stars 1.49k forks source link

Train on Rectangle Input Sizes #535

Open clydebailey opened 2 years ago

clydebailey commented 2 years ago

I have trained a yolov4-tiny-3l network on custom dataset in alexeyab darknet repo and I am trying to mimic the results using this repo. The custom model is trained on an image resolution of (320 + 96m)x(320+96n) shape and I see the readme supports this type of rectangular input shape. However In the train.py (yolo loss function), I see only a single argument for image size has been provided of 608. Am I missing anything?

pavlik-tikhomirov commented 1 year ago

Train.py is written very bad, so you should change fsize to for example _fwidth and _fheight, and then make corresponding changes in init, build_target and forward functions

I have trained a yolov4-tiny-3l network on custom dataset in alexeyab darknet repo and I am trying to mimic the results using this repo. The custom model is trained on an image resolution of (320 + 96m)x(320+96n) shape and I see the readme supports this type of rectangular input shape. However In the train.py (yolo loss function), I see only a single argument for image size has been provided of 608. Am I missing anything?