Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AbelHu/YOLO

 
 

Repository files navigation

YOLO

YOLOv2 YOLO9000: Better, Faster, Stronger 的 Keras 实现。

依赖项

数据集

MSCOCO 2017 数据集,请按照说明 下载 train2017.zip, val2017.zip, annotations_trainval2017.zip 放入 data 目录。

$ wget http://images.cocodataset.org/zips/train2017.zip && wget http://images.cocodataset.org/zips/val2017.zip && wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip

image

用法

数据预处理

提取123,287个训练图像,并将它们分开(118,287个用于训练,5,000个用于验证):

$ python pre-process.py

训练

$ python train.py

如果想在培训期间进行可视化,请在终端中运行:

$ tensorboard --logdir path_to_current_dir/logs

性能评估

$ python eval_gen_results.py
$ python eval.py

mAP = 30.3

KPI value
Average Precision (AP) @[ IoU=0.50:0.95 + area= all + maxDets=100 ] = 0.120
Average Precision (AP) @[ IoU=0.50 + area= all + maxDets=100 ] = 0.189
Average Precision (AP) @[ IoU=0.75 + area= all + maxDets=100 ] = 0.131
Average Precision (AP) @[ IoU=0.50:0.95 + area= small + maxDets=100 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 + area=medium + maxDets=100 ] = 0.046
Average Precision (AP) @[ IoU=0.50:0.95 + area= large + maxDets=100 ] = 0.303
Average Recall (AR) @[ IoU=0.50:0.95 + area= all + maxDets= 1 ] = 0.115
Average Recall (AR) @[ IoU=0.50:0.95 + area= all + maxDets= 10 ] = 0.134
Average Recall (AR) @[ IoU=0.50:0.95 + area= all + maxDets=100 ] = 0.134
Average Recall (AR) @[ IoU=0.50:0.95 + area= small + maxDets=100 ] = 0.000
Average Recall (AR) @[ IoU=0.50:0.95 + area=medium + maxDets=100 ] = 0.044
Average Recall (AR) @[ IoU=0.50:0.95 + area= large + maxDets=100 ] = 0.357

Demo

下载 pre-trained model 放在 models 目录然后执行:

$ python demo.py
1 2 3 4
image image image image
image image image image
image image image image
image image image image
image image image image

数据增强

$ python augmentor.py
before after
image image
image image
image image
image image
image image
image image
image image
image image
image image
image image

About

YOLO-v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%