torrvision / crfasrnn

This repository contains the source code for the semantic image segmentation method described in the ICCV 2015 paper: Conditional Random Fields as Recurrent Neural Networks. http://crfasrnn.torr.vision/
Other
1.34k stars 462 forks source link

caffe.MultiStageMeanfieldParameter" has no field named "spatial_filter_weight #88

Closed makaspacex closed 7 years ago

makaspacex commented 7 years ago

/usr/bin/python2.7 /home/simon/Desktop/crfasrnn-master/python-scripts/crfasrnn_demo.py Input file is " input.jpg Output file is " output.png GPU_DEVICE is " 0 WARNING: Logging before InitGoogleLogging() is written to STDERR W1207 23:30:13.552337 16866 _caffe.cpp:122] DEPRECATION WARNING - deprecated use of Python interface W1207 23:30:13.552371 16866 _caffe.cpp:123] Use this instead (with the named "weights" parameter): W1207 23:30:13.552376 16866 _caffe.cpp:125] Net('TVG_CRFRNN_new_deploy.prototxt', 1, weights='TVG_CRFRNN_COCO_VOC.caffemodel') [libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 626:25: Message type "caffe.MultiStageMeanfieldParameter" has no field named "spatial_filter_weight". F1207 23:30:13.554874 16866 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: TVG_CRFRNN_new_deploy.prototxt *** Check failure stack trace: ***

my caffe version is https://github.com/bittnt/caffe/tree/crfrnn who can help me, thanks!

dachengxiaocheng commented 7 years ago

Hi all

I encountered the same problem. I used the latest GPU vision CRF-RNN. My error is below:

I1212 18:26:29.364348 32582 solver.cpp:91] Creating training net from net file: CRFRNN_train_test_GPU.prototxt [libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 699:25: Message type "caffe.MultiStageMeanfieldParameter" has no field named "spatial_filter_weight".

F1212 18:26:29.365051 32582 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: CRFRNN_train_test_GPU.prototxt

Check failure stack trace: Aborted (core dumped)

Any ideas about this?

Many thanks for your help!

bittnt commented 7 years ago

layer { name: "inference1" type: "MultiStageMeanfield" bottom: "unary" bottom: "Q0" bottom: "data" top: "score_post" param { lr_mult: 1000 } param { lr_mult: 1000 } param { lr_mult: 1000 } multi_stage_meanfield_param { spatial_filter_weights_str: "3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3" bilateral_filter_weights_str: "5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5" num_iterations: 5 compatibility_mode: POTTS threshold: 2 theta_alpha: 59 theta_beta: 3 theta_gamma: 3 } }

dachengxiaocheng commented 7 years ago

@bittnt Hi Shuai Thanks so much for your help. Now I use the new parameters spatial_filter_weights_str: "3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3" and bilateral_filter_weights_str: "5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5" in prototxt.

But a new error appears: I1213 13:27:29.764771 19172 multi_stage_meanfield.cpp:56] This implementation has not been tested batch size > 1. Traceback (most recent call last): File "solve.py", line 17, in solver = caffe.SGDSolver('solver.prototxt') RuntimeError: A malformed string! >3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3<. Couldn't read 23 values.

dachengxiaocheng commented 7 years ago

@bittnt Hi

Sorry, it is a silly error. I had fixed it. Cheers

makaspacex commented 7 years ago

@bittnt Thanks a lot for your help. Now, it works!

qincao1994 commented 7 years ago

@dachengxiaocheng hello, I encounter the same problem. Could you help me? Traceback (most recent call last): File "solve.py", line 41, in solver = caffe.SGDSolver('solver.prototxt') RuntimeError: A malformed string! ><. Couldn't read 41 values.