-2

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.

Riley K
  • 363
  • 3
  • 17

1 Answers1

1

If there is always exactly one object you can try to treat this as a regression problem and predict the parameters of the ellipse. For example: center (x, y), axis lengths and angle.

https://en.wikipedia.org/wiki/Ellipse#General_ellipse

u1234x1234
  • 2,062
  • 1
  • 1
  • 8