Skip to content

ns-process-data: allow using best sparse model instead of always model 0 #3708

Open

Description

@luishresende

COLMAP creates several models and tries to join them into a single model as I understand, if that does not work, the models will remain split.

I have however noticed that out of the x models, one of them is a good one, but nerfstudio is unable to pick it.

Can you check the COLMAP folder and see if you several models and import them into the COLMAP GUI interface and inspect them?

Then you can move the “good” model into sparse/0 and still run nerfstudio nerf.

I explained the issue here #3435

Originally posted by @abrahamezzeddine in #3357

I've been working with NeRFs and Gaussian Splatting for almost two years and have witnessed this issue several times in the Nerfstudio dataset pipeline (ns-process-data).

Activity

  1. luishresende commented on Sep 6, 2025

    @luishresende
    Author
  2. luishresende commented on Sep 11, 2025

    @luishresende
    Author

    To illustrate and facilitate understanding of the issue, I have made available on Google Drive the processing of a dataset where it occurs. The folder contains the following contents:

    • water_tank_two_models/
    • water_tank_one_model/
    • images.zip

    Both directories contain datasets generated with the same command. The images.zip file includes the folders images, images_2, images_4, and images_8, created during image preprocessing.

    The logs below show the execution of the colmap model_analyzer command.

    water_tank_one_model

    sparse/0

    I20250911 17:20:53.414210 139683312984064 model.cc:438] Cameras: 1
    I20250911 17:20:53.414367 139683312984064 model.cc:439] Images: 285
    I20250911 17:20:53.414392 139683312984064 model.cc:440] Registered images: 285
    I20250911 17:20:53.414414 139683312984064 model.cc:442] Points: 50046
    I20250911 17:20:53.414419 139683312984064 model.cc:443] Observations: 236690
    I20250911 17:20:53.414450 139683312984064 model.cc:445] Mean track length: 4.729449
    I20250911 17:20:53.414484 139683312984064 model.cc:447] Mean observations per image: 830.491228
    I20250911 17:20:53.414496 139683312984064 model.cc:450] Mean reprojection error: 1.240746px
    
    • In this case, the output transforms.json has all the registered images.

    water_tank_two_models

    sparse/0

    I20250911 17:23:45.584128 140283123826688 model.cc:438] Cameras: 1
    I20250911 17:23:45.584239 140283123826688 model.cc:439] Images: 2
    I20250911 17:23:45.584246 140283123826688 model.cc:440] Registered images: 2
    I20250911 17:23:45.584250 140283123826688 model.cc:442] Points: 262
    I20250911 17:23:45.584255 140283123826688 model.cc:443] Observations: 524
    I20250911 17:23:45.584263 140283123826688 model.cc:445] Mean track length: 2.000000
    I20250911 17:23:45.584280 140283123826688 model.cc:447] Mean observations per image: 262.000000
    I20250911 17:23:45.584288 140283123826688 model.cc:450] Mean reprojection error: 0.318485px
    

    sparse/1

    I20250911 17:23:51.286212 139620573421568 model.cc:438] Cameras: 1
    I20250911 17:23:51.286409 139620573421568 model.cc:439] Images: 545
    I20250911 17:23:51.286435 139620573421568 model.cc:440] Registered images: 545
    I20250911 17:23:51.286459 139620573421568 model.cc:442] Points: 133629
    I20250911 17:23:51.286465 139620573421568 model.cc:443] Observations: 700125
    I20250911 17:23:51.286506 139620573421568 model.cc:445] Mean track length: 5.239319
    I20250911 17:23:51.286528 139620573421568 model.cc:447] Mean observations per image: 1284.633028
    I20250911 17:23:51.286581 139620573421568 model.cc:450] Mean reprojection error: 1.290739px
    
    • And for this, the output transforms.json is:
    {
        "w": 3840,
        "h": 2160,
        "fl_x": 8805.991735896425,
        "fl_y": 7101.4977495346675,
        "cx": 1920.0,
        "cy": 1080.0,
        "k1": 2.4052674923766273,
        "k2": -22.86337591293921,
        "p1": -0.07604473357502362,
        "p2": 0.30461438532170365,
        "camera_model": "OPENCV",
        "frames": [
            {
                "file_path": "images/frame_00254.png",
                "transform_matrix": [
                        ...
                ],
                "colmap_im_id": 254
            },
            {
                "file_path": "images/frame_00264.png",
                "transform_matrix": [
                        ...
                ],
                "colmap_im_id": 264
            }
        ],
        "applied_transform": [
            ...
        ],
        "ply_file_path": "sparse_pc.ply"
    }
    
    • just two frames.
  3. ChuyaoFu commented on Sep 19, 2026

    @ChuyaoFu

    Opened #3789 to address this by selecting the readable reconstruction with the most registered images, including HLoc-style nested models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions