nerfstudio-project / nerfstudio

A collaboration friendly studio for NeRFs
https://docs.nerf.studio
Apache License 2.0
8.9k stars 1.18k forks source link

question about correctly exporting point clouds #3278

Open adrianJW421 opened 4 days ago

adrianJW421 commented 4 days ago

I appreciate your wonderful work!! I have encountered some problems.

I prepared a custom video and extract the frames in it. I prepared dataset using

ns-process-data images --data chair --output-dir chair_out

and then train a nerf as below:

ns-train nerfacto --data chair_out colmap

In the viewer, I can see some correct rendered scene as below:

image

However, after the training is done, and I tried to export the point clouds with:

ns-export pointcloud \
            --load-config outputs/chair_out/nerfacto/2024-07-01_173121/config.yml \
            --output-dir exports/pcd/ \
            --num-points 1000000 \
            --remove-outliers True \
            --normal-method open3d \
            --save-world-frame True

and I get very strange results like this:

image

image

Could you please help me figure out what went wrong?

abrahamezzeddine commented 4 days ago

Can you try to export it normally without the additional arguments but these?

ns-export pointcloud \ --load-config outputs/chair_out/nerfacto/2024-07-01_173121/config.yml \ --output-dir exports/pcd/ \

        Does it make any difference?
samadbarrikhojasteh commented 1 day ago

I think it is caused by depth. Please check your rendered depth maps, If you do not have good depth that is mean probably your sfm method did not estimate camera parameters properly. To address this problem, I think firstly, you need to make sure about your image number (more images-->better estimation) and add some image with different point of views into your training dataset. You can also fix the camera parameters for all images (if you use only one camera) inside sfm.