In my use case, the number of the objects is always one and the object is always ellipse-shaped. When training, I notice that the segmentation model occasionally predicts multiple objects (noise are other).
Is there any way to formulate a Keras loss function to reward predictions close to the perceived center of mass of the ellipse and penalize predictions far from the center while keeping an ellipse-like shape?
How can a loss function be implemented to handle such restrictions? I know there are loss functions like the wasserstein loss for multiple objects the penalize when the known object hierarchy is not met.