快速使用mobiledets-yolov4

jupiter
2022-11-22 / 0 评论 / 376 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2022年11月22日,已超过519天没有更新,若内容或图片失效,请留言反馈。

1.下载项目

git clone https://github.com/inacmor/mobiledets-yolov4-pytorch.git

2.准备数据

2.1 准备VOC格式的数据集

put your trainset and labels(xml) in data/Imgs and data/Annotations.

这里选择直接将一个VOC格式的数据集通过软链接链接过来

ln -s /data_jupiter/dataset/209_VOC_new/Annotations ./
ln -s /data_jupiter/dataset/209_VOC_new/JPEGImages ./Imgs 

2.2 修改classes.txt

LuggageVehicle
BridgeVehicle
Plane
RefuelVehicle
Person
FoodVehicle
LuggageVehicleHead
FollowMe
TractorVehicle

3.开始训练

3.0 环境安装

  1. 安装pytorch(略)
  2. 安装apex

    git clone https://github.com/NVIDIA/apex
    cd apex
    python setup.py install

3.1 训练前准备工作

python ready.py
python kmeans.py

3.2 开始训练

没有预训练模型的话需要将模型加载注释掉,修改train.py
#model.load_state_dict(torch.load(pretrained_weights), strict=False)
# 执行训练
python train.py
0

评论 (0)

打卡
取消