Code for ICCV 2021 paper: ARAPReg: An As-Rigid-As Possible Regularization Loss for Learning Deformable Shape Generators..

Overview

ARAPReg

Code for ICCV 2021 paper: ARAPReg: An As-Rigid-As Possible Regularization Loss for Learning Deformable Shape Generators..

Installation

The code is developed using Python 3.6 and cuda 10.2 on Ubuntu 18.04.

Note that Pytorch and Pytorch Geometric versions might change with your cuda version.

Data Preparation

We provide data for 3 datasets: DFAUST, SMAL and Bone dataset.

DFAUST

We use 4264 test shapes and 32933 training shapes from DFaust dataset. You can download the dataset here. Please place dfaust.zip in data/DFaust/raw/.

SMAL

We use 400 shapes from the family 0 in SMAL dataset. We generate shapes by the SMAL demo where the mean and the variance of the pose vectors are set to 0 and 0.2. We split them to 300 training and 100 testing samples.

You can download the generated dataset here. After downloading, please move the downloaded smal.zip to ./data/SMAL/raw.

Bone

We created a conventional bone dataset with 4 categories: tibia, pelvis, scapula and femur. Each category has about 50 shapes. We split them to 40 training and 10 testing samples. You can download the dataset here. After downloading, please move bone.zip to ./data then extract it.

Testing

Pretrained checkpoints

You can find pre-trained models and training logs in the following paths:

DFAUST: checkpoints.zip. Uncompress it under repository root will place two checkpoints in DFaust/out/arap/checkpoints/ and DFaust/out/arap/test_checkpoints/.

SMAL: smal_ckpt.zip. Move it to ./work_dir/SMAL/out, then extract it.

Bone: bone_ckpt.zip. Move it to ./work_dir, then extract it. It contains checkpoints for 4 bone categories.

Run testing

After putting pre-trained checkpoints to their corresponding paths, you can run the following scripts to optimize latent vectors for shape reconstruction. Note that our model has the auto-decoder architecture, so there's still a latent vector training stage for testing shapes.

Note that both SMAL and Bone checkpoints were trained on a single GPU. Please keep args.distributed False in main.py. In your own training, you can use multiple GPUs.

DFAUST:

bash test_dfaust.sh

SMAL:

bash test_smal.sh

Bone:

bash test_smal.sh

Note that for bone dataset, we train and test 4 categories seperately. Currently there's tibia in the training and testing script. You can replace it with femur, pelvis or scapula to get results for other 3 categories.

Model training

To retrain our model, run the following scripts after downloading and extracting datasets.

DFAUST: Note that on DFaust, it is preferred to have multiple GPUs for better efficiency. The script on DFaust tracks the reconstruction error to avoid over-fitting.

bash train_and_test_dfaust.sh

SMAL:

bash train_smal.sh

Bone:

bash train_bone.sh

Train on a new dataset

Data preprocessing and loading scripts are in ./datasets. To train on a new dataset, please write data loading file similar to ./datasets/dfaust.py. Then add the dataset to ./datasets/meshdata.py and main.py. Finally you can write a similar training script like train_and_test_dfaust.sh.

You might also like...
 Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

An implementation for the loss function proposed in Decoupled Contrastive Loss paper.

Decoupled-Contrastive-Learning This repository is an implementation for the loss function proposed in Decoupled Contrastive Loss paper. Requirements P

Open source repository for the code accompanying the paper 'Non-Rigid Neural Radiance Fields Reconstruction and Novel View Synthesis of a Deforming Scene from Monocular Video'.
Open source repository for the code accompanying the paper 'Non-Rigid Neural Radiance Fields Reconstruction and Novel View Synthesis of a Deforming Scene from Monocular Video'.

Non-Rigid Neural Radiance Fields This is the official repository for the project "Non-Rigid Neural Radiance Fields: Reconstruction and Novel View Synt

[CVPRW 2021] Code for Region-Adaptive Deformable Network for Image Quality Assessment
[CVPRW 2021] Code for Region-Adaptive Deformable Network for Image Quality Assessment

RADN [CVPRW 2021] Code for Region-Adaptive Deformable Network for Image Quality Assessment [Paper on arXiv] Overview Update [2021/5/7] add codes for W

Code for
Code for "Learning to Segment Rigid Motions from Two Frames".

rigidmask Code for "Learning to Segment Rigid Motions from Two Frames". ** This is a partial release with inference and evaluation code.

[ICCV 2021] Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation
[ICCV 2021] Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation

MAED: Encoder-decoder with Multi-level Attention for 3D Human Shape and Pose Estimation Getting Started Our codes are implemented and tested with pyth

Official implementation of the paper Image Generators with Conditionally-Independent Pixel Synthesis https://arxiv.org/abs/2011.13775
Official implementation of the paper Image Generators with Conditionally-Independent Pixel Synthesis https://arxiv.org/abs/2011.13775

