unsup3d
1.0.0
Shangzhe Wu,Christian Rupprecht,Andrea Vedaldi,牛津大学视觉几何组。在CVPR 2020年(最佳纸张奖)中。

我们提出了一种从原始单视图像中学习弱对称变形的3D对象类别的方法,没有地面真相3D,多个视图,2D/3D关键点,先前的形状模型或任何其他监督。
conda env create -f environment.yml
或手动:
conda install -c conda-forge scikit-image matplotlib opencv moviepy pyyaml tensorboardX
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=9.2 -c pytorch
注意:该代码在CentOS 7上使用Pytorch 1.2.0和CUDA 9.2进行了测试。培训和测试需要GPU版本,因为Neural_Renderer软件包仅具有GPU实现。您仍然可以在没有GPU的情况下运行演示。
此软件包是培训和测试所需的,并且演示是可选的。它需要GPU设备和启用GPU的Pytorch。
pip install neural_renderer_pytorch
注意:如果您的GCC版本低于5。如果您不想升级GCC,则可能会失败,另一种解决方案是使用Conda的GCC并从源中编译包装。例如:
conda install gxx_linux-64=7.3
git clone https://github.com/daniilidis-group/neural_renderer.git
cd neural_renderer
python setup.py install
此包是演示的可选。它允许自动人脸检测。
pip install facenet-pytorch
img_celeba.7z ),并在data/裁剪图像中运行celeba_crop.py 。data/提供的脚本download_synface.sh下载。data/提供的脚本download_cat.sh下载。data/提供的脚本download_syncar.sh下载。如果您使用这些数据集,请记住引用相应的论文。
使用pretrained/ (例如:
cd pretrained && sh download_pretrained_celeba.sh
python -m demo.demo --input demo/images/human_face --result demo/results/human_face --checkpoint pretrained/pretrained_celeba/checkpoint030.pth
选项:
--gpu :启用GPU--detect_human_face :使用FaceNet-Pytorch提供的MTCNN启用自动人脸检测和裁剪。这仅适用于人脸的图像。您将需要手动为其他对象裁剪图像。--render_video :使用neural_renderer渲染3D动画(需要GPU) 在experiments/运行实验中检查配置文件,例如:
python run.py --config experiments/train_celeba.yml --gpu 0 --num_workers 4
@InProceedings{Wu_2020_CVPR,
author = {Shangzhe Wu and Christian Rupprecht and Andrea Vedaldi},
title = {Unsupervised Learning of Probably Symmetric Deformable 3D Objects from Images in the Wild},
booktitle = {CVPR},
year = {2020}
}