I’m trying to replicate a paper that outputs a mask for an image (similar to the carvana challenge).
Part of the loss requires applying the predicted mask to the input image (ie, we’re not just comparing the ground-truth mask to the predicted mask, we actually want the apply them to the original image).
I’m stumped at how to access the original image when computing the loss function during training. I’ve tried hacking it by concatenating the original image to the ground truth masks and letting them get carried all the way through, but this seems like extreme overkill and requires a lot more memory.
Is there a convenient way to do this?