0

I am using a CNN model to detect the location of a tennis ball's center (not bounding box). the output is a 2d tensor after a softmax layer so each cell represent the probebility that this is where the ball center is found.

I am trying to figure out what is the best way to calculate the loss. I tried several methods, the first is comparing it to a tensor that equel 1 in the real location and 0 anywhere else. the problem here is that if the model predict the ball location is one cell a side even though the accurecy is good enough for me, the loss would be like it was complitly wrong. other methods were to give 1 to the real location and all its neighbors but this is not possible to achive if the last layer is softmax (i tried sigmoid but it gave horrble results) or to give a high score to the real location like 0.92 and 0.01 the the neighbors which I am currently using.

Is there a known method how to do it? or should I just try them all?

0 Answers0