Skip to content

Commit 29a09ae

Browse files
committed
fix issues/15, issue/7
1 parent 7f0e9df commit 29a09ae

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

code/dataset/dtu_train.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ def __getitem__(self, idx):
260260
near_fars.append(self.all_near_fars[index_mat])
261261
intrinsics.append(self.all_intrinsics[index_mat])
262262

263-
w2cs.append(self.all_extrinsics[index_mat])
263+
# issue/7
264+
w2cs.append(self.all_extrinsics[index_mat] @ w2c_ref_inv)
264265

265266
if os.path.exists(depth_filename): # and i == 0
266267
depth_h = self.read_depth(depth_filename)

code/utils/renderer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import torch
2+
import torch.nn.functional as F
23

34
class VolumeRenderer():
45
def __init__(self, args=None):
@@ -26,7 +27,10 @@ def render(self, z_val, radiance, geo_value, cos_anneal_ratio=1.0, deviation_net
2627
inv_s = inv_s0.expand(batch_size, n_samples)
2728

2829
true_cos = -1.0
29-
iter_cos = -(-true_cos * 0.5 + 0.5 * (1.0 - cos_anneal_ratio) -true_cos * cos_anneal_ratio)
30+
31+
# FIX: https://github.com/IVRL/VolRecon/issues/15
32+
iter_cos = -(F.relu(-true_cos * 0.5 + 0.5) * (1.0 - cos_anneal_ratio) + F.relu(-true_cos) * cos_anneal_ratio)
33+
# iter_cos = -(-true_cos * 0.5 + 0.5 * (1.0 - cos_anneal_ratio) -true_cos * cos_anneal_ratio)
3034

3135
estimated_next_srdf = srdf + iter_cos * interval * 0.5
3236
estimated_prev_srdf = srdf - iter_cos * interval * 0.5

0 commit comments

Comments
 (0)