[读论文] Monocular 3D Object Reconstruction with GAN inversion (ECCV2022)
创始人
2024-04-17 18:50:01
0次

概述

项目主页:https://www.mmlab-ntu.com/project/meshinversion/
方法名称:MeshInversion
输入:单目图像 (in the wild,有背景的,没有抠图的)
输出:textured 3D mesh
key challenge: 缺少3D或multiview supervision
方法核心:先预训练一个3D GAN ,可以从latent code z生成textured mesh。然后在inference的时候,从输入的图片倒推最符合的z。(这是一个inferece optimization的方法!!)
在这里插入图片描述

Related Work

Single View 3D Reconstruction

image-3D object pairs [46,35,32,39]
multi-view images [33,28,51,47,34]
SMPL for humans and 3DMM for faces [8,40,18],

CMR [19] reconstructs categoryspecific
textured mesh

texture一般有两种方法,一个是direct regression of pixel values in the UV texture map – often blurry 但作者用的这个。
主流方法是learning the texture flow。

GAN inversion

textured mesh generation

6.Learning to predict 3D objects with an interpolation-based differentiable renderer.
In: NeurIPS (2019)
重建的mesh可微渲染之后,用渲染得到的multi view images做discriminaive 监督

13.Leveraging 2D data to learn textured
3D mesh generation. In: CVPR (2020)
VAE 方法,face colors instead of texture maps

38.Convolutional generation of textured 3D meshes
topology-aligned texture maps and deformation maps in the UV space. (本文就用了他的pretrained model)

Method

看起来大体方法是用Generator从latent code生成geometry和texture,然后用chamfer mask loss和chamfer texture loss来监督。

Preliminaries

mesh表示为O = (V,F,T), 即点,面,texture map。
其中,由于

An individual mesh is iso-morphic to a 2-pole sphere.

因此点的位置可用球体的deformation ΔV\Delta \mathbf{V}ΔV表示:
V=Vsphere+ΔV\mathbf{V} = \mathbf{V}_{sphere} + \Delta \mathbf{V}V=Vsphere​+ΔV
以前的方法大多用MLP来regress delta V,本文使用CNN。

渲染是,使用弱透视投影。(区别于透视投影和正交投影的一种投影方法),参数为π, 包含scale s, translation t和rotation r。

3.1 Reconstruction with Generative Prior

Pre-training Stage

这个阶段训练了一个3D GAN。主要参考ConvMesh和PatchGAN。

Inversion Stage

  • 目的:find the z that best recovers the 3D object from the input image Iin\mathbf{I}_{in}Iin​.

  • 需要:原始的image,其对应的mask,还有将3Dshape进行渲染的相机参数。

    • 其中mask 用现成的segmentation tool (PointRend)来获取。
    • 理由在此:https://github.com/junzhezhang/mesh-inversion/issues/5 是为了fair comparison以及强调这是test time optimization
    • shape用的latent code z和渲染用的相机参数π用本文的网络来预测。也就是mesh用ConvMesh,相机用CMR。
  • 如何预测相机参数π:如果直接regress camera pose from scratch,存在camera-shape ambiguity问题。[24] 所以我们用CMR来initialize the camera。

由于这个相机位置是不断oprimize的,image不可能完美对齐,需要一个鲁棒的texture loss,见下文

3.2 chamfer texture loss

  • 将image看做2D点云,每个点有2D坐标和3D的RGB颜色值。
  • 两个图像的dissimilarity就用chamfer distance来表达。
    • 其中distance D 被分解为 appearance term and spatial term, 都用的l2 distance。
    • 重要:具体来说,考虑到我们只想让他tolerant on local misalignment, 因此在spatial term上增加了一个exp操作来惩罚空间距离过远的点,变成这样:
    • 在这里插入图片描述
    • 解释:首先是Da和Ds相乘。
      • 增加epsilon是如果有一样位置的点,颜色相差极大,那应该算作不同的点,免得给他弄成零了;
      • 然后Ds这边加上指数,惩罚距离太远的,因为我只想要较小的misalignment
      • 取个max
    • 注意:Ds这一项是不可微的,他只是训练Da(texture)用的权重。

