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

How to use inference.py? #1

Closed
tranvnhan opened this issue Apr 1, 2019 · 3 comments
Closed

How to use inference.py? #1

tranvnhan opened this issue Apr 1, 2019 · 3 comments

Comments

@tranvnhan
Copy link

tranvnhan commented Apr 1, 2019

I can run the training phase and I've had the checkpoint file.

Now the problem is how to use the provided inference.py. In that file, I see you generate a random input and use the pretrained model. What about loading a test image and running inference on it? How to do it specifically?
Thanks.

@tranvnhan
Copy link
Author

Update: I can run inference using GPU but when I do the same with CPU I get a totally different result.
What might be the problem?

Thank you in advance!

@yunlongdong
Copy link
Owner

yunlongdong commented Apr 25, 2019

u can use https://github.com/yunlongdong/FCN-pytorch-easiest/blob/master/BagData.py to load test image to be tensor of torch by torchvision.transforms.

@tranvnhan
Copy link
Author

Update: running inference on GPU and CPU return the same result. The problem might come from conflicts during building PyTorch from source.

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