def edge_aware_loss_v2(rgb, disp,skymask=None):
"""Computes the smoothness loss for a disparity image
The color image is used for edge-aware smoothness
"""
mean_disp = disp.mean(1, True).mean(2, True)#行&列的均值
disp = disp / (mean_disp + 1e-7)#归一化处理
grad_disp_x = torch.abs(disp[:
【code|loss edge-aware smoothness loss】
最新推荐文章于 2024-06-28 20:51:20 发布