当前位置:网站首页>ModelArts-based object detection YOLOv3 practice [play with HUAWEI CLOUD]
ModelArts-based object detection YOLOv3 practice [play with HUAWEI CLOUD]
2022-08-01 10:10:00 【HUAWEI CLOUD】
前言
YOLO场景运用: YOLO作为一个one-stage目标检测算法,在速度和准确度上都有杰出的表现.
除了在NotebookThe development environment to run the algorithm and the definition of a,通过ModelArtsPreset algorithm can also beYOLOTraining algorithm and reasoning.The following example is a useNotebook中的YOLO V3Training object detection and reasoning process.
另外,想要了解ModelArts预置算法,可以前往华为云GitHub教程链接:ModelArts物体检测Yolo_V3预置算法案例
Or you can refer to my this post before:https://bbs.huaweicloud.com/blogs/224006
背景
Object detection is an important research field in computer vision,In testing,行人跟踪,自动驾驶,Medical imaging has been widely used in such fields as.Different from the simple image classification,Object detection is aimed at to accurately identify the target in the image,As well as the position of the object and classification,So can be applied to more high-level visual processing scene.例如在自动驾驶领域,Need to identify camera image of vehicle、行人、Traffic signs and their locations,According to these data, in order to further determine the driving strategy.这次实践,I will focus onYOLO算法,YOLO(You Only Look Once)是一种one-stage物体检测算法.
基础环境准备
在使用 ModelArts 进行 AI 开发前,Please complete the following basic operating oh(如有已完成部分,请忽略),主要分为4步(注册–>实名认证–>服务授权–>领代金券):
使用手机号注册华为云账号:点击注册
点此去完成实名认证,账号类型选"个人",个人认证类型推荐使用"扫码认证".
点此进入 ModelArts Data management console page,Above will be prompted to access authorization,点击【服务授权】按钮,按下图顺序操作:
进入 ModelArts 控制台首页,如下图,点击页面上的"彩蛋",Get the new vouchers!Subsequent steps may produce cost of resource consumption,Please be sure to get.
以上操作,Also provides a detailed video tutorials,点此查看:ModelArts环境配置
基于ModelArts的物体检测YOLOv3Practice steps
1.点击进入 【物体检测YOLOv3实践】的案例页面,并完成基础配置.
本次实践使用的是AI框架: TensorFlow-1.13.1,在GPU下面运行;推荐规格: GPU V100
点击 Run in ModelArts,进入 JupyterLab 页面:
稍等30s左右,等待项目初始化完毕......
由于需要GPU下运行,So we need to switch from the specification,并选择 [限时免费]GPU: 1*V100|CPU: 8核 64GB ,点击切换规格.
Wait for a moment just switch to complete,如下所示:
2.数据和代码下载
运行下面代码,Download and extract the data and code
这里使用coco数据,共80个类别.
3准备数据
3.1文件路径定义
3.2读取标注数据
3.3数据读取函数,构建数据生成器.
Each read a lot of data to memory training,And to do data to enhance
4.模型训练
这里使用Keras深度学习框架搭建YOLOv3神经网络.
4.1构建神经网络
可以在./yolo3/model.py
File for details
4.2开始训练
4.3保存模型
5.模型测试
5.1Open the test photo
5.2图像预处理
5.3构建模型
5.4加载模型权重
5.5定义IOU以及score
- IOU: Will be occurring simultaneously than larger thanIOUBounding box as redundant frames to remove
- score:To predict the score greater thanscoreThe bounding box of screening out
5.6构建输出[boxes, scores, classes]
5.7进行预测
5.8The predicted results drawn in the picture
Output the first artwork
Object detection effect
可以看出,基于ModelArts的物体检测YOLOv3Can detect the umbrella and people,Box to choose accurate,With the precision of data set training also has a relationship.
总结
Object detection is an important research field in computer vision,In testing,行人跟踪,自动驾驶,Medical imaging has been widely used in such fields as.Different from the simple image classification,Object detection is aimed at to accurately identify the target in the image,As well as the position of the object and classification,So can be applied to more high-level visual processing scene.本次实操,Through good training data for testing,较为精确,不难看出,YOLO作为一个one-stage目标检测算法,在速度和准确度上都有杰出的表现.
至此,本文结束.
感恩能与大家在华为云遇见!希望能与大家一起在华为云社区共同成长.
边栏推荐
猜你喜欢
Custom Types - Enums, Unions
Enterprise WeChat group: robot timing reminder function database configuration
VS“无法查找或打开PDB文件”是怎么回事?如何解决
rpm和yum
Google Earth Engine APP——15行代码搞定一个inspector高程监测APP
2022年中盘点 | 产品打底,科技背书,广汽集团阔步向前
Mysql index related knowledge review one
报告:想学AI的学生数量已涨200%,老师都不够用了
如何在IntellJ IDEA中批量修改文件换行符
Qt supports HEIC/HEIF format images
随机推荐
高级驾驶辅助系统ADAS简介
《时代》杂志:元宇宙时代将改变世界
Quantify daily work metrics
广域铭岛入选2022年重庆市数字经济产业发展试点示范项目名单
【云驻共创】分布式技术之华为云全域调度技术与实践
Explain / Desc 执行计划分析
笔记。。。。
Introduction and application of pointers
CTO strongly banning the use of the Calendar, that in what?
Comprehensive experiment BGP
指针的介绍及应用
玻璃拟态(Glassmorphism)设计风格
gc的意义和触发条件
MTK6225-紧急电话
线上问题排查常用命令,总结太全了,建议收藏!!
【软件架构模式】MVVM模式和MVC模式区别
redis
node 格式化时间的传统做法与高级做法(moment)
What is a stepper motor?40 pictures to show you!
Google Earth Engine APP——15行代码搞定一个inspector高程监测APP