Code Monkey home page Code Monkey logo

pointnetautoencoder_pytorch's Introduction

Pointnet autoencoder pytorch

Download_data

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

Models

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

How to train

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 = ''.

How to eval

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'.

How to show the reconstructions

Use show.ipynb .

Change the 'in_data_file' and 'model' options.

Results with 50 epochs

pointnet-test Poinnet_train

Ground Truth & Reconstruction Results

Ground Truth Reconstruction result
ground_truth0 result0
ground_truth1 result1
ground_truth2 result2
ground_truth3 result3

Helped by

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

pointnetautoencoder_pytorch's People

Contributors

han-oqo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.