Jiangfeng-Xiong / SiamRPN-TF

A TensorFlow implementation of SiamRPN
18 stars 5 forks source link

ImportError: No module named alexnet_tweak #6

Open jasonisnotmyrealname opened 4 years ago

jasonisnotmyrealname commented 4 years ago

Hi, when I run 'python demo.py', it shows "ImportError: No module named alexnet_tweak". I guess alexnet_tweak is a pretrained model? How can I solve this issue? Thanks.

Jiangfeng-Xiong commented 4 years ago

you can just use '# 'to comment it here, i don't upload such file in the repository

jasonisnotmyrealname commented 4 years ago

Thanks, really appreciate that. I did some steps as following:

  1. Download SiamRPNOTB.model pretrained by pytorch
  2. Run conver_pymodel_to_pickle.py to get siamrpn_model.pkl
  3. Run convert_pretrained_model.py to get some ckpt files
  4. Replace 'SiamRPN_Base' to SiamRPN_Config
  5. Replace /home/lab-xiong.jiangfeng/Projects/ to my working dir.
  6. Run 'python demo.py'

Then the demo window shows up and code run well except the bounding box drifted around and failed to track on the moving bag. I'm kinda of stuck in here, having no idea how to debug the problem. Could you give me some tips about the correct steps to run demo in the right way?

Jiangfeng-Xiong commented 4 years ago

The siamrpn_model.pkl is only used to initialize the weight of the network, you should run train_SiamRPN.py to get the trained model weights and config, which will be saved in Logs/SiamRPN/track_model_checkpoints/xxx. I didn't provide the pretrained model that can be directly used to track object.