关于作者

October 8, 2021 · View on GitHub

数据文件准备

数据集已挂载至aistudio项目中,如果需要本地训练可以从这里下载数据集,项目已同步至AIStudio

工程目录大致如下,可根据实际情况修改

home/aistudio
|-- coco(dataset)
|   |-- annotions
|       |-- instances_train2017.json
|       |-- instances_val2017.json
|   |-- train2017
|   |-- val2017
|   |-- test2017
|-- EfficientDet(repo)

训练

单卡训练

python train.py -c 0 -p coco --batch_size 8 --lr 1e-5

-c X表明efficientdet-dX

验证

确保已安装pycocotoolswebcolors

pip install pycocotools webcolors
python coco_eval.py -p coco -c 0

你需要将权重文件下载至weights文件夹下,或者使用-w手动指定权重路径

验证结果如下所示

所有完整验证结果可在EfficientDet/benchmark/coco_eval_result.txt下查看

coefficientpth_downloadGPU Mem(MB)mAP 0.5:0.95(this repo)mAP 0.5:0.95(official)
D0efficientdet-d0.pdparams104933.133.8
D1efficientdet-d1.pdparams115938.839.6
D2efficientdet-d2.pdparams132142.143.0
D3efficientdet-d3.pdparams164745.645.8
D4efficientdet-d4.pdparams190348.549.4
D5efficientdet-d5.pdparams225550.050.7
D6efficientdet-d6.pdparams298550.751.7
D7efficientdet-d7.pdparams381952.653.7
D7Xefficientdet-d8.pdparams381953.855.1

推理

python efficientdet_test.py

注意到你需要手动更改中第17compound_coef = 8来指定efficientdet-dX

部分模型推理结果如下所示

原始图像                                  ;                              官方efficientdet-d0预测图像

本项目efficientdet-d0预测图像                            本项目efficientdet-d8预测图像

python efficientdet_test_videos.py

efficientdet-d0为例,测试效果如下

results

TODO

  • 多卡训练(Coming soon)
  • EfficientNet Pretrained Weights(Coming soon)

GitHub地址

关于作者

姓名郭权浩
学校电子科技大学研2020级
研究方向计算机视觉
BLOG主页DeepHao的 blog 主页
GitHub主页DeepHao的 github 主页
如有错误,请及时留言纠正,非常蟹蟹!
后续会有更多论文复现系列推出,欢迎大家有问题留言交流学习,共同进步成长!