Commit Graph
78 Commits
Author SHA1 Message Date
Justin be47ffca81 add l2 penalties on optimizers 2023-06-18 06:09:46 +00:00
Justin ae5ef15bed rip out camera optimization from datamanager and move to nerfacto.py 2023-06-18 05:43:31 +00:00
Justin Kerr 8fad92c39a nerfacto-huge (#2003)
An even larger version of nerfacto with scaled hashgrid resolution, MLP sizes, batch sizes, appearance embeddings, proposal sampler resolution, and more.
Also includes some minor tweaks to nerfacto-big configs
2023-06-15 11:05:53 -07:00
LSong 10dab142d0 Move out NeRFPlayer: clean files and add method link (#2072)
* clean files and add method link

* fix black

* update
2023-06-14 13:51:09 -07:00
Jonáš Kulhánek 3b0f7581d8 Reduce GPU memory usage in CacheDataloader (#1730)
* Reduce GPU memory usage in CacheDataloader

* Move also masks and seg.masks, depths to cpu

* Fix linter issues
2023-06-07 14:14:24 -04:00
Ethan WeberandEthan Weber bb6925bac6 Ability to use vanilla pytorch instead of tcnn for Nerfacto (#1936)
* started a package to easily swap out tcnn for pytorch

* trains with pytorch and not tcnn

* cleaned up imports

* making it easy to install on mac

* removed/reverted files

* merged main

* reverted changes

* updating config

* starting to add nerfacto to tests

* fixxing default value

* fixed default implementation

* defaults to torch if tcnn and not installed

* update log

* add comment

* resolved pr comments

* fix

* update default

---------

Co-authored-by: Ethan Weber <ethanweber@eecs-128-32-175-250.dhcp.berkeley.edu>
2023-05-25 14:55:42 -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
Matthew TancikandBrent Yi 2b0831b6d4 Final typing fixes + add Pyright to CI (#1944)
* knocking out a couple

* Fix more errors

* Add pyright

* Remove some unnecessary cv2 type ignores, warning on missing imports
(for missing tinycudann)

* Minor annotation fixes

* Update docs

* Drop `None` from temporal distortion output

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
2023-05-18 02:25:34 -07:00
Jonáš KulhánekandBrent Yi f481f5ebec Fix some typing problems (#1940)
* Fix some typing problems

* nerfstudio.data typing error fixes

* Add tiny fixes

* Remove ABC from pipeline

* Prevent circular imports

* Tweak ModuleList typing

* TrainingCallbackAttributes cleanup

* Various minor nits

* More nits

* Run `ruff`

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
2023-05-17 17:36:56 -07:00
Brent YiandMatt Tancik d542646c72 Switch to ruff (#1939)
* `isort` -> `ruff`

* `pylint` -> `ruff`

* Remove line

* More minor cleanup

* Better documentation for rules we are enabling

* Fix gitignore, run black

* vscode settings

---------

Co-authored-by: Matt Tancik <mattt4001@gmail.com>
2023-05-17 10:08:14 -07:00
Brent Yi 814db32ec4 More typing fixes (#1941)
* Fix more types

* Fix tests

* Minor cleaning

* Address comments

* Resolve linting errors

* Re-ignore pymeshlab type

* Add extra assert / error message to mipnerf model
2023-05-17 07:17:40 -07:00
Brent YiandMatt Tancik 6ba2a18b2b torchtyping => jaxtyping (#1838)
* Run `ruff --fix`

* Add jaxtyping migration script

* Run migration scripts + ruff + black

* Merge remote-tracking branch 'origin/main' into brent/jaxtyping

* black

* Fix lint

* fix lint

* Cleanup and more specific types

* Fixed annotation errors

* Fix more errors

* Fix annotation

* Delete _torchtyping_to_jaxtyping.py

---------

Co-authored-by: Matt Tancik <mattt4001@gmail.com>
2023-05-16 15:57:47 -07:00
Ethan Weber 13e0fce122 Update copyright (#1917)
* updated copyright

* including txt file

* updated black

* removing license

* fixing license
2023-05-12 16:16:13 -07:00
Jonáš Kulhánek 02f449b661 Implement gradient scaling (#1901)
* Implement gradient scaling

* Make grad scaling more general

* Fix pylint errors

* Fix lint error + change gradient scaling

* Fix issues with grad scaling

* Fix linting errors
2023-05-12 07:23:41 +02:00
Yan XiaoandYan Xiao 38cbb0f358 implementing l1 and tv reg in the original tensorf paper (#1855)
* implementing l1 and tv reg in the original tensorf paper

* added documentation for tv loss

* added test for tv loss

* fix formating

* fix formatting

---------

Co-authored-by: Yan Xiao <yax010@ucsd.edu>
2023-05-09 09:32:51 -07:00
Brent Yi 63c6303736 Bump minimum Python version to 3.8 (#1876)
* Bump minimum Python version to 3.8

* typing_extensions.Literal -> typing.Literal

* ns-dev-test

* typing_extensions.get_args => typing.get_args

* Format with older version of black

* Bump `black`

* Run black
2023-05-06 13:29:48 -07:00
Ruilong Li(李瑞龙) ea2993d5b1 Update NGP related models with nerfacc 0.5.2 (#1809)
* profiling

* set pose_optimizer to None if it's mode is "off"

* radial_and_tangential_undistort in nerfacc

* fix camera distortions

* update to nerfacc 0.5.1. Upgrade instant-ngp model.

* revert nerfacc to 0.5.1

* format

* allows to fall back to the pytorch undistortion

* format

* fix linting

* fix test

* fix test

* fix nerfplayer-ngp

* enable_collider=False for NGP

* nerfplayer verified.

* zero cone_angle for ngp bounded

* fix format

* fix pylint
2023-04-24 17:11:30 -07:00
Yuantao Chen ce733a8308 Delete useless lists of tensors put to CUDA which may cause OOM. (#1748)
eval_large_imgs
2023-04-17 23:35:34 -07:00
Pablo VelaandEthan Weber 8126d47d8c NeusFacto (#1654)
* add neus_facto method

* fix missing pixsfm from video process

* fix dev errors and small typos

---------

Co-authored-by: Ethan Weber <eweb0124@gmail.com>
2023-04-12 19:08:53 -05:00
Matt Tancik 3ec8c06e83 Cleanup 2023-03-22 14:37:05 -07:00
David McAllisterandMatthew Tancik 4c2e200098 TensoRF go brrrrrrr (#1609)
* pdfsampler no longer includes uniform samples

* Lint

* Typo fix

---------

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-03-15 20:27:37 -07:00
Pablo Vela ddfa463f4d NeuS Implementation (#1444)
* add initial method configs and data manager

* add neus scheduler

* add initial surface model and neus

* add Neus ray sampler

* add sdf field

* move scale/shift calc to math utils

* add debug and fix sdf_dataset typo

* update vscode neus debug

* fix dataset and get initial working version

* add magic number from original repo

* black fixes

* clean up get weights/transmittance from alphas

* clean up typos in sdf datamanager

* type annotations on neus scheduler and remove unused params

* clean up and annotate sdf field along w/ other fixes

* more clean up

* remove unnessary directions norm

* resolve comments

* update neus scheduler to follow refactor

* fix linter errors

* fix some typos

* remove get_weights_from_alpha

* more comment fixes

* more linter error fixes

* clean up and add comments

* more little fixes for types/comments

* more comments

* rename NeuS Scheduler to DelayedScheduler

* rename DelayedScheduler to CosineDecayScheduler
2023-03-12 16:01:18 -04:00
Georgy Ponimatkin f48fa6a923 Instant ngp args (#1549)
* Expand instant-ngp args.

* Fixed misplaced string.
2023-03-02 23:49:30 +01:00
Fernando Rivas-ManzanequeandMatthew Tancik 9053643932 Volinga model and NVOL documentation (#1486)
* added volinga model to NeRFStudio

* Removed unused dependencies

* Modified dockerfile to match main

* Corrected typo in core_code_checks.yml

* Corrected typo in core_code_checks.yml

* updated test with Volinga

* Added conversion to NVOL documentation

* [WIP] Refactor documentation and removing Volinga config

* Volinga use existing NerfactoModelConfig

* Added Unreal Engine documentation to extensions

* removed unused field class import

* Updated docs

* Documentation ready

* Update Dockerfile

---------

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-02-25 14:49:53 -08:00
Ruilong Li(李瑞龙) 7dc7129cf8 fixes for nerf synthetic dataset (#1507)
* fixes for nerf synthetic dataset

* restore eval script

* fix format with black
2023-02-25 14:37:10 -08:00
Nikhil Mohanandmachenmusik a91b92f89d semantic_nerfw_configurability (#1467)
* fix semseg vis

* semantic configs

* change defaults

* Fix type

* format

* fix imports

* suggested fix for issue 1465

* fix docstring placement; avoid log spam and runtime errors

`nerfstudio\models\semantic_nerfw.py:81: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  self.colormap = torch.tensor(self.semantics.colors).to(self.device)`

* hide semantics output choice, since it kills the viewer

* revert some changes

* caps

* move both image and mask to GPU to avoid runtime error

as suggested in https://github.com/nerfstudio-project/nerfstudio/issues/1465#issuecomment-1441117562

---------

Co-authored-by: machenmusik <machenmusik@users.noreply.github.com>
2023-02-22 22:21:04 -05:00
Jake AustinandMatthew Tancik 50dc5d6cd7 Triplanes (#1456)
* Triplanes working

* Doing the TODOs, better variable names

---------

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
2023-02-22 16:23:12 -08:00
Matthew Tancik f3a34bbf95 Refactor schedulers (#1466)
* Refactor schedulers

* lint

* lint
2023-02-21 12:51:51 -08:00
Sacha Lewin 151b1060fe Uniform Sampler in Nerfacto (#1464)
* Allow black/white background color in Nerfacto

* Use white background in Nerfacto Blender Benchmark

* Fixed unused import

* Updated index for license headers script

* Removed debug code in NGP models

* Uniform initial sampler config in Nerfacto

* Undo changes in settings.json

* Removed unwanted settings file

* Removed unneeded config parameter

* Use uniform sampler on Blender benchmark
2023-02-21 09:17:57 -08:00
Matthew Tancik ceda935e64 Fix depth nerfacto exporting (#1453) 2023-02-19 13:53:01 -08:00
Matthew Tancik 73f0f5a16a Fix mesh export normals (#1452)
* Fix mesh export normals

* lint
2023-02-19 13:43:43 -08:00
Sacha Lewin 8e4ae6bebf Allow use of black or white background in Nerfacto models (#1441)
* Allow black/white background color in Nerfacto

* Use white background in Nerfacto Blender Benchmark

* Fixed unused import

* Updated index for license headers script
2023-02-17 20:39:10 -08:00
NCJ 2878aff1c5 Fix LPIPS data range (#1425) 2023-02-14 10:18:33 -08:00
Yiming Zhou 8c9c2ba2ab Add support for sparse depth maps (#1373)
Add support for sparse depth maps (#2)

* sparse depth maps

* pr comments

* unified loss

* minor

* lint
2023-02-07 16:26:05 -08:00
Matthew Tancik 59d7e99c80 Create shaders (#1344) 2023-02-03 11:21:54 -08:00
Jeffrey Hu a0976d1ff8 Fix depth-supervised nerf when using z-buffer depth. (#1340)
* fix z buffer depth

* remove script
2023-02-02 18:22:55 -08:00
Matthew Tancik 2e79c93cd2 Fix normals visualization (#1341) 2023-02-02 18:06:11 -08:00
LSongandmachenmusik e73692e599 nerfplayer with ngp and nerfacto (#1277)
* nerfplayer with ngp and nerfacto

* update comments

* update cpp extension build

* avoid Windows repeated CUDA compile

---------

Co-authored-by: machenmusik <machenmusik@users.noreply.github.com>
2023-01-31 11:56:28 -08:00
Justin Kerr c8fdc1a7cb Increase max_res of first proposal network (#1282) 2023-01-24 13:23:37 -08:00
Terrance Wang 73bffe058f Fix tensorf chkpt loading (#1266)
* setting tensorf default from wandb to viewer

* adding functionality to adjust model depending on the step of the checkpoint that is loaded

* cleaning code

* bug fix

* fixing style
2023-01-20 12:00:51 -08:00
2120bd5dd9 CropBox GUI implementation (#1205)
* fixed an exception bug in case of num_samples is 0

fixed an exception bug when num samples is 0 , 
"IndexError tensors used as indices must be long, byte or bool tensors"

change type to long ( was float32)

* implemented crop box in gui. For now works on instant-ngp-bounded

* fixed import bugs

* update aabb every time and not only on training

* prevent crash when chosing accomulation and crop box

* Checkbox

* max_box is bounded by scevne box in the gui

* implemented altenative intesection to nerfacc

* convert str to bool correctly

* fixed isort bug

* fixed isort bug2

* update viewer version

* remove json bug

* Update UI

* Force black background

* Fix formatting

Co-authored-by: dror <you@example.com>
Co-authored-by: Matt Tancik <tancik@berkeley.edu>
Co-authored-by: Matthew Tancik <mattt4001@gmail.com>
2023-01-19 17:39:37 -08:00
JamesPerlman e575f128d7 Update incorrect comment (#1226) 2023-01-16 12:42:22 -08:00
matsurenandMatthew Tancik 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
Michal Pandy 3da877050d Depth supervision for Nerfacto (#1173)
* Implement depth supervision

* Fixes

* Change normalize dtype

* refactor

* Change depth weight

* Small refactor

* Change docstring

* Removu unused import

* Add assumption to depth comment

* Implement URF loss

* Remove default depth loss type param

* URF fixes

* Fix depth loss scale

* Visualize gt depths

* Fixes & documentation

* Documentation and formatting

* Fix formatting problems

* Fix linter problems

* Fix tests

* Fix tests
2023-01-02 10:13:38 +01:00
Ruilong Li(李瑞龙) 028df82be6 upgrade nerfacc to 0.3.x with CUB accel (#1187) 2022-12-31 07:28:11 +08:00
Brent Yi 5495a8e146 Type and docs fixes (#1170) 2022-12-26 09:04:24 -07:00
dozeri83anddror 96f269cc1a instant-ngp-bounded model (#1116)
* inerted a new model configuration instant-ngp-bounded

* added more remarks and small fixes

* went back to old near plane

* added the oprtion to get a file as well as directory in nerfstudio data parser

* pretify prev commit

* review fixes

* more clear explanation in README.md

* reverted readme changes

* fixed merge bug

* review changes. update config.data docs support for json files inputs

Co-authored-by: dror <you@example.com>
2022-12-13 13:05:48 -08:00
Matthew Tancik 676f816156 Bump max res default (#1106) 2022-12-11 13:03:35 -08:00
Zak Murezandzmurez a7df91edc8 config nerfacto (#1020)
Co-authored-by: zmurez <zmurez@eng.ucsd.edu>
2022-11-27 15:56:06 -08:00
b829499c12 Computing and predicting normals (#905)
* staring normals PR

* code runs but visualization looks bad

* Camera and world coordinate conventions (#889)

* documented coordinate conventions without a figure for now

* another sentence

* update frames docs

* explain intrinsics and extrinsics

* more comments

* fix build

* Start viewer with more accurate speed calculation (#899)

Start viewer with more accurate speed calc

* Minor doc updates (#903)

* fix conflicts

* code runs but visualization looks bad

* normals implemented and vis fixed. still debugging quality

* minor name change

* comment

* fix black

* lint

* predicting normals

* adding detach

* predicted normals

* improved normals prediction performance

* cleaning code

* cleaning code

* cleaning code

* adding type to function param

* fixing tensorf forward func

* reverting tensorf changes

* fix style with tensorf field

* adding normals check to tensorffield

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
Co-authored-by: terrance <terrance.3512@gmail.com>
2022-11-20 13:22:37 -08:00