vojirt / kcf

Kernelized Correlation Filter tracker
408 stars 174 forks source link

"txt" question #20

Open Dorismz opened 6 years ago

Dorismz commented 6 years ago

please somebody tell me where can i get the images.txt ? Thanks a lot!

Dorismz commented 6 years ago

please somebody tell me where can i get the images.txt ? Thanks a lot! and , i can't make successful, it was error: undefined reference to symbol 'pthread_create@@GLIBC2.2.5. so, how can i get the lib,"pthread,"?

Dorismz commented 3 years ago

怎样把这个pth转成onnx?

Dorismz commented 3 years ago

---------求带。。。。 我转换的时候出现提示“copying a param with shape torch.Size([512,4608]) from checkpoint, the shape in current model is torch.Size([512,4620800]).” ---------下面是我的转换代码----------: import torch, onnx, collections from torchvision.models.utils import load_state_dict_from_url from siamese import Siamese from PIL import Image import numpy as np print('notice !!!! ----> use python3 run this script!!! \n') INPUT_DICT = 'model_data/Omniglot_vgg.pth'#input path OUT_ONNX = 'E:/data/att_faces/Siamese-pytorch-master/Siamese-pytorch-master/model_data/Omniglot_vgg.onnx'#output path device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model = Siamese() model.load_state_dict(torch.load(self.model_path, map_location=device)) model.eval() x = torch.randn(1, 3, 105, 105); input_names = ["input"]; out_names = ["output"];

xmodel= torch.load(INPUT_DICT, map_location=torch.device('cpu'))

xmodel= torch.load_state_dict(torch.load(file_path))#(INPUT_DICT, map_location=torch.device('cpu'))

xmodel.eval()

xmodel = Siamese()

torch.onnx.export(model, x, OUT_ONNX, export_params=True, training=False, input_names=input_names, output_names=out_names)

print('please run: python3 -m onnxsim test.onnx test_sim.onnx\n')#对转化后的模型,运行这个命令,简化符号

print('convert done!\n')