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提取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.pymAP = 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 |
下载 pre-trained model 放在 models 目录然后执行:
$ python demo.py| 1 | 2 | 3 | 4 |
|---|---|---|---|
$ python augmentor.py| before | after |
|---|---|