Giter Club home page Giter Club logo

darknet2caffe's Introduction

Darknet2Caffe

DarkNet下训练的yolo的.cfg文件和.weights文件转换为Caffe的.prototxt文件和.caffemodel文件

根目录执行命令:

python darknet2caffe.py yolov2_tiny_3.cfg yolov2_tiny_3.weights yolov2_tiny_3.prototxt yolov2_tiny_3.caffemodel

其中:

  1. yolov2_tiny_3.cfg --------- 模型结构文件,这里是一个3个类别的目标检测模型

  2. yolov2_tiny_3.weights ----- 训练好的模型权重文件

  3. yolov2_tiny_3.prototxt ---- 待生成的Caffe框架下的模型结构文件

  4. yolov2_tiny_3.caffemodel -- 待生成的Caffe框架下的模型权重文件

注:

  1. 上面我准备好的4个文件下载链接:链接: https://pan.baidu.com/s/1di7UxmJkUmkN3vgvlJOVFQ 提取码: ckd2

  2. 修改darknet2caffe.py中的Caffe路径(路径为Caffe的根目录,从官方GitHub下载并正常安装,可参考:https://blog.csdn.net/lwplwf/article/details/82415620)

  3. 修改yolov2_tiny_3.prototxt文件(和Caffe下region层的实现有关)

将第一层

input: "data"
input_dim: 1
input_dim: 3
input_dim: 416
input_dim: 416

修改为:

layer {
  name: "data"
  type: "Input"
  top: "data"
  input_param { shape: { dim: 1 dim: 3 dim: 416 dim: 416 } }
}

Reference:

https://github.com/marvis/pytorch-caffe-darknet-convert

https://github.com/lwplw/caffe_yolov2

darknet2caffe's People

Contributors

lwplw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

darknet2caffe's Issues

Failure to transform yolov2-tiny model

/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
[libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 15:14: Expected integer.
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0725 09:48:08.277065 10690 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: yolov2_tiny_voc.prototxt
*** Check failure stack trace: ***
已放弃 (核心已转储)

This error occurred when transforming the yolov2-tiny model. Do you know why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.