jkulhanek / wild-gaussians

[NeurIPS'24] WildGaussians: 3D Gaussian Splatting In the Wild
https://wild-gaussians.github.io
Other
329 stars 22 forks source link

Question about debug #22

Open c1ircle opened 2 months ago

c1ircle commented 2 months ago

Could you tell me if I use "nerfbaselines train - method wild - gaussians -- data external: / / phototourism trevi fountain" - this instruction training, should be how to debug. My launch.json file looks like below, but when I break points in wildgaussians/train.py file, nothing happens. { "version": "0.2.0", "configurations": [ { "name": "Python 调试程序: 当前文件", "type": "debugpy", "request": "launch", // "program": "${file}", "console": "integratedTerminal", "module": "nerfbaselines", "justMyCode": false, "args": [ // debug train bias sep // "viewer", // "--checkpoint=https://huggingface.co/jkulhanek/wild-gaussians/resolve/main/phototourism/trevi-fountain.zip/checkpoint", // "--data=external:'//phototourism/trevi-fountain'"

            "train",
            "--method", "wild-gaussians",
            "--data", "external://phototourism/trevi-fountain"
            ],
        "cwd": "${workspaceFolder}",
    }
]

}

jkulhanek commented 2 months ago

Hi, I'm sorry, but I don't have any experience with vscode debugger. Perhaps you can try adding breakpoint() call to train.py to start PDB? Would that resolve the issue or do you insist on using vscode debugger?

c1ircle commented 2 months ago

Thank you! I'd like to try it again. By the way, when using "nerfbaselines train-method wild-gaussians -- data external: / / phototourism trevi fountain", where does the train function start, and why? I not familiar with the use of nerfbaselines.

jkulhanek commented 2 months ago

When training wild gaussians, you can either use the training script in this repo or use NerfBaselines to do the training. NerfBaselines is easier to use (it creates the environment and everything for you), but the train.py script in this repo is easier to understand. Please take a look at the Trainer class in the NerfBaselines repo if you want to learn how the training is done with NerfBaselines: https://github.com/nerfbaselines/nerfbaselines/blob/076a443979c8612f7de0c2acf5eaaeafcd31952d/nerfbaselines/training.py#L538

c1ircle commented 2 months ago

What is the command line if I want to use the train file from the repo?

jkulhanek commented 2 months ago

The command is python -m wildgaussians.train --dataset-type ... --data .... Try typing python -m wildgaussians.train --help which will show you the available options.

c1ircle commented 2 months ago

Thank you. There's a little bit of confusion. The paper says, "However, when we want to fit the appearance of a previously unseen image, we need to perform test-time optimization of the unseen image's embedding. "Since this image is not in the dataset, how do we train its appenarance embedding?Is there no appearance_embedding and gt_image when I want to look at a new view of the image? How would you render this?

jkulhanek commented 2 months ago

Please take a look at this code: https://github.com/jkulhanek/wild-gaussians/blob/eebbec0f3acd6a44c5e5e2e4e28740f99f6d22cd/wildgaussians/datasets/phototourism.py#L223

YangLiu-BIT commented 1 month ago

The command is python -m wildgaussians.train --dataset-type ... --data .... Try typing python -m wildgaussians.train --help which will show you the available options.

Thanks for the great work. I run the train file followed your provided command. However, I wonder what is the command line if I want to test the trained model (reused the checkpoint).

jkulhanek commented 1 month ago

You can use the nerfbaselines for rendering and evaluation: nerfbaselines render --checkpoint <path> and nerfbaselines evaluate <path to predictions>.