Skip to content

Commit 812713d

Browse files
authored
Merge pull request #5 from orperel/operel/imports_docs_cleanups
import cleanups, some missing core docs
2 parents 10ed35e + 1c6353b commit 812713d

File tree

108 files changed

+2393
-1963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2393
-1963
lines changed

app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from wisp.trainers import *
1414
from wisp.config_parser import parse_options, argparse_to_str, get_modules_from_config, \
1515
get_optimizer_from_config
16-
from wisp.framework.state import WispState
16+
from wisp.framework import WispState
1717

1818
# Usual boilerplate
1919
parser = parse_options(return_parser=True)

app/main_interactive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from wisp.trainers import *
1818
from wisp.config_parser import parse_options, argparse_to_str, get_modules_from_config, \
1919
get_optimizer_from_config
20-
from wisp.framework.state import WispState
20+
from wisp.framework import WispState
2121

2222
# Usual boilerplate
2323
parser = parse_options(return_parser=True)
@@ -38,9 +38,9 @@
3838
scene_state=scene_state)
3939

4040
if not os.environ.get('WISP_HEADLESS') == '1':
41-
from wisp.renderer.app.optimizer_renderer import OptimizationRenderer
41+
from wisp.renderer.app.optimization_app import OptimizationApp
4242
scene_state.renderer.device = trainer.device # Use same device for trainer and renderer
43-
renderer = OptimizationRenderer(wisp_state=scene_state,
43+
renderer = OptimizationApp(wisp_state=scene_state,
4444
trainer_step_func=trainer.iterate,
4545
experiment_name="wisp trainer")
4646
renderer.run()

configs/ngp_nerf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ optimizer:
2020

2121
dataset:
2222
dataset_type: 'multiview'
23-
multiview_dataset_format: 'rtmv'
23+
multiview_dataset_format: 'standard'
2424
num_rays_sampled_per_img: 4096
2525
mip: 2
2626
bg_color: 'white'

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension, CUDA_HOME
1818

1919
PACKAGE_NAME = 'wisp'
20-
DESCRIPTION = 'neural fields research'
21-
URL = 'https://gitlab-master.nvidia.com/ttakikawa/solr'
20+
DESCRIPTION = 'Kaolin-Wisp: A PyTorch library for performing research on neural fields'
21+
URL = 'https://github.com/NVIDIAGameWorks/kaolin-wisp'
2222
AUTHOR = 'Towaki Takikawa'
2323
LICENSE = 'NVIDIA Source Code License'
2424
version = '0.1.0'

wisp/accelstructs/octree_as.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,16 @@
77
# license agreement from NVIDIA CORPORATION & AFFILIATES is strictly prohibited.
88

99
import torch
10-
import torch.nn.functional as F
11-
import torch.nn as nn
12-
import numpy as np
13-
import logging as log
14-
1510
import wisp.ops.mesh as mesh_ops
16-
17-
from wisp.ops.perf import PerfTimer
18-
from wisp.ops.debug import PsDebugger
19-
11+
from wisp.utils import PsDebugger, PerfTimer
2012
import wisp.ops.spc as wisp_spc_ops
2113
import kaolin.ops.spc as spc_ops
2214
import kaolin.render.spc as spc_render
2315

16+
2417
class OctreeAS(object):
25-
"""Octree accelstruct class implemented using Kaolin SPC.
18+
"""Octree bottom-level acceleration structure class implemented using Kaolin SPC.
19+
Can be used to to quickly query cells occupancy, and trace rays against the volume.
2620
"""
2721

2822
def __init__(self):
@@ -126,8 +120,9 @@ def query(self, coords, level=None, with_parents=False):
126120
return spc_ops.unbatched_query(self.octree, self.prefix, coords, level, with_parents)
127121

128122
def raytrace(self, rays, level=None, with_exit=False):
129-
"""Traces rays against the SPC structure.
130-
123+
"""Traces rays against the SPC structure, returning all intersections along the ray with the SPC points
124+
(SPC points are quantized, and can be interpreted as octree cell centers or corners).
125+
131126
Args:
132127
rays (wisp.core.Rays): Ray origins and directions of shape [batch, 3].
133128
level (int) : The level of the octree to raytrace. If None, traces the highest level.

wisp/config_parser.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
import argparse
1212
import pprint
1313
import yaml
14-
1514
import torch
16-
1715
from wisp.datasets import *
18-
from wisp.core import Pipeline
16+
from wisp.models import Pipeline
1917
from wisp.models.nefs import *
2018
from wisp.models.grids import *
2119
from wisp.tracers import *
22-
from wisp.ops.ray import *
20+
from wisp.datasets.transforms import *
2321

2422
str2optim = {m.lower(): getattr(torch.optim, m) for m in dir(torch.optim) if m[0].isupper()}
2523

24+
2625
def parse_options(return_parser=False):
2726
"""Function used to parse options.
2827

wisp/core/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
# license agreement from NVIDIA CORPORATION & AFFILIATES is strictly prohibited.
88

99
from .primitives import PrimitivesPack
10-
from .render_buffer import RenderBuffer
1110
from .rays import Rays
12-
from .pipeline import Pipeline
1311
from .channels import *
1412
from .channel_fn import *
1513
from .colors import *
14+
from .render_buffer import RenderBuffer

0 commit comments

Comments
 (0)