这个东西挺有用的,请看消融实验:
在这里插入图片描述

3.3 Chamfer Mask Loss

  • 从3D shape 得到mask需要rasterization that discretizes the mesh into a grid of pixels. 这一部会导致信息丢失,引入误差,对训练好的ConvMesh影响尤其大。
  • 为此,作者提出Chamfer Mask Loss Lcm.
    • 不是将mesh渲染为binary mask,而是把mesh的点直接投影到image plane,得到Sv。
    • 然后把用现成工具分割得到的前景点的坐标给normalize到-1到1之间,得到Sf。
    • 然后计算Sv和Sf的chamfer distance

总loss

  • pixel-level chamfer texture loss (appearance)
  • feature-level chamfer texture loss (appearance)
  • chamfer mask loss (geometry)
  • smooth loss (neighboring faces to have similar normals i.e. low cosine)
  • latent space loss (L2 norm of z to ensure Gaussian distribution)

等下仔细看看代码,尤其是这个latent space loss。
以及那个feature level是咋搞啊。

Experiments

  • datasets:
    • CUB-200-2011 (鸟类)
    • PASCAL3D: cars
  • pretrain ConvMesh: pseudo ground truths ??? 感觉是指上文提到的那个segmentation和camera pose prediction网络得到的结果。
  • inference 时GAN inversion: 似乎也是pseudo ground truths。
  • evaluation: 用的GT了
    • geometry accuracy: rendered masks 和 GT masks的2D mask IoU
    • appearance quality: image synthesis metric FID (single view and multi view), 反映了GT images和generated images的分布的相似性。
    • user study: 找了40个user来打分。
    • (PASCAL3D 特有:有approximated 3D CAD shapes,可以用3D IoU)

Texture Flow vs. Texture Regression

Texture Flow 更常用,但在invisible的地方容易出错;因为容易copy foreground pixies including the obstacles.

实现(主要来自补充材料)

时间,显存,设备GPU

Pre-training:
600 epochs, with a batch size of 128,
15 hours on four Nvidia V100 GPUs.

网络结构:和ConvMesh一样。

  • convolutional generator G with 2 branches.
    • 输入:latent code z (64)
    • 输出:deformation map S 32*32; texture map T 512-512
  • UV space discriminator
    • deformation map
    • texture map
  • image space discriminator (PatchGAN)

相关内容

热门资讯

前端-session、jwt 目录:   (1)session (2&#x...
linux入门---制作进度条 了解缓冲区 我们首先来看看下面的操作: 我们首先创建了一个文件并在这个文件里面添加了...
关于测试,我发现了哪些新大陆 关于测试 平常也只是听说过一些关于测试的术语,但并没有使用过测试工具。偶然看到编程老师...
前缀和与对数器与二分法 1. 前缀和 假设有一个数组,我们想大量频繁的去访问L到R这个区间的和,...
nodejs:本地安装nvm实... 一、背景-使用不同版本node的原因 vue3+ts、nuxt3版本,node...
JAVA集合知识整理 Java集合知识整理 HashMap相关 HashMap的底层数据结构:jdk1.8之...
无刷直流电机介绍及单片机控制实... 无刷直流电机介绍及单片机控制实例前言基本概念优势与劣势使用寿命基本结构使用单片机控制实例电子调速器&...
fwdiary(2) dp2 1.传纸条  AcWing 275. 传纸条 - AcWing 走两条路,走一条最大的...
常用的DOS命令 常用的DOS命令 DOS(Disk Operating System,磁...
<C++> 类和对象(下) 1.const成员函数将const修饰的“成员函数”称之为const成员函数,cons...