yangguorun / SegStereo

SegStereo: Exploiting Semantic Information for Disparity Estimation
Other
105 stars 23 forks source link

Unable to test models/get_disp.py function. Get "caffe.LayerParameter" has no field named "bn_param" error. #10

Open alantwm opened 5 years ago

alantwm commented 5 years ago

Hello I created an environment using the docker images. My dockerfile is as follows:

We will use Ubuntu for our image

FROM ubuntu:16.04 FROM bvlc/caffe:cpu

Next I did:

pip install opencv-python pip install pypng pip install numpy==1.15 (to deal with a cannot import "from numpy.lib.arraypad import _validate_lengths" error)

Next I cloned the SegStereo repo and downloaded the ResNetCorr_SRC_pretrain.caffemodel and placed it in the models/ResNetCorr folder.

Running the suggested command:

python get_disp.py --model_weights ./ResNetCorr/ResNetCorr_SRC_pretrain.caffemodel --model_deploy ./ResNetCorr/ResNetCorr_deploy.prototxt --data ../data/KITTI --result ./ResNetCorr/result/kitti --gpu 0 --colorize --evaluate

resulted in the following error:

python get_disp.py --model_weights ./ResNetCorr/ResNetCorr_SRC_pretrain.caffemodel --model_deploy ./ResNetCorr/ResNetCorr_deploy.prototxt --data ../data/KITTI --result ./ResNetCorr/result/kitti --gpu 0 --colorize --evaluate WARNING: Logging before InitGoogleLogging() is written to STDERR W0611 09:30:39.870862 95 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface W0611 09:30:39.870918 95 _caffe.cpp:140] Use this instead (with the named "weights" parameter): W0611 09:30:39.870931 95 _caffe.cpp:142] Net('./ResNetCorr/ResNetCorr_deploy.prototxt', 1, weights='./ResNetCorr/ResNetCorr_SRC_pretrain.caffemodel') [libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 55:12: Message type "caffe.LayerParameter" has no field named "bn_param". F0611 09:30:39.872071 95 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: ./ResNetCorr/ResNetCorr_deploy.prototxt Check failure stack trace: Aborted

Can anyone help me with this problem?