def getMeanImage(mean_path):
# the following code is from https://github.com/BVLC/caffe/issues/290
blob = caffe.proto.caffe_pb2.BlobProto()
data = open( mean_path , 'rb' ).read()
blob.ParseFromString(data)
arr = np.array( caffe.io.blobproto_to_array(blob) )
out = arr[0]
np.save( sys.argv[2] , out )
convert_from_caffe.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录