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 460 forks source link

AttributeError: 'dict' object has no attribute 'itervalues' in /caffe/python/caffe/pycaffe.py line 260 #156

Open dfki-bruce opened 6 years ago

dfki-bruce commented 6 years ago

Dear All,

Initially an error "xrange is not defined" came when I tried to run the demo.py, then I changed the "xrange" to "range" and the py script started to run,however , anothe error came: I0414 00:13:46.749788 14861 upgrade_proto.cpp:628] Successfully upgraded file specified using deprecated V1LayerParameter Traceback (most recent call last): File "crfasrnn_demo.py", line 205, in main(sys.argv[1:]) File "crfasrnn_demo.py", line 201, in main run_crfrnn(input_file, output_file, gpu_device) File "crfasrnn_demo.py", line 138, in run_crfrnn segmentation = crfrnn_segmenter(_MODEL_DEF_FILE, _MODEL_FILE, gpu_device, [im]) File "crfasrnn_demo.py", line 97, in crfrnn_segmenter out = net.forward_all({net.inputs[0]: caffe_in}) File "../caffe/python/caffe/pycaffe.py", line 176, in _Net_forward_all for batch in self._batch(kwargs): File "../caffe/python/caffe/pycaffe.py", line 260, in _Net_batch num = len(blobs.itervalues().next()) AttributeError: 'dict' object has no attribute 'itervalues'**

It seems that it is an compatible issue,

thank you in advance!

hassanrazakhalid commented 5 years ago

Yes same issue. i think this caffe version is meant for python2. Folder name is kind of misleading as it says python3