yolov9
yolov9 copied to clipboard
Please use `train.py` to train gelan models, and use `train_dual.py` to train yolov9 models.
Please use `train.py` to train gelan models, and use `train_dual.py` to train yolov9 models.
Originally posted by @WongKinYiu in https://github.com/WongKinYiu/yolov9/issues/27#issuecomment-1960679596
when we train the 2048*2448-size dataset for gelan.yaml, both train.py and train_dual.py report issue:
File "D:\PythonCode\yolov9-main\utils\loss_tal_dual.py", line 175, in
training for yolov9.yaml is ok.
By the way, how to output the pixel position of the each visual object in the detection?
size should be multiples of 64.
size should be multiples of 64.
Thank you for your prompt reply. sorry, this is my first time using Yolo, what does it mean?
Because the architecture include dowansampling modules and upsampling modules which strides equal to 2. if the input width and height are not multiples of 64, it may cause shape mismatch error. You could use 20482432-size or 20482496-size to train the model.
dualDetect branch at the bottom of the yolov9-c.yaml ( [[31, 34, 37, 16, 19, 22], 1, DualDDetect, [nc]], # DualDDetect(A3, A4, A5, P3, P4, P5) ) so train_dual.py (line 315) will have two list. pred[0] -->3 heads pred[1] --> 3 heads
and other one, for example, gelan-c.yaml you can not find dual branch. there is only single branch ([[15, 18, 21], 1, DDetect, [nc]], # DDetect(P3, P4, P5)) so train.py (line 303) will have only one list. pred --> 3 heads
so if you want to run like gelan-c.yaml then you shoud use train.py not train_dual.py