[{"data":1,"prerenderedAt":583},["ShallowReactive",2],{"content-query-M1diSVwvYG":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":577,"_id":578,"_source":579,"_file":580,"_stem":581,"_extension":582},"/technology-blogs/zh/762","zh",false,"","MindSpore创新模型EPP-MVSNet：高精高效的三维重建","针对深度假设进行合理设置的高精高效稠密重建算法","2021-10-25","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2021/10/25/292842db777a4eb9866d83825113f51e.png","technology-blogs","大V博文",{"type":15,"children":16,"toc":574},"root",[17,25,31,44,55,67,75,83,94,107,118,131,142,150,158,166,174,182,190,201,209,221,232,240,251,259,270,278,286,297,308,316,324,334,342,353,367,375,386,394,405,413,424,435,443,454,462,473,481,489,504,519,527,535,543,558,566],{"type":18,"tag":19,"props":20,"children":22},"element","h1",{"id":21},"mindspore创新模型epp-mvsnet高精高效的三维重建",[23],{"type":24,"value":8},"text",{"type":18,"tag":26,"props":27,"children":28},"p",{},[29],{"type":24,"value":30},"作者：于璠",{"type":18,"tag":26,"props":32,"children":33},{},[34,36],{"type":24,"value":35},"作者主页：",{"type":18,"tag":37,"props":38,"children":42},"a",{"href":39,"rel":40},"https://www.zhihu.com/people/yu-fan-42-9",[41],"nofollow",[43],{"type":24,"value":39},{"type":18,"tag":26,"props":45,"children":46},{},[47,49],{"type":24,"value":48},"文章来源：",{"type":18,"tag":37,"props":50,"children":53},{"href":51,"rel":52},"https://zhuanlan.zhihu.com/p/424375514",[41],[54],{"type":24,"value":51},{"type":18,"tag":26,"props":56,"children":57},{},[58],{"type":18,"tag":59,"props":60,"children":61},"strong",{},[62],{"type":18,"tag":59,"props":63,"children":64},{},[65],{"type":24,"value":66},"背景",{"type":18,"tag":26,"props":68,"children":69},{},[70],{"type":18,"tag":59,"props":71,"children":72},{},[73],{"type":24,"value":74},"稠密重建(Multi-view Stereo, MVS)是一种利用多视角拍摄的图像以及相机位姿，通过空间几何关系进行像素级密集匹配从而预测图像深度的算法，被广泛应用于AR/VR、游戏、勘测等领域。自MVSNet[1]提出以来，基于正平扫(front-to-parallel)+可微单应性形变(differentiable homography)构建多视图对cost volume的learning-based方法在越来越多的公开数据集上证明了其优势。但是这类方法的预测精度和效率会极大地受到深度假设的影响，在深度范围较大的场景下难以达到计算量和精度之间的良好平衡。后续的CasMVSNet[2]提出coarse-to-fine的结构范式，在小尺度特征上进行粗粒度全局深度范围下的预测，将refine的任务交给大尺度特征。coarse-to-fine的范式在一定程度上控制了整体的深度假设数量，因此能够在不过多增长计算量的情况下提升深度预测精度，但是依旧没有对深度假设的设置问题进行过多探讨。",{"type":18,"tag":26,"props":76,"children":77},{},[78],{"type":18,"tag":59,"props":79,"children":80},{},[81],{"type":24,"value":82},"针对上述问题，华为MindSpore团队提出了一种针对深度假设进行合理设置的高精高效稠密重建算法EPP-MVSNet。EPP-MVSNet继承了coarse-to-fine思想，在此基础上分别对于coarse阶段和fine阶段的深度假设分别提出了对应的EAM(epipolar assembling module)和ER(entropy refining strategy)模块进行优化。同时，通过对3D正则网络进行精简，进一步提升了整个模型的计算效率。截止2021年3月，EPP-MVSNet在稠密重建领域的公开数据集Tanks & Temples上取得了intermediate榜单第一，advanced榜单第四的成绩。相关论文已被ICCV2021接收，代码已基于MindSpore开源发布，欢迎大家使用。",{"type":18,"tag":26,"props":84,"children":85},{},[86],{"type":18,"tag":59,"props":87,"children":88},{},[89],{"type":18,"tag":59,"props":90,"children":91},{},[92],{"type":24,"value":93},"论文链接：",{"type":18,"tag":26,"props":95,"children":96},{},[97],{"type":18,"tag":59,"props":98,"children":99},{},[100],{"type":18,"tag":37,"props":101,"children":104},{"href":102,"rel":103},"https://link.zhihu.com/?target=https://openaccess.thecvf.com/content/ICCV2021/html/Ma_EPP-MVSNet_Epipolar-Assembling_Based_Depth_Prediction_for_Multi-View_Stereo_ICCV_2021_paper.html",[41],[105],{"type":24,"value":106},"https://openaccess.thecvf.com/content/ICCV2021/html/Ma_EPP-MVSNet_Epipolar-Assembling_Based_Depth_Prediction_for_Multi-View_Stereo_ICCV_2021_paper.html",{"type":18,"tag":26,"props":108,"children":109},{},[110],{"type":18,"tag":59,"props":111,"children":112},{},[113],{"type":18,"tag":59,"props":114,"children":115},{},[116],{"type":24,"value":117},"代码链接：",{"type":18,"tag":26,"props":119,"children":120},{},[121],{"type":18,"tag":59,"props":122,"children":123},{},[124],{"type":18,"tag":37,"props":125,"children":128},{"href":126,"rel":127},"https://link.zhihu.com/?target=https://gitee.com/mindspore/models/tree/master/research/cv/eppmvsnet",[41],[129],{"type":24,"value":130},"https://gitee.com/mindspore/models/tree/master/research/cv/eppmvsnet",{"type":18,"tag":26,"props":132,"children":133},{},[134],{"type":18,"tag":59,"props":135,"children":136},{},[137],{"type":18,"tag":59,"props":138,"children":139},{},[140],{"type":24,"value":141},"名词解释",{"type":18,"tag":26,"props":143,"children":144},{},[145],{"type":18,"tag":59,"props":146,"children":147},{},[148],{"type":24,"value":149},"深度假设：深度预测流程中，像素对应三维点可能位于的深度假设平面。",{"type":18,"tag":26,"props":151,"children":152},{},[153],{"type":18,"tag":59,"props":154,"children":155},{},[156],{"type":24,"value":157},"深度间隔：深度预测流程中，深度假设平面之间的间隔。",{"type":18,"tag":26,"props":159,"children":160},{},[161],{"type":18,"tag":59,"props":162,"children":163},{},[164],{"type":24,"value":165},"对极线：物体的某个真实三维点，与主/辅助视图的相机中心连线构成极平面，极平面与辅助视图的交线称为对极线。",{"type":18,"tag":26,"props":167,"children":168},{},[169],{"type":18,"tag":59,"props":170,"children":171},{},[172],{"type":24,"value":173},"主视图：深度预测流程中，需要进行深度预测的图像。",{"type":18,"tag":26,"props":175,"children":176},{},[177],{"type":18,"tag":59,"props":178,"children":179},{},[180],{"type":24,"value":181},"辅助视图：深度预测流程中，与主视图关联度最高的图像集合。",{"type":18,"tag":26,"props":183,"children":184},{},[185],{"type":18,"tag":59,"props":186,"children":187},{},[188],{"type":24,"value":189},"Cost Volume：深度预测流程中，主视图上像素在预设的深度假设范围内，与辅助视图上对应采样点之间的匹配关系构成的集合。",{"type":18,"tag":26,"props":191,"children":192},{},[193],{"type":18,"tag":59,"props":194,"children":195},{},[196],{"type":18,"tag":59,"props":197,"children":198},{},[199],{"type":24,"value":200},"算法介绍",{"type":18,"tag":26,"props":202,"children":203},{},[204],{"type":18,"tag":59,"props":205,"children":206},{},[207],{"type":24,"value":208},"Learning-based coarse-to-fine稠密重建方法主要分为以下几个步骤：二维特征提取、cost volume构建、3D正则、深度结果预测。EPP-MVSNet的主要创新点EAM与ER模块聚焦于关键步骤cost volume构建，算法流水线如下图所示。",{"type":18,"tag":26,"props":210,"children":211},{},[212],{"type":18,"tag":59,"props":213,"children":214},{},[215],{"type":18,"tag":216,"props":217,"children":220},"img",{"alt":218,"src":219},"1.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/091411tfeiooif2d5tzcwl.jpg",[],{"type":18,"tag":26,"props":222,"children":223},{},[224],{"type":18,"tag":59,"props":225,"children":226},{},[227],{"type":18,"tag":59,"props":228,"children":229},{},[230],{"type":24,"value":231},"Epipolar Assembling Module",{"type":18,"tag":26,"props":233,"children":234},{},[235],{"type":18,"tag":59,"props":236,"children":237},{},[238],{"type":24,"value":239},"深度假设的设置作为大部分coarse-to-fine稠密重建方法的关键步骤，在不同的阶段的设置有着较大差别。其中，coarse阶段需要设置全局深度范围下的若干深度假设，同时为了控制cost volume的大小，该阶段往往只能设置一个相对较小的深度假设数量。这就导致了coarse阶段的深度假设间隔相对较大，具体反映到辅助视图上，呈现出对极线采样点分布相对稀疏的情况，容易遗漏关键特征点。",{"type":18,"tag":26,"props":241,"children":242},{},[243],{"type":18,"tag":59,"props":244,"children":245},{},[246],{"type":18,"tag":216,"props":247,"children":250},{"alt":248,"src":249},"2.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/091425ymiz3ryuiolmeimh.jpg",[],{"type":18,"tag":26,"props":252,"children":253},{},[254],{"type":18,"tag":59,"props":255,"children":256},{},[257],{"type":24,"value":258},"针对此问题，EPP-MVSNet提出了EAM(epipolar assembling module)模块，通过提前计算默认深度假设范围情况下辅助视图上原始采样点的分布情况，根据其分布间隔适应性地插入新的采样点。通过这个策略，EPP-MVSNet能够根据主视图和不同辅助视图之间由于空间几何关系不同产生的不同采样点分布情况，自适应地维持采样点的密集程度，减少遗漏关键特征点的可能。",{"type":18,"tag":26,"props":260,"children":261},{},[262],{"type":18,"tag":59,"props":263,"children":264},{},[265],{"type":18,"tag":216,"props":266,"children":269},{"alt":267,"src":268},"3.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/0914413iavyc4cggkdj0bd.jpg",[],{"type":18,"tag":26,"props":271,"children":272},{},[273],{"type":18,"tag":59,"props":274,"children":275},{},[276],{"type":24,"value":277},"自适应插值虽然增加了采样密度，但是不可避免地导致了cost volume的线性增长，同时也可能出现主视图和不同辅助视图生成的cost volume的形状不一的情况。为了控制cost volume的大小，EAM采用了“深度卷积“对插值后的cost volume进行简单的信息提取，之后根据插值情况选择不同窗口大小和步长设置的max pooling对cost volume进行降采样，使其变回插值之前的形状。同时，EAM的动态pooling还会将cost volume深度维度上插值点的cost信息汇聚到原始点上。",{"type":18,"tag":26,"props":279,"children":280},{},[281],{"type":18,"tag":59,"props":282,"children":283},{},[284],{"type":24,"value":285},"经过EAM模块处理后的cost volume，依旧维持了原始形状，但是每个cost voxel都汇聚了邻近插值采样点的信息，其感受野要远优于处理之前，从而能够做出更为精准的深度预测。",{"type":18,"tag":26,"props":287,"children":288},{},[289],{"type":18,"tag":59,"props":290,"children":291},{},[292],{"type":18,"tag":59,"props":293,"children":294},{},[295],{"type":24,"value":296},"Entropy Refining Strategy",{"type":18,"tag":26,"props":298,"children":299},{},[300],{"type":18,"tag":59,"props":301,"children":302},{},[303],{"type":18,"tag":216,"props":304,"children":307},{"alt":305,"src":306},"4.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/091458wlklj5qkqumounxf.jpg",[],{"type":18,"tag":26,"props":309,"children":310},{},[311],{"type":18,"tag":59,"props":312,"children":313},{},[314],{"type":24,"value":315},"EAM模块主要解决了coarse阶段的深度假设问题，而在refine阶段的深度假设一般以上个阶段的深度预测结果为中心，向两边各扩展一定区间作为深度假设范围。由于refine阶段的深度预测基于高分辨率的特征，考虑到计算效率无法采用过多的深度假设。如果为了预测精度统一缩小深度假设范围，可能导致前置阶段深度预测不准确而将真值排除在外；如果相对保守地放宽深度假设范围，又会引起深度间隔增大，从而导致预测精度下降。",{"type":18,"tag":26,"props":317,"children":318},{},[319],{"type":18,"tag":59,"props":320,"children":321},{},[322],{"type":24,"value":323},"针对上述问题，EPP-MVSNet提出了ER(entropy refining strategy)模块，可以根据当前阶段的深度预测情况自适应调整下个阶段的深度假设范围。ER模块利用了“熵”的性质，其表达了模型对于预测结果的置信度：熵越大，代表模型对于预测结果越不置信。",{"type":18,"tag":26,"props":325,"children":326},{},[327],{"type":18,"tag":59,"props":328,"children":329},{},[330],{"type":18,"tag":216,"props":331,"children":333},{"alt":7,"src":332},"https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/092103mt0qr4ksk2wuz2tf.png",[],{"type":18,"tag":26,"props":335,"children":336},{},[337],{"type":18,"tag":59,"props":338,"children":339},{},[340],{"type":24,"value":341},"如上述所示，E代表熵，k代表当前处于的阶段，M代表当前阶段的深度假设数量，P代表深度预测概率，p代表像素位置，d代表相应的深度假设。",{"type":18,"tag":26,"props":343,"children":344},{},[345],{"type":18,"tag":59,"props":346,"children":347},{},[348],{"type":18,"tag":216,"props":349,"children":352},{"alt":350,"src":351},"5.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/091625o5cc9rkajdbprslo.jpg",[],{"type":18,"tag":26,"props":354,"children":355},{},[356],{"type":18,"tag":59,"props":357,"children":358},{},[359,361,365],{"type":24,"value":360},"计算得到当前阶段深度图上每个点对应的熵之后，根据上述公式获取下一个阶段的深度假设范围。其中，r代表深度范围， ",{"type":18,"tag":216,"props":362,"children":364},{"alt":7,"src":363},"https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/092310mqizx8qi7gzphxpc.png",[],{"type":24,"value":366},"是一个超参数。",{"type":18,"tag":26,"props":368,"children":369},{},[370],{"type":18,"tag":59,"props":371,"children":372},{},[373],{"type":24,"value":374},"ER模块可以根据每个阶段的深度预测情况自适应地确定下个阶段适宜的深度假设范围，从而起到进一步refine深度预测精度的同时，减少错误地将真值排除在深度假设范围之外的情况。",{"type":18,"tag":26,"props":376,"children":377},{},[378],{"type":18,"tag":59,"props":379,"children":380},{},[381],{"type":18,"tag":59,"props":382,"children":383},{},[384],{"type":24,"value":385},"Light-weighted Network",{"type":18,"tag":26,"props":387,"children":388},{},[389],{"type":18,"tag":59,"props":390,"children":391},{},[392],{"type":24,"value":393},"EPP-MVSNet在cost volume聚合上参考[3]采用了加权聚合的方式，同时为了节省计算量，只在coarse阶段生成作为权重的visibility map，后续阶段通过上采样的方式复用权重。为了进一步提升整个模型的计算效率，EPP-MVSNet受到[4]的启发，采用pseudo-3D卷积代替传统3D卷积。具体而言，EPP-MVSNet的3D正则网络均由3*1*1和1*3*3的卷积组合而成，分维度提取cost volume的信息。",{"type":18,"tag":26,"props":395,"children":396},{},[397],{"type":18,"tag":59,"props":398,"children":399},{},[400],{"type":18,"tag":216,"props":401,"children":404},{"alt":402,"src":403},"6.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/091806rq8v1qbawbxyawth.jpg",[],{"type":18,"tag":26,"props":406,"children":407},{},[408],{"type":18,"tag":59,"props":409,"children":410},{},[411],{"type":24,"value":412},"通过上述设置，EPP-MVSNet整体的计算效率和显存占用得到了进一步的提升。",{"type":18,"tag":26,"props":414,"children":415},{},[416],{"type":18,"tag":59,"props":417,"children":418},{},[419],{"type":18,"tag":59,"props":420,"children":421},{},[422],{"type":24,"value":423},"实验结果",{"type":18,"tag":26,"props":425,"children":426},{},[427],{"type":18,"tag":59,"props":428,"children":429},{},[430],{"type":18,"tag":216,"props":431,"children":434},{"alt":432,"src":433},"7.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/091823airr8cwggjgdbce4.jpg",[],{"type":18,"tag":26,"props":436,"children":437},{},[438],{"type":18,"tag":59,"props":439,"children":440},{},[441],{"type":24,"value":442},"如上图所示，采用了EAM和ER模块的EPP-MVSNet在Tanks & Temples intermediate数据集上超越了之前的SOTA方法。",{"type":18,"tag":26,"props":444,"children":445},{},[446],{"type":18,"tag":59,"props":447,"children":448},{},[449],{"type":18,"tag":216,"props":450,"children":453},{"alt":451,"src":452},"8.jpg","https://bbs-img.huaweicloud.com/data/forums/attachment/forum/202110/25/09184225xhnicsl0btzkdr.jpg",[],{"type":18,"tag":26,"props":455,"children":456},{},[457],{"type":18,"tag":59,"props":458,"children":459},{},[460],{"type":24,"value":461},"截止2021年3月18号，EPP-MVSNet获得了Tanks & Temples intermediate榜单第一和advanced榜单第四的成绩。",{"type":18,"tag":26,"props":463,"children":464},{},[465],{"type":18,"tag":59,"props":466,"children":467},{},[468],{"type":18,"tag":59,"props":469,"children":470},{},[471],{"type":24,"value":472},"总结",{"type":18,"tag":26,"props":474,"children":475},{},[476],{"type":18,"tag":59,"props":477,"children":478},{},[479],{"type":24,"value":480},"EAM模块有效解决了coarse阶段全局深度假设范围下深度间隔相对较大导致的采样稀疏问题，借助动态pooling的设计控制了计算量的同时提升了深度预测精度。ER模块为coarse-to-fine方法在refine阶段的深度假设设置提供了新思路；最后，得益于轻量级的网络设计和pseudo-3d卷积的使用，EPP-MVSNet在运行时间上也优于大部分SOTA方法，仅次于PatchmatchNet[5]。",{"type":18,"tag":26,"props":482,"children":483},{},[484],{"type":18,"tag":59,"props":485,"children":486},{},[487],{"type":24,"value":488},"对于EPP-MVSNet的介绍就到这里啦，欢迎大家多多讨论，批评指正。",{"type":18,"tag":26,"props":490,"children":491},{},[492,494],{"type":24,"value":493},"****MindSpore官网：",{"type":18,"tag":59,"props":495,"children":496},{},[497],{"type":18,"tag":37,"props":498,"children":501},{"href":499,"rel":500},"https://link.zhihu.com/?target=https://www.mindspore.cn/",[41],[502],{"type":24,"value":503},"https://www.mindspore.cn/",{"type":18,"tag":26,"props":505,"children":506},{},[507,509],{"type":24,"value":508},"****MindSpore论坛：",{"type":18,"tag":59,"props":510,"children":511},{},[512],{"type":18,"tag":37,"props":513,"children":516},{"href":514,"rel":515},"https://link.zhihu.com/?target=https://bbs.huaweicloud.com/forum/forum-1076-1.html",[41],[517],{"type":24,"value":518},"https://bbs.huaweicloud.com/forum/forum-1076-1.html",{"type":18,"tag":26,"props":520,"children":521},{},[522],{"type":18,"tag":59,"props":523,"children":524},{},[525],{"type":24,"value":526},"参考文献：",{"type":18,"tag":26,"props":528,"children":529},{},[530],{"type":18,"tag":59,"props":531,"children":532},{},[533],{"type":24,"value":534},"[1] Yao Y, Luo Z, Li S, et al. Mvsnet: Depth inference for unstructured multi-view stereo[C]//Proceedings of the European Conference on Computer Vision (ECCV). 2018: 767-783.",{"type":18,"tag":26,"props":536,"children":537},{},[538],{"type":18,"tag":59,"props":539,"children":540},{},[541],{"type":24,"value":542},"[2] LaroGu X, Fan Z, Zhu S, et al. Cascade cost volume for high-resolution multi-view stereo and stereo matching[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2020: 2495-2504.chelle H, Erhan D, Bengio Y. Zero-data learning of new tasks[C]//AAAI. 2008, 1(2): 3.",{"type":18,"tag":26,"props":544,"children":545},{},[546],{"type":18,"tag":59,"props":547,"children":548},{},[549,551],{"type":24,"value":550},"[3] ",{"type":18,"tag":37,"props":552,"children":555},{"href":553,"rel":554},"https://link.zhihu.com/?target=https://arxiv.org/abs/2008.07928",[41],[556],{"type":24,"value":557},"https://arxiv.org/abs/2008.07928",{"type":18,"tag":26,"props":559,"children":560},{},[561],{"type":18,"tag":59,"props":562,"children":563},{},[564],{"type":24,"value":565},"[4] Qiu Z, Yao T, Mei T. Learning spatio-temporal representation with pseudo-3d residual networks[C]//proceedings of the IEEE International Conference on Computer Vision. 2017: 5533-5541.",{"type":18,"tag":26,"props":567,"children":568},{},[569],{"type":18,"tag":59,"props":570,"children":571},{},[572],{"type":24,"value":573},"[5] Wang F, Galliani S, Vogel C, et al. PatchmatchNet: Learned Multi-View Patchmatch Stereo[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021: 14194-14203.",{"title":7,"searchDepth":575,"depth":575,"links":576},4,[],"markdown","content:technology-blogs:zh:762.md","content","technology-blogs/zh/762.md","technology-blogs/zh/762","md",1776506140701]