realfusion
realfusion copied to clipboard
Saving mesh not working
Description
Hi @lukemelas, thanks for open sourcing your great work! Upon reproducing your examples, cat_statue specifically, I noticed that --save_mesh option does not work as expected on testing time. Here's the output:
[INFO] Trainer: df | 2023-04-10_14-25-15 | cuda | fp16 | outputs/default/2023-04-10--13-49-56--seed-101/ [INFO] num parameters: 1_806_983 [INFO] num parameters w/ grad: 1_806_983 [INFO] Loading latest checkpoint ... [INFO] Latest checkpoint is outputs/default/2023-04-10--13-49-56--seed-101/checkpoints/df.pth [INFO] loaded model. [INFO] load at epoch 50, global step 5000 ==> Start Test, save results to outputs/default/2023-04-10--13-49-56--seed-101/results 100% 100/100 [00:05<00:00, 18.63it/s]rgb opacity depth /home/tongwang/workspace/realfusion/nerf/trainer.py:590: RuntimeWarning: invalid value encountered in cast preds_np = (preds_tensor.detach().cpu().numpy() * 255).astype(np.uint8) normals textureless grid ==> Finished Test. 100% 100/100 [00:06<00:00, 15.85it/s] ==> Saving mesh to outputs/default/2023-04-10--13-49-56--seed-101/mesh ==> Finished saving mesh.
Although the log says it is "==>Saving mesh", but it did not actually save the mesh. Could you please look into this issue? Thanks in advance.
Steps to Reproduce
python main.py --workspace $model_path --O --test --save_mesh
Expected Behavior
save a textured mesh
Environment
ubuntu 20.04, torch1.13+cu116