A Problem When Running Fully Convolutional Networks for Semantic Segmentation

1,382 views
Skip to first unread message

Guotai Wang

unread,
Apr 20, 2016, 1:52:31 PM4/20/16
to Caffe Users
Dear Caffe users,
    I've downloaded recent caffe version and installed successfully (compiled with python). After successfully running examples such as "Image Classification and Filter Visualization" and "Fine-tunning for Style Recognition", I started to try FCN for segmentation tasks.
    So I downloaded the FCN code from https://github.com/shelhamer/fcn.berkeleyvision.org. When I tried to run voc-fcn8s/net.py, I saw the following errors:

Traceback (most recent call last):
  File "net.py", line 3, in <module>
    from caffe.coord_map import crop
ImportError: No module named coord_map


     It says that the coord_map module is missing. I searched it  in the caffe code repository,  but I failed to find this module or its source files.
     I'd like to know what is happening here. Do I need a specific version of caffe or I how can I fix this problem?
   
     Thanks very much!
Guotai

Jan

unread,
Apr 21, 2016, 4:32:45 AM4/21/16
to Caffe Users
Well, it should be there: https://github.com/BVLC/caffe/blob/master/python/caffe/coord_map.py. Evan informed me that you can now do the FCN stuff with the regular master branch of BVLC/caffe (the official version of caffe). So if it is not in your repository, either yours is outdated or you are on a different branch.

Jan

Guotai Wang

unread,
Apr 21, 2016, 6:12:17 AM4/21/16
to Caffe Users
Thanks Jan, now it works! I used the BVLC/caffe:master @ 74cc497 version.

在 2016年4月21日星期四 UTC+1上午9:32:45,Jan写道:

sharath s

unread,
May 3, 2016, 11:49:37 AM5/3/16
to Caffe Users
I am trying to Train FCN using VOC 2011 dataset,

i picked the code of evan from here

I get an import error

ImportError: No module named layers

see attached for output.

I did a recent git pull.
output_ss.txt

Jan

unread,
May 4, 2016, 5:54:58 AM5/4/16
to Caffe Users
Did you compile the "python layer" functionality? Check your Makefile.config.

Jan

sharath s

unread,
May 4, 2016, 8:57:51 AM5/4/16
to Caffe Users
Jan,

Yes i had uncommented WITH_PYTHON_LAYER := 1, cleaned and compiled it again, and tested.

python module layer, i dont know why i am not able to import.
Message has been deleted
Message has been deleted

Nan Meng

unread,
Jun 21, 2016, 3:05:36 AM6/21/16
to Caffe Users
Hi, sharath.    did you resolve the problem? I also met this problem...

Jason Lin

unread,
Jun 28, 2016, 11:24:26 AM6/28/16
to Caffe Users
Hi, sharath

Maybe, you can try to change module: "layers" to module: "voc_layers" in train.prototxt file.

Nan Meng於 2016年6月21日星期二 UTC+8下午3時05分36秒寫道:

Nan Meng

unread,
Jun 30, 2016, 10:53:38 PM6/30/16
to Caffe Users
thanks it works for me.

Zhibo Yang

unread,
Aug 19, 2016, 4:12:55 AM8/19/16
to Caffe Users
hi Nan Meng,
         I have same problem with you when I tried to repeat voc fcn8s using FCN caffe. There is a module voc_layers, and a layer VOCSegDataLayer, and also I saw a python file voc_layers.py. I don't know how to import the voc module to my training process.
My training process stopped when a check failed appears. 
**********
layer {
  name: "score"
  type: "Crop"
  bottom: "upscore8"
  bottom: "data"
  top: "score"
  crop_param {
    axis: 2
    offset: 31
  }
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "score"
  bottom: "label"
  top: "loss"
  loss_param {
    ignore_label: 255
    normalize: false
  }
}
I0819 15:58:16.632815 32118 layer_factory.hpp:77] Creating layer data
F0819 15:58:16.632856 32118 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: Python (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, Input, LRN, LSTM, LSTMUnit, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, RNN, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData)
*** Check failure stack trace: ***
Aborted

Can you help me with my problems? thanks a lot

Youyou Li

unread,
May 5, 2017, 3:19:20 AM5/5/17
to Caffe Users
Hello Zhibo Yang,
 I have met the same problem ' No module named voc_layers'. Then I copy the voc_layers which is original in 'yourroute/fcn.berkeleyvision.org/' to another folder where the solve.py belong to. In the end, the problem is solved by doing this.

在 2016年8月19日星期五 UTC+8下午4:12:55,Zhibo Yang写道:

Olzhas Kadyrakunov

unread,
Oct 17, 2017, 3:41:09 AM10/17/17
to Caffe Users
Hey! Did Youyou Li's answer help to resolve your problem? It didn't work for me. I wonder if you came up with some other solution. Sorry for bringing up an old issue..
Reply all
Reply to author
Forward
0 new messages