Skip to content

Commit

Permalink
easyvolcap: fix renaming utils
Browse files Browse the repository at this point in the history
  • Loading branch information
dendenxu committed Apr 5, 2024
1 parent 62c2fca commit e31d9fa
Show file tree
Hide file tree
Showing 8 changed files with 370 additions and 367 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from torch.nn import functional as F
from easyvolcap.engine import EMBEDDERS, REGRESSORS
from easyvolcap.utils.base_utils import dotdict
from easyvolcap.utils.enerf_utils import sample_feature_volume, sample_geometry_feature_image, FeatureAgg, FeatureNet
from easyvolcap.utils.ibr_utils import get_src_inps, get_src_feats, prepare_caches, compute_src_inps, compute_src_feats
from easyvolcap.utils.enerf_utils import FeatureAgg, FeatureNet
from easyvolcap.utils.ibr_utils import get_src_inps, get_src_feats, prepare_caches, compute_src_inps, compute_src_feats, sample_feature_volume, sample_geometry_feature_image
from easyvolcap.utils.image_utils import interpolate_image, pad_image
from easyvolcap.utils.data_utils import to_x

Expand Down
3 changes: 2 additions & 1 deletion easyvolcap/models/networks/embedders/image_based_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from easyvolcap.utils.base_utils import dotdict
from easyvolcap.utils.data_utils import to_x
from easyvolcap.utils.chunk_utils import chunkify
from easyvolcap.utils.enerf_utils import sample_feature_volume, sample_feature_image, FeatureAgg
from easyvolcap.utils.ibr_utils import sample_feature_volume, sample_feature_image
from easyvolcap.utils.enerf_utils import FeatureAgg


@EMBEDDERS.register_module()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from easyvolcap.engine import REGRESSORS
from easyvolcap.utils.sh_utils import eval_sh
from easyvolcap.utils.base_utils import dotdict
from easyvolcap.utils.enerf_utils import sample_feature_volume, sample_feature_image, FeatureAgg, FeatureNet
from easyvolcap.models.networks.regressors.mlp_regressor import MlpRegressor


Expand Down
8 changes: 4 additions & 4 deletions easyvolcap/models/samplers/cost_volume_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
from easyvolcap.utils.timer_utils import timer # global timer
from easyvolcap.utils.base_utils import dotdict
from easyvolcap.utils.data_utils import to_x
from easyvolcap.utils.ibr_utils import get_src_inps, get_src_feats, prepare_caches, compute_src_inps, compute_src_feats
from easyvolcap.utils.nerf_utils import linear_sampling, ray2xyz, volume_rendering
from easyvolcap.utils.prop_utils import s_vals_to_z_vals, z_vals_to_s_vals
from easyvolcap.utils.image_utils import interpolate_image, pad_image
from easyvolcap.utils.enerf_utils import MinCostRegNet, CostRegNet, FeatureNet, get_proj_mats, build_cost_vol, depth_regression, render_debug_cost_volume
from easyvolcap.utils.prop_utils import s_vals_to_z_vals, z_vals_to_s_vals
from easyvolcap.utils.nerf_utils import linear_sampling, ray2xyz, volume_rendering
from easyvolcap.utils.ibr_utils import get_src_inps, get_src_feats, prepare_caches, compute_src_inps, compute_src_feats, get_proj_mats, build_cost_vol, depth_regression, render_debug_cost_volume
from easyvolcap.utils.enerf_utils import MinCostRegNet, CostRegNet, FeatureNet

# ? How do we share 2D convolutions between multiple levels?
# We use a single level network for this, allow more customization since cas_enerf isn't multiple NeRFs stacked together -> instead they are highly intertwined
Expand Down
2 changes: 1 addition & 1 deletion easyvolcap/utils/depth_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from easyvolcap.utils.console_utils import *
from easyvolcap.utils.color_utils import colormap
from easyvolcap.utils.ray_utils import create_meshgrid
from easyvolcap.utils.enerf_utils import depth_regression
from easyvolcap.utils.ibr_utils import depth_regression
from easyvolcap.utils.math_utils import affine_inverse, torch_inverse_3x3


Expand Down
355 changes: 1 addition & 354 deletions easyvolcap/utils/enerf_utils.py

Large diffs are not rendered by default.

358 changes: 357 additions & 1 deletion easyvolcap/utils/ibr_utils.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions scripts/points/ibr_colorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
For every point, then find the closest ranking view, and use that view's color
This way we can deal with non-uniform camera distribution
"""

import torch
import torch.nn.functional as F
from easyvolcap.utils.console_utils import *
from easyvolcap.utils.viewer_utils import Camera
from easyvolcap.utils.net_utils import load_pretrained
from easyvolcap.utils.parallel_utils import parallel_execution
from easyvolcap.utils.easy_utils import read_camera, write_camera
from easyvolcap.utils.chunk_utils import multi_gather, multi_scatter
from easyvolcap.utils.data_utils import load_pts, export_pts, to_cuda, to_cpu, to_tensor, load_image
from easyvolcap.utils.enerf_utils import sample_geometry_feature_image
from easyvolcap.utils.data_utils import load_pts, export_pts, to_cuda, load_image
from easyvolcap.utils.ibr_utils import sample_geometry_feature_image


@catch_throw
Expand Down

0 comments on commit e31d9fa

Please sign in to comment.