当前位置:网站首页>Use baidu EasyDL intelligent bin

Use baidu EasyDL intelligent bin

2022-08-09 06:28:00 PaddlePaddle

项目说明

业务背景

2017年3月底,国家发展改革委、The Ministry of Housing and Urban-Rural Development jointly released it《生活垃圾分类制度实施方案》,Required in municipalities、省会城市、It is a city under separate state planning and the first batch of demonstration cities for domestic waste classification,First implement the compulsory classification of domestic waste.But distance residents develop the habit of sorting garbage,这条路还很长,日本花了27年,德国花了40年.Therefore, it is necessary to monitor the garbage classification of residents,Auxiliary classification, etc. became the government、The pain point of the environmental protection department.An environmental protection technology company in Jiangsu and Zhejiang hopes to passAIAbility to sort the garbage thrown by residents,In the form of smart garbage bins, we can supervise residents' garbage disposal and establish a garbage recycling ecology.

业务难点

AI模型的训练需要有图片对应标注的数据集,Massive garbage pictures need to be labeled,成本高,且人工标注效率低;模型效果调优周期长,需要反复添加数据进行模型迭代,效率低下;Smart litter boxes are outdoors,Internet conditions are unstable,Requires edge hardware deploymentAI能力,High volume hardware deployment costs,部署效率低下.

解决方案

使用EasyDL图像分类任务,无需了解AI算法知识,提交少量图片进行训练,Soon you will get one that recognizes all kinds of junk photosAI模型.标注少量数据后可使用智能标注功能,完成大量原始数据的标注,来进行模型训练与迭代.EasyDLIt also provides software and hardware integrated solutions,将AIThe model is deployed in the cost-effective BaiduEdgeBoardSmart Calculation Box,The multi-channel cameras correspond to the reasoning of different garbage bin conveyor belts respectively,High performanceAI应用,Meet the needs of the implementation of the identification of residential waste disposal scenarios.

image.png

数据准备

数据采集

  1. The customer's final application scenario is to provide the garbage sorting function in the smart garbage bin,因此数据采集的照片要尽量贴合用户拍摄的场景,具备真实性,包含多种光照条件(Be sure to include early/晚/开灯/When the lights are not turned on),这样才能保证训练模型的效果.切勿使用网络图片进行训练.
  2. The application scenario needs to be right「厨余垃圾」、「可回收垃圾」、「有害垃圾」、「其他垃圾」进行分类,However, the visual sensory differences between different items under the same garbage category are too large,如果将所有「厨余垃圾」defined as the same label,AI识别效果会比较差,For example, pork and cabbage are also defined as kitchen waste,但AIThe identification results of pork and cabbage may be unsatisfactory.Therefore we need to collect the main body in the garbage conveyor(specific garbage)Clear original picture,And define its specific item as a kind of label,For example pork junk photos are defined as「猪肉」,Cabbage photos are defined as「白菜」,while developing the application,Match the pork and cabbage labels to「厨余垃圾」的逻辑中.
  3. 应用场景中,For residents who are packaged as garbage bags and thrown into the garbage as a whole,Timely feedback and warnings are required.因此「垃圾袋」To be individually set as a label category.

    Data import and annotation

    第一步,在EasyDL官网点击立即使用,选择图像分类任务,进入图像分类操作台.

第二步,在数据总览页中点击创建数据集,创建一个“垃圾分类”数据集,点击完成.

image.png

image.png

第三步,在数据总览页中找到刚才创建的数据集,点击操作栏的“导入”,EasyDL提供多种数据导入方式,可在页面中参考各个方式对应的要求来导入数据.提示:为方便开展模型训练,示例数据已经在本地通过文件夹分隔进行好分类.请选择“有标注信息”-“本地导入”-“上传压缩包”-“以文件夹命名分类”,上传压缩包【garbage.zip】,并确认.

image.png

image.png

第四步,在数据总览中可以看到数据已经导入,点击右侧的查看与标注就可以去标注上传的原始图片数据.如果上传的是EasyDL提供的示例数据,则无需标注.

image.png

模型训练

第一步,在我的模型页创建模型,填写真实信息,方便EasyDL团队后续提供更好的服务.

image.png

第二步,在刚才创建好的模型操作栏点击训练,准备开始配置训练任务.

image.png

第三步,配置训练任务.训练配置有很多功能,可根据业务的需求考虑后选择.部署方式分为公有云部署和本地部署,Because of garbage classificationAICapabilities are applied in smart bins,The network environment is unstable,And smart trash cans need to be spread all over the city,It is an application scenario that needs to control the hardware cost,Therefore, special adaptation hardware in on-premises deployment is selectedEdgeBoard部署.在选择算法时可根据应用场景是更加看重识别精度还是识别结果返回的速度,来决定是选择高精度还是高性能算法.In the application scenario of garbage classification,Pay more attention to performance,Real-time reasoning is required to return results to prompt residents whether they are correctly disposing of garbage.So here we choose the high-performance model.配置完训练策略后即可添加刚才导入的数据集作为训练数据,即可点击开始训练啦!

image.png

You can view the training status of the model on the My Models page,一般1000Zhang dataset wait a few hours for training to complete.Model deployment can be performed after model training is complete.

image.png

模型部署

在模型训练完成后,You can click the application release in the corresponding operation column,Publish the model asEdgeBoardspecially adaptedSDK-纯离线服务.

image.png

After the model is published,It can be downloaded in pure offline serviceSDKDeploy locally,For local deployment, please refer to the operation documentation:https://ai.baidu.com/ai-doc/EASYDL/Ek38n38zs

image.png

批量部署

After the smart trash can was officially put into use,will be found in every corner of the city,At this time, the management of each intelligent computing box has become a difficult problem,模型SDK-The deployment cost of pure offline services is also extremely high,It needs to be done manually one by one.这种情况下,EasyEdgeAn intelligent edge console can solve the problem very well,智能边缘控制台-The multi-node version is an intelligent edge platform for edge resource management and model service applications,A large number of edge boxes can be managed uniformly at the central node,One-click model service batch delivery is supported,灵活部署AI模型.详情请看https://ai.baidu.com/ai-doc/EASYDL/sl138yv75

image.png

常见问题

问题1:我应该采集多少数据?

如果是为了体验模型训练和使用的流程,每个类别准备20张即可开始训练.如果需要保证模型效果,模型将投入业务中使用,建议每个类别准备300-500张图片,且覆盖光照和角度都比较全面,从而保证模型的泛化性.

问题2:我有些标签数据量很少,会不会影响模型效果?如果影响,我应该怎么办?

某类标签的数据量相比其他标签的量较少,会影响模型对此类标签的识别准确率.在无法采集到更多原始数据的情况下可以在EasyDL上配置多个策略来优化效果.

第一,可在训练配置页面-高级训练配置中打开「数据不平衡优化」开关,优化某类标签数据量少带来的效果问题.

第二,可打开数据增强开关,并自己选择数据增强算子来生成更多训练数据,选择算子时需要结合自己的应用场景来选择.例如从肉眼上判断,光照不太影响识别率,就可以选择配置「Brightness」算子来调节光照条件来增加数据.

问题3:模型训练免费吗?你们平台什么时候收费?

数据标注、模型训练都是免费的,公有云服务API调用和本地部署SDK都提供免费试用的额度

原网站

版权声明
本文为[PaddlePaddle]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208090623092784.html