mkdir data && cd data
mkdir ModelNet && cd ModelNet
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=1zE1d_eYD_QEnmS01LlZlEOMSZTIXRwIA" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=1zE1d_eYD_QEnmS01LlZlEOMSZTIXRwIA" -o modelnet_classification.h5
md5sum modelnet_classification.h5
The output should be exactly the same as this:
87e763a66819066da670053a360889ed modelnet_classification.h5
There are model.py and model1.py in model directory.
Both have 128 dimensional latent space, and they have slightly different architecture.
Model1 have better performance.
I used the average Chamfer distance as Test Loss
At train.ipynb,
# Set hyperparameters.
args = easydict.EasyDict({
'train': True,
'batch_size': 32, # input batch size
'n_epochs': 50, # number of epochs
'n_workers': 4, # number of data loading workers
'learning_rate': 0.001, # learning rate
'beta1': 0.9, # beta 1
'beta2': 0.999, # beta 2
'step_size': 20, # step size
'gamma': 0.5, # gamma
'in_data_file': 'data/ModelNet/modelnet_classification.h5', # data directory
'model': '', # model path
'model_type': 'hankyu1' # hankyu = model, hankyu1 = model1
})
make sure train = true, and model = ''.
At train.ipynb,
# Set hyperparameters.
args = easydict.EasyDict({
'train': False,
'batch_size': 32, # input batch size
'n_epochs': 50, # number of epochs
'n_workers': 4, # number of data loading workers
'learning_rate': 0.001, # learning rate
'beta1': 0.9, # beta 1
'beta2': 0.999, # beta 2
'step_size': 20, # step size
'gamma': 0.5, # gamma
'in_data_file': 'data/ModelNet/modelnet_classification.h5', # data directory
'model': 'saved_models/autoencoder_50.pth', # model path
'model_type': 'hankyu1' # hankyu = model, hankyu1 = model1
})
make sure train = False and model = 'model path'.
Use show.ipynb .
Change the 'in_data_file' and 'model' options.
Ground Truth | Reconstruction result |
---|---|
https://github.com/dhirajsuvarna/pointnet-autoencoder-pytorch/blob/master/infer.py
https://pytorch3d.org/tutorials/deform_source_mesh_to_target_mesh
https://github.com/charlesq34/pointnet-autoencoder/blob/master/utils/show3d_balls.py