Skip to content

Latest commit

 

History

History
 
 

v1

Initial with YOLOV3-608.weights

Performance

train dataset: VOC 2012 + VOC 2007
test dataset: VOC 2007
test size: 544
test code: mAP (not use 07 metric)
test score threshold: 0.01

modelmAPdeltarelease
baseline84.30.0yes
data agumentation85.8+1.5yes
multi scale train86.3+0.5yes
focal loss88.3+2.0yes
desxxx+1.0no
group normalizationxxxxxxyes
soft nmsxxx-0.6yes
label smooth88.6+0.3yes
cosine learning rate88.60.0yes
GIOU88.8+0.2yes
multi scale test90.7+1.9yes

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 Stronger-yolo 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:
    |--stronger-yolo
    |--|--v1
    |--|--v2
    |--|--v3
    |--data
    |--|--VOC
    |--|--|--2012_trainval
    |--|--|--2007_trainval
    |--|--|--2007_test
    (2) convert data format
    You should alter DATASET_PATH in config.py, for example:
    DATASET_PATH = /home/wz/doc/code/python_code/data/VOC

    cd Stronger-yolo/v1
    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 --data_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 stronger-yolo-v1-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

Reference:

paper:

Requirements

software

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

hardware

  • 12G 1080Ti