Loss functions that considers objects and not just tp, fp, fn

Hey guys so we have this training system going on at our pace for a while.

We have been to ruffer project now and it seams the loss fonctions we use (bce and tversky_focal_loss) doesn’t make any difference if the false positive or false negative pixels are arratched to an detected object (Tp pixel) or not (of an object further away has just been misted ! )

The thing is it does matter… maybe our crop are too big but undetected object is far worst than just undetected pixel attached to true positive pixel…

Is there any loss fonction what I could use that consider objects and not just false positive, false negative and true positive pixel ??

Thanks a lot and have a good one

Hi @Gabriel_Beaudet

Welcome to the TensorFlow Forum!

The given information is not enough. Please share minimal reproducible code to replicate and understand the issue. Thank you.