-
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 pycaffe #1774
Comments
Does caffe.Net interface support real-time data passing instead of from definition file. For instance, can I get the layer values of a particular image just read by caffe.io in the code? Also still I am pretty confident about the issue #1758 that you closed. This is an issue not the users thing. |
shelhammer,Thanks for the comment to my request. I think that one small run through sample code would be greatly helpful.
|
@erogol Re: #1758 -- the Python preprocessing can work, as it does in our examples, but I agree that it is confusing which is why I advocate for #1245. @kamikawa and all more pycaffe examples and docs are coming in February after the ICML deadline 02/06. |
@shelhamer so for replicating the c++ lmdb results we should use your caffe.Net code snippet and for classifying images/that are not stored on lmdbs, caffe.Classifier ? I know that you have tons of stuff to do and that you are already working on it, but I would appreciate a lot if you could update or provide a python classification example, as right now it's very confusing with all the new changes. |
@shelhamer Hello shelhamer, Recently I switched from old version to a new version of caffe (downloaded from master branch on 31st March 2015). I've used this new version for some time and everything was fine. Now I would like to organize testing with Python script. I've done all "make all", "make test", "make runtest", "make pycaffe", "make distribute". In my Python script, import sys This gives me import error import caffe I noticed that libcaffe.so is also in the /distribute/lib folder, so I modified the Python script to import sys But still I get this import error import caffe My code is working fine with previous version of caffe. So I'm not sure if it's caused by the version change. Did you experience similar error? Thanks a lot for your help! |
Hi, May I ask whether there is a natural way in either command line or python interface to make predictions and collect the results for ALL batches from an input data (e.g. HD5)? I understand that with the correct number of iterations(=#total/#batch_size), and net.forward(), it will do the work for the test data that is pre-defined in the prototxt files (This is a little bit awkward itself though). But what if one would like to make predictions for new data and get probabilistic scores out of the predictions, rather than just get a accuracy number on a benchmark dataset? Is there a way to feed customized input (not necessarily 4-dim image input) of data and directly make prediction for them, instead of for data that is defined in the prototxt? Thanks a lot! |
Closing since there are now several notebook examples of pycaffe, Python data layers handily cover many use cases, and the |
There's confusion about the Python interface. In particular users get stuck with
caffe.Net
interface vs. thecaffe.Classifier
andcaffe.Detector
(caffe.Net
is real and the others are meant only as examples). That is, just usecaffe.Net
.Advice on matching the caffe command and caffe python module:
Raw
input
s like in deploy model inputs can be processed by thecaffe.Net.preprocess()
method orcaffe.Classifier
convenience class since these are bottom blobs. Data layers, likeHDF5_DATA
orMEMORY_DATA
cannot, since these are top blobs in the Net. For models with data layers, callcaffe.Net.forward()
as shown.In general I suggest the
caffe.Net
interface. For input processing #1245 is an important step.Documentation and examples of all this should follow #1703.
The text was updated successfully, but these errors were encountered: