Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Do Depth-Supervision in NeRFStudio #3549

Open
aidris823 opened this issue Dec 14, 2024 · 4 comments
Open

Can't Do Depth-Supervision in NeRFStudio #3549

aidris823 opened this issue Dec 14, 2024 · 4 comments

Comments

@aidris823
Copy link

Hello:

I have a dataset of RGB images and their corresponding depth images. I first process the data in COLMAP using:

ns-process-data images --data ./Tractor_RGB_Depth/TractorRGB/ --output-dir Processed_Tractor_RGB_Depth

After this, I manually moved the depth maps (which are a depths folder followed by versions I downsampled in Python). This is what my Processed_Tractor_RGB_Depth folder looks like:

(nerfstudio) bash-4.4$ tree -d

.
├── colmap
│   └── sparse
│       └── 0
├── depths
├── depths_2
├── depths_4
├── depths_8
├── images
├── images_2
├── images_4
└── images_8

I then try to run:
image

Why is depths-path giving an error and saying it doesn't recognize it, but then proceeds to suggest running depths-path? What is going on?

@mpEsri
Copy link

mpEsri commented Dec 20, 2024

Did you have the "depth_file_path" for each frame in the transforms.json?, e.g.,

"frames": [
        {
            "file_path": "images/1_top.png",
            "depth_file_path": "images/1_top_depth.png",
            "transform_matrix": [
                [
                    0.9674752470564001,
                    -0.24428335846855864,
                    -0.06570606599454189,
                    0.5244950340632486
                ],
                [
                    -0.24400542080376744,
                    -0.9696952760161552,
                    0.01234610425716215,
                    0.11477608703373846
                ],
                [
                    -0.06673080961245557,
                    0.004088086015976274,
                    -0.9977626404116322,
                    -0.08361680439408765
                ],
                [
                    0.0,
                    0.0,
                    0.0,
                    1.0
                ]
            ]
        },

I had depth and rgb images in the same folder and it worked for me.
see https://docs.nerf.studio/quickstart/data_conventions.html#depth-images

@Irving87
Copy link

Did you have the "depth_file_path" for each frame in the transforms.json?, e.g.,

"frames": [
        {
            "file_path": "images/1_top.png",
            "depth_file_path": "images/1_top_depth.png",
            "transform_matrix": [
                [
                    0.9674752470564001,
                    -0.24428335846855864,
                    -0.06570606599454189,
                    0.5244950340632486
                ],
                [
                    -0.24400542080376744,
                    -0.9696952760161552,
                    0.01234610425716215,
                    0.11477608703373846
                ],
                [
                    -0.06673080961245557,
                    0.004088086015976274,
                    -0.9977626404116322,
                    -0.08361680439408765
                ],
                [
                    0.0,
                    0.0,
                    0.0,
                    1.0
                ]
            ]
        },

I had depth and rgb images in the same folder and it worked for me. see https://docs.nerf.studio/quickstart/data_conventions.html#depth-images

May I ask how to automatically add “depth_file_path” to transforms.json? Is there any scripts in nerfstudio? I can only find ns-process-data command in nerfstudio docs...

@mpEsri
Copy link

mpEsri commented Dec 23, 2024

Take a look at this Python script: https://github.com/nerfstudio-project/nerfstudio/blob/main/nerfstudio/process_data/polycam_utils.py
Function def polycam_to_json() should give you a good starting point to automate it.

@Irving87
Copy link

ould give you a good starting

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants