Skip to content
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

Open
Magsun opened this issue Apr 30, 2020 · 3 comments
Open

Inference.py question for frame process #42

Magsun opened this issue Apr 30, 2020 · 3 comments

Comments

@Magsun
Copy link

Magsun commented Apr 30, 2020

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

tmp = tmp_ - np.array([[[90.0, 98.0, 102.0]]])

Kindly help to explain that what purpose of doing this operation.

Thanks again.

@marsna
Copy link

marsna commented May 15, 2020

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'

@Magsun
Copy link
Author

Magsun commented May 19, 2020

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'])

@marsna
Copy link

marsna commented May 22, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants