Code Monkey home page Code Monkey logo

tf_yolov3's Introduction

START

This code is implemented base on the original code Yolov3 Tensorflow. The main purpose is improving the performance and can using on some Edge device

Clone this file

$ git clone https://github.com/buiduchanh/TF_yolov3.git

Train your own dataset

1. Prepare Dataset

Two files are required as follows:

xxx/xxx.jpg 18.19,6.32,424.13,421.83,20 323.86,2.65,640.0,421.94,20 
xxx/xxx.jpg 48,240,195,371,11 8,12,352,498,14
# image_path x_min, y_min, x_max, y_max, class_id  x_min, y_min ,..., class_id 
# make sure that x_max < width and y_max < height
person
bicycle
car
...
toothbrush

2. Caculate Anchor

We provided file kmeans.py for caculate the anchor like coco_anchor.txt

3. Change config

Then edit your ./core/config.py to make some necessary configurations

__C.YOLO.CLASSES                = "./data/classes/voc.names"
__C.TRAIN.ANNOT_PATH            = "./data/dataset/voc_train.txt"
__C.TEST.ANNOT_PATH             = "./data/dataset/voc_test.txt"

If you want to use MobileNetV2 as backbone instead of Darknet53 just set the parameters in config same as below
__C.YOLO.BACKBONE_MOBILE        = True
__C.YOLO.GT_PER_GRID            = 3

Here are two kinds of training method:

4. Training

$ python train.py
$ tensorboard --logdir ./data

Result

We will update this result asap

Improve from original code

  • MobileV2
  • DarkNet
  • Using Focal loss
  • Added Batch Normalize

TODO

  • Convert model to using in edge device
  • Adding channel prunning
  • Using Diou loss instead of Giou loss ( increase mAP ~5%)
  • Adaptively spatial feature fusion ASFF which increase the mAP ~ 10%

Reference

Stronger-Yolo
focal-loss
kl-loss
YOLOv3目标检测有了TensorFlow实现,可用自己的数据来训练
Implementing YOLO v3 in Tensorflow (TF-Slim)
Understanding YOLO

tf_yolov3's People

Contributors

buiduchanh avatar devtsmg avatar

Watchers

 avatar  avatar  avatar

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.