单视图三维重建在计算机视觉领域中是一个具有挑战性的问题. 为了提升现有三维重建算法重建后三维模型的精度, 本文除了提取图像全局特征之外还提取图像局部特征, 结合全局特征和局部特征并选取SDF (signed distance function)作为重建后的三维物体表达方式, 不仅提高了模型的精度, 生成了更高质量的3D形状, 还增强了模型的泛化能力, 使得深度模型可以以较高质量重建出其他物体种类. 实验结果表明, 本文提出的深度网络结构和3D形状表示方法与当今最先进的重建算法相比, 无论在重建后三维模型的效果还是新型物体的泛化中都有更好的表现.
Single-view 3D reconstruction is a challenging problem in computer vision. To improve the accuracy of the 3D model reconstructed by the existing 3D reconstruction algorithm, this study extracts both global and local features of the image. On this basis, the signed distance function (SDF) is used to describe the reconstructed 3D objects. In this way, high-quality 3D shapes are generated, and the model has higher accuracy and enhanced generalization capability, which enables the deep model to reconstruct other types of objects with high quality. Experiments demonstrate that compared with the most advanced reconstruction algorithm at present, the proposed deep network and the method for representing 3D shapes have better performance in the effects of reconstructed 3D models and the generalization of new objects.
单视图三维重建一直以来是计算机视觉领域里的一个热点. 随着深度学习的发展和大型3D模型数据集ShapeNet[
近年来, 单视图三维重建工作使用的3D表达方式主要有点云, 体素, 网格. 基于点云[
针对上述3种表达方式的局限性, 隐式曲面表达[
本文提出的模型创新点有: (1)加入2.5D草图预测模块使模型可以从复杂背景图片中重建三维模型, 结合局部特征提取模块和SDF隐式表面表达可以生成更逼真的模型. (2)讨论模型的泛化能力, 研究模型是否可以重建出训练集中未出现过的物体种类, 实验结果证明加入2.5D草图预测模块有助于提升泛化能力. (3)本文采用隐式表面表达方法中最常用的SDF(signed distance function)作为三维模型的表达方式不仅估计了采样点的正负值(该点在表面外还是表面内)还估计了其到表面的距离, 可以提取任意值的等值面.
本文方法概况如下: 先通过采样策略为数据集ShapeNet每个三维模型采样点生成采样点点云, 之后结合图片全局特征和局部特征预测每个采样点的SDF值, 最后提取SDF值为0的面作为最终生成三维模型表面.
网络整体架构如
网络架构
使用ShapeNet数据集进行这个模块训练, 此模块功能为预测将默认位姿的3D模型投影至与输入图片相同位姿所需要的相机参数. 将ShapeNet数据集中各个3D模型默认位姿作为世界坐标下位姿, 并提取点云生成世界坐标下的点云. 在数据准备操作中会对ShapeNet数据集进行渲染, 会对默认位姿3D模型旋转、平移特定角度, 而后提取点云生成真实相机坐标下的点云. 相机位姿预测模块大致为输入一张图片至CNN (这里采用VGG-16)预测位姿, 将网络预测出的位姿对世界坐标下的点云进行旋转平移变换操作生成预测相机坐标下的点云, 再与真实相机坐标下的点云损失对比优化这一模块. 估计出来的相机参数用于局部特征提取. Zhou等人[
其中,
预测相机坐标下的点云和真实相机坐标下的点云之间的差距作为本模块的损失函数如式(2):
该方程本质是MSE (mean squared error), 其中
相机位姿预测网络
SDF是一个将3D模型采样的点
在全局特征提取时使用了2.5D草图模块如
2.5D草图预测模块
如
局部特征提取
如
通过图像特征预测SDF
用原始数据集ShapeNet中的三维模型先提取出点云, 而后测量出点云中各个点的SDF值作为地面真实SDF值, 而我们的网络
其中,
为了生成隐式平面, 首先定义一个分辨率为256×256×256稠密3D网格将采样点点云放入其中并为网格中的每个点预测SDF值. 得到了稠密网格中每个点的SDF值之后使用Marching cubes在SDF值为0的等值面上生成对应的平面.
传统实验都是采用ShapeNet数据集中所有13种种类按照官方推荐的训练集数据集分割进行实验. 本文为了检测泛化能力, 验证网络是否可以重建出训练集中未出现的物体种类, 采用数据集中最大的3种种类(长凳、汽车、桌子)作为训练集而其余10种作为训练集. 重建结果与最先进的方法进行对比, 结果显示本文可以重构出训练集中未出现过的种类, 同时还解决了重构中细节恢复的问题.
使用ShapeNet 作为数据集, 在实验中我们使用3种种类作为训练集, 而使用另外10种种类作为测试集. 实验中地面真实深度图、法线贴图等2.5D草图我们使用Cycles光线追踪引擎在Blender中实现了自定义数据生成管道, 以2D图片为渲染对象, 生成的2.5D草图作为地面真实值与网络生成的2.5D草图计算损失. 为了生成实验中的复杂背景2D图片, 用不同的20个随机图像作背景渲染每个3D模型而后生成具有复杂背景的2D图片. 为了增加2D图像数据量, 本文通过旋转、平移特定角度生成不同角度下的3D模型再添加背景图生成2D图像. 每个三维模型旋转、平移8个特定角度, 因此每个模型生成8张具有复杂背景的2D图像. 实验中使用的点云也是由数据集ShapeNet得到的, 把数据集默认位姿提取得到的点云作为世界坐标下的点云, 而由旋转、平移不同角度后得到的三维模型中提取得到的点云作为真实相机坐标空间下的点云, 其旋转平移的相机参数则作为真实相机参数.
要生成三维模型因此更关注物体表面周边的点, 所以在训练过程中采样策略为在高斯分布
本文分开训练相机位姿预测网络和SDF预测网络. 相机位姿预测网络中CNN使用VGG-16, 使用式(2)作为这个模块的损失函数. 因SDF预测网络需要用到相机位姿预测网络中预测出的相机参数, 为更好训练SDF预测网络, 我们使用地面真实相机参数训练此网络. 在本模块中提取全局特征线路使用2.5D草图作为中间表达, 用Blender渲染出来的2.5D草图和网络训练得到草图对比来调优2.5D草图提取模块. 最后由局部特征、全局特征和点特征共同预测的SDF值与地面真实SDF值使用式(3)作为损失函数, 其中
测试阶段中, 先使用相机位姿预测模块估计相机位姿, 把预测到的位姿用于SDF预测模块预测各个点的SDF值. 所有采样点SDF已知后采用第2.5节中提及表面重建的方法生成输出模型.
对于质量评测, 使用常见的衡量指标倒角距离chamfer distance (CD)比较重建后的模型和地面真实模型. CD计算公式为式(4), 为了使用CD评判重建后模型和地面真实模型的相似度需对两个模型采样生成点云.
通过渲染复杂背景图后的图片作为输入, 由2.5D草图估计网络得到对应的2.5D草图如
本文提出的网络使用SDF隐式曲面来表示三维物体, 生成后的模型相较于之前单视图三维重建方法有更为清晰的表面. 引入局部特征提取的模块使得最后生成的模型能够捕获细粒度的细节生成高质量3D模型. 我们还进行了泛化能力的实验, 通过2.5D模块和选择以视觉为中心的坐标系来测试泛化能力. 定性和定量的实验可以验证出我们的方法在重建模型的质量上和泛化能力方面都优于现有的方法.
输入图片和2.5D
三维模型重构对比
6种训练集未出现的种类CD比较
种类 | OccNet | GenRe | Ours |
沙发 | 0.15 | 0.13 | 0.08 |
抢 | 0.15 | 0.17 | 0.13 |
台灯 | 0.23 | 0.14 | 0.09 |
床 | 0.30 | 0.20 | 0.17 |
飞机 | 0.22 | 0.16 | 0.11 |
凳子 | 0.25 | 0.15 | 0.09 |
平均 | 0.21 | 0.16 | 0.11 |
et al. ShapeNet: An information-rich 3D model repository. arXiv: 1512.03012, 2015.]]>
et al. MarrNet: 3D shape reconstruction via 2.5D sketches. Proceedings of the 31st International Conference on Neural Information Processing Systems. Long Beach: Curran Associates Inc., 2017. 540–550.]]>
et al. 3D-LMNet: Latent embedding matching for accurate and diverse 3D point cloud reconstruction from a single image. Proceedings of British Machine Vision Conference 2018. Newcastle: BMVA Press, 2018. 1–19.]]>
Zhang Y, Liu Z, Liu TP,
et al. 3D-R2N2: A unified approach for single and multi-view 3D object reconstruction. Proceedings of the 14th European Conference on Computer Vision. Amsterdam: Springer, 2016. 628–644.]]>
et al. Learning a predictable and generative vector representation for objects. Proceedings of the 14th European Conference on Computer Vision. Amsterdam: Springer, 2016. 484–499.]]>
et al. Image2Mesh: A learning framework for single image 3D reconstruction. Proceedings of 14th Asian Conference on Computer Vision. Perth: Springer, 2019. 365–381.]]>
et al. A Papier-Mache approach to learning 3D surface generation. Proceedings of the IEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Salt Lake City: IEEE, 2018. 216–224.]]>
et al. Learning free-form deformations for 3D object reconstruction. Proceedings of 14th Asian Conference on Computer Vision. Perth: Springer, 2019. 317–333.]]>
et al. DeepSDF: Learning continuous signed distance functions for shape representation. Proceedings of 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach: IEEE, 2019. 165–174.]]>
et al. Occupancy networks: Learning 3D reconstruction in function space. Proceedings of IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Long Beach: IEEE, 2019. 4455–4465.]]>
et al. DISN: Deep implicit surface network for high-quality single-view 3D reconstruction. Proceedings of the 33rd International Conference on Neural Information Processing Systems. Vancouver: Curran Associates Inc., 2019. 45.]]>
et al. 3D reconstruction of novel object shapes from single image. Proceedings of 2021 International Conference on 3D Vision (3DV). London: IEEE, 2021. 85–95.]]>
et al. On the continuity of rotation representations in neural networks. Proceedings of IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach: IEEE, 2019. 5738–5746.]]>
Lorensen WE, Cline HE. Marching cubes: A high resolution 3D surface construction algorithm. ACM SIGGRAPH Computer Graphics, 1987, 21(4): 163–169.
et al. Learning to reconstruct shapes from unseen classes. Proceedings of the 32nd International Conference on Neural Information Processing Systems (NeurIPS). Montréal: Curran Associates Inc., 2018. 2263–2274.]]>