论文:
https://arxiv.org/abs/2007.12099
手把手教你使用PaddleDetection训练自己的数据集
【PaddleDetection2.0专项】PP-YOLOv2
https://github.com/PaddlePaddle/PaddleDetection
进入AIstudio,申请GPU资源
打开终端:
查看Cuda版本:nvcc -V
配置环境:
# CUDA10.1
python -m pip install paddlepaddle-gpu==2.0.2 -f https://mirror.baidu.com/pypi/simple
训练
# 单卡
export CUDA_VISIBLE_DEVICES=0
python tools/train.py -c configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.yml
# 多卡
export CUDA_VISIBLE_DEVICES=0,1
python -m paddle.distributed.launch --gpus 0,1 tools/train.py -c configs/yolov3/yolov3_mobilenet_v1_roadsign.yml
评估
export CUDA_VISIBLE_DEVICES=0
python -u tools/eval.py -c configs/yolov3/yolov3_mobilenet_v1_roadsign.yml -o weights=output/yolov3_mobilenet_v1_roadsign/model_final.pdparams
预测
python tools/infer.py -c configs/yolov3/yolov3_mobilenet_v1_roadsign.yml --infer_img=demo/road554.png -output_dir=infer_output --draw_threshold=0.5 -o weights=output/yolov3_mobilenet_v1_roadsign/model_final.pdparams --use_vdl=Ture