lmb-freiburg / flownet2

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
https://lmb.informatik.uni-freiburg.de/Publications/2017/IMKDB17/
Other
1k stars 318 forks source link

[libprotobuf ERROR C:\ci\libprotobuf_1523040574637\work\src\google\protobuf\text_format.cc:288] Error parsing text-format caffe.NetParameter: 524:15: Message type "caffe.LayerParameter" has no field named "irnn_param" #219

Closed guanhuankang closed 4 years ago

guanhuankang commented 4 years ago

Install

I install caffe(python version) by running following command: conda create -n caffe python=3.7 conda install caffe-gpu ; And I have ran the test code successfully, the test code as follow: import caffe caffe.set_device(0) caffe.set_mode_gpu()

Problem

However, when I try to load a model and do some test on it , I encounter the above problem. It seems like that caffe fails to parse the network. I am a very new player on caffe. Thank you for any help!

The file I try to run as follow:

from IPython import get_ipython

import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pylab import matplotlib.cm as cm import scipy.misc from PIL import Image import scipy.io import os import scipy.misc import time

import caffe

EPSILON = 1e-8

def getFileList( p ): p = str( p ) if p=="": return [ ] if p[ -1] != "/": p = p+"/" a = os.listdir( p ) b = [ x for x in a if os.path.isfile( p + x ) ] return b

data_root = r'C:\Users\Rot\Downloads\MistGPU\SBU-shadow\SBU-shadow\SBU-Test' with open(r'C:\Users\Rot\Downloads\MistGPU\SBU-shadow\SBU-shadow\SBU-Test\test.txt') as f: test_name = f.readlines()

test_lst = [data_root+x.strip() for x in test_name]

print(test_lst[0], len(test_lst))

caffe.set_mode_gpu() caffe.set_device(0) caffe.SGDSolver.display = 0

print("Load start") net = caffe.Net('deploy.prototxt', 'snapshot/DSC_iter_12000.caffemodel', caffe.TEST)

print("Load finish") exit(0)


The whole err msg: C:\Users\Rot\Downloads\MistGPU\SBU-shadow\SBU-shadow\SBU-TestShadowImages/$_35.jpg 638 WARNING: Logging before InitGoogleLogging() is written to STDERR I0822 15:32:36.296939 23268 common.cpp:36] System entropy source not available, using fallback algorithm to generate seed instead. Load start W0822 15:32:36.299937 23268 _caffe.cpp:175] DEPRECATION WARNING - deprecated use of Python interface W0822 15:32:36.299937 23268 _caffe.cpp:176] Use this instead (with the named "weights" parameter): W0822 15:32:36.299937 23268 _caffe.cpp:178] Net('deploy.prototxt', 1, weights='snapshot/DSC_iter_12000.caffemodel') [libprotobuf ERROR C:\ci\libprotobuf_1523040574637\work\src\google\protobuf\text_format.cc:288] Error parsing text-format caffe.NetParameter: 524:15: Message type "caffe.LayerParameter" has no field named "irnn_param". F0822 15:32:36.345911 23268 upgrade_proto.cpp:90] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: deploy.prototxt Check failure stack trace:

nikolausmayer commented 4 years ago

This does not sound like a FlowNet issue, but like a Caffe problem. Message type "caffe.LayerParameter" has no field named "irnn_param". indicates that you might be using a wrong Caffe version, or have multiple installed versions that interfere with each other. Please redirect this issue to the maintainers of Caffe or of the network you are trying to run. We can only assist with queries specific to FlowNet.