Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Update test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Xt-Chen authored Jun 29, 2021
1 parent d54b671 commit aebc931
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def kitti_metrics_preprocess(pred, gt):
crop_mask = np.zeros(mask.shape)
crop_mask[crop[0]:crop[1],crop[2]:crop[3]] = 1
mask = np.logical_and(mask, crop_mask)
scalor = np.median(gt[mask])/np.median(pred[mask])
pred[mask] *= scalor
scalar = np.median(gt[mask])/np.median(pred[mask])
pred[mask] *= scalar

return pred[mask], gt[mask]

Expand Down Expand Up @@ -179,8 +179,8 @@ def nyu_metrics_preprocess(pred, gt):

mask = np.logical_and(gt > min_depth, gt < max_depth)

scalor = np.median(gt[mask])/np.median(pred[mask])
pred[mask] *= scalor
scalar = np.median(gt[mask])/np.median(pred[mask])
pred[mask] *= scalar
# gtiheight, gt_width = gt.shape

#print("gt2:", gt[mask])
Expand Down

0 comments on commit aebc931

Please sign in to comment.