MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / rgb_loss

Function rgb_loss

script/dm/direct_pose_model.py:75–85  ·  view source on GitHub ↗

Compute RGB MSE Loss, original from NeRF Paper

(rgb, target, extras)

Source from the content-addressed store, hash-verified

73 return pose
74
75def rgb_loss(rgb, target, extras):
76 ''' Compute RGB MSE Loss, original from NeRF Paper '''
77 # Compute MSE loss between predicted and true RGB.
78 img_loss = img2mse(rgb, target)
79 loss = img_loss
80
81 # Add MSE loss for coarse-grained model
82 if 'rgb0' in extras:
83 img_loss0 = img2mse(extras['rgb0'], target)
84 loss += img_loss0
85 return loss
86
87def PoseLoss(args, pose_, pose, device):
88 loss_func = nn.MSELoss()

Callers 1

train_on_batchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected