Giter Club home page Giter Club logo

stronger-yolo's Introduction

Note

I'm solving scale invariant. If you have a good paper, you can email me by [email protected]. Thanks!
Because I'm looking for an internship, I suspend update the project. If anyone is willing to recommend me to your company, thank you very much.
If you have any problem, please read README.md carefully

Improve yolo_v3 with latest paper

performance on VOC2007(Better performance than Tencent's reimplementation)

modelinitial with yolov3.weightsinitial with darknet.weightsrelease
mAPdeltamAPdelta
baseline84.30.072.30.0yes
data agumentation85.8+1.575.9+3.6yes
multi scale train86.3+0.578.3+2.4yes
focal loss88.3+2.079.6+1.3yes
desxxx+1.0xxxxxxno
group normalizationxxxxxxxxxxxxyes
soft nmsxxx-0.6xxx-0.6yes
mix upxxx-0.380.7+1.4no
label smooth88.6+0.381.1+0.4yes
cosine learning rate88.6+0.082.1+1.0yes
GIOU88.8+0.282.3+0.2yes
remove anchor(running)xxxxxxxxxxxxno
multi scale test90.7+1.984.1+1.8yes

evaluated at 544x544 on Pascal VOC 2007 test set

mAP

mAP

to do

  • Deformable convolutional networks
  • Scale-Aware Trident Networks for Object Detection
  • Understanding the Effective Receptive Field in Deep Convolutional Neural Networks

Usage

  1. clone YOLO_v3 repository

    git clone https://github.com/Stinky-Tofu/Stronger-yolo.git
  2. prepare data
    (1) download datasets
    Create a new folder named data in the directory where the YOLO_V3 folder is located, and then create a new folder named VOC in the data/.
    Download VOC 2012_trainvalVOC 2007_trainvalVOC 2007_test, and put datasets into data/VOC, name as 2012_trainval2007_trainval2007_test separately.
    The file structure is as follows:
    |--YOLO_V3
    |--data
    |--|--VOC
    |--|--|--2012_trainval
    |--|--|--2007_trainval
    |--|--|--2007_test
    (2) convert data format
    You should set DATASET_PATH in config.py to the path of the VOC dataset, for example: DATASET_PATH = '/home/xzh/doc/code/python_code/data/VOC',and then

    python voc_annotation.py
  3. prepare initial weights
    Download YOLOv3-608.weights firstly, put the yolov3.weights into yolov3_to_tf/, and then

    cd yolov3_to_tf
    python3 convert_weights.py --weights_file=yolov3.weights --dara_format=NHWC --ckpt_file=./saved_model/yolov3_608_coco_pretrained.ckpt
    cd ..
    python rename.py
  4. Train

    python train.py
  5. Test
    Download weight file yolo_test.ckpt
    If you want to get a higher mAP, you can set the score threshold to 0.01、use multi scale test、flip test.
    If you want to use it in actual projects, or if you want speed, you can set the score threshold to 0.2.

    python test.py --gpu=0 --map_calc=True --weights_file=model_path.ckpt
    cd mAP
    python main.py -na -np

Train for custom dataset

  1. Generate your own annotation file train_annotation.txt and test_annotation.txt, one row for one image.
    Row format: image_path bbox0 bbox1 ...
    Bbox format: xmin,ymin,xmax,ymax,class_id(no space), for example:
    /home/xzh/doc/code/python_code/data/VOC/2007_test/JPEGImages/000001.jpg 48,240,195,371,11 8,12,352,498,14
  2. Put the train_annotation.txt and test_annotation.txt into YOLO_V3/data/.
  3. Configure config.py for your dataset.
  4. Start training.
    python train.py

Reference:

paper:

mAP calculate: mean Average Precision

Requirements

software

  • Python2.7.12
  • Numpy1.14.5
  • Tensorflow.1.8.0
  • Opencv3.4.1

headware

  • 12G 1080Ti

stronger-yolo's People

Stargazers

 avatar

Watchers

 avatar

Forkers

dodogoffy

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.