-
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
Make a matrix output and ground truth example (segmentation, sliding window detection, etc.) #1698
Comments
I would find this very useful. Echoing #197, a reference OverFeat-like model in Caffe would be fantastic. |
To help in the meantime, check out this code sample for generating an LMDB in Python with custom data:
While this code makes an image DB, you can likewise make the ground truth DB from any scalar / vector / matrix data and calling |
/cc @mtamburrano |
@shelhamer Sorry, I'm a newer for caffe and I can't fully understand. Could you tell me the steps dealing with matrix ground trouth |
@shelhamer you sent this link through caffe-users group, but it is still a little bit confusing. As far as i understand 'inputs' should contain the location for all the images right? There is a missing bracket in your code, it should be: im = im.transpose((2,0,1)) |
Hi, |
@shelhamer Hi, |
@Linzert make a singleton dimension for the channels so the groundtruth is 1 x H x W. Please ask usage questions on the caffe-users group. |
@shelhamer OK! I got it.Thanks very much. |
@ctrevino @demondan label = L.Data(batch_size=99, backend=P.Data.LMDB, source='train_label', transform_param=dict(scale=1./255), ntop=1)
data = L.Data(batch_size=99, backend=P.Data.LMDB, source='train_data', transform_param=dict(scale=1./255), ntop=1) |
Hello, @shelhamer sorry to bother you, I am trying to fine-tune your fcn_alexnet to my own dataset, but when i use gpu, i encounter a problem as follows: I1128 22:55:19.044678 358 parallel.cpp:395] GPUs pairs 0:1, 2:3, 0:2 i have transform my data to lmdb by your python code at github and use it as the source. print("Creating Training Data LMDB File ..... ") print("Creating Training Label LMDB File ..... ") layer { the same with test phase i created 4 lmdbs for train data, test data, train label, test label respectively when I use cpu mode, it is ok, but it's too slow i have looking for the answer for so long and can't figure it out. thank you. |
https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:
|
To help anyone in the future with this, here is an example notebook: |
@varunagrawal the notebook example code is giving me an error in the lines(In [2]): sys.path.append("pycaffe/layers") # the datalayers we will use are in this directory. I cannot find the mentioned 'tools' file in the master branch. |
Please see the fcn.berkeleyvision.org repo for master compatible FCNs, solver configurations, and scripts for learning, inference, and scoring. This includes how to define the net and python layers for loading inputs and labels which are both 3-D. Closing, as I think the multilabel example #3471 and an FCN example as requested in #3890 will satisfy this issue. Please post on the caffe-users mailing list with further questions about modeling and usage for labels >1-D. |
@ctrevino What does 'inputs' look like? How to contain all the images in "inputs"? |
For the label LMDB creation, just upload each label as |
Caffe is perfectly happy with models that make matrix outputs and learn from matrix ground truths for problems where the output and truth have spatial dimensions e.g. reconstruction / de-noising, pixelwise semantic segmentation, sliding window detection, and so forth. The forward and backward passes for these models follow directly from the definitions and Caffe has always been capable of computing these.
However, there isn't yet a bundled example and exactly how to accomplish this is confusing to many new users.
#189 is already solved technically by on-the-fly reshaping #594, instance-wise losses like SOFTMAX_LOSS, EUCLIDEAN_LOSS, SIGMOID_CROSS_ENTROPY_LOSS and so on, and proper data preparation. At the same time, this isn't immediately obvious from the documentation and examples so a walkthrough would do a lot of good.
#308 is technically redundant and does not mesh with the Caffe code but it was put to use in a standalone way and it's good that the code was made available to accompany the tech report.
The text was updated successfully, but these errors were encountered: