Skip to content

Commit

Permalink
Organize disparity interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonykaesemodel committed Jul 25, 2021
1 parent c27dab0 commit cb91f13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion argoverse/evaluation/stereo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def compute_disparity_error(
density = num_pixels_all_est / num_pixels_all

if density < 1.0:
pred_disparity[pred_disparity == 0] = -1 # Set invalid disparities to -1
pred_disparity = interpolate_disparity(pred_disparity)

# Compute errors
Expand Down Expand Up @@ -149,6 +148,8 @@ def interpolate_disparity(disparity: np.ndarray) -> np.ndarray:
"""
height, width = disparity.shape

disparity = np.where(disparity == 0, -1, disparity) # Set invalid disparities to -1

for v in range(height):
count = 0
for u in range(width):
Expand Down

0 comments on commit cb91f13

Please sign in to comment.