Faster-RCNN使用时Error parsing text-format caffe.NetParameter
问题:在做车系识别过程中,先用py-faster-rcnn检测物体位置,(py-faster-rcnn项目里有一个Caffe)。再用最新版本的caffe(caffe)训练(微调)一个分类器。现在想在一个程序里完成两步。都是调用 python接口,会出现如下错误:GPU mode[libprotobuf ERROR google/protobuf/text_format.cc:298] Error
·
问题:
在做车系识别过程中,先用py-faster-rcnn检测物体位置,(py-faster-rcnn项目里有一个Caffe)。再用最新版本的caffe(caffe)训练(微调)一个分类器。现在想在一个程序里完成两步。都是调用 python接口,会出现如下错误:
GPU mode
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format caffe.NetParameter: 6:15: Message type "caffe.LayerParameter" has no field named "input_param".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F1118 15:47:17.330337 164439 upgrade_proto.cpp:68] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: /home/zhangxin0627/gitlab/CarRecognition/_tmp/Train/20161022finetune_series/100/deploy1.prototxt
*** Check failure stack trace: ***
Aborted (core dumped)
原因:
py-faster-rcnn里用的是旧版本的caffe,不支持新版的input_param。
解决办法:
py-faster-rcnn/caffe-raster-rcnn/models/bvlc_googlenet/deploy.prototxt
name: "GoogleNet"
input: "data"
input_shape {
dim: 10
dim: 3
dim: 224
dim: 224
}
caffe/models/bvlc_googlenet/deploy.prototxt
name: "GoogleNet"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 10 dim: 3 dim: 224 dim: 224 } }
}
需要改成与旧版一致,即可。
昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链
更多推荐

所有评论(0)