diff --git a/app.py b/app.py index e0c327f..2785379 100644 --- a/app.py +++ b/app.py @@ -19,9 +19,9 @@ from aiortc import RTCPeerConnection, RTCSessionDescription from webrtc import HumanPlayer import argparse -from nerf_triplane.provider import NeRFDataset_Test -from nerf_triplane.utils import * -from nerf_triplane.network import NeRFNetwork +from ernerf.nerf_triplane.provider import NeRFDataset_Test +from ernerf.nerf_triplane.utils import * +from ernerf.nerf_triplane.network import NeRFNetwork from nerfreal import NeRFReal import shutil diff --git a/data_utils/deepspeech_features/README.md b/ernerf/data_utils/deepspeech_features/README.md similarity index 100% rename from data_utils/deepspeech_features/README.md rename to ernerf/data_utils/deepspeech_features/README.md diff --git a/data_utils/deepspeech_features/deepspeech_features.py b/ernerf/data_utils/deepspeech_features/deepspeech_features.py similarity index 100% rename from data_utils/deepspeech_features/deepspeech_features.py rename to ernerf/data_utils/deepspeech_features/deepspeech_features.py diff --git a/data_utils/deepspeech_features/deepspeech_store.py b/ernerf/data_utils/deepspeech_features/deepspeech_store.py similarity index 100% rename from data_utils/deepspeech_features/deepspeech_store.py rename to ernerf/data_utils/deepspeech_features/deepspeech_store.py diff --git a/data_utils/deepspeech_features/extract_ds_features.py b/ernerf/data_utils/deepspeech_features/extract_ds_features.py similarity index 100% rename from data_utils/deepspeech_features/extract_ds_features.py rename to ernerf/data_utils/deepspeech_features/extract_ds_features.py diff --git a/data_utils/deepspeech_features/extract_wav.py b/ernerf/data_utils/deepspeech_features/extract_wav.py similarity index 100% rename from data_utils/deepspeech_features/extract_wav.py rename to ernerf/data_utils/deepspeech_features/extract_wav.py diff --git a/data_utils/deepspeech_features/fea_win.py b/ernerf/data_utils/deepspeech_features/fea_win.py similarity index 100% rename from data_utils/deepspeech_features/fea_win.py rename to ernerf/data_utils/deepspeech_features/fea_win.py diff --git a/data_utils/face_parsing/logger.py b/ernerf/data_utils/face_parsing/logger.py similarity index 100% rename from data_utils/face_parsing/logger.py rename to ernerf/data_utils/face_parsing/logger.py diff --git a/data_utils/face_parsing/model.py b/ernerf/data_utils/face_parsing/model.py similarity index 100% rename from data_utils/face_parsing/model.py rename to ernerf/data_utils/face_parsing/model.py diff --git a/data_utils/face_parsing/resnet.py b/ernerf/data_utils/face_parsing/resnet.py similarity index 100% rename from data_utils/face_parsing/resnet.py rename to ernerf/data_utils/face_parsing/resnet.py diff --git a/data_utils/face_parsing/test.py b/ernerf/data_utils/face_parsing/test.py similarity index 100% rename from data_utils/face_parsing/test.py rename to ernerf/data_utils/face_parsing/test.py diff --git a/data_utils/face_tracking/__init__.py b/ernerf/data_utils/face_tracking/__init__.py similarity index 100% rename from data_utils/face_tracking/__init__.py rename to ernerf/data_utils/face_tracking/__init__.py diff --git a/data_utils/face_tracking/convert_BFM.py b/ernerf/data_utils/face_tracking/convert_BFM.py similarity index 100% rename from data_utils/face_tracking/convert_BFM.py rename to ernerf/data_utils/face_tracking/convert_BFM.py diff --git a/data_utils/face_tracking/data_loader.py b/ernerf/data_utils/face_tracking/data_loader.py similarity index 100% rename from data_utils/face_tracking/data_loader.py rename to ernerf/data_utils/face_tracking/data_loader.py diff --git a/data_utils/face_tracking/face_tracker.py b/ernerf/data_utils/face_tracking/face_tracker.py similarity index 100% rename from data_utils/face_tracking/face_tracker.py rename to ernerf/data_utils/face_tracking/face_tracker.py diff --git a/data_utils/face_tracking/facemodel.py b/ernerf/data_utils/face_tracking/facemodel.py similarity index 100% rename from data_utils/face_tracking/facemodel.py rename to ernerf/data_utils/face_tracking/facemodel.py diff --git a/data_utils/face_tracking/geo_transform.py b/ernerf/data_utils/face_tracking/geo_transform.py similarity index 100% rename from data_utils/face_tracking/geo_transform.py rename to ernerf/data_utils/face_tracking/geo_transform.py diff --git a/data_utils/face_tracking/render_3dmm.py b/ernerf/data_utils/face_tracking/render_3dmm.py similarity index 100% rename from data_utils/face_tracking/render_3dmm.py rename to ernerf/data_utils/face_tracking/render_3dmm.py diff --git a/data_utils/face_tracking/render_land.py b/ernerf/data_utils/face_tracking/render_land.py similarity index 100% rename from data_utils/face_tracking/render_land.py rename to ernerf/data_utils/face_tracking/render_land.py diff --git a/data_utils/face_tracking/util.py b/ernerf/data_utils/face_tracking/util.py similarity index 100% rename from data_utils/face_tracking/util.py rename to ernerf/data_utils/face_tracking/util.py diff --git a/data_utils/process.py b/ernerf/data_utils/process.py similarity index 100% rename from data_utils/process.py rename to ernerf/data_utils/process.py diff --git a/encoding.py b/ernerf/encoding.py similarity index 85% rename from encoding.py rename to ernerf/encoding.py index d08795c..1059c28 100644 --- a/encoding.py +++ b/ernerf/encoding.py @@ -13,23 +13,23 @@ def get_encoder(encoding, input_dim=3, return lambda x, **kwargs: x, input_dim elif encoding == 'frequency': - from freqencoder import FreqEncoder + from .freqencoder import FreqEncoder encoder = FreqEncoder(input_dim=input_dim, degree=multires) elif encoding == 'spherical_harmonics': - from shencoder import SHEncoder + from .shencoder import SHEncoder encoder = SHEncoder(input_dim=input_dim, degree=degree) elif encoding == 'hashgrid': - from gridencoder import GridEncoder + from .gridencoder import GridEncoder encoder = GridEncoder(input_dim=input_dim, num_levels=num_levels, level_dim=level_dim, base_resolution=base_resolution, log2_hashmap_size=log2_hashmap_size, desired_resolution=desired_resolution, gridtype='hash', align_corners=align_corners) elif encoding == 'tiledgrid': - from gridencoder import GridEncoder + from .gridencoder import GridEncoder encoder = GridEncoder(input_dim=input_dim, num_levels=num_levels, level_dim=level_dim, base_resolution=base_resolution, log2_hashmap_size=log2_hashmap_size, desired_resolution=desired_resolution, gridtype='tiled', align_corners=align_corners) elif encoding == 'ash': - from ashencoder import AshEncoder + from .ashencoder import AshEncoder encoder = AshEncoder(input_dim=input_dim, output_dim=16, log2_hashmap_size=log2_hashmap_size, resolution=desired_resolution) else: diff --git a/freqencoder/__init__.py b/ernerf/freqencoder/__init__.py similarity index 100% rename from freqencoder/__init__.py rename to ernerf/freqencoder/__init__.py diff --git a/freqencoder/backend.py b/ernerf/freqencoder/backend.py similarity index 100% rename from freqencoder/backend.py rename to ernerf/freqencoder/backend.py diff --git a/freqencoder/freq.py b/ernerf/freqencoder/freq.py similarity index 100% rename from freqencoder/freq.py rename to ernerf/freqencoder/freq.py diff --git a/freqencoder/setup.py b/ernerf/freqencoder/setup.py similarity index 100% rename from freqencoder/setup.py rename to ernerf/freqencoder/setup.py diff --git a/freqencoder/src/bindings.cpp b/ernerf/freqencoder/src/bindings.cpp similarity index 100% rename from freqencoder/src/bindings.cpp rename to ernerf/freqencoder/src/bindings.cpp diff --git a/freqencoder/src/freqencoder.cu b/ernerf/freqencoder/src/freqencoder.cu similarity index 100% rename from freqencoder/src/freqencoder.cu rename to ernerf/freqencoder/src/freqencoder.cu diff --git a/freqencoder/src/freqencoder.h b/ernerf/freqencoder/src/freqencoder.h similarity index 100% rename from freqencoder/src/freqencoder.h rename to ernerf/freqencoder/src/freqencoder.h diff --git a/gridencoder/__init__.py b/ernerf/gridencoder/__init__.py similarity index 100% rename from gridencoder/__init__.py rename to ernerf/gridencoder/__init__.py diff --git a/gridencoder/backend.py b/ernerf/gridencoder/backend.py similarity index 100% rename from gridencoder/backend.py rename to ernerf/gridencoder/backend.py diff --git a/gridencoder/grid.py b/ernerf/gridencoder/grid.py similarity index 100% rename from gridencoder/grid.py rename to ernerf/gridencoder/grid.py diff --git a/gridencoder/setup.py b/ernerf/gridencoder/setup.py similarity index 100% rename from gridencoder/setup.py rename to ernerf/gridencoder/setup.py diff --git a/gridencoder/src/bindings.cpp b/ernerf/gridencoder/src/bindings.cpp similarity index 100% rename from gridencoder/src/bindings.cpp rename to ernerf/gridencoder/src/bindings.cpp diff --git a/gridencoder/src/gridencoder.cu b/ernerf/gridencoder/src/gridencoder.cu similarity index 100% rename from gridencoder/src/gridencoder.cu rename to ernerf/gridencoder/src/gridencoder.cu diff --git a/gridencoder/src/gridencoder.h b/ernerf/gridencoder/src/gridencoder.h similarity index 100% rename from gridencoder/src/gridencoder.h rename to ernerf/gridencoder/src/gridencoder.h diff --git a/main.py b/ernerf/main.py similarity index 98% rename from main.py rename to ernerf/main.py index cc8a0b5..a2ad228 100644 --- a/main.py +++ b/ernerf/main.py @@ -1,9 +1,9 @@ import torch import argparse -from nerf_triplane.provider import NeRFDataset,NeRFDataset_Test -from nerf_triplane.utils import * -from nerf_triplane.network import NeRFNetwork +from .nerf_triplane.provider import NeRFDataset,NeRFDataset_Test +from .nerf_triplane.utils import * +from .nerf_triplane.network import NeRFNetwork # torch.autograd.set_detect_anomaly(True) # Close tf32 features. Fix low numerical accuracy on rtx30xx gpu. diff --git a/nerf_triplane/asr.py b/ernerf/nerf_triplane/asr.py similarity index 100% rename from nerf_triplane/asr.py rename to ernerf/nerf_triplane/asr.py diff --git a/nerf_triplane/gui.py b/ernerf/nerf_triplane/gui.py similarity index 100% rename from nerf_triplane/gui.py rename to ernerf/nerf_triplane/gui.py diff --git a/nerf_triplane/network.py b/ernerf/nerf_triplane/network.py similarity index 99% rename from nerf_triplane/network.py rename to ernerf/nerf_triplane/network.py index 0eb3f24..20cae92 100644 --- a/nerf_triplane/network.py +++ b/ernerf/nerf_triplane/network.py @@ -2,7 +2,7 @@ import torch import torch.nn as nn import torch.nn.functional as F -from encoding import get_encoder +from ..encoding import get_encoder from .renderer import NeRFRenderer # Audio feature extractor diff --git a/nerf_triplane/provider.py b/ernerf/nerf_triplane/provider.py similarity index 100% rename from nerf_triplane/provider.py rename to ernerf/nerf_triplane/provider.py diff --git a/nerf_triplane/renderer.py b/ernerf/nerf_triplane/renderer.py similarity index 99% rename from nerf_triplane/renderer.py rename to ernerf/nerf_triplane/renderer.py index 925ec53..00e28fe 100644 --- a/nerf_triplane/renderer.py +++ b/ernerf/nerf_triplane/renderer.py @@ -7,7 +7,7 @@ import torch import torch.nn as nn import torch.nn.functional as F -import raymarching +from .. import raymarching from .utils import custom_meshgrid, get_audio_features, euler_angles_to_matrix, convert_poses def sample_pdf(bins, weights, n_samples, det=False): diff --git a/nerf_triplane/utils.py b/ernerf/nerf_triplane/utils.py similarity index 100% rename from nerf_triplane/utils.py rename to ernerf/nerf_triplane/utils.py diff --git a/raymarching/__init__.py b/ernerf/raymarching/__init__.py similarity index 100% rename from raymarching/__init__.py rename to ernerf/raymarching/__init__.py diff --git a/raymarching/backend.py b/ernerf/raymarching/backend.py similarity index 100% rename from raymarching/backend.py rename to ernerf/raymarching/backend.py diff --git a/raymarching/raymarching.py b/ernerf/raymarching/raymarching.py similarity index 100% rename from raymarching/raymarching.py rename to ernerf/raymarching/raymarching.py diff --git a/raymarching/setup.py b/ernerf/raymarching/setup.py similarity index 100% rename from raymarching/setup.py rename to ernerf/raymarching/setup.py diff --git a/raymarching/src/bindings.cpp b/ernerf/raymarching/src/bindings.cpp similarity index 100% rename from raymarching/src/bindings.cpp rename to ernerf/raymarching/src/bindings.cpp diff --git a/raymarching/src/raymarching.cu b/ernerf/raymarching/src/raymarching.cu similarity index 100% rename from raymarching/src/raymarching.cu rename to ernerf/raymarching/src/raymarching.cu diff --git a/raymarching/src/raymarching.h b/ernerf/raymarching/src/raymarching.h similarity index 100% rename from raymarching/src/raymarching.h rename to ernerf/raymarching/src/raymarching.h diff --git a/scripts/train_obama.sh b/ernerf/scripts/train_obama.sh similarity index 100% rename from scripts/train_obama.sh rename to ernerf/scripts/train_obama.sh diff --git a/shencoder/__init__.py b/ernerf/shencoder/__init__.py similarity index 100% rename from shencoder/__init__.py rename to ernerf/shencoder/__init__.py diff --git a/shencoder/backend.py b/ernerf/shencoder/backend.py similarity index 100% rename from shencoder/backend.py rename to ernerf/shencoder/backend.py diff --git a/shencoder/setup.py b/ernerf/shencoder/setup.py similarity index 100% rename from shencoder/setup.py rename to ernerf/shencoder/setup.py diff --git a/shencoder/sphere_harmonics.py b/ernerf/shencoder/sphere_harmonics.py similarity index 100% rename from shencoder/sphere_harmonics.py rename to ernerf/shencoder/sphere_harmonics.py diff --git a/shencoder/src/bindings.cpp b/ernerf/shencoder/src/bindings.cpp similarity index 100% rename from shencoder/src/bindings.cpp rename to ernerf/shencoder/src/bindings.cpp diff --git a/shencoder/src/shencoder.cu b/ernerf/shencoder/src/shencoder.cu similarity index 100% rename from shencoder/src/shencoder.cu rename to ernerf/shencoder/src/shencoder.cu diff --git a/shencoder/src/shencoder.h b/ernerf/shencoder/src/shencoder.h similarity index 100% rename from shencoder/src/shencoder.h rename to ernerf/shencoder/src/shencoder.h diff --git a/ernerf/workspace/log_ngp.txt b/ernerf/workspace/log_ngp.txt new file mode 100644 index 0000000..55aa2c5 --- /dev/null +++ b/ernerf/workspace/log_ngp.txt @@ -0,0 +1,14 @@ +[INFO] Trainer: ngp | 2023-09-23_17-52-22 | cuda | fp16 | workspace +[INFO] #parameters: 1789121 +[INFO] Loading data/pretrained/ngp_kf.pth ... +[INFO] Trainer: ngp | 2023-09-23_18-58-25 | cuda | fp16 | workspace +[INFO] #parameters: 1789121 +[INFO] Loading data/pretrained/ngp_kf.pth ... +[INFO] Trainer: ngp | 2023-09-23_19-01-54 | cuda | fp16 | workspace +[INFO] #parameters: 1787681 +[INFO] Loading data/pretrained/ngp_kf.pth ... +[INFO] loaded model. +[INFO] load at epoch 14, global step 51226 +[WARN] Failed to load optimizer. +[INFO] loaded scheduler. +[INFO] loaded scaler.