4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00
Commit Graph

66 Commits

Author SHA1 Message Date
bglglzd
eba2e794ee Fix a small issue in nerfstudio (#3769) 2026-07-12 22:00:20 +03:00
Emmanuel Ferdman
2adcc380c6
Fix Viser reference (#3654)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-05-21 14:22:20 -07:00
Anthony Zhang
94357f82c1
Dataloading Followup (#3604)
* fixing ns-eval when datamanager is set to disk for splats

* fixing prefetch_factor type issues if user decides to use 0 workers

* removing accidental file

* fixing depth nerfacto config for issue 3592

* ruff linting the imports

* fixing workers creating GPU tensors serialization error

* finished next_eval

* adding flowcharts!

* fixing ruff

* added flowcharts into datamanagers.md

* simplying code and adding GPU serialization fix for both datamanagers

* fixing nits with consistent styling

* last optional nit

* fixing num workers
2025-04-20 11:46:18 -07:00
Anthony Zhang
4a3e3e6403
Dataloading Revamp (#3216)
* initial debugging and testing works

* pwais changes with RayBatchStream to alleviate training

* few bugs to iron out with multiprocessing, specifically pickled collate_fn

* working version of RayBatchStream

* additional docstrings

* cleanup

* much more documentation

* successfully trained AEA-script2_seq2 closed_loop without OOM

* porting over aria dataset-size feature

* added logic to handle eviction of a worker's cached_collated_batch

* antonio's implementation of stream batches

* training on a dataset with 4000 images works!

* some configuration speedups, loops aren't actually needed!

* quick fix adjustment to aria

* removed unnecessary looping

* much faster training when adding i variable to collate every 5 ray bundles

* cleanup unnecssary variables in Dataloader

* further cleanup

* adding caching of compressed images to RAM to reduce disk bottleneck

* added caching to RAM for masks

* found fast way to collate - many tricks applied

* quick update to aria to test on different datasets

* cleaned up the accelerated pil_to_numpy function

* cleaning up PR

* this commit was used to generate the time metrics and profiling metrics

* REAL commit used to run tests

* testing with nerfacto-big

* generated RayBundle collate and converting images from uint8s to float32 on GPU tests

* updating nerfacto to support uint8 easily, will need to figure out a way to contain this within the datamanager API

* datamanager updates, both splat and nerf

* must use writeable arrays because torch requires them

* cleaned up base_dataset, added pickle to utils, more code in full_image, and cleaner desc for base_datamanager

* lots of process on a parallel FullImageDatamanger

* can train big splats with pre-assertion hack or ROI hack and 0 workers

* fixed all undistortion issues with ParallelImageDatamanager

* adding some downsampling and parallel tests with splatfacto!

* deleted commented code in dataloaders.py and added bugfix to shuffling

* testing splatfacto-big

* cleaned up base_pipeline.py

* cleaned up base_pipeline.py ACTUALLY THIS TIME, forgot to save last time

* cleaned up a lot of code

* process_project_aria back to main branch and some cleanup in full_image_datamanager

* clarifying docstrings

* further PR cleanup

* updating models

* further cleanup

* removed caching of images into bytestrings

* adding caching of compressed images to RAM, forgot that hardware matters

* removing oom methods, adding the ability to add a flag to dataloading

* removed CacheDataloader, moved RayBatchStream to dataloaders.py, new vanilla_datamanager rewritten

* fixing base_piplines, deleting a weird datamanager_configs file that was accidently created

* cleaning up next_train

* replaced parallel datamanager with new datamanager

* reverted the original base_datamanager.py, new datamanager replaced parallel_datamanager.py

* modified VanillaConfig, but VanillaDataManager is the same as before

* cleaning up, 2 datamanagers now - original and new parallel one

* able to train with new nerfstudio dataloader now

* side by side datamanagers, moved tons of logic into dataloaders.py and created new files for our parallel datamangers

* added custom ray processing API to support implementations like LERF, cleaned up FullImageDatamanager to original because of new ParallelImageDatamanger

* adding functionality for ns-eval by adding FixedIndicesEvalDataloader to the setup_eval

* adding both ray API and image-view API to datamanagers for custom parallelization

* updating splatfacto config for 4k tests

* updating docstrings to be more descriptive

* new datamanager API breaks when setup_eval() has multiple workers, not sure why but single worker will have to do

* adding custom_view_processor to ImageBatchStream

* reverting full_images_datamanager to main branch

* removing nn.Module inheritance from Datamanager class

* don't need to move datamanger to device anymore since Datamanager is not a subclass of nn.Module

* finished integration test with nerfacto

* simplified config variables, integrated the parallelism/disk-data-loading all into one datamanager

* updated the splatfacto config to be simpler with the dataloading and now uses FullImageDatamanager (which has been changed)

* style checks and some cleanup

* new splatfacto test, cleaning up nerfacto integration test

* removing redundant parallel_full_images_datamaanger, as the OG full_image_datamanager now has full parallelized support

* ruff linting and pyright fixing

* further pyright fixing

* another pyright fixing

* fixing pyright error, camera optimization no longer part of datamanager

* fixing one pyright

* fixing dataloading error when camera is not undistorted with dataloader

* fixing comments and updating style

* undoing a style change i made

* undoing another style change i made by accident

* fixing slow runtime

* fixing a more general camera undistortion bug

* move images to device properly

* minor improvements

* add print statement about >500 images, cleanup method configs

* make method configs consistent across nerfacto models

* adding description comments

* updating description

* resolving some pyright issues with export.py, explained in PR desc

* fixing pyright issues in base_pipeline.py

* ran pyright on exporter and base_pipeline.py without issues

* adding a git ignore to a clearly checked pyright issue

* typo

* fixing most ns-dev-test cases

* cleanup, passing final ns-dev-test

* oops, accidentally pushed the deletion of a docstring, undoing that

* another cleanup

* some fixes to eval pipeline

* lint

* add asserts for spawn

* lint

* cleaning up import statements in parallel_datamanager.py

* adding new developer documentation if users would like to migrate their custom datamanagers to support new features

* removing unnecessary to_device no-op

* further updates to documentation

* lint

* more docs

* docs

* remove comment

* add docs, fix depth dataset with parallel datamanager, fix mask sampling bug

* remove profiling

* more profile removal

* custom_view_processor->custom_image_processor

* doc clarification

* datamanager doc nit

* whitespace

* nits

* remove stuff from __post_init__, tune num workers more, add random offset in raybatchstream

* removing unnecessary assertion, updating docstring because DataManager is no longer an nn.Module

* clarifying configuration with num_images_to_sample_from and num_times_to_repeat_images, cleaning up functions

* adding logic so that nerfacto users can load_from_disk and customize image batch sizes and repeat parameters

* ruff formatting! whoops forgot to format

* fixing logic, now if users set load_from_disk to true, datamanager will use 50 and 10. If users set it and specify their own values, we support that as well

* adding separate datamanager config so that target can be removed in method_configs

---------

Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
Co-authored-by: Brent Yi <yibrenth@gmail.com>
2025-01-31 10:40:01 -08:00
Qizhi Chen
1dc2ebd9dc
Fix cli bug in high version of tyro (#3567)
* limited the tyro version up to 0.9.2

* bump tyro>=0.9.8

* Bump typeguard

* Runtime checking with jaxtyping hook instead of typeguard

* Fix test for Python >=3.11, caused by missing default_factory

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
2025-01-21 03:32:35 -08:00
clonefetch
14f1d4ed62
chore: remove redundant words in comment (#3544)
* chore: remove redundant words in comment

Signed-off-by: clonefetch <c0217@outlook.com>

* small typo change

---------

Signed-off-by: clonefetch <c0217@outlook.com>
Co-authored-by: Alexander Kristoffersen <alexanator28@icloud.com>
2024-12-22 19:52:11 +00:00
Chung Min Kim
c572eb7f19
Refactor ScenePointerCallbacks for viser compatibility (#3036)
* Update to match viser pr

* Bump viser version

* `done` => `removed` in docs

* Update viewer_elements.py

* Fix

* Point function signature overload

* Update viewer_control.md

* type ignore on callback

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
2024-04-02 23:42:15 -07:00
Chung Min Kim
71de07163a
Support rectangle selection in viewer (#3014)
* Support rectangle selection in viewer

* Update doc for click screen_pos

* Raise callback override warning from nerfstudio

* Bump viser version, rect-select only in >0.1.26
2024-03-25 19:48:49 +00:00
Brent Yi
6127ec0f72
Update viewer legacy docs (#2875) 2024-02-06 16:07:37 -08:00
Matthew Tancik
451a70c1f3
Migrate to viser viewer (#2515)
* fix jittering in markdown in viewer beta

* Revert "fix jittering in markdown in viewer beta"

This reverts commit 70ade42e46.

* Migrate to viser viewer

* Fix docs

* print correctly formatted url in banner for viewer beta

* add deprecation warnings to viewer_elements.py

* fix export string scientific notation bug, change .5 to 2.0 sec transition time

---------

Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
2024-01-08 11:40:02 -08:00
omahs
4c966b9bd4
Fix typos (#2655)
* fix typo

* fix typo

* fix typos

* fix typo
2023-12-08 11:27:05 +00:00
Chung Min Kim
5865ecf323
Integrate scene click capability from original viewer (#2509)
* Integrate scene click capability from original viewer

* filter non-click ScenePointerEvents from ClickEvent

* lint

* Put click origin+direction in nerfstudio world scale

* Update docs

* Update doc heading

---------

Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
2023-11-29 14:48:58 -08:00
Shiva Gantha
e206079370
minor typing error (#2545) 2023-10-19 21:58:27 -07:00
Matthew Tancik
d325593e02
Remove unused config param (#2495)
Remove unused config.
2023-10-09 10:35:08 +08:00
Rohan Mathur
afcc8434d0
fixed link to viser to be functional link cause previous 404ed (#2486) 2023-10-03 09:20:58 +02:00
Sid Mehta
7269a7ee16
Add Comet Logging (#2431)
* initial commit

* fixed naming

* added comet_ml as depedency

* added comet to docs

* Update custom_gui.md

* Update models.md

* Update benchmarking.md

* added Comet to ReadMe

* added decorator

* fixed link and added comet examples

* fixed link and added comet example

* fixed format

* fixed type ignore error

* fixed readme typo

* fixed typo
2023-09-15 09:21:09 -07:00
Jonáš Kulhánek
6af0bcfbf8
Unify dataparser and method discovery (#2398)
* Unify external dataparser registration

* Unify dataparser and method discovery
2023-09-08 08:26:41 +00:00
drewgilliam
d947f6e485
Update engine docs (#2405)
* build docs for nerfstudio.engine.trainer and nerfstudio.engine.callbacks

* docs minor edit for new_methods.md
2023-09-07 18:17:03 +00:00
drewgilliam
4d0033343c
NERFSTUDIO_METHOD_CONFIGS callable MethodSpecification (#2385)
* NERFSTUDIO_METHOD_CONFIGS allow method specification as callabale (function or class)

* docs - NERFSTUDIO_METHOD_CONFIGS accepts function or derived class
2023-09-05 13:55:08 -07:00
Matias Turkulainen
cf2d90d009
template repository (#2319)
* template repo

* template repo
2023-08-09 17:01:48 +00:00
Matthew Tancik
76165fcd02
Fix custom dataparser docs (#1991)
Update new_methods.md
2023-05-24 11:18:35 -07:00
Milan van Wouden
d413ca4204
fix large number of typos in repository (#1977)
* fix large number of typos in repository

* fix typos in tests
2023-05-23 10:41:49 -07:00
Justin Kerr
0ee63cb581
Expose viewer controls to pipeline (#1804)
* Increase max_res of first proposal network

* start on ViewerCamera

* crop controls exposed

* lint

* fix viewer crash when invisible element has its value set

* fov, look_at, and camera type

* stuff

* set update interval correctly in cameracontrols, smooth transitions work now

* demo with depth zooming

* depth min

* WIP adding click message

* put the clock back in viewerwindow

* use setlookat when pos and target are defined at the same time

* remove demo from nerfacto

* Add click commands as rays (origin, direction)

* short doc

* Fix double event for doubleclick

* add ViewerClick, cleanup docs

* add docs

* cleanup

* remove scripts

* remove nerfacto changes

* js compile things

* update viewer version

* fix mutable state thing

* docs improvements

* add kwarg value for enableTransition

* fix

* lint

* path in sync-defs

* Misc doc edits requested in pr

* Add click description

* WIP remove redefinition of banner_height, refer to SCSS vars

* add docstring

* radix

* radix

* speed

---------

Co-authored-by: Chung Min Kim <chungmin99@gmail.com>
2023-05-18 17:36:00 -07:00
Matt Tancik
9932b0fecf fix doc error 2023-05-15 15:01:39 -07:00
Matthew Tancik
415a037880
Update method docs (#1925)
* Update method docs

* Cleanup
2023-05-15 13:47:40 -07:00
wuzirui
bc110d7bd9
extract dataparser configs to a stand-alone file, support custom dataparsers (#1909)
* extract dataparser configs to a stand-alone file, support custom dataparsers

* add license

* fix pylint issues

* fix type error issue

* update naming; add documentations;

* print f string

* fix pylint issue

---------

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-05-12 15:11:46 -07:00
Matthew Tancik
72a14b0b22
Move scripts folder into nerfstudio (#1897)
move scripts folder into nerfstudio
2023-05-09 16:44:21 -07:00
Jonáš Kulhánek
971c9eb307
Enable method config registration from env variable (#1869) 2023-05-04 20:53:52 +02:00
Matthew Tancik
9a61851bcf
Update lerf docs (#1782) 2023-04-20 10:06:13 -07:00
Brent Yi
63919c0db2
Docs fixes for viewer elements (#1770) 2023-04-18 19:15:29 -07:00
Jonáš Kulhánek
ea14152ae6
Add PyTorch profiler to support tracing of forward/backward calls (#1761)
* Add PyTorch profiler support

* Add support for wrapped code, fix linting errors

* Update docs
2023-04-18 20:29:09 +02:00
Brent Yi
2ddb2631b5
Improve viewer element types (#1743) 2023-04-15 01:14:38 -07:00
Matthew Tancik
a9eea19880
Update method docs (#1742)
* Update method docs

* typo
2023-04-14 15:02:45 -07:00
Brent Yi
6a7c8820b8
Viewer backend refactor (#1702)
* Copy in `viser` communication infrastructure

* Update background image

* Add build directory to fix viser HTTP server
May want to remove these later

* Copy in `viser` communication infrastructure

* Update background image

* Pass dataset vis using viser

* initial impl of ViewerParameter

* idk what i did but brent and matt know

* Suppress eslint typescript warnings

* implement ViewerElement base class, then ViewerButton, ViewerSlider, etc

* client -> server message setup

* multi folder stuff

* Stream controls over viser

* import

* add types to viewer_param.py

* Move another message to viser

* Update folder color

* Use non throttled messages

* multiple folders works

* Cleanup, more porting

* starting impl of control panel in viser

* More porting

* scenebox to viser

* Cleanup

* Fix render updates

* More cleanup, docs, typing

* start control_panel.py

* set_hidden logic but not merged in

* control_panel replicates behavior of existing control panel (visually), except for setting the list of output options. not yet integrated with viewer_utils.py for logic flow. also implemented set_disabled and set_hidden in javscript/ViewerElement side

* Remove some original leva components

* add some train util logic, attempt set_value, doesn't work on javascript side fully yet (value updates but not slider visually

* bye zmq

* missing call to decoder

* 'gui_set' works properly, control panel now replicates behavior of original

* remove print

* Fix status viewer message

* More cleanup

* support set_options in dropdown

* hiding buttons works correctly

* fix set_options, switch from cur_value to get_value()

* Fix slowdown

* output options

* colormap logic converted

* add handle to cb_hook

* fix some lambda bugs

* cleanup

* Save checkpoint logic readded

* Cleanup and minor fixes

* snappier ui

* Refactoring

* Fix state update bugs

* Bug fixes

* Write less to redux

* added comments to reducer code

* Render state machine (#1727)

* state machine works, but train step throttling not implemented

* more step logic, cleanup

* remove random try catcH

* mutex logic for render

* Update lock logic

* types and docs

* added some state machine logic to help rerenders

* merge

---------

Co-authored-by: Justin <justin.g.kerr@gmail.com>

* Refactor and cleanup

* More cleanup and docs

* docstring to gui_utils

* docstrings, rename viewer_param.py to viewer_elements.py

* Fix viewer, remove bridge stuff

* Render on connect

* Fix lint errors

* More eslint fixes

* render_freq logic

* better rerender logic for crop

* More cleanup

* Purge

* Cleanup

* Lint fixes

* Fix cache

* better parsing logic

* Fix infinite test

* More cleanup

* typo

* Update webdocs

* Update docs

* rerender on custom hooks

* add more docs

* Use shared utilities in `viser.infra`

* rework callback to use elements instead of handles

* Fix ESlint errors

* change naming of handle to element, add setter for value

* cleanup

---------

Co-authored-by: Matt Tancik <mattt4001@gmail.com>
Co-authored-by: Justin <justin.g.kerr@gmail.com>
Co-authored-by: Ethan Weber <eweb0124@gmail.com>
Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-04-14 14:53:10 -07:00
Matthew Tancik
2e777e4577
Update dataparser docs (#1698)
* Update dataparser docs

* Add missing files
2023-04-04 18:30:52 -07:00
Matthew Tancik
7126334976
Docs for adding new methods (#1697) 2023-04-04 12:49:15 -07:00
Matthew Tancik
63af268495
Remove webrtc (#1579)
* Remove webrtc

* cleanup

* lint

* cleanup

* Lower quailty

* Update viewer version

* Update docs

* remove cryptography req
2023-03-10 12:00:35 -08:00
Frédéric Devernay
a277cd4886
camera_utils: add "vertical" orientation and "focus" center methods (#1543)
* camera_utils: add "vertical" orientation and "focus" center methods

* camera_utils: -Z is the look-at direction

* Update nerfstudio_dataparser.py

* missing import

* fix pylint issues

* camera_utils: handle degenerate case for "vertical" orientation method

* camera_utils: split focus_of_attention computation

---------

Co-authored-by: Frédéric Devernay <f-dy@users.noreply.github.com>
2023-03-10 11:22:21 -08:00
Jingchen Ye
e0ad53762e
Rename train_split_percentage with train_split_fraction (#1497)
rename train_split_percentage with train_split_fraction
2023-02-24 11:16:37 -08:00
Matthew Tancik
448e1072db
Update doc link 2023-02-09 17:55:51 -08:00
Jonáš Kulhánek
59f71eda0e
Allow methods configs to be discovered from external packages. (#1357)
* Allow method_config to be registered from external packages

* Add license

* Add MethodSpecification class + fix linter errors

---------
2023-02-06 13:25:33 -08:00
machenmusik
f5f424095a
Document localhost URL (fixes #1323) (#1324)
Document localhost URL

Co-authored-by: Chen, Michael <Michael_Chen@cable.comcast.com>
2023-01-31 22:27:05 -05:00
matsuren
408ab709ec
Fix typo (#1231)
* Fix typo COLAMP->COLMAP

* Fix more typo

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-01-16 12:12:55 -08:00
Frédéric Devernay
8fc7950719
Fix benchmarking scripts (#1005)
* launch_eval_blender.sh: fix script

- add shebang
- add -s option to launch a single job per GPU
- last GPU was ignored
- kill all subprocesses when script is terminated

* launch_train_blender.sh: fix script

- add -s option to launch a single job per GPU
- add -v option to use tensorboard instead of wandb
- set nerfacto options according to https://github.com/nerfstudio-project/nerfstudio/issues/806#issuecomment-1284327844
- use a single timestamp for all training jobs
- last GPU was ignored
- kill all subprocesses when script is terminated
- print the eval script command-line

* launch_eval_blender.sh: fix script

* Update benchmarking.md

* launch_train_blender.sh: add -s to eval command-line

* Update launch_train_blender.sh

* Update benchmarking.md
2022-11-28 13:25:14 -08:00
Matthew Tancik
2656e5653e
Update viewer docs (#950) 2022-11-11 15:17:52 -08:00
Matthew Tancik
0271c7ded8
Update docs (#944) 2022-11-11 08:58:53 -08:00
Nail Ibrahimli
a6de0f5f60
fixing typos (#915) 2022-11-07 10:34:15 -08:00
Nikhil Mohan
1a24f3e58c
Refactor Data Pipeline (#896)
* add none check

* black formatting

* cleanup

* cleanup

* fix tests

* remove new line

* init

* toy example working

* semantic nerf working

* simplify pixel samplers

* cleanup + fix tests

* comments

* fix tests

* fix tests
2022-11-06 07:40:43 -08:00
Ethan Weber
cac177717f
Pose optimization (#721)
* pose opt default nerfacto.

* added SO3 cam pose optimization which is slightly faster (~2.2m/iter) than BARF

* integrating record3d

* fix linting errors

* fix save checkpoint logic

* added record3d data

* workaround to avoid flag

* moved dict

* black

* record3d docs

* re-add typing to exp_map.

* Pose optimization refactor

* Fix camera optimizer param group logic

* Update docs + comments

* Update docs, shorten names

* Appease pylint

* repeat -> tile, apply missing name change

* Fix optimizer as scheduler bug

* Fix test

Co-authored-by: akristoffersen <akristoffersen@berkeley.edu>
Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
Co-authored-by: Brent Yi <yibrenth@gmail.com>
2022-10-07 10:11:33 -07:00
Alexander Kristoffersen
2aca915d61
Record3D docs added to Custom Data docs (#718)
* alex/record3d_docs_add

* alex/record3d_docs_add

* link from dataparsers to custom_dataset added.

* images are now appearing

Co-authored-by: evonneng <evonne_ng@berkeley.edu>
2022-10-06 14:10:48 -07:00