Comments (5)
Hi, Zhipeng, good job! Thanks for your kind release of this code. When I test the siamRPN with pre-trained model, however, I find the results is always lost even at the beginning. I wonder if you released the right version of the pretrained model? I see the following on my terminal:
python test_siamrpn.py
load pretrained model from ../snapshot/CIResNet22.pth
remove prefix 'module.'
missing keys:set(['connect_model.adjust.weight', 'connect_model.search_reg.bias', 'connect_model.search_cls.bias', 'connect_model.search_reg.weight', 'connect_model.template_reg.weight', 'connect_model.template_reg.bias', 'connect_model.search_cls.weight', 'connect_model.template_cls.bias', 'connect_model.template_cls.weight', 'connect_model.adjust.bias'])
unused checkpoint keys:set([u'connect_model.loc_adjust.weight', u'connect_model.loc_adjust.bias'])Would you please kindly help to run the code succesfully? the code of SiamFC is OK (I tried). I used this setting for testing:
parser.add_argument('--arch', dest='arch', default='SiamRPNRes22', help='backbone architecture')
parser.add_argument('--resume', default='../snapshot/CIResNet22.pth', type=str, help='pretrained model')
Hi~ The pretrained model you used is not correct. You should use CIResNet22_RPN.pth
for SiamRPN and CIResNet22.pth
for SiamFC respectively. Try and give me a feedback pls.
from siamdw.
Thanks for your advice. I also tried "CIResNet22_RPN.pth", but it shown me the following error:
python test_siamrpn.py
load pretrained model from ../snapshot/CIResNet22_RPN.pth
remove prefix 'module.'
missing keys:set([])
unused checkpoint keys:set([u'features.features.layer2.2.bn1.num_batches_tracked', u'features.features.layer2.0.bn2.num_batches_tracked', u'features.features.layer2.3.bn2.num_batches_tracked', u'features.features.layer1.2.bn1.num_batches_tracked', u'features.features.layer1.1.bn3.num_batches_tracked', u'features.features.layer1.2.bn2.num_batches_tracked', u'features.features.layer2.4.bn2.num_batches_tracked', u'features.features.layer2.3.bn3.num_batches_tracked', u'features.features.layer1.0.bn1.num_batches_tracked', u'features.features.layer2.3.bn1.num_batches_tracked', u'features.features.layer2.2.bn3.num_batches_tracked', u'features.features.layer1.1.bn2.num_batches_tracked', u'features.features.layer2.0.bn3.num_batches_tracked', u'features.features.layer1.1.bn1.num_batches_tracked', u'features.features.layer2.2.bn2.num_batches_tracked', u'features.features.layer1.2.bn3.num_batches_tracked', u'features.features.layer1.0.downsample.1.num_batches_tracked', u'features.features.layer2.0.downsample.1.num_batches_tracked', u'features.features.layer2.4.bn3.num_batches_tracked', u'features.features.layer1.0.bn2.num_batches_tracked', u'features.features.bn1.num_batches_tracked', u'features.features.layer2.0.bn1.num_batches_tracked', u'features.features.layer2.4.bn1.num_batches_tracked', u'features.features.layer1.0.bn3.num_batches_tracked'])
Traceback (most recent call last):
File "test_siamrpn.py", line 317, in
main()
File "test_siamrpn.py", line 203, in main
net = load_pretrain(net, args.resume)
File "/media/wangxiao/49cd8079-e619-4e4b-89b1-15c86afb5102/my_works/SiamDW-master-revised/siamese_tracking/../lib/utils/utils.py", line 240, in load_pretrain
model.load_state_dict(pretrained_dict, strict=False)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 721, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for SiamRPNRes22:
While copying the parameter named "connect_model.template_cls.bias", whose dimensions in the model are torch.Size([5120]) and whose dimensions in the checkpoint are torch.Size([1280]).
While copying the parameter named "connect_model.template_cls.weight", whose dimensions in the model are torch.Size([5120, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([1280, 512, 3, 3]).
While copying the parameter named "connect_model.template_reg.bias", whose dimensions in the model are torch.Size([10240]) and whose dimensions in the checkpoint are torch.Size([5120]).
While copying the parameter named "connect_model.template_reg.weight", whose dimensions in the model are torch.Size([10240, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([5120, 512, 3, 3]).
While copying the parameter named "connect_model.search_cls.bias", whose dimensions in the model are torch.Size([512]) and whose dimensions in the checkpoint are torch.Size([256]).
While copying the parameter named "connect_model.search_cls.weight", whose dimensions in the model are torch.Size([512, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([256, 512, 3, 3]).
While copying the parameter named "connect_model.search_reg.bias", whose dimensions in the model are torch.Size([512]) and whose dimensions in the checkpoint are torch.Size([256]).
While copying the parameter named "connect_model.search_reg.weight", whose dimensions in the model are torch.Size([512, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([256, 512, 3, 3]).
from siamdw.
Thanks for your advice. I also tried "CIResNet22_RPN.pth", but it shown me the following error:
python test_siamrpn.py
load pretrained model from ../snapshot/CIResNet22_RPN.pth
remove prefix 'module.'
missing keys:set([])
unused checkpoint keys:set([u'features.features.layer2.2.bn1.num_batches_tracked', u'features.features.layer2.0.bn2.num_batches_tracked', u'features.features.layer2.3.bn2.num_batches_tracked', u'features.features.layer1.2.bn1.num_batches_tracked', u'features.features.layer1.1.bn3.num_batches_tracked', u'features.features.layer1.2.bn2.num_batches_tracked', u'features.features.layer2.4.bn2.num_batches_tracked', u'features.features.layer2.3.bn3.num_batches_tracked', u'features.features.layer1.0.bn1.num_batches_tracked', u'features.features.layer2.3.bn1.num_batches_tracked', u'features.features.layer2.2.bn3.num_batches_tracked', u'features.features.layer1.1.bn2.num_batches_tracked', u'features.features.layer2.0.bn3.num_batches_tracked', u'features.features.layer1.1.bn1.num_batches_tracked', u'features.features.layer2.2.bn2.num_batches_tracked', u'features.features.layer1.2.bn3.num_batches_tracked', u'features.features.layer1.0.downsample.1.num_batches_tracked', u'features.features.layer2.0.downsample.1.num_batches_tracked', u'features.features.layer2.4.bn3.num_batches_tracked', u'features.features.layer1.0.bn2.num_batches_tracked', u'features.features.bn1.num_batches_tracked', u'features.features.layer2.0.bn1.num_batches_tracked', u'features.features.layer2.4.bn1.num_batches_tracked', u'features.features.layer1.0.bn3.num_batches_tracked'])
Traceback (most recent call last):
File "test_siamrpn.py", line 317, in
main()
File "test_siamrpn.py", line 203, in main
net = load_pretrain(net, args.resume)
File "/media/wangxiao/49cd8079-e619-4e4b-89b1-15c86afb5102/my_works/SiamDW-master-revised/siamese_tracking/../lib/utils/utils.py", line 240, in load_pretrain
model.load_state_dict(pretrained_dict, strict=False)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 721, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for SiamRPNRes22:
While copying the parameter named "connect_model.template_cls.bias", whose dimensions in the model are torch.Size([5120]) and whose dimensions in the checkpoint are torch.Size([1280]).
While copying the parameter named "connect_model.template_cls.weight", whose dimensions in the model are torch.Size([5120, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([1280, 512, 3, 3]).
While copying the parameter named "connect_model.template_reg.bias", whose dimensions in the model are torch.Size([10240]) and whose dimensions in the checkpoint are torch.Size([5120]).
While copying the parameter named "connect_model.template_reg.weight", whose dimensions in the model are torch.Size([10240, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([5120, 512, 3, 3]).
While copying the parameter named "connect_model.search_cls.bias", whose dimensions in the model are torch.Size([512]) and whose dimensions in the checkpoint are torch.Size([256]).
While copying the parameter named "connect_model.search_cls.weight", whose dimensions in the model are torch.Size([512, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([256, 512, 3, 3]).
While copying the parameter named "connect_model.search_reg.bias", whose dimensions in the model are torch.Size([512]) and whose dimensions in the checkpoint are torch.Size([256]).
While copying the parameter named "connect_model.search_reg.weight", whose dimensions in the model are torch.Size([512, 512, 3, 3]) and whose dimensions in the checkpoint are torch.Size([256, 512, 3, 3]).
- Please install packages with
install_rpn.sh
. - Make sure that the input
cls_type
isthinner
.
from siamdw.
@JudasDie Thanks for your suggestions. It's working now (Only "thinner" works for my setting). May I add your wechat? Maybe we can have some cooperations later. It's ok if you do not want to be troubled. My wechat is: wangxiao5791509.
from siamdw.
@JudasDie Thanks for your suggestions. It's working now (Only "thinner" works for my setting). May I add your wechat? Maybe we can have some cooperations later. It's ok if you do not want to be troubled. My wechat is: wangxiao5791509.
Glad to know you make it. The question will be closed.
from siamdw.
Related Issues (20)
- Tracker Parameters HOT 1
- can't reproduced the result in paper HOT 3
- "Set up VOT-Toolkit according to official tutorial" HOT 1
- occlusion problem while testing HOT 1
- 请问SiamDW_T的训练方式是否和SiamDW一样 HOT 2
- vot测试结果 HOT 4
- 请问每个epoch使用多少对数据?
- 使用新資料重新訓練模型
- How do I get pre trained my Backbone network with imagenet?
- torch.nn.modules.module.ModuleAttributeError: 'SiamRPNRes22' object has no attribute 'module'
- How you get the pretrain model? HOT 4
- When i test,i use"python siamese_tracking/run_video.py --arch SiamRPNRes22 --resume snapshot/CIResNet22_RPN.pth --video videos/bag.mp4",but there is a KeyError:"SiamRPNRes22" HOT 1
- test problems
- failed to fetch data from googledrive
- failed to download protained_model in SiamDW_T,it's not found
- the number
- the number of parameters and flops of tracker
- The argument list of lib/core/workspace_load.m may be wrong.
- 关于ResNet22W的训练过程 HOT 2
- Failed to reach google drive's link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from siamdw.