Skip to content

Commit

Permalink
Merge branch 'main' into ci
Browse files Browse the repository at this point in the history
  • Loading branch information
markkua committed Apr 15, 2024
2 parents f42b8cb + 0cb80c8 commit da565cf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/dataset/base_depth_dataset.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Author: Bingxin Ke
# Last modified: 2024-03-30
# Last modified: 2024-04-15

import io
import os
Expand Down Expand Up @@ -200,13 +200,13 @@ def _training_preprocess(self, rasters):
# Set invalid pixel to far plane
if self.move_invalid_to_far_plane:
if self.depth_transform.far_plane_at_max:
rasters["depth_filled_norm"][
~rasters["valid_mask_filled"]
] = self.depth_transform.norm_max
rasters["depth_filled_norm"][~rasters["valid_mask_filled"]] = (
self.depth_transform.norm_max
)
else:
rasters["depth_filled_norm"][
~rasters["valid_mask_filled"]
] = self.depth_transform.norm_min
rasters["depth_filled_norm"][~rasters["valid_mask_filled"]] = (
self.depth_transform.norm_min
)

# Resize
if self.resize_to_hw is not None:
Expand Down

0 comments on commit da565cf

Please sign in to comment.