weixin_39538500
weixin_39538500
2020-12-08 21:20

I get this Error :Error parsing text-format caffe.NetParameter: 16:14: Expected integer, got: 1.5

Platform environment

  • python:3.7.7
  • caffe 1.0.0
  • pytorch 1.4.0

Install steep

  • Firstly, I build and install caffe pycaffe
  • Secondly, I convert darknet2caffe.py .... to python3 version
  • Finally, I run python darknet2caffe.py yolov3-custom.cfg converted.weights yolov3-custom.prototxt yolov3-custom.caffemodel

But get error


unknow layer type yolo 
OrderedDict([('bottom', 'layer80-conv'), ('top', 'layer84-route'), ('name', 'layer84-route'), ('type', 'Concat')])
84
2
OrderedDict([('bottom', 'layer85-conv'), ('top', 'layer86-upsample'), ('name', 'layer86-upsample'), ('type', 'Upsample'), ('upsample_param', OrderedDict([('scale', '2')]))])
('upsample:', 86)
{1: 'layer1-conv', 2: 'layer2-conv', 3: 'layer3-conv', 4: 'layer4-conv', 5: 'layer5-shortcut', 6: 'layer6-conv', 7: 'layer7-conv', 8: 'layer8-conv', 9: 'layer9-shortcut', 10: 'layer10-conv', 11: 'layer11-conv', 12: 'layer12-shortcut', 13: 'layer13-conv', 14: 'layer14-conv', 15: 'layer15-conv', 16: 'layer16-shortcut', 17: 'layer17-conv', 18: 'layer18-conv', 19: 'layer19-shortcut', 20: 'layer20-conv', 21: 'layer21-conv', 22: 'layer22-shortcut', 23: 'layer23-conv', 24: 'layer24-conv', 25: 'layer25-shortcut', 26: 'layer26-conv', 27: 'layer27-conv', 28: 'layer28-shortcut', 29: 'layer29-conv', 30: 'layer30-conv', 31: 'layer31-shortcut', 32: 'layer32-conv', 33: 'layer33-conv', 34: 'layer34-shortcut', 35: 'layer35-conv', 36: 'layer36-conv', 37: 'layer37-shortcut', 38: 'layer38-conv', 39: 'layer39-conv', 40: 'layer40-conv', 41: 'layer41-shortcut', 42: 'layer42-conv', 43: 'layer43-conv', 44: 'layer44-shortcut', 45: 'layer45-conv', 46: 'layer46-conv', 47: 'layer47-shortcut', 48: 'layer48-conv', 49: 'layer49-conv', 50: 'layer50-shortcut', 51: 'layer51-conv', 52: 'layer52-conv', 53: 'layer53-shortcut', 54: 'layer54-conv', 55: 'layer55-conv', 56: 'layer56-shortcut', 57: 'layer57-conv', 58: 'layer58-conv', 59: 'layer59-shortcut', 60: 'layer60-conv', 61: 'layer61-conv', 62: 'layer62-shortcut', 63: 'layer63-conv', 64: 'layer64-conv', 65: 'layer65-conv', 66: 'layer66-shortcut', 67: 'layer67-conv', 68: 'layer68-conv', 69: 'layer69-shortcut', 70: 'layer70-conv', 71: 'layer71-conv', 72: 'layer72-shortcut', 73: 'layer73-conv', 74: 'layer74-conv', 75: 'layer75-shortcut', 76: 'layer76-conv', 77: 'layer77-conv', 78: 'layer78-conv', 79: 'layer79-conv', 80: 'layer80-conv', 81: 'layer81-conv', 82: 'layer82-conv', 83: 'layer82-conv', 84: 'layer84-route', 85: 'layer85-conv', 86: 'layer86-upsample'}
OrderedDict([('bottom', ['layer86-upsample', 'layer62-shortcut']), ('top', 'layer87-route'), ('name', 'layer87-route'), ('type', 'Concat')])
87
unknow layer type yolo 
OrderedDict([('bottom', 'layer92-conv'), ('top', 'layer96-route'), ('name', 'layer96-route'), ('type', 'Concat')])
96
2
OrderedDict([('bottom', 'layer97-conv'), ('top', 'layer98-upsample'), ('name', 'layer98-upsample'), ('type', 'Upsample'), ('upsample_param', OrderedDict([('scale', '2')]))])
('upsample:', 98)
{1: 'layer1-conv', 2: 'layer2-conv', 3: 'layer3-conv', 4: 'layer4-conv', 5: 'layer5-shortcut', 6: 'layer6-conv', 7: 'layer7-conv', 8: 'layer8-conv', 9: 'layer9-shortcut', 10: 'layer10-conv', 11: 'layer11-conv', 12: 'layer12-shortcut', 13: 'layer13-conv', 14: 'layer14-conv', 15: 'layer15-conv', 16: 'layer16-shortcut', 17: 'layer17-conv', 18: 'layer18-conv', 19: 'layer19-shortcut', 20: 'layer20-conv', 21: 'layer21-conv', 22: 'layer22-shortcut', 23: 'layer23-conv', 24: 'layer24-conv', 25: 'layer25-shortcut', 26: 'layer26-conv', 27: 'layer27-conv', 28: 'layer28-shortcut', 29: 'layer29-conv', 30: 'layer30-conv', 31: 'layer31-shortcut', 32: 'layer32-conv', 33: 'layer33-conv', 34: 'layer34-shortcut', 35: 'layer35-conv', 36: 'layer36-conv', 37: 'layer37-shortcut', 38: 'layer38-conv', 39: 'layer39-conv', 40: 'layer40-conv', 41: 'layer41-shortcut', 42: 'layer42-conv', 43: 'layer43-conv', 44: 'layer44-shortcut', 45: 'layer45-conv', 46: 'layer46-conv', 47: 'layer47-shortcut', 48: 'layer48-conv', 49: 'layer49-conv', 50: 'layer50-shortcut', 51: 'layer51-conv', 52: 'layer52-conv', 53: 'layer53-shortcut', 54: 'layer54-conv', 55: 'layer55-conv', 56: 'layer56-shortcut', 57: 'layer57-conv', 58: 'layer58-conv', 59: 'layer59-shortcut', 60: 'layer60-conv', 61: 'layer61-conv', 62: 'layer62-shortcut', 63: 'layer63-conv', 64: 'layer64-conv', 65: 'layer65-conv', 66: 'layer66-shortcut', 67: 'layer67-conv', 68: 'layer68-conv', 69: 'layer69-shortcut', 70: 'layer70-conv', 71: 'layer71-conv', 72: 'layer72-shortcut', 73: 'layer73-conv', 74: 'layer74-conv', 75: 'layer75-shortcut', 76: 'layer76-conv', 77: 'layer77-conv', 78: 'layer78-conv', 79: 'layer79-conv', 80: 'layer80-conv', 81: 'layer81-conv', 82: 'layer82-conv', 83: 'layer82-conv', 84: 'layer84-route', 85: 'layer85-conv', 86: 'layer86-upsample', 87: 'layer87-route', 88: 'layer88-conv', 89: 'layer89-conv', 90: 'layer90-conv', 91: 'layer91-conv', 92: 'layer92-conv', 93: 'layer93-conv', 94: 'layer94-conv', 95: 'layer94-conv', 96: 'layer96-route', 97: 'layer97-conv', 98: 'layer98-upsample'}
OrderedDict([('bottom', ['layer98-upsample', 'layer37-shortcut']), ('top', 'layer99-route'), ('name', 'layer99-route'), ('type', 'Concat')])
99
unknow layer type yolo 
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format caffe.NetParameter: 16:14: Expected integer, got: 1.5
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0422 13:35:17.855028  3270 upgrade_proto.cpp:90] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: yolov3-custom.prototxt
*** Check failure stack trace: ***

