You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use mmdetection models to optimize (learn) the pixel values for an image. This means I'd like to keep the weights of the detection model fixed and take the gradient of the loss with respect to the input image pixels. Is there a way that I can get the gradient of a loss function with respect to the input image pixel values using mmdetection models?
I know how to do this via pytorch because one can use a tensor throughout and simply ensure requires_grad=True on the input image tensor. After finding the loss, one can then call loss.backward() and then the input image tensor will have it's grad attribute populated. However, because mmdetection models take ndarrays as input and output, I'm unsure how to do this with mmdetection models. Any help is appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd like to use mmdetection models to optimize (learn) the pixel values for an image. This means I'd like to keep the weights of the detection model fixed and take the gradient of the loss with respect to the input image pixels. Is there a way that I can get the gradient of a loss function with respect to the input image pixel values using mmdetection models?
I know how to do this via pytorch because one can use a tensor throughout and simply ensure
requires_grad=True
on the input image tensor. After finding the loss, one can then callloss.backward()
and then the input image tensor will have it'sgrad
attribute populated. However, because mmdetection models take ndarrays as input and output, I'm unsure how to do this with mmdetection models. Any help is appreciated!Beta Was this translation helpful? Give feedback.
All reactions