PaddleDetection 快速上手
本项目以路标数据集roadsign为例,详细说明了如何使用PaddleDetection训练一个目标检测模型,并对模型进行评估和预测。
本项目提供voc格式的roadsign数据集和coco格式的roadsign数据集。
本项目提供 YOLOv3、FasterRCNN、FCOS这几个算法的配置文件。
您可以选择其中一个配置开始训练,快速体验PaddleDeteciton。
效果请戳这里:
欢迎到PaddleDetection主页查看更快更好的模型。
您也可以扫下面的二维码访问PaddleDetection github主页,欢迎关注和点赞_。

环境安装
1. AiStudio环境设置
# 查看当前挂载的数据集目录, 该目录下的变更重启环境后会自动还原
# View dataset directory. This directory will be recovered automatically after resetting environment.
!ls /home/aistudio/data
# 查看工作区文件, 该目录下的变更将会持久保存. 请及时清理不必要的文件, 避免加载过慢.
# View personal work directory. All changes under this directory will be kept even after reset. Please clean unnecessary files in time to speed up environment loading.
!ls /home/aistudio/work
# 如果需要进行持久化安装, 需要使用持久化路径, 如下方代码示例:
# If a persistence installation is required, you need to use the persistence path as the following:
!mkdir /home/aistudio/external-libraries
!pip install beautifulsoup4 -t /home/aistudio/external-libraries
# 同时添加如下代码, 这样每次环境(kernel)启动的时候只要运行下方代码即可:
# Also add the following code, so that every time the environment (kernel) starts, just run the following code:
import sys
sys.path.append('/home/aistudio/external-libraries')
2. 安装Paddle
AIStudio上已经安装好paddlepaddle 1.8.4。
import paddle
print(paddle.__version__)
3. 克隆PaddleDetection
通过以下命令克隆最新的PaddleDetection代码库。
! git clone https://github.com/PaddlePaddle/PaddleDetection
如果因为网络问题clone较慢,可以:
- 通过github加速通道clone
git clone https://hub.fastgit.org/PaddlePaddle/PaddleDetection.git
- 选择使用码云上的托管
git clone https://gitee.com/paddlepaddle/PaddleDetection
注:码云托管代码可能无法实时同步本github项目更新,存在3~5天延时,请优先从github上克隆。
- 使用本项目提供的代码库,存放路径
work/PaddleDetection.zip
这里采用项目提供的代码库
! ls ~/work/PaddleDetection.zip
%cd ~/work/
! unzip -o PaddleDetection.zip
4. PaddleDetection依赖安装及设置
通过如下方式安装PaddleDetection依赖,并设置环境变量
安装 cocoapi
如果因为网络问题clone较慢,可以:
- 通过github加速通道clone
pip install "git+https://hub.fastgit.org/cocodataset/cocoapi.git#subdirectory=PythonAPI"
# github
#! pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"
# fast github
# ! pip ins

本教程以路标数据集为例,详细介绍如何使用PaddleDetection训练目标检测模型,涵盖环境搭建、数据准备、模型训练、评估与预测等关键步骤。
最低0.47元/天 解锁文章
745

被折叠的 条评论
为什么被折叠?



