2022-04-19 efficientdet:ubuntu18.04-cuda10.1-cudnn7-python3.7-pytorch1.4.0
模型简介
《EfficientDet: Scalable and Efficient Object Detection》论文发表于2020年7月由Mingxing Tan, Ruoming Pang, Quoc V. Le三人完成,EfficientDet是一种对象检测模型,它利用了若干优化和主干调整,例如使用BiFPN,以及一种复合缩放方法,该方法同时均匀缩放所有主干、特征网络和盒/类预测网络的分辨率、深度和宽度。
论文官网:https://arxiv.org/abs/1911.09070
在root/Yet-Another-EfficientDet-Pytorch(默认)路径下,运行以下命令:
mkdir datasets
ln -s /datasets/coco2017 ../../root/Yet-Another-EfficientDet-Pytorch/datasets
# 先创建datasets文件夹后,然后将复现所需的公开数据集软链接到该文件夹下
# 需将root/Yet-Another-EfficientDet-Pytorch/datasets路径下的coco2017更名为coco
mkdir weights
ln -s /modelsets/EfficientDet/efficientdet-d2.pth ../../root/Yet-Another-EfficientDet-Pytorch/weights
# 先创建weights文件夹后,然后将复现所需的预训练权重文件软链接到该文件夹下
# 平台自带efficientdet-d0.pth至efficientdet-d7.pth共8个预训练权重文件,可按需选择
在终端中,在root/Yet-Another-EfficientDet-Pytorch(默认)路径下,运行以下命令:
python efficientdet_test.py
在终端中,在root/Yet-Another-EfficientDet-Pytorch(默认)路径下,运行以下命令:
python train.py --batch_size 8 --lr 1e-3 --num_epochs 10 \
--load_weights weights/efficientdet-d2.pth
# 需修改root/Yet-Another-EfficientDet-Pytorch/projects/coco.yml文件中的gpu数量
参数 | 说明 |
---|---|
batch_size | 数据大小 |
lr | 学习率 |
num_epochs | 批次数量 |
load_weights | 预训练权重文件路径 |
在终端中,在root/Yet-Another-EfficientDet-Pytorch(默认)路径下,运行以下命令:
python coco_eval.py -c 5 \
-w weights/efficientdet-d2.pth
参数 | 说明 |
---|---|
c | 分类 |