ChenYingpeng / darknet2caffe

Convert darknet weights to caffemodel
182 stars 87 forks source link

Having issues with KeyError: 'layer1-conv' #26

Open b154012 opened 4 years ago

b154012 commented 4 years ago

First of all, I would like to apologize if this post is related to the previous problem. However, I am still stuck in fixing the following errors:

I typed the command:

!python darknet2caffe.py yolov3_testing.cfg yolov3_training_final.weights yolov3.prototxt yolov3.caffemodel

The following link shows the error message:

https://drive.google.com/file/d/1lXmA2HfnQSIBoLlrOXtIkwCb1xq8fxwA/view

I have modified the darknet2caffe.py file. I changed the has_key() function to the contain() function . It can be reviewed here:

https://drive.google.com/file/d/1joxRt-vnKV3HY0CfDOmoxMrCxOC82Jl2/view?usp=sharing

I used python 2.7, caffe and pytorch (1.7) > 0.4, or 3.6.

the Makefile example file:

https://drive.google.com/file/d/1bBlv_2V3RZ45EEG-TwzuJz072bGu8FUf/view?usp=sharing

How to solve this issue?

Perhaps my cfg and weights have some bugs? However, I already tested it using Darknet and was able to predict my classes.

I desperately need this conversion so that it can be run on Raspberry Pi for real-time object detection. I could provide my custom YOLOv3 files for you if the files are fine. Perhaps I am missing something?

I highly appreciate any help or clarification.

zhangxinxing0923 commented 4 years ago

Hi, I got the same error. Did you solve it?

laoxie001 commented 3 years ago

@b154012 @zhangxinxing0923 hi, I got the same problem .I solved it by setting the default python to 2.7 and remaking the caffe