-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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 classify a single image? #566
Labels
Comments
Take a look here: #499 |
This is most easily done by the Python or MATLAB interfaces but #499 does give you the details on how to do this purely in Caffe. |
How to solve the problem that net_input_blobs_.size is 0? |
Is there any java sample code for classifying a single image? |
frankier
pushed a commit
to frankier/caffe
that referenced
this issue
May 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to write a function that classifies a single image. I looked into convert_imageset.cpp, test_net.cpp and wrapper.py while trying to figure it out.
So far I managed to load the net, load the image, resize it and convert it into a caffe::Blob. But when I call net::Forward(), it crashes:
The vector bottom holds 1 entry, the blob I created from the loaded image. However net_input_blobs has 0 entries, and therefore doing [i] crashes. How do I have to set things up correctly so net_input_blobs is set correcly?
My code so far
The text was updated successfully, but these errors were encountered: