Zhongdao / Towards-Realtime-MOT

Joint Detection and Embedding for fast multi-object tracking
MIT License
2.38k stars 539 forks source link

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

Open MCQCQM opened 3 years ago

MCQCQM commented 3 years ago

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]).

fanshu4869 commented 3 years ago

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

MCQCQM commented 3 years ago

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,

fanshu4869 commented 3 years ago

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

MCQCQM commented 3 years ago

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

fanshu4869 commented 3 years ago

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

MCQCQM commented 3 years ago

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

fanshu4869 commented 3 years ago

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

还是非常感谢

afonseca18 commented 3 years ago

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.

fanshu4869 commented 3 years ago

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

afonseca18 commented 3 years ago

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]

fanshu4869 commented 3 years ago

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.

0x45f commented 3 years ago

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

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

fanshu4869 commented 3 years ago

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

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

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

0x45f commented 3 years ago

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

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

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

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

fanshu4869 commented 3 years ago

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

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

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

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

跟cfg的分辨率保持一致

0x45f commented 3 years ago

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

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

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

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

跟cfg的分辨率保持一致

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

JAYCHOU2020 commented 2 years ago

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

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

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

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

跟cfg的分辨率保持一致

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

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

JAYCHOU2020 commented 2 years ago

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

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

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

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

跟cfg的分辨率保持一致

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

十分迫切得到您的回复,

JYing7 commented 2 years ago

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

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

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

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

跟cfg的分辨率保持一致

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

十分迫切得到您的回复,

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