DecodeError: Error parsing message for .binaryproto conversion to array

55 views
Skip to first unread message

Lynnsey Martin

unread,
Jul 18, 2017, 9:58:26 AM7/18/17
to Caffe Users

I'm currently trying to convert the .binaryproto file here to a usable numpy array. I'm running everything in my python terminal and following some of the guides as given here.

I can make it as far as seen below:

import caffe
blob = caffe.proto.caffe_pb2.BlobProto()
data = open('ucf101_train_mean.binaryproto','rb').read()
blob.ParseFromString(data)

At which point I get the error:

Traceback (most recent call last)L
  File "<stdin>", line 1, in <module>
google.protobuf.message.DecodeError: Error parsing message

I've cleared and reinstalled caffe thinking it was an installation problem and it hasn't helped. I printed the data string and checked the length and both seem appropriate.

Or, as an alternative solution - is there another way I could potentially load the values of the .binaryproto file to get a usable mean? Thank you!


Reply all
Reply to author
Forward
0 new messages