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
This commit is contained in:
Pablo Vela authored and GitHub committed 2023-03-12 16:01:18 -04:00
1 parent 1b18b44d81
commit ddfa463f4d
16 files changed
+1376 -53

No files matched your search

+11 -1
View File
@@ -17,16 +17,26 @@ Base class for the graphs.
"""
from abc import abstractmethod
from typing import Dict, Optional, Tuple
from dataclasses import dataclass, field
from typing import Dict, Optional, Tuple, Type
import torch
from torch import nn
from torchtyping import TensorType
from nerfstudio.cameras.rays import Frustums, RaySamples
from nerfstudio.configs.base_config import InstantiateConfig
from nerfstudio.field_components.field_heads import FieldHeadNames
@dataclass
class FieldConfig(InstantiateConfig):
"""Configuration for field instantiation"""
_target: Type = field(default_factory=lambda: Field)
"""target class to instantiate"""
class Field(nn.Module):
"""Base class for fields."""