[{"data":1,"prerenderedAt":403},["ShallowReactive",2],{"content-query-8Btd3EcCug":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"category":13,"body":14,"_type":397,"_id":398,"_source":399,"_file":400,"_stem":401,"_extension":402},"/technology-blogs/zh/883","zh",false,"","人工智能技术应用：MindSpore在智慧屏/智能电视上的应用，让您的家庭相册分类功能越用越准","MindSpore Lite 致力于持续构建优化轻量化的高效端侧训练框架","2021-12-24","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2021/12/25/95b7ef8878ac4bf595d6c4eb2180a01f.png","technology-blogs","大V博文",{"type":15,"children":16,"toc":387},"root",[17,25,29,35,48,59,68,82,90,95,102,107,116,150,156,161,172,177,184,193,198,205,254,259,266,271,278,283,290,295,300,311,319,324,329,334,346,358,363,375],{"type":18,"tag":19,"props":20,"children":22},"element","h1",{"id":21},"人工智能技术应用mindspore在智慧屏智能电视上的应用让您的家庭相册分类功能越用越准",[23],{"type":24,"value":8},"text",{"type":18,"tag":26,"props":27,"children":28},"h2",{"id":7},[],{"type":18,"tag":30,"props":31,"children":32},"p",{},[33],{"type":24,"value":34},"作者：李锐锋",{"type":18,"tag":30,"props":36,"children":37},{},[38,40],{"type":24,"value":39},"作者主页：",{"type":18,"tag":41,"props":42,"children":46},"a",{"href":43,"rel":44},"https://www.zhihu.com/people/risenberg/posts",[45],"nofollow",[47],{"type":24,"value":43},{"type":18,"tag":30,"props":49,"children":50},{},[51,53],{"type":24,"value":52},"文章来源：",{"type":18,"tag":41,"props":54,"children":57},{"href":55,"rel":56},"https://zhuanlan.zhihu.com/p/448990579",[45],[58],{"type":24,"value":55},{"type":18,"tag":26,"props":60,"children":62},{"id":61},"背景",[63],{"type":18,"tag":64,"props":65,"children":66},"strong",{},[67],{"type":24,"value":61},{"type":18,"tag":30,"props":69,"children":70},{},[71,73,80],{"type":24,"value":72},"MindSpore Lite是MindSpore全场景AI框架的轻量级AI引擎，本文介绍MindSpore Lite在华为智慧屏上的",{"type":18,"tag":41,"props":74,"children":77},{"href":75,"rel":76},"https://link.zhihu.com/?target=https%3A//appgallery.cloud.huawei.com/ag/n/app/C100330247%3Flocale%3Dzh_CN%26source%3Dappshare%26subsource%3DC100330247%26shareTo%3Dcom.huawei.works%26shareFrom%3Dappmarket",[45],[78],{"type":24,"value":79},"应用",{"type":24,"value":81},"，与传统电视相比，智慧屏除了可以观看电视节目外；还可以联网观看海量视频，语音控制家里的智能家电等，帮助您轻松开启智慧生活。智慧屏不仅是家庭的影音娱乐中心，更是信息共享中心、控制管理中心、多设备交互中心，及家庭的智慧生活控制中心。本文是MindSpore 人工智能技术应用系列第四篇，也欢迎您发布基于MindSpore的应用。",{"type":18,"tag":30,"props":83,"children":84},{},[85],{"type":18,"tag":86,"props":87,"children":89},"img",{"alt":7,"src":88},"https://pic3.zhimg.com/80/v2-e2a034f96d80497c75bf6c15928434d2_720w.jpg",[],{"type":18,"tag":30,"props":91,"children":92},{},[93],{"type":24,"value":94},"华为智慧屏参考图",{"type":18,"tag":30,"props":96,"children":97},{},[98],{"type":18,"tag":86,"props":99,"children":101},{"alt":7,"src":100},"https://pic3.zhimg.com/80/v2-b8725b88a9f9414556f676d34e05dd7a_720w.jpg",[],{"type":18,"tag":30,"props":103,"children":104},{},[105],{"type":24,"value":106},"京东上销量较高的华为智慧屏",{"type":18,"tag":26,"props":108,"children":110},{"id":109},"使用mindspore-lite的优势",[111],{"type":18,"tag":64,"props":112,"children":113},{},[114],{"type":24,"value":115},"使用MindSpore Lite的优势",{"type":18,"tag":117,"props":118,"children":119},"ol",{},[120,126,131,145],{"type":18,"tag":121,"props":122,"children":123},"li",{},[124],{"type":24,"value":125},"极致性能 高效的内核算法和汇编级优化，支持CPU、GPU、NPU异构调度，最大化发挥硬件算力，最小化推理时延和功耗。",{"type":18,"tag":121,"props":127,"children":128},{},[129],{"type":24,"value":130},"轻量化 提供超轻量的解决方案，支持模型量化压缩，模型更小跑得更快，使能AI模型极限环境下的部署执行。",{"type":18,"tag":121,"props":132,"children":133},{},[134,136,143],{"type":24,"value":135},"全场景支持 支持iOS、Android、鸿蒙等手机操作系统以及LiteOS",{"type":18,"tag":41,"props":137,"children":140},{"href":138,"rel":139},"https://www.zhihu.com/search?q=%E5%B5%8C%E5%85%A5%E5%BC%8F%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra=%7B%22sourceType%22%3A%22article%22%2C%22sourceId%22%3A433400817%7D",[45],[141],{"type":24,"value":142},"嵌入式操作系统",{"type":24,"value":144},"，支持手机、大屏、平板、IoT等各种智能设备上的AI应用。",{"type":18,"tag":121,"props":146,"children":147},{},[148],{"type":24,"value":149},"高效部署 支持MindSpore/TensorFlow Lite/Caffe/Onnx模型，提供模型压缩、数据处理等能力，统一训练和推理IR，方便用户快速部署。",{"type":18,"tag":26,"props":151,"children":153},{"id":152},"ai应用在智慧屏上部署的挑战",[154],{"type":24,"value":155},"AI应用在智慧屏上部署的挑战",{"type":18,"tag":30,"props":157,"children":158},{},[159],{"type":24,"value":160},"当部署一个AI 应用到手机，智慧屏，音箱等终端设备上，在App使用过程中出现非预期效果时，比如语音识别不准，图片分类出错，个性化搜索推荐等，用户可能想到AI 应用背后的深度学习模型能否在线学习的方式使得深度学习模型更加准确，不会再次出现上述识别或者分类错误。神经网络本地基于用户数据在线学习或者在线训练更新，实现千人千模，能有效提升深度学习模型的预测准确率，实现更加准确的语音识别或者照片分类，更加精准的广告推荐，显著提高用户个性化体验。同时，用户数据不需要离开设备，很好的避免了数据外发泄露导致的用户隐私和安全问题。",{"type":18,"tag":30,"props":162,"children":163},{},[164,168],{"type":18,"tag":86,"props":165,"children":167},{"alt":7,"src":166},"https://pic2.zhimg.com/80/v2-02b6e0ce16b109f3b670d4603032690d_720w.jpg",[],{"type":18,"tag":86,"props":169,"children":171},{"alt":7,"src":170},"https://pic2.zhimg.com/80/v2-f04fed8ef0e32a0d38b12424dc41960d_720w.jpg",[],{"type":18,"tag":30,"props":173,"children":174},{},[175],{"type":24,"value":176},"随着AI模型小型化技术如NAS，剪枝、量化等，越来越成熟，以及端侧设备的算力(POWER)和物理存储(ROM/RAM)的增长，AI模型大小突破了端侧设备算力和存储等硬件资源的限制，在端侧进行神经网络学习，如迁移学习，小样本学习，增量学习，联邦学习等已成为可能。",{"type":18,"tag":30,"props":178,"children":179},{},[180],{"type":18,"tag":86,"props":181,"children":183},{"alt":7,"src":182},"https://pic1.zhimg.com/80/v2-1873f73333de35168dfc2f0c37abdc64_720w.jpg",[],{"type":18,"tag":26,"props":185,"children":187},{"id":186},"mindspore的方案",[188],{"type":18,"tag":64,"props":189,"children":190},{},[191],{"type":24,"value":192},"MindSpore的方案",{"type":18,"tag":30,"props":194,"children":195},{},[196],{"type":24,"value":197},"为了方便开发者，MindSpore Lite 开发了一套轻量化的端侧训练框架，并对外提供丰富、简单、易用的c++和java API。",{"type":18,"tag":30,"props":199,"children":200},{},[201],{"type":18,"tag":86,"props":202,"children":204},{"alt":7,"src":203},"https://pic1.zhimg.com/80/v2-d796d50bbcb7881d4dd3db3bda90157c_720w.jpg",[],{"type":18,"tag":206,"props":207,"children":208},"ul",{},[209,214,219,224,229,234,239,244],{"type":18,"tag":121,"props":210,"children":211},{},[212],{"type":24,"value":213},"**动静态内存复用：**算子间和算子内的两层复用，内存消耗更小；",{"type":18,"tag":121,"props":215,"children":216},{},[217],{"type":24,"value":218},"**混合精度训练：**节省训练内存的同时提升训练速度；",{"type":18,"tag":121,"props":220,"children":221},{},[222],{"type":24,"value":223},"**训练中止和恢复：**端侧设备硬件资源有限且业务繁多，端侧训练消耗硬件资源多，因此灵活的训练业务中止和恢复十分必要。",{"type":18,"tag":121,"props":225,"children":226},{},[227],{"type":24,"value":228},"**梯度的获取和覆盖：**针对联邦学习，通常需将本地模型梯度经加密后发送到到云侧汇聚平均，然后重新分发梯度给各边缘设备，实现各端边缘侧数据特征共享，因此开放梯度的读写操作接口有助于用户构建开发应用；",{"type":18,"tag":121,"props":230,"children":231},{},[232],{"type":24,"value":233},"**迁移训练接口：**针对迁移学习和增量学习，一般需独立构建backbone网络和head网络，训练时固定backbone网络，只对head网络finetune。因此MindSpore Lite 方便用于使用，对外提供了接口，backbone和head 网络的拼接由MindSpore Lite 训练框架来完成。",{"type":18,"tag":121,"props":235,"children":236},{},[237],{"type":24,"value":238},"**在线的训练后量化：**端侧对模型大小的存储空间比较敏感，因此MindSpore 提供了在线的高精度权重量化方法，在保存训练模型或者推理模型时可对模型权重进行8bit压缩，轻松实现模型大小变小4x，缓解端侧存储压力；",{"type":18,"tag":121,"props":240,"children":241},{},[242],{"type":24,"value":243},"**丰富的优化器：**Adam，SGD，MSE等；",{"type":18,"tag":121,"props":245,"children":246},{},[247,252],{"type":18,"tag":64,"props":248,"children":249},{},[250],{"type":24,"value":251},"丰富的ModelZoo:",{"type":24,"value":253}," 支持了MobileNetV1/V2/V3, efficientNet, googleNet, denseNet, shuffleNet, tinyBert, yoloV3网络端侧训练；",{"type":18,"tag":30,"props":255,"children":256},{},[257],{"type":24,"value":258},"华为智慧屏家庭相册功能致力于打造智慧家庭相册，利用超大屏幕和超高音质的视觉和听觉效果，追忆美好时光。",{"type":18,"tag":30,"props":260,"children":261},{},[262],{"type":18,"tag":86,"props":263,"children":265},{"alt":7,"src":264},"https://pic4.zhimg.com/80/v2-54b3488d0a663115652f2cfea365d09b_720w.jpg",[],{"type":18,"tag":30,"props":267,"children":268},{},[269],{"type":24,"value":270},"由于智慧屏的照片来源十分广，时间跨度大，照片质量参差不齐，比如儿童成长过程外貌特征变化大，云侧训练端侧推理部署形态易导致误分类。",{"type":18,"tag":30,"props":272,"children":273},{},[274],{"type":18,"tag":86,"props":275,"children":277},{"alt":7,"src":276},"https://pic1.zhimg.com/80/v2-e5b28855bf767c3ea7d1cbb0dfd48ffc_720w.jpg",[],{"type":18,"tag":30,"props":279,"children":280},{},[281],{"type":24,"value":282},"作为打造高质量用户体验的家庭相册，需要有在线纠错能力，能感知误分类信息，实现分类越来越准。",{"type":18,"tag":30,"props":284,"children":285},{},[286],{"type":18,"tag":86,"props":287,"children":289},{"alt":7,"src":288},"https://pic3.zhimg.com/80/v2-c750a76755f35915adfad1855e793382_720w.jpg",[],{"type":18,"tag":30,"props":291,"children":292},{},[293],{"type":24,"value":294},"此外，家庭相册内置相册主题有限，比如婚礼，运动，聚餐，美食等，需满足用户新增自定义相册主题诉求并准确分类。",{"type":18,"tag":30,"props":296,"children":297},{},[298],{"type":24,"value":299},"MindSpore Lite通过小样本学习算法，基于少量误分类用户数据，实现模型算法在线更新，越用越准，此外通过增量学习算法，在确保已有内置相册主题准确率的同时，用户可自定义新增主题分类，突破传统预置主题分类限制，生活场景全覆盖。",{"type":18,"tag":30,"props":301,"children":302},{},[303,307],{"type":18,"tag":86,"props":304,"children":306},{"alt":7,"src":305},"https://pic2.zhimg.com/80/v2-5856203f5c6b186f0ed18fbab328baad_720w.jpg",[],{"type":18,"tag":86,"props":308,"children":310},{"alt":7,"src":309},"https://pic3.zhimg.com/80/v2-1693262b1795fa855acd47c9eb73b1da_720w.jpg",[],{"type":18,"tag":26,"props":312,"children":314},{"id":313},"总结",[315],{"type":18,"tag":64,"props":316,"children":317},{},[318],{"type":24,"value":313},{"type":18,"tag":30,"props":320,"children":321},{},[322],{"type":24,"value":323},"MindSpore Lite端侧训练能力已落地智慧屏、广告推荐等业务。在个人数据隐私和安全日趋重要的时代，基于用户数据本地个性化学习是端侧AI越来越重要的能力，MindSpore Lite 致力于持续构建优化轻量化的高效端侧训练框架，与开发者共同构建安全和谐的AI社会。",{"type":18,"tag":30,"props":325,"children":326},{},[327],{"type":24,"value":328},"本文作者在MindSpore社区从事相关AI工作，欢迎您扫码加入QQ群，与数千MindSpore开发者一起交流，用MindSpore赋能千行百业，点亮您的智慧生活。",{"type":18,"tag":30,"props":330,"children":331},{},[332],{"type":24,"value":333},"官方QQ群: 486831414",{"type":18,"tag":30,"props":335,"children":336},{},[337,339],{"type":24,"value":338},"MindSpore官网：",{"type":18,"tag":41,"props":340,"children":343},{"href":341,"rel":342},"https://link.zhihu.com/?target=https%3A//www.mindspore.cn/",[45],[344],{"type":24,"value":345},"https://www.mindspore.cn/",{"type":18,"tag":30,"props":347,"children":348},{},[349,351],{"type":24,"value":350},"MindSpore论坛：",{"type":18,"tag":41,"props":352,"children":355},{"href":353,"rel":354},"https://link.zhihu.com/?target=https%3A//bbs.huaweicloud.com/forum/forum-1076-1.html",[45],[356],{"type":24,"value":357},"https://bbs.huaweicloud.com/forum/forum-1076-1.html",{"type":18,"tag":30,"props":359,"children":360},{},[361],{"type":24,"value":362},"代码仓地址：",{"type":18,"tag":30,"props":364,"children":365},{},[366,368],{"type":24,"value":367},"Gitee-",{"type":18,"tag":41,"props":369,"children":372},{"href":370,"rel":371},"https://link.zhihu.com/?target=https%3A//gitee.com/mindspore/mindspore.git",[45],[373],{"type":24,"value":374},"https://gitee.com/mindspore/mindspore.git",{"type":18,"tag":30,"props":376,"children":377},{},[378,380],{"type":24,"value":379},"GitHub-",{"type":18,"tag":41,"props":381,"children":384},{"href":382,"rel":383},"https://link.zhihu.com/?target=https%3A//github.com/mindspore-ai/mindspore.git",[45],[385],{"type":24,"value":386},"https://github.com/mindspore-ai",{"title":7,"searchDepth":388,"depth":388,"links":389},4,[390,392,393,394,395,396],{"id":7,"depth":391,"text":7},2,{"id":61,"depth":391,"text":61},{"id":109,"depth":391,"text":115},{"id":152,"depth":391,"text":155},{"id":186,"depth":391,"text":192},{"id":313,"depth":391,"text":313},"markdown","content:technology-blogs:zh:883.md","content","technology-blogs/zh/883.md","technology-blogs/zh/883","md",1776506141961]