Hello, I'm doing the final thesis of my bachelor's degree about object detection and I'm trying to apply your method to get a mask instead of the bounding boxes.
I've been extracting the key parts of your code (bounds and losses) to adapt it to my code but there is something I don't understand.
When applying the LogBarrierLoss, the bounds are given by parameter, as they are calculated when loading the data from the dataloader for the whole image (the positive area for the whole image times the margins).
However, the inference is done for each slice of the image (I guess it's because of memory issues, otherwise I'd appreciate to know why). When applying this loss to the prediction, the predicted mask for that slice is compared with the bounds of the full image from what I understand, instead of the bounds for that slice.
|
losses = [w * loss_fn(pred_probs, label[label_sampling], bound, box_priors) for loss_fn, label, w, bound in ziped] |
What am I missing?
Thanks in advance and great job! It's being very helpful.