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

Improve ns-process-data images when using existing COLMAP model #1371

Merged

Conversation

jkulhanek
Copy link
Contributor

This PR implements the following:

  • Additional flag --skip-images for ns-process-data, which skips copying and downscaling of images. The typical use case is if the user already downscaled the images and wants to run just COLMAP
  • Additional parameter --colmap-model-path can be used with --skip-colmap. It allows specifying the path to the COLMAP model as opposed to always using "colmap/sparse/0"
  • Fixes a bug with --skip-colmap. When --skip-colmap is used with an existing COLMAP model, the filenames are not renamed (but they are renamed when they are copied and downscaled). This makes the resulting transforms.json contain invalid paths.

NOTE: I accidentally closed PR #1366. This PR contains the same changes.

…hen using --skip-colmap on images.bin with non-standard image names
Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up this pipeline. We have received multiple requests for supporting externally colmaped data.

@@ -74,6 +74,10 @@ class ProcessImages:
will downscale the images by 2x, 4x, and 8x."""
skip_colmap: bool = False
"""If True, skips COLMAP and generates transforms.json if possible."""
skip_images: bool = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make more descriptive, -> skip_image_processing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

scripts/process_data.py Show resolved Hide resolved
Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tancik tancik merged commit 2ff1d3b into nerfstudio-project:main Feb 7, 2023
yimingzhou1 added a commit to parallelsystems/nerfstudio that referenced this pull request Feb 7, 2023
* Fix normals visualization (nerfstudio-project#1341)

* Fix depth-supervised nerf when using z-buffer depth. (nerfstudio-project#1340)

* fix z buffer depth

* remove script

* Create shaders (nerfstudio-project#1344)

* New config parameter --viewer.codec defaults to VP8, but allows H264 (nerfstudio-project#1343)

* New config parameter --viewer.codec defaults to H264 rather than VP8

* make quantize clearer

* change codec to Literal

default is VP8 due to libx264 log spam, see nerfstudio-project#1343 (comment)

* isort

* pylint, including python 3.7 compatibility

* double-quote filenames in process-data commands so that on Windows, paths with spaces don't fail (nerfstudio-project#1347)

* double-quote filenames in commands so that on Windows, paths with spaces don't fail

* reformatting by black

* Improve viewer colormap choices (nerfstudio-project#1348)

* Consistent naming for depth maps in Polycam (nerfstudio-project#1352)

* Handle uncalibrated Metashape sensor (nerfstudio-project#1359)

This fix allows loading Metashape XML files which
contain an additional uncalibrated sensor.

Metashape XML format keeps unmatched images but
assignes a dummy sensor to them. The sensor has
no calibration data.

Co-authored-by: gilureta <[email protected]>

* add viewer.local config property when viewing local instance (nerfstudio-project#1358)

If running local server instance, avoid using relays to communicate with the viewer.

* Allow methods configs to be discovered from external packages. (nerfstudio-project#1357)

* Allow method_config to be registered from external packages

* Add license

* Add MethodSpecification class + fix linter errors

---------

* Trace Stable Diffusion (nerfstudio-project#1362)

* Trace Stable Diffusion

* pylint

Co-authored by Terrance Wang

* Fix ns-train help (nerfstudio-project#1370)

* Improve ns-process-data images when using existing COLMAP model (nerfstudio-project#1371)

* Allow skipping copy+downscale of images in ns-process-data, fix bug when using --skip-colmap on images.bin with non-standard image names

* Rename flags and improve error messages

---------

Co-authored-by: Matthew Tancik <[email protected]>

---------

Co-authored-by: Matthew Tancik <[email protected]>
Co-authored-by: Jeffrey Hu <[email protected]>
Co-authored-by: machenmusik <[email protected]>
Co-authored-by: ManuConcepBrito <[email protected]>
Co-authored-by: Francisca T. Gil Ureta <[email protected]>
Co-authored-by: gilureta <[email protected]>
Co-authored-by: Jonáš Kulhánek <[email protected]>
chris838 pushed a commit to chris838/nerfstudio that referenced this pull request Apr 22, 2023
…studio-project#1371)

* Allow skipping copy+downscale of images in ns-process-data, fix bug when using --skip-colmap on images.bin with non-standard image names

* Rename flags and improve error messages

---------

Co-authored-by: Matthew Tancik <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants