fix bug v0.6
This commit is contained in:
parent
5e3c3672b6
commit
8b5fff517d
|
@ -407,7 +407,8 @@ class EPPMVSNetP1(nn.Cell):
|
||||||
depth_num=self.n_depths[0],
|
depth_num=self.n_depths[0],
|
||||||
depth_start_override=depth_start,
|
depth_start_override=depth_start,
|
||||||
depth_interval_override=depth_interval *
|
depth_interval_override=depth_interval *
|
||||||
self.interval_ratios[0])
|
self.interval_ratios[
|
||||||
|
0])
|
||||||
|
|
||||||
_, src_feats, proj_mats = [ref_feat_1, srcs_feat_1, proj_mats[:, :, 2]]
|
_, src_feats, proj_mats = [ref_feat_1, srcs_feat_1, proj_mats[:, :, 2]]
|
||||||
pixel_distances = []
|
pixel_distances = []
|
||||||
|
@ -445,16 +446,14 @@ class EPPMVSNetP3(nn.Cell):
|
||||||
|
|
||||||
ref_feat_1, srcs_feat_1 = feat_pack_1[:, 0], feat_pack_1[:, 1:]
|
ref_feat_1, srcs_feat_1 = feat_pack_1[:, 0], feat_pack_1[:, 1:]
|
||||||
if self.entropy_range:
|
if self.entropy_range:
|
||||||
est_depth_1, _, pair_results_1, conf_range_1 = self.stage1_p3(cost_volume_list_stage1,
|
est_depth_1, _, pair_results_1, conf_range_1 = self.stage1_p3(cost_volume_list_stage1, depth_values_stage1,
|
||||||
depth_values_stage1, [ref_feat_1, srcs_feat_1,
|
[ref_feat_1, srcs_feat_1, proj_mats[:, :, 2]],
|
||||||
proj_mats[:, :, 2]],
|
self.n_depths[0])
|
||||||
self.n_depths[0])
|
|
||||||
stage2_conf_interval = self.shrink_ratio * conf_range_1 / self.n_depths[0] * (
|
stage2_conf_interval = self.shrink_ratio * conf_range_1 / self.n_depths[0] * (
|
||||||
depth_interval * self.interval_ratios[0] * self.n_depths[0]) / self.n_depths[1]
|
depth_interval * self.interval_ratios[0] * self.n_depths[0]) / self.n_depths[1]
|
||||||
else:
|
else:
|
||||||
est_depth_1, _, pair_results_1 = self.stage1_p3(cost_volume_list_stage1,
|
est_depth_1, _, pair_results_1 = self.stage1_p3(cost_volume_list_stage1, depth_values_stage1,
|
||||||
depth_values_stage1, [ref_feat_1, srcs_feat_1,
|
[ref_feat_1, srcs_feat_1, proj_mats[:, :, 2]],
|
||||||
proj_mats[:, :, 2]],
|
|
||||||
self.n_depths[0])
|
self.n_depths[0])
|
||||||
stage2_conf_interval = None
|
stage2_conf_interval = None
|
||||||
uncertainty_maps_1, uncertainty_maps_2 = [], []
|
uncertainty_maps_1, uncertainty_maps_2 = [], []
|
||||||
|
@ -473,7 +472,7 @@ class EPPMVSNetP3(nn.Cell):
|
||||||
depth_interval_override=stage2_conf_interval,
|
depth_interval_override=stage2_conf_interval,
|
||||||
uncertainty_maps=uncertainty_maps_2)
|
uncertainty_maps=uncertainty_maps_2)
|
||||||
stage3_conf_interval = self.shrink_ratio * conf_range_2 / self.n_depths[1] * (
|
stage3_conf_interval = self.shrink_ratio * conf_range_2 / self.n_depths[1] * (
|
||||||
stage2_conf_interval * self.n_depths[1]) / self.n_depths[2]
|
stage2_conf_interval * self.n_depths[1]) / self.n_depths[2]
|
||||||
else:
|
else:
|
||||||
est_depth_2, _, _ = self.stage2([ref_feat_2, srcs_feat_2, proj_mats[:, :, 1]],
|
est_depth_2, _, _ = self.stage2([ref_feat_2, srcs_feat_2, proj_mats[:, :, 1]],
|
||||||
depth_num=self.n_depths[1], depth_start_override=depth_start_2,
|
depth_num=self.n_depths[1], depth_start_override=depth_start_2,
|
||||||
|
@ -498,7 +497,7 @@ class EPPMVSNetP3(nn.Cell):
|
||||||
depth_num=self.n_depths[2],
|
depth_num=self.n_depths[2],
|
||||||
depth_start_override=depth_start_3,
|
depth_start_override=depth_start_3,
|
||||||
depth_interval_override=depth_interval *
|
depth_interval_override=depth_interval *
|
||||||
self.interval_ratios[2],
|
self.interval_ratios[2],
|
||||||
uncertainty_maps=uncertainty_maps_3)
|
uncertainty_maps=uncertainty_maps_3)
|
||||||
refined_depth = est_depth_3
|
refined_depth = est_depth_3
|
||||||
return refined_depth, prob_map_3
|
return refined_depth, prob_map_3
|
||||||
|
|
Loading…
Reference in New Issue