[{"data":1,"prerenderedAt":600},["ShallowReactive",2],{"content-query-AzWntxKEUD":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":594,"_id":595,"_source":596,"_file":597,"_stem":598,"_extension":599},"/technology-blogs/zh/1451","zh",false,"","论文干货——【CSD】基于对比自蒸馏的超分辨率模型压缩与加速","可同时进行压缩和加速，具有通用性，可广泛应用于大部分深度学习超分辨率模型","2022-04-26","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/f9e63e9f2a7f4fb0b854baa345ff34e4.png","technology-blogs","实践",{"type":15,"children":16,"toc":591},"root",[17,25,34,50,62,72,77,88,100,114,126,139,153,158,163,168,173,187,198,209,220,229,243,254,259,264,271,276,290,297,302,309,314,321,326,340,345,350,357,364,371,376,381,388,393,400,405,412,417,424,429,434,441,446,453,458,463,470,475,482,487,501,506,511,518,526,536,551,561,576],{"type":18,"tag":19,"props":20,"children":22},"element","h1",{"id":21},"论文干货csd基于对比自蒸馏的超分辨率模型压缩与加速",[23],{"type":24,"value":8},"text",{"type":18,"tag":26,"props":27,"children":28},"p",{},[29],{"type":18,"tag":30,"props":31,"children":33},"img",{"alt":7,"src":32},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/b5beda1571324869a7fbdffb81c64d8c.gif",[],{"type":18,"tag":26,"props":35,"children":36},{},[37,43,45],{"type":18,"tag":38,"props":39,"children":40},"strong",{},[41],{"type":24,"value":42},"1",{"type":24,"value":44}," ",{"type":18,"tag":38,"props":46,"children":47},{},[48],{"type":24,"value":49},"研究背景",{"type":18,"tag":26,"props":51,"children":52},{},[53],{"type":18,"tag":38,"props":54,"children":55},{},[56],{"type":18,"tag":57,"props":58,"children":59},"em",{},[60],{"type":24,"value":61},"背景",{"type":18,"tag":26,"props":63,"children":64},{},[65,70],{"type":18,"tag":38,"props":66,"children":67},{},[68],{"type":24,"value":69},"图像超分辨率",{"type":24,"value":71},"的目的是放大给定图像，使其分辨率更高，得到更加清晰地细节纹理。它可以显著提升下游任务如车辆检测、场景理解等高层视觉任务的性能，是图像处理和计算机视觉领域共同关切的前沿课题。",{"type":18,"tag":26,"props":73,"children":74},{},[75],{"type":24,"value":76},"但目前大部分图像超分辨率方法都关注于构建复杂的网络结构，带来了大量的参数两和计算量，使得模型在轻量级设备中难以部署。",{"type":18,"tag":26,"props":78,"children":79},{},[80],{"type":18,"tag":38,"props":81,"children":82},{},[83],{"type":18,"tag":57,"props":84,"children":85},{},[86],{"type":24,"value":87},"论文研究方向",{"type":18,"tag":26,"props":89,"children":90},{},[91,93,98],{"type":24,"value":92},"本文的主要目标是",{"type":18,"tag":38,"props":94,"children":95},{},[96],{"type":24,"value":97},"设计一种通用的超分辨率模型加速和压缩方法，压缩现有超分辨率模型参数量并实现运行时间上的加速，构建以自蒸馏为核心的算法框架",{"type":24,"value":99},"。",{"type":18,"tag":26,"props":101,"children":102},{},[103,108,109],{"type":18,"tag":38,"props":104,"children":105},{},[106],{"type":24,"value":107},"2",{"type":24,"value":44},{"type":18,"tag":38,"props":110,"children":111},{},[112],{"type":24,"value":113},"团队介绍",{"type":18,"tag":26,"props":115,"children":116},{},[117,119,124],{"type":24,"value":118},"所在团队由",{"type":18,"tag":38,"props":120,"children":121},{},[122],{"type":24,"value":123},"吴文俊",{"type":24,"value":125},"科学技术奖自然科学奖、上海市科技进步特等奖获得者谢源教授领衔。",{"type":18,"tag":26,"props":127,"children":128},{},[129,131,137],{"type":24,"value":130},"团队长期从事机器学习、计算机视觉与模式识别等方面的科研工作,有扎实的研究基础和丰富的成果积累（AI与CV顶会年均产出4",{"type":18,"tag":132,"props":133,"children":134},"del",{},[135],{"type":24,"value":136},"8篇，AI与CV顶刊年均产出3",{"type":24,"value":138},"5篇），并形成了一系列自有知识产权的国际领先的科研成果。",{"type":18,"tag":26,"props":140,"children":141},{},[142,147,148],{"type":18,"tag":38,"props":143,"children":144},{},[145],{"type":24,"value":146},"3",{"type":24,"value":44},{"type":18,"tag":38,"props":149,"children":150},{},[151],{"type":24,"value":152},"论文主要内容简介",{"type":18,"tag":26,"props":154,"children":155},{},[156],{"type":24,"value":157},"论文提出了一种基于对比自蒸馏的图像超分辨率模型压缩和加速方法。",{"type":18,"tag":26,"props":159,"children":160},{},[161],{"type":24,"value":162},"通过构造自蒸馏框架，学生网络和教师网络共享部分参数，实现隐式知识蒸馏，为运行时动态加载提供基础。区别于分类任务，简单地进行隐式知识蒸馏无法有效约束学生网络。",{"type":18,"tag":26,"props":164,"children":165},{},[166],{"type":24,"value":167},"在此基础上，论文通过引入基于对比学习的损失函数，对学生网络和教师网络的关系进行显式约束，并通过引入负样本为学生网络解空间提供下界约束。",{"type":18,"tag":26,"props":169,"children":170},{},[171],{"type":24,"value":172},"论文通过大量、详实的实验在实践中验证了方法的正确性和有效性。在相近计算量情况下，使用论文设计的方法训练的模型具有更高性能。同时，论文设计的方法可以拓展到大量现有超分辨率模型上，使现有SOTA方法能适应端侧设备轻量化需求。",{"type":18,"tag":26,"props":174,"children":175},{},[176,181,182],{"type":18,"tag":38,"props":177,"children":178},{},[179],{"type":24,"value":180},"4",{"type":24,"value":44},{"type":18,"tag":38,"props":183,"children":184},{},[185],{"type":24,"value":186},"代码链接",{"type":18,"tag":26,"props":188,"children":189},{},[190],{"type":18,"tag":38,"props":191,"children":192},{},[193],{"type":18,"tag":57,"props":194,"children":195},{},[196],{"type":24,"value":197},"论文链接",{"type":18,"tag":26,"props":199,"children":200},{},[201],{"type":18,"tag":202,"props":203,"children":207},"a",{"href":204,"rel":205},"https://arxiv.org/abs/2105.11683",[206],"nofollow",[208],{"type":24,"value":204},{"type":18,"tag":26,"props":210,"children":211},{},[212],{"type":18,"tag":38,"props":213,"children":214},{},[215],{"type":18,"tag":57,"props":216,"children":217},{},[218],{"type":24,"value":219},"基于昇思MindSpore实现代码开源链接",{"type":18,"tag":26,"props":221,"children":222},{},[223],{"type":18,"tag":202,"props":224,"children":227},{"href":225,"rel":226},"https://gitee.com/mindspore/models/tree/master/research/cv/csd",[206],[228],{"type":24,"value":225},{"type":18,"tag":26,"props":230,"children":231},{},[232,237,238],{"type":18,"tag":38,"props":233,"children":234},{},[235],{"type":24,"value":236},"5",{"type":24,"value":44},{"type":18,"tag":38,"props":239,"children":240},{},[241],{"type":24,"value":242},"算法框架技术要点",{"type":18,"tag":26,"props":244,"children":245},{},[246,248,253],{"type":24,"value":247},"算法框架包括两部分，即",{"type":18,"tag":38,"props":249,"children":250},{},[251],{"type":24,"value":252},"基于自蒸馏架构的学生-教师网络，以及对比损失",{"type":24,"value":99},{"type":18,"tag":26,"props":255,"children":256},{},[257],{"type":24,"value":258},"学生-教师网络包括浅层特征提取模块，深层特征提取模块及上采样模块。学生网络和教师网络共享每一层部分通道，通过宽度系数进行控制。",{"type":18,"tag":26,"props":260,"children":261},{},[262],{"type":24,"value":263},"除了传统的重建损失以外，论文将学生网络的输出作为锚点，教师网络输出作为正样本，双三次插值图像作为负样本，输入到预训练的VGG网络中并计算对比损失。",{"type":18,"tag":26,"props":265,"children":266},{},[267],{"type":18,"tag":30,"props":268,"children":270},{"alt":7,"src":269},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/6653b0667d92410db42e7b5bd5098072.png",[],{"type":18,"tag":26,"props":272,"children":273},{},[274],{"type":24,"value":275},"（图一：算法框架）",{"type":18,"tag":26,"props":277,"children":278},{},[279,284,285],{"type":18,"tag":38,"props":280,"children":281},{},[282],{"type":24,"value":283},"6",{"type":24,"value":44},{"type":18,"tag":38,"props":286,"children":287},{},[288],{"type":24,"value":289},"实验结果",{"type":18,"tag":26,"props":291,"children":292},{},[293],{"type":18,"tag":30,"props":294,"children":296},{"alt":7,"src":295},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/20c8ad2fbc02437799e0303cb77296ea.png",[],{"type":18,"tag":26,"props":298,"children":299},{},[300],{"type":24,"value":301},"（图二：论文在EDSR模型上压缩后性能）",{"type":18,"tag":26,"props":303,"children":304},{},[305],{"type":18,"tag":30,"props":306,"children":308},{"alt":7,"src":307},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/0628bc151c3343798725cf09dc6f04fc.png",[],{"type":18,"tag":26,"props":310,"children":311},{},[312],{"type":24,"value":313},"（图三：论文在不同模型结构上压缩加速效果）",{"type":18,"tag":26,"props":315,"children":316},{},[317],{"type":18,"tag":30,"props":318,"children":320},{"alt":7,"src":319},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/d8a4a85db6ac44e1a91d5e6ecfbd0979.png",[],{"type":18,"tag":26,"props":322,"children":323},{},[324],{"type":24,"value":325},"（图四：可视化效果）",{"type":18,"tag":26,"props":327,"children":328},{},[329,334,335],{"type":18,"tag":38,"props":330,"children":331},{},[332],{"type":24,"value":333},"7",{"type":24,"value":44},{"type":18,"tag":38,"props":336,"children":337},{},[338],{"type":24,"value":339},"MindSpore代码实现",{"type":18,"tag":26,"props":341,"children":342},{},[343],{"type":24,"value":344},"代码主要包括一下模块：数据加载，网络结构（以EDSR模型为例），损失函数以及训练器。",{"type":18,"tag":26,"props":346,"children":347},{},[348],{"type":24,"value":349},"（1）数据加载：",{"type":18,"tag":26,"props":351,"children":352},{},[353],{"type":18,"tag":30,"props":354,"children":356},{"alt":7,"src":355},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/85461e914dd14100897c9dcf1f583619.jpg",[],{"type":18,"tag":26,"props":358,"children":359},{},[360],{"type":18,"tag":30,"props":361,"children":363},{"alt":7,"src":362},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/7d267432aee24a2eb869561b611b05ed.jpg",[],{"type":18,"tag":26,"props":365,"children":366},{},[367],{"type":18,"tag":30,"props":368,"children":370},{"alt":7,"src":369},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/970421d1bdde478ba2dea79ee29eac93.jpg",[],{"type":18,"tag":26,"props":372,"children":373},{},[374],{"type":24,"value":375},"(图五：数据集类)",{"type":18,"tag":26,"props":377,"children":378},{},[379],{"type":24,"value":380},"（2）网络结构：",{"type":18,"tag":26,"props":382,"children":383},{},[384],{"type":18,"tag":30,"props":385,"children":387},{"alt":7,"src":386},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/be8f11da4a564177a4b80739605546fe.jpg",[],{"type":18,"tag":26,"props":389,"children":390},{},[391],{"type":24,"value":392},"(图六：可调整宽度的EDSR模型)",{"type":18,"tag":26,"props":394,"children":395},{},[396],{"type":18,"tag":30,"props":397,"children":399},{"alt":7,"src":398},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/305e8450751b49d19df9897e42bbe88e.jpg",[],{"type":18,"tag":26,"props":401,"children":402},{},[403],{"type":24,"value":404},"(图七：宽度可调整的残差块)",{"type":18,"tag":26,"props":406,"children":407},{},[408],{"type":18,"tag":30,"props":409,"children":411},{"alt":7,"src":410},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/0d6907c34ddd4b658cae1a26ec399657.jpg",[],{"type":18,"tag":26,"props":413,"children":414},{},[415],{"type":24,"value":416},"(图八：宽度可调整的上采样块)",{"type":18,"tag":26,"props":418,"children":419},{},[420],{"type":18,"tag":30,"props":421,"children":423},{"alt":7,"src":422},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/b439c995cd8249fc9be79cb2d89edf3a.jpg",[],{"type":18,"tag":26,"props":425,"children":426},{},[427],{"type":24,"value":428},"(图九：pixel-shuffle操作)",{"type":18,"tag":26,"props":430,"children":431},{},[432],{"type":24,"value":433},"（3）损失函数：",{"type":18,"tag":26,"props":435,"children":436},{},[437],{"type":18,"tag":30,"props":438,"children":440},{"alt":7,"src":439},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/50dc58912d6f4250a8253537fe46da7b.jpg",[],{"type":18,"tag":26,"props":442,"children":443},{},[444],{"type":24,"value":445},"（图十：对比损失）",{"type":18,"tag":26,"props":447,"children":448},{},[449],{"type":18,"tag":30,"props":450,"children":452},{"alt":7,"src":451},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/97e4aa907d5b4a68bab94b382b6965f0.jpg",[],{"type":18,"tag":26,"props":454,"children":455},{},[456],{"type":24,"value":457},"（图十一：完整损失函数）",{"type":18,"tag":26,"props":459,"children":460},{},[461],{"type":24,"value":462},"（4）训练器：",{"type":18,"tag":26,"props":464,"children":465},{},[466],{"type":18,"tag":30,"props":467,"children":469},{"alt":7,"src":468},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/f38349f88478440cb9d27920e72bf4d0.jpg",[],{"type":18,"tag":26,"props":471,"children":472},{},[473],{"type":24,"value":474},"（图十二：单步训练过程）",{"type":18,"tag":26,"props":476,"children":477},{},[478],{"type":18,"tag":30,"props":479,"children":481},{"alt":7,"src":480},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/b950e9bf3f4b44838bee6a70071247d5.jpg",[],{"type":18,"tag":26,"props":483,"children":484},{},[485],{"type":24,"value":486},"（图十三：完整训练过程）",{"type":18,"tag":26,"props":488,"children":489},{},[490,495,496],{"type":18,"tag":38,"props":491,"children":492},{},[493],{"type":24,"value":494},"8",{"type":24,"value":44},{"type":18,"tag":38,"props":497,"children":498},{},[499],{"type":24,"value":500},"总结与展望",{"type":18,"tag":26,"props":502,"children":503},{},[504],{"type":24,"value":505},"本文设计了一个针对超分辨率任务的通用模型压缩和加速方法，通过构建自蒸馏架构，模型可根据实际计算资源进行动态部署。同时引入正负样本有效约束了解空间，对教师网络和学生网络进行显式知识蒸馏。",{"type":18,"tag":26,"props":507,"children":508},{},[509],{"type":24,"value":510},"文中所提出的方法可同时进行压缩和加速，具有通用性，可广泛应用于大部分深度学习超分辨率模型，但未在其他低层视觉任务上进行探索。未来工作将着力探索本文所提出的方法对其他图像复原类任务的有效性。",{"type":18,"tag":26,"props":512,"children":513},{},[514],{"type":18,"tag":30,"props":515,"children":517},{"alt":7,"src":516},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/04/29/12c925eb324c4cd0ac983d1681ba125e.jpg",[],{"type":18,"tag":26,"props":519,"children":520},{},[521],{"type":18,"tag":38,"props":522,"children":523},{},[524],{"type":24,"value":525},"MindSpore官方资料",{"type":18,"tag":26,"props":527,"children":528},{},[529,534],{"type":18,"tag":38,"props":530,"children":531},{},[532],{"type":24,"value":533},"官方QQ群:",{"type":24,"value":535}," 486831414",{"type":18,"tag":26,"props":537,"children":538},{},[539,544,545],{"type":18,"tag":38,"props":540,"children":541},{},[542],{"type":24,"value":543},"官网:",{"type":24,"value":44},{"type":18,"tag":202,"props":546,"children":549},{"href":547,"rel":548},"https://www.mindspore.cn/",[206],[550],{"type":24,"value":547},{"type":18,"tag":26,"props":552,"children":553},{},[554,559],{"type":18,"tag":38,"props":555,"children":556},{},[557],{"type":24,"value":558},"Gitee:",{"type":24,"value":560}," https : //gitee.com/mindspore/mindspore",{"type":18,"tag":26,"props":562,"children":563},{},[564,569,570],{"type":18,"tag":38,"props":565,"children":566},{},[567],{"type":24,"value":568},"GitHub:",{"type":24,"value":44},{"type":18,"tag":202,"props":571,"children":574},{"href":572,"rel":573},"https://github.com/mindspore-ai/mindspore",[206],[575],{"type":24,"value":572},{"type":18,"tag":26,"props":577,"children":578},{},[579,584,585],{"type":18,"tag":38,"props":580,"children":581},{},[582],{"type":24,"value":583},"官方论坛:",{"type":24,"value":44},{"type":18,"tag":202,"props":586,"children":589},{"href":587,"rel":588},"https://bbs.huaweicloud.com/forum/forum-1076-1.html",[206],[590],{"type":24,"value":587},{"title":7,"searchDepth":592,"depth":592,"links":593},4,[],"markdown","content:technology-blogs:zh:1451.md","content","technology-blogs/zh/1451.md","technology-blogs/zh/1451","md",1776506112437]