We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,这是一份很好的工作,我想问下,在这里面的输出是depth还是disparity raw_img = cv2.imread('your/image/path') depth = model.infer_image(raw_img) # HxW raw depth map in numpy, 如果是深度,我直接通过这种方式对齐真实尺度和shift可以么 def align_scale_shift_numpy(pred: np.array, target: np.array): mask = target > 0 target_mask = target[mask] pred_mask = pred[mask] if np.sum(mask) > 10: scale, shift = np.polyfit(pred_mask, target_mask, deg=1) if scale < 0: scale = np.median(target[mask]) / (np.median(pred[mask]) + 1e-8) shift = 0 else: scale = 1 shift = 0 pred = pred * scale + shift
return pred, scale
The text was updated successfully, but these errors were encountered:
你好,这里输出的是disparity
Sorry, something went wrong.
No branches or pull requests
您好,这是一份很好的工作,我想问下,在这里面的输出是depth还是disparity
raw_img = cv2.imread('your/image/path')
depth = model.infer_image(raw_img) # HxW raw depth map in numpy,
如果是深度,我直接通过这种方式对齐真实尺度和shift可以么
def align_scale_shift_numpy(pred: np.array, target: np.array):
mask = target > 0
target_mask = target[mask]
pred_mask = pred[mask]
if np.sum(mask) > 10:
scale, shift = np.polyfit(pred_mask, target_mask, deg=1)
if scale < 0:
scale = np.median(target[mask]) / (np.median(pred[mask]) + 1e-8)
shift = 0
else:
scale = 1
shift = 0
pred = pred * scale + shift
The text was updated successfully, but these errors were encountered: