martinkersner / train-CRF-RNN

Train CRF-RNN for Semantic Image Segmentation
Other
199 stars 92 forks source link

Error parsing text-format caffe.NetParameter #29

Open 157995010 opened 8 years ago

157995010 commented 8 years ago

Hi, When I run the code python solve.py 2>&1 | tee train.log, I met the fellow question:

test_initialization: false
I1021 17:13:47.560746 46264 solver.cpp:96] Creating training net from net file: TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 224:3: Unknown enumeration value of "MULTI_STAGE_MEANFIELD" for field "type".
F1021 17:13:47.561707 46264 upgrade_proto.cpp:932] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: TVG_CRFRNN_COCO_VOC_TRAIN_3_CLASSES.prototxt
*** Check failure stack trace: ***
Aborted (core dumped)

I wonder how to solve this problem? Thanks a lot.

nk-dev0 commented 8 years ago

Hi I got this same error, and it's a problem with the specific version of Caffe you have installed. I made the following steps based on what worked for me after a lot of finagling:

A.install Caffe from https://github.com/bittnt/caffe.git

  1. install following directions c. download cmake/Targets.cmake from main Caffe repo and replace old Targets.cmake with it d. if make runtest fails with 2 NesterovSolverTest errors:
    1. before make runtest, export CUDA_VISIBLE_DEVICES=0 e. use prototxt files from https://github.com/stoneyang/train-CRF-RNN/tree/ed6a5eaa94b32c09714106b6857ce00d04577a79 for updated layer names ( CROP updated to 'Crop', etc.)

B. download crf-rnn from github

  1. if getting 'spatial.par not found' error: copy spatial.par and bilateral.par from crf-rnn/python-scripts to caffe/src/caffe/layers and/or caffe/build/install/src/caffe/layers, also copy to train-CRF-RNN