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
performance on VOC2007(Better performance than Tencent's reimplementation)
model | initial with yolov3.weights | initial with darknet.weights | release | ||
mAP | delta | mAP | delta | ||
baseline | 84.3 | 0.0 | 72.3 | 0.0 | yes |
data agumentation | 85.8 | +1.5 | 75.9 | +3.6 | yes |
multi scale train | 86.3 | +0.5 | 78.3 | +2.4 | yes |
focal loss | 88.3 | +2.0 | 79.6 | +1.3 | yes |
des | xxx | +1.0 | xxx | xxx | no |
group normalization | xxx | xxx | xxx | xxx | yes |
soft nms | xxx | -0.6 | xxx | -0.6 | yes |
mix up | xxx | -0.3 | 80.7 | +1.4 | no |
label smooth | 88.6 | +0.3 | 81.1 | +0.4 | yes |
cosine learning rate | 88.6 | +0.0 | 82.1 | +1.0 | yes |
GIOU | 88.8 | +0.2 | 82.3 | +0.2 | yes |
remove anchor(running) | xxx | xxx | xxx | xxx | no |
multi scale test | 90.7 | +1.9 | 84.1 | +1.8 | yes |
evaluated at 544x544 on Pascal VOC 2007 test set
- Deformable convolutional networks
- Scale-Aware Trident Networks for Object Detection
- Understanding the Effective Receptive Field in Deep Convolutional Neural Networks
-
clone YOLO_v3 repository
git clone https://github.com/Stinky-Tofu/Stronger-yolo.git
-
prepare data
(1) download datasets
Create a new folder nameddata
in the directory where theYOLO_V3
folder is located, and then create a new folder namedVOC
in thedata/
.
Download VOC 2012_trainval 、VOC 2007_trainval 、VOC 2007_test, and put datasets intodata/VOC
, name as2012_trainval
、2007_trainval
、2007_test
separately.
The file structure is as follows:
|--YOLO_V3
|--data
|--|--VOC
|--|--|--2012_trainval
|--|--|--2007_trainval
|--|--|--2007_test
(2) convert data format
You should setDATASET_PATH
inconfig.py
to the path of the VOC dataset, for example:DATASET_PATH = '/home/xzh/doc/code/python_code/data/VOC'
,and thenpython voc_annotation.py
-
prepare initial weights
Download YOLOv3-608.weights firstly, put the yolov3.weights intoyolov3_to_tf/
, and thencd 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
-
Train
python train.py
-
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
- Generate your own annotation file
train_annotation.txt
andtest_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
- Put the
train_annotation.txt
andtest_annotation.txt
intoYOLO_V3/data/
. - Configure config.py for your dataset.
- Start training.
python train.py
paper:
- YOLOv3: An Incremental Improvement
- Foca Loss for Dense Object Detection
- Group Normalization
- Single-Shot Object Detection with Enriched Semantics
- An Analysis of Scale Invariance in Object Detection - SNIP
- Deformable convolutional networks
- Scale-Aware Trident Networks for Object Detection
- Understanding the Effective Receptive Field in Deep Convolutional Neural Networks
- Bag of Freebies for Training Object Detection Neural Networks
- Generalized Intersection over Union: A Metric and A Loss for Bounding Box Regression
mAP calculate: mean Average Precision
software
- Python2.7.12
- Numpy1.14.5
- Tensorflow.1.8.0
- Opencv3.4.1
headware
- 12G 1080Ti