Opencv_contrib PASCAL VOC caffemodel fails

asked 2016-10-06 01:10:23 -0500

Neerja gravatar image

updated 2016-10-06 01:49:29 -0500

berak gravatar image

Hey ,

I am trying to use opencv_contrib with dnn module to use PASCAL VOC caffemodel.

I have a set up of,

A working Opencv , opencv_contrib along with dnn module .

I have used caffe_googlenet.cpp , bvlc_googlenet.caffemodel, bvlc_googlenet.prototxt, synset_words.txt

Got the result: Best class: #812 'space shuttle' Probability: 99.6378%

When I try Pascal VOC dataset to identify person/s,

I have used fcn_semsegm.cpp, fcn8s-heavy-pascal.caffemodel, fcn8s-heavy-pascal.prototxt , pascal-classes.txt

I am getting a runtime error:

g++ fcn_semsegm.cpp -o fcn_semsegm `pkg-config --cflags opencv` `pkg-config --libs opencv`

./fcn_semsegm

**[libprotobuf ERROR /home/user/opencv_contrib/modules/dnn/3rdparty/protobuf/src/google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 517:15: Message type "caffe.LayerParameter" has no field named "crop_param_".
OpenCV Error: Unspecified error (FAILED: ReadProtoFromTextFile(param_file, param).Failed to parse NetParameter file: fcn8s-heavy-pascal.prototxt) in ReadNetParamsFromTextFileOrDie, file /home/user/opencv_contrib/modules/dnn/src/caffe/caffe_io.cpp, line 1101
/home/user/opencv_contrib/modules/dnn/src/caffe/caffe_io.cpp:1101: error: (-2) FAILED: ReadProtoFromTextFile(param_file, param).Failed to parse NetParameter file: fcn8s-heavy-pascal.prototxt in function ReadNetParamsFromTextFileOrDie
Can't load network by using the following files: 
prototxt:   fcn8s-heavy-pascal.prototxt
caffemodel: fcn8s-heavy-pascal.caffemodel
fcn8s-heavy-pascal.caffemodel can be downloaded here:
http://dl.caffe.berkeleyvision.org/fcn8s-heavy-pascal.caffemodel**
edit retag flag offensive close merge delete