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
In my loss implementation, I use the ROIs to precisely backpropagate loss contributions from only those pixel regions in the H&E images over which there is an ROI defined containing our classes of interest.
A generic representation of my loss looks like this:
if batch["roi"] is not None:
batch_loss = loss_fn(rois*preds, rois*targets)
else:
batch_loss = loss_fn(preds, targets)
If the training batch doesn't contain roi (meaning, there are no ground truth labels), then the loss function should not consume rois.
But right now, the dlup transform always outputs an empty roi (filled with zeros) even though there is no mask corresponding to any label in a particular tile.
So, the loss curve looks like this:
Meaning, the loss computation happens only when there is a tile with a label and all other time, my model outputs become zero because they get multiplied by the "roi" every time even though there is no ROI.
I handle this within my own codebase. Although, it would be nice if the transform returned an ROI array only if there is a corresponding label within it else, it should return None.
The text was updated successfully, but these errors were encountered:
In my loss implementation, I use the ROIs to precisely backpropagate loss contributions from only those pixel regions in the H&E images over which there is an ROI defined containing our classes of interest.
A generic representation of my loss looks like this:
If the training batch doesn't contain
roi
(meaning, there are no ground truth labels), then the loss function should not consume rois.But right now, the dlup transform always outputs an empty roi (filled with zeros) even though there is no mask corresponding to any label in a particular tile.
So, the loss curve looks like this:
Meaning, the loss computation happens only when there is a tile with a label and all other time, my model outputs become zero because they get multiplied by the "roi" every time even though there is no ROI.
I handle this within my own codebase. Although, it would be nice if the transform returned an ROI array only if there is a corresponding label within it else, it should return
None
.The text was updated successfully, but these errors were encountered: