(prediction, target, mask, Bs)
| 545 | return target, t_2, t_98 |
| 546 | |
| 547 | def video_loss(prediction, target, mask, Bs): |
| 548 | # median norm |
| 549 | prediction_nm, a_norm, b_norm = normalize_video_robust(prediction, mask, Bs) |
| 550 | target_nm, a_norm_gt, b_norm_gt = normalize_video_robust(target.float(), mask, Bs) |
| 551 | depth_loss = nn.functional.l1_loss(prediction_nm[mask], target_nm[mask]) |
| 552 | # rel depth 2 metric --> (pred - a')/(b'-a')*(b-a) + a |
| 553 | scale = (b_norm_gt - a_norm_gt) / (b_norm - a_norm) |
| 554 | shift = a_norm_gt - a_norm*scale |
| 555 | return depth_loss, scale, shift, prediction_nm, target_nm |
| 556 | |
| 557 | def median_loss(prediction, target, mask, Bs): |
| 558 | # median norm |
nothing calls this directly
no test coverage detected