lucidrains / meshgpt-pytorch

Implementation of MeshGPT, SOTA Mesh generation using Attention, in Pytorch
MIT License
714 stars 58 forks source link

Add pr for ArgumentParser CLI #24

Open fire opened 9 months ago

fire commented 9 months ago

Since my other proposals didn't mention what it would take to be merged, I will ask before opening prs to avoid wasted effort.

I made a change to meshgpt-pytorch https://github.com/V-Sekai-fire/meshgpt-pytorch/blob/main/run.py to use ArgumentParser so it's easier to use.

python3 run.py --dataset_directory ../cats_dataset
python3 run.py 
usage: run.py [-h] --dataset_directory DATASET_DIRECTORY [--data_augment DATA_AUGMENT] [--autoencoder_learning_rate AUTOENCODER_LEARNING_RATE] [--transformer_learning_rate TRANSFORMER_LEARNING_RATE] [--autoencoder_train AUTOENCODER_TRAIN] [--transformer_train TRANSFORMER_TRAIN] [--batch_size BATCH_SIZE] [--grad_accum_every GRAD_ACCUM_EVERY] [--checkpoint_every CHECKPOINT_EVERY] [--dim DIM] [--encoder_depth ENCODER_DEPTH] [--decoder_depth DECODER_DEPTH]
              [--num_discrete_coors NUM_DISCRETE_COORS] [--inference_only] [--autoencoder_path AUTOENCODER_PATH] [--transformer_path TRANSFORMER_PATH] [--num_quantizers NUM_QUANTIZERS] [--test_mode]
run.py: error: the following arguments are required: --dataset_directory

Can also be made into a executable via https://pyinstaller.org/en/stable/