PaddleDetection 快速上手

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

PaddleDetection 快速上手

本项目以路标数据集roadsign为例,详细说明了如何使用PaddleDetection训练一个目标检测模型,并对模型进行评估和预测。

本项目提供voc格式的roadsign数据集和coco格式的roadsign数据集。

本项目提供 YOLOv3、FasterRCNN、FCOS这几个算法的配置文件。

您可以选择其中一个配置开始训练,快速体验PaddleDeteciton。

效果请戳这里:

PaddleDetection

欢迎到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较慢,可以:

  1. 通过github加速通道clone

git clone https://hub.fastgit.org/PaddlePaddle/PaddleDetection.git

  1. 选择使用码云上的托管

git clone https://gitee.com/paddlepaddle/PaddleDetection

注:码云托管代码可能无法实时同步本github项目更新,存在3~5天延时,请优先从github上克隆。

  1. 使用本项目提供的代码库,存放路径work/PaddleDetection.zip

这里采用项目提供的代码库

! ls ~/work/PaddleDetection.zip
%cd ~/work/
! unzip -o PaddleDetection.zip

4. PaddleDetection依赖安装及设置

通过如下方式安装PaddleDetection依赖,并设置环境变量

安装 cocoapi

如果因为网络问题clone较慢,可以:

  1. 通过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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YEGE学AI算法

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值