Skip to content

Commit 724a6a6

Browse files
committed
disparity to depth
1 parent 11b6117 commit 724a6a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mvdatasets/loaders/dynamic/flow3d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ def load(
253253
# load npy
254254
depth_np = np.load(depth_path) # (H, W)
255255
depth_np = depth_np.astype(np.float32)
256+
# this is really a disparity map, convert to depth
257+
depth_np = 1.0 / (depth_np + 1e-6)
256258
depth_np = depth_np[..., None] # (H, W, 1)
257259
# print("depth", depth_np.shape)
258260
depths_dict[img_name] = depth_np

0 commit comments

Comments
 (0)