-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inference.py question for frame process #42
Comments
Can you run inference.py with pretrained model? |
I didn't see this error. My code is here:
|
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.
|
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:
![image](https://user-images.githubusercontent.com/12060858/80663407-7a67c480-8ac6-11ea-9121-ce9323924a8c.png)
tmp = tmp_ - np.array([[[90.0, 98.0, 102.0]]])
Kindly help to explain that what purpose of doing this operation.
Thanks again.
The text was updated successfully, but these errors were encountered: