diff --git a/argoverse/evaluation/stereo/utils.py b/argoverse/evaluation/stereo/utils.py index b58e0acc..b6d1b39d 100644 --- a/argoverse/evaluation/stereo/utils.py +++ b/argoverse/evaluation/stereo/utils.py @@ -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 @@ -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):