CIPS -- Official Pytorch Implementation of the paper Image Generators with Conditionally-Independent Pixel Synthesis Requirements pip install -r requi

Official implementation of
Official implementation of "GS-WGAN: A Gradient-Sanitized Approach for Learning Differentially Private Generators" (NeurIPS 2020)

GS-WGAN This repository contains the implementation for GS-WGAN: A Gradient-Sanitized Approach for Learning Differentially Private Generators (NeurIPS

Implement of "Training deep neural networks via direct loss minimization" in PyTorch for 0-1 loss

This is the implementation of "Training deep neural networks via direct loss minimization" published at ICML 2016 in PyTorch. The implementation targe

Comments
  • Interpolation

    Interpolation

    Hi,

    Is it possible to have an example of a working bash script for the interpolation?

    I'm getting an error when trying to do so:

    File "/mnt/c/Users/clement/Human4D/code/ARAPReg/main.py", line 272, in <module> train_eval.global_interpolate(model, lat_vecs, optimizer_all, scheduler, File "/mnt/c/Users/clement/Human4D/code/ARAPReg/utils/train_eval.py", line 286, in global_interpolate min_path = np.random.randint(0, min_tree.shape[0], size=50) NameError: name 'min_tree' is not defined

    And when I try to set this min_tree.shape[0] to 300 when using SMAL dataset, all the generated meshes are the same.

    Thanks!

    opened by CLemeunier 4
  • Questions about the implementation

    Questions about the implementation

    Hi,

    In the paper it is said that you apply alternating minimization in order to optimize both $z_i$ and $\theta$ alternatively in the auto decoder setting:

    " Our implementation applies one epoch of optimizing θ for each alternating optimization iteration. When the network parameters θ are fixed, ...., our implementation applies one epoch of optimizing zi for each alternating iteration. The total number of alternating iterations is set as 30 in this paper. "

    I can't find anything like this in the code. It seems that you changed the alternating optimization to a common optimization with $z_i$ defined as embeddings of the training data (trained with different learning rates). Am I understanding it correctly? Is there any reason for doing this -- besides, from my guess, an easier open source implementation :)? Does it change the network performance? And does the pretrained checkpoint use this implementation?

    Anyway, thank you very much to share this code!

    opened by daidedou 2
Owner
Bo Sun
CS Ph.D. student at UT Austin. Email: [email protected]
Bo Sun
Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.

Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.

null 235 Dec 26, 2022
Official implementation of NPMs: Neural Parametric Models for 3D Deformable Shapes - ICCV 2021

NPMs: Neural Parametric Models Project Page | Paper | ArXiv | Video NPMs: Neural Parametric Models for 3D Deformable Shapes Pablo Palafox, Aljaz Bozic

PabloPalafox 109 Nov 22, 2022
Orthogonal Jacobian Regularization for Unsupervised Disentanglement in Image Generation (ICCV 2021)

Orthogonal Jacobian Regularization for Unsupervised Disentanglement in Image Generation Home | PyTorch BigGAN Discovery | TensorFlow ProGAN Regulariza

Yuxiang Wei 54 Dec 30, 2022
The code for the CVPR 2021 paper Neural Deformation Graphs, a novel approach for globally-consistent deformation tracking and 3D reconstruction of non-rigid objects.

Neural Deformation Graphs Project Page | Paper | Video Neural Deformation Graphs for Globally-consistent Non-rigid Reconstruction Aljaž Božič, Pablo P

Aljaz Bozic 134 Dec 16, 2022
Code for 'Single Image 3D Shape Retrieval via Cross-Modal Instance and Category Contrastive Learning', ICCV 2021

CMIC-Retrieval Code for Single Image 3D Shape Retrieval via Cross-Modal Instance and Category Contrastive Learning. ICCV 2021. Introduction In this wo

null 42 Nov 17, 2022
Pytorch implementation of the paper Progressive Growing of Points with Tree-structured Generators (BMVC 2021)

PGpoints Pytorch implementation of the paper Progressive Growing of Points with Tree-structured Generators (BMVC 2021) Hyeontae Son, Young Min Kim Pre

Hyeontae Son 9 Jun 6, 2022
The LaTeX and Python code for generating the paper, experiments' results and visualizations reported in each paper is available (whenever possible) in the paper's directory

This repository contains the software implementation of most algorithms used or developed in my research. The LaTeX and Python code for generating the

João Fonseca 3 Jan 3, 2023
PyTorch code accompanying our paper on Maximum Entropy Generators for Energy-Based Models

Maximum Entropy Generators for Energy-Based Models All experiments have tensorboard visualizations for samples / density / train curves etc. To run th

Rithesh Kumar 135 Oct 27, 2022
A-SDF: Learning Disentangled Signed Distance Functions for Articulated Shape Representation (ICCV 2021)

A-SDF: Learning Disentangled Signed Distance Functions for Articulated Shape Representation (ICCV 2021) This repository contains the official implemen

null 81 Dec 14, 2022