fast-rcnn icon indicating copy to clipboard operation
fast-rcnn copied to clipboard

Unknown layer_type ROIPooling

Open LiviuMarina opened this issue 8 years ago • 5 comments

Hi,

I am trying to train PASCAL_VOC model. Unfortunately,for some time, I am having this error, that the ROIPooling layer is unknown. The roi_pooling_layer.cpp, roi_pooling_layer.cu can be found in ...src/caffe/layers. Also roi_pooling_layer.hpp can be found in ...include/caffe/layers.

When I checked layer_factory.cpp I saw that the layer is not registered.

Did someone encountered this issue? Any help will be highly appreciated.

This is the error:

I0922 16:29:10.121187 10272 layer_factory.hpp:77] Creating layer roi_pool5 F0922 16:29:10.121187 10272 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: ROIPooling (known types: AbsVal, Accuray, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convoltion, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclieanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageDaa, InfogainLoss, InnerProduct, Input, LRN, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, Python, ReLU, Reduction, Reshape, SP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, SmoothL1Loss, Softmx, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData) *** Check failure stack trace: ***

Thank you!

LiviuMarina avatar Sep 22 '16 14:09 LiviuMarina

This sounds to me like it's running the wrong version of Caffe, i.e. not the one required for and included with fast-rcnn which includes the appropriate layer.

I suspect running "locate roi_pooling_layer.hpp" in the terminal would show another version to be installed. Otherwise, I'd check that caffe-fast-rcnn is on the right commit.

nwestlake avatar Sep 22 '16 15:09 nwestlake

Thank you for the fast answer.

I am using Caffe on Windows. I have tried "where" instead of "locate" in CMD. The file is found : ...FRCN_ROOT2\caffe\include\caffe\layers\roi_pooling_layer.hpp.

I was thinking to the same problem, that I am using the wrong Caffe version. But I don't know which version should I use. An advice will be great for me.

LiviuMarina avatar Sep 22 '16 17:09 LiviuMarina

I have the same exact error on running demo example. I'm currently running rcnn on a different caffe build (which was setup before). Had to change _init_paths.py to point to that caffe installation. Any help to correct this would be great. Thanks.

ghost avatar Nov 21 '16 09:11 ghost

I am similarly trying to figure out if it's possible to update the windows version of caffe to use this layer.

mattm401 avatar Mar 06 '17 13:03 mattm401

Thanks god. I find a way can sovle it in windows version(it's work ,but not sure in linux) caffe,运行fast-rcnn出现Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: ROIPooling .

The error occurred because files such as roi_pooling_layer.cpp(cu or hpp) are not written to the build directory and are not generated in the windows version.

First of all, you make sure you have these files roi_pooling_layer.cpp, roi_pooling_layer.cu & roi_pooling_layer.hpp in the right position (the owner of this issue mentioned).

Second, add code in libcaffe.vcxproj (youpath\fast-rcnn\caffe-fast-rcnn\windows\libcaffe\libcaffe.vcxproj). ps: my version of caffe may be old ,because it still have branch windows.While the latest version have not) a) add <ClCompile Include="..\..\src\caffe\layers\roi_pooling_layer.cpp" /> in line 157 b) add<ClInclude Include="..\..\include\caffe\layers\roi_pooling_layer.hpp" /> in line 265 c) add<CudaCompile Include="..\..\src\caffe\layers\roi_pooling_layer.cu" /> in line 344

Third step, add code in libcaffe.vcxproj.filters (same directory as before) a)add the following code in line 291

<ClCompile Include="..\..\src\caffe\layers\roi_pooling_layer.cpp">
<Filter>src\layers</Filter>
</ClCompile>

b)add the following code in line 569

<ClInclude Include="..\..\include\caffe\layers\roi_pooling_layer.hpp">
<Filter>include\layers</Filter>
</ClInclude>

c)add the following code in line 781

<CudaCompile Include="..\..\src\caffe\layers\roi_pooling_layer.cu">
<Filter>cu\layers</Filter>
</CudaCompile>

Fourth step , recompile caffe & pycaffe and make it properly configured. I hope my answer is useful. good luck.

cobbwho avatar Apr 12 '18 04:04 cobbwho