pytorch-video-recognition
pytorch-video-recognition copied to clipboard
Inference.py question for frame process
Hello @jfzhang95 , thanks for your share of c3d implement.
When I inference with trained c3d model, I notice that you did some process to central croped frame.
listed here:
tmp = tmp_ - np.array([[[90.0, 98.0, 102.0]]])
Kindly help to explain that what purpose of doing this operation.
Thanks again.
Can you run inference.py with pretrained model? I run inference.py and see error: Traceback (most recent call last): File "inference.py", line 78, in main() File "inference.py", line 32, in main model.load_state_dict(checkpoint['state_dict']) KeyError: 'state_dict'
Can you run inference.py with pretrained model? I run inference.py and see error: Traceback (most recent call last): File "inference.py", line 78, in main() File "inference.py", line 32, in main model.load_state_dict(checkpoint['state_dict']) KeyError: 'state_dict'
I didn't see this error. My code is here:
# init model
model = C3D_model.C3D(num_classes=2)
checkpoint = torch.load('/workspace/pytorch-video-recognition/run/run_4/models/C3D-ucf101_epoch-3.pth.tar',
map_location=lambda storage, loc: storage)
model.load_state_dict(checkpoint['state_dict'])
Thank you very much.I'll try to train my dataset.
------------------ 原始邮件 ------------------ 发件人: "Magsun"<[email protected]>; 发送时间: 2020年5月19日(星期二) 上午10:52 收件人: "jfzhang95/pytorch-video-recognition"<[email protected]>; 抄送: "Mars.Nan"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [jfzhang95/pytorch-video-recognition] Inference.py question for frame process (#42)
Can you run inference.py with pretrained model? I run inference.py and see error: Traceback (most recent call last): File "inference.py", line 78, in main() File "inference.py", line 32, in main model.load_state_dict(checkpoint['state_dict']) KeyError: 'state_dict'
I didn't see this error. My code is here:
init model model = C3D_model.C3D(num_classes=2) checkpoint = torch.load('/workspace/pytorch-video-recognition/run/run_4/models/C3D-ucf101_epoch-3.pth.tar', map_location=lambda storage, loc: storage) model.load_state_dict(checkpoint['state_dict'])
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.