Towards-Realtime-MOT icon indicating copy to clipboard operation
Towards-Realtime-MOT copied to clipboard

The weight after training is different from the dimension of the model

Open MCQCQM opened this issue 4 years ago • 19 comments

RuntimeError: Error(s) in loading state_dict for Darknet: size mismatch for classifier.weight: copying a param with shape torch.Size([519, 512]) from checkpoint, the shape in current model is torch.Size([14455, 512]). size mismatch for classifier.bias: copying a param with shape torch.Size([519]) from checkpoint, the shape in current model is torch.Size([14455]).

MCQCQM avatar Nov 04 '20 09:11 MCQCQM

maybe you can try this multitracker.py line163 self.model = Darknet(opt.cfg, nID=14455) To nID=11932

fanshu4869 avatar Nov 09 '20 07:11 fanshu4869

thanks a lot ! and you can see #121 ,it has the same question and he deletes the "nID=14455", i test it and that's ok. But i don't know the reason,

MCQCQM avatar Nov 09 '20 07:11 MCQCQM

非常感谢,不过我用自己训练的权重跑通了以后没有出现结果,不知道为啥

fanshu4869 avatar Nov 09 '20 08:11 fanshu4869

对于MOT16数据集来说,在训练集训练之后得到权重,在MOT16测试集使用的话只能得到推理的视频,MOTA等指标是没有的,因为测试集没有gt,好像只能提交到官网得到评价结果......你在训练之后自己怎样做测试的,提交官网吗?

MCQCQM avatar Nov 09 '20 08:11 MCQCQM

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

fanshu4869 avatar Nov 09 '20 08:11 fanshu4869

不好意思,还真没遇到这个问题

MCQCQM avatar Nov 09 '20 08:11 MCQCQM

不好意思,还真没遇到这个问题

还是非常感谢

fanshu4869 avatar Nov 09 '20 08:11 fanshu4869

maybe you can try this multitracker.py line163 self.model = Darknet(opt.cfg, nID=14455) To nID=11932

Hello! I'm facing the same issue but this value does not work for me. How do you calculate this value based on the first question? Thanks in advance.

afonseca18 avatar Nov 19 '20 10:11 afonseca18

maybe you can try this multitracker.py line163 self.model = Darknet(opt.cfg, nID=14455) To nID=11932

Hello! I'm facing the same issue but this value does not work for me. How do you calculate this value based on the first question? Thanks in advance.

Maybe you can see #121

fanshu4869 avatar Nov 19 '20 10:11 fanshu4869

maybe you can try this multitracker.py line163 self.model = Darknet(opt.cfg, nID=14455) To nID=11932

Hello! I'm facing the same issue but this value does not work for me. How do you calculate this value based on the first question? Thanks in advance.

Maybe you can see #121

Thanks for your response. Unfortunately, that does not solve my problem (Already tried nID=0, nID=14455 and deleted the parameter) and that's why I asked you about the reason behind your response, hoping that you used some kind of formula based on the original shape since mine is [2217,512] instead of [519,512]

afonseca18 avatar Nov 19 '20 10:11 afonseca18

maybe you can try this multitracker.py line163 self.model = Darknet(opt.cfg, nID=14455) To nID=11932

Hello! I'm facing the same issue but this value does not work for me. How do you calculate this value based on the first question? Thanks in advance.

Maybe you can see #121

Thanks for your response. Unfortunately, that does not solve my problem (Already tried nID=0, nID=14455 and deleted the parameter) and that's why I asked you about the reason behind your response, hoping that you used some kind of formula based on the original shape since mine is [2217,512] instead of [519,512]

Sorry, I’m afraid I can’t solve your problem.

fanshu4869 avatar Nov 19 '20 10:11 fanshu4869

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

0x45f avatar Jan 06 '21 12:01 0x45f

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

我是因为训练的时候图片尺寸设置错了

fanshu4869 avatar Jan 06 '21 12:01 fanshu4869

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

我是因为训练的时候图片尺寸设置错了

请问您训练的图片尺寸是怎么设置的呢?我训练的时候使用的是默认的[1088, 608]尺寸

0x45f avatar Jan 06 '21 12:01 0x45f

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

我是因为训练的时候图片尺寸设置错了

请问您训练的图片尺寸是怎么设置的呢?我训练的时候使用的是默认的[1088, 608]尺寸

跟cfg的分辨率保持一致

fanshu4869 avatar Jan 06 '21 12:01 fanshu4869

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

我是因为训练的时候图片尺寸设置错了

请问您训练的图片尺寸是怎么设置的呢?我训练的时候使用的是默认的[1088, 608]尺寸

跟cfg的分辨率保持一致

我训练时是一致的,那应该是其他的问题了,感谢您的回复

0x45f avatar Jan 06 '21 12:01 0x45f

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

我是因为训练的时候图片尺寸设置错了

请问您训练的图片尺寸是怎么设置的呢?我训练的时候使用的是默认的[1088, 608]尺寸

跟cfg的分辨率保持一致

我训练时是一致的,那应该是其他的问题了,感谢您的回复

我也是分辨率是一致的但是检测不到任何目标,想请问你找到问题所在了吗?

JAYCHOU2020 avatar Mar 07 '22 08:03 JAYCHOU2020

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

我是因为训练的时候图片尺寸设置错了

请问您训练的图片尺寸是怎么设置的呢?我训练的时候使用的是默认的[1088, 608]尺寸

跟cfg的分辨率保持一致

我训练时是一致的,那应该是其他的问题了,感谢您的回复

十分迫切得到您的回复,

JAYCHOU2020 avatar Mar 07 '22 08:03 JAYCHOU2020

不是,我的意思是,输入视频之后,输出的视频连检测框都没有,results.txt也完全是空的

我也是自己训练了数据集,测试的时候一个检测框都没有,请问你解决这个问题了吗

我是因为训练的时候图片尺寸设置错了

请问您训练的图片尺寸是怎么设置的呢?我训练的时候使用的是默认的[1088, 608]尺寸

跟cfg的分辨率保持一致

我训练时是一致的,那应该是其他的问题了,感谢您的回复

十分迫切得到您的回复,

我也是检测不到任何目标,想请问你找到问题所在了吗?

JYing7 avatar Sep 28 '22 10:09 JYing7