GithubHelp home page GithubHelp logo

royxue / darknet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pjreddie/darknet

0.0 2.0 0.0 4.31 MB

Convolutional Neural Networks

Home Page: http://pjreddie.com/darknet/

License: Other

Makefile 0.24% Python 2.08% Shell 0.11% Cuda 7.55% C 89.74% C++ 0.28%
yolo2 training object-detection

darknet's Introduction

Darknet Logo

#Darknet# Darknet is an open source neural network framework written in C and CUDA. It is fast, easy to install, and supports CPU and GPU computation.

For more information see the Darknet project website.

For questions or issues please use the Google Group.


This Repo is used training one specific class detection project.

Training Steps:

  1. Prepare GPU machine(highly recommend): Using AWS g2/2x.large with some community AMI with Cuda, CuDNN installed, or you need to have them installed by yourself.

  2. Change the Makefile, set GPU=1 and CUDNN=1.

  3. Prepare your dataset, manualy label the data by BBox Label Tools, and convert to the format darknet accept. x, y, width, height are all relative values. <object-class> <x> <y> <width> <height>

  4. Create labels names, like data/voc.names, list all your classes names.

  5. Create data config, like cfg/voc.data

    classes= {NUM_CLASSES}
    train  = {DATA_PATH}/train.txt
    valid  = {DATA_PATH}/valid.txt
    names = data/xxx.names
    backup = {DATA_PATH}/backup/
    

    train.txt and valid.txt are just 2 lists of the image paths, darknet will automatically find labels in the image folder or it's parents folder. Suggest to have 2 folders /images and /labels.

  6. Create your .cfg file, you can modify the existing ones, or create some brand new one. If you choose to modify existing ones, there are serval values you need to change:

    classes={NUM_CLASSES} filters=num*{NUM_CLASSES+coords+1} for the last convolutional layers.

  7. (Optional) Download some pre-trained darknet weights.

  8. Run the training by ./darknet detector train cfg/xxx.data cfg/xxx.cfg xxx.weights

  9. Run the test, first you need to change the line 404 in src/darknet.c the data file to your training one, and then make and run detector with your test images.

  10. If you want to use the model on android devices, please see darkflow for how to generate darknet protobuf.

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.