How can I fix this error, Please!!

该提问来源于开源项目:ChenYingpeng/darknet2caffe

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39581652 weixin_39581652 5月前

    You should make sure that you add upsample layer into caffe proto. Install upsample layer link.

    点赞 评论 复制链接分享
  • weixin_39619635 weixin_39619635 5月前

    Hi after add upsample layer into caffe proto, I still faced the error as below

    ('upsample:', 119) ('upsample:', 129) unknow layer type yolo unknow layer type yolo unknow layer type yolo [libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 16:14: Expected integer. WARNING: Logging before InitGoogleLogging() is written to STDERR F0528 05:21:37.348749 28831 upgrade_proto.cpp:90] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: prototxt/yolov4.prototxt

    could you tell me how to fix it , thanks :)

    点赞 评论 复制链接分享
  • weixin_39654067 weixin_39654067 5月前

    Hi after add upsample layer into caffe proto, I still faced the error as below

    ('upsample:', 119) ('upsample:', 129) unknow layer type yolo unknow layer type yolo unknow layer type yolo [libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 16:14: Expected integer. WARNING: Logging before InitGoogleLogging() is written to STDERR F0528 05:21:37.348749 28831 upgrade_proto.cpp:90] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: prototxt/yolov4.prototxt

    could you tell me how to fix it , thanks :)

    same problem

    点赞 评论 复制链接分享
  • weixin_39654067 weixin_39654067 5月前

    We have fixed the bug with PR.

    点赞 评论 复制链接分享

相关推荐