alexklwong / calibrated-backprojection-network

PyTorch Implementation of Unsupervised Depth Completion with Calibrated Backprojection Layers (ORAL, ICCV 2021)
Other
117 stars 24 forks source link

How are the gradients for the image information loss computed for backprop? #23

Open rakshith95 opened 1 year ago

rakshith95 commented 1 year ago

Hello, I was wondering how the gradients for the loss function of , say color consistency loss, are computed wrt the weights by backprop.

You have your depth d at a coordinate which is a function of your weights, say X at a pixel location i, i.e. d(X,i) . From this depth, you get your warped image coordinate, say W(d). For the color consistency, you compare the pixel values of the source image, and warped image, which would be some difference between img(i) and img(W(d(X,i) ) .

Numerically, I can see how you can obtain the derivative of this function wrt the weights, but how does auto-differentiation do it analytically, since img(i) cannot really be stated analytically?