mmdetection-mini icon indicating copy to clipboard operation
mmdetection-mini copied to clipboard

can you train yolov5?

Open WangPeng19981204 opened this issue 3 years ago • 4 comments

i can not train yolov5 with your code ,report error ' ValueError: Target size (torch.Size([16, 1200, 1])) must be the same as input size (torch.Size([16, 17000, 1]))',it seems that have prombles on network ,i find two prombles,the first is the neck of yolov5 is none ,the neck code need to write,the second is anchor size of yolov5 is that of yolov3 ,which need to be modified. finally ,thank you for you great work ,Look forward to your reply!

WangPeng19981204 avatar Apr 08 '21 03:04 WangPeng19981204

i can not train yolov5 with your code ,report error ' ValueError: Target size (torch.Size([16, 1200, 1])) must be the same as input size (torch.Size([16, 17000, 1]))',it seems that have prombles on network ,i find two prombles,the first is the neck of yolov5 is none ,the neck code need to write,the second is anchor size of yolov5 is that of yolov3 ,which need to be modified. finally ,thank you for you great work ,Look forward to your reply!

I have the same problem

caixiiaoyang avatar Apr 10 '21 08:04 caixiiaoyang

https://github.com/hhaAndroid/mmdetection-mini/blob/3858c8c2f071c064fe78ce24088a1c9815ae1a21/mmdet/models/dense_heads/rr_yolov5_head.py#L73 I think the reason is that the yolov5Head‘s output channel number is hard coded.

woolpeeker avatar Apr 21 '21 04:04 woolpeeker

I have the same problem. How to fix it? Thanks !!

fengqian-wei avatar Jul 06 '21 14:07 fengqian-wei

I have the same problem. How to fix it? Thanks !!

setting as nn.Conv2d(make_div8_fun(256), (classNum+5)*3, 1),

fengqian-wei avatar Jul 06 '21 15:07 fengqian-wei