From 8023fdbe7911410ae5af859211b5239502e56119 Mon Sep 17 00:00:00 2001 From: xzeng Date: Thu, 16 Mar 2023 12:19:31 -0400 Subject: [PATCH] add other test data --- README.md | 13 +++++++++++-- script/compute_score.py | 6 +++--- script/train_prior.sh | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2a7a971..54747f4 100644 --- a/README.md +++ b/README.md @@ -65,16 +65,25 @@ run `python demo.py`, will load the released text2shape model on hugging face an * run `bash ./script/train_prior.sh $NGPU` (the released checkpoint is trained with `NGPU=8` with 2 node on V100) ### evaluate a trained prior -* download the test data from [here](https://drive.google.com/file/d/1uEp0o6UpRqfYwvRXQGZ5ZgT1IYBQvUSV/view?usp=share_link), unzip and put it as `./datasets/test_data/` +* download the test data (Table 1) from [here](https://drive.google.com/file/d/1uEp0o6UpRqfYwvRXQGZ5ZgT1IYBQvUSV/view?usp=share_link), unzip and put it as `./datasets/test_data/` * download the released checkpoint from above ``` checkpoint="./lion_ckpt/unconditional/airplane/checkpoints/model.pt" bash ./script/eval.sh $checkpoint # will take 1-2 hour ``` +#### other test data +* ShapeNet-Vol test data: + * please check [here](https://github.com/nv-tlabs/LION/issues/20#issuecomment-1436315100) before using this data + * [all category](https://drive.google.com/file/d/1QXrCbYKjTIAnH1OhZMathwdtQEXG5TjO/view?usp=sharing): 1000 shapes are sampled from the full validation set + * [chair, airplane, car](https://drive.google.com/file/d/11ZU_Bq5JwN3ggI7Ffj4NAjIxxhc2pNZ8/view?usp=share_link) +* table 21 and table 20, point-flow test data + * check [here](https://github.com/nv-tlabs/LION/issues/26#issuecomment-1466915318) before using this data + * [mug](https://drive.google.com/file/d/1lvJh2V94Nd7nZPcRqsCwW5oygsHOD3EE/view?usp=share_link) and [bottle](https://drive.google.com/file/d/1MRl4EgW6-4hOrdRq_e2iGh348a0aCH5f/view?usp=share_link) + * 55 catergory [data](https://drive.google.com/file/d/1Rbj1_33sN_S2YUbcJu6h922tKuJyQ2Dm/view?usp=share_link) ## Evaluate the samples with the 1-NNA metrics * download the test data from [here](https://drive.google.com/file/d/1uEp0o6UpRqfYwvRXQGZ5ZgT1IYBQvUSV/view?usp=share_link), unzip and put it as `./datasets/test_data/` -* run `python ./script/compute_score.py` +* run `python ./script/compute_score.py` (Note: for ShapeNet-Vol data and table 21, 20, need to set `norm_box=True`) ## Citation ``` diff --git a/script/compute_score.py b/script/compute_score.py index ff0498a..fbdd74e 100644 --- a/script/compute_score.py +++ b/script/compute_score.py @@ -13,7 +13,7 @@ from utils.eval_helper import compute_score samples = './lion_ckpt/unconditional/car/samples.pt' ref = './datasets/test_data/ref_val_car.pt' -compute_score(samples, ref_name=ref) +compute_score(samples, ref_name=ref, norm_box=False) """ will get: [Test] MinMatDis | CD 0.000913 | EMD 0.007523 @@ -24,7 +24,7 @@ will get: samples = './lion_ckpt/unconditional/chair/samples.pt' ref = './datasets/test_data/ref_val_chair.pt' -compute_score(samples, ref_name=ref) +compute_score(samples, ref_name=ref, norm_box=False) """ [Test] MinMatDis | CD 0.002643 | EMD 0.015516 [Test] Coverage | CD 0.489426 | EMD 0.521148 @@ -34,7 +34,7 @@ compute_score(samples, ref_name=ref) samples = './lion_ckpt/unconditional/chair/samples.pt' ref = './datasets/test_data/ref_val_chair.pt' -compute_score(samples, ref_name=ref) +compute_score(samples, ref_name=ref, norm_box=False) """ [Test] MinMatDis | CD 0.000221 | EMD 0.003706 [Test] Coverage | CD 0.471605 | EMD 0.496296 diff --git a/script/train_prior.sh b/script/train_prior.sh index a867dc9..2ac1698 100644 --- a/script/train_prior.sh +++ b/script/train_prior.sh @@ -32,7 +32,7 @@ $ENT \ sde.prior_model 'models.latent_points_ada_localprior.PVCNN2Prior' \ sde.train_vae $train_vae \ sde.embedding_scale 1.0 \ - viz.save_freq 1 \ + viz.save_freq 1000 \ viz.viz_freq -200 viz.log_freq -1 viz.val_freq -10000 \ data.batch_size $BS \ trainer.type 'trainers.train_2prior' \