Hello, I'm not sure whether this is the correct place to ask but I was trying to implement your paper in Julia and I'm stuck at the focal loss function you use for the detection of objects.
If I compare the focal loss function in you paper to the one in the cornernet paper, yours lacks a -, is this intentional?
Say this is a target heatmap, the black pixels are 0 and white is 1.

In my code it's often the case that no pixel has a value of 1 since the center of an object often falls in between pixels. Does this implementation cope with this somehow?
Also, when training my implementation, the predicted heatmap quicly only returns zeros, that way the loss has reached 0

I'm sure I'm missing something and I'd love to hear back from you.
Thanks
Hi,
Thanks for pointing out our typo. There should be a -1 out of equation (1) for the focal loss. This is exactly the same as the CornerNet paper. We will rectify it soon.
We take the floor of the pixel coordinate before generating the Gaussian. No peak will fall between pixels. Also, please note that we use an adaptive gaussian radius for objects in different sizes.
Thanks for the reply.
As for the adaptive gaussian radius, I was looking at the function here and I'm uncertain what's happening here. What are the different radii that you're computing?
I tested that function on a range of inputs but r3 always seems to be the minimum. Could I be missing some cornercases or making a mistake somewhere?
Thanks in advance
Hi, this is from CornerNet and I haven't gone through the details. There seems some math problems but it just works fine here ...
@merckxiaan Have you solved the all-0 prediction problem?
@xingyizhou I have tried to train a center point prediction only network, i.e. no regression of center position or object sizes. When use the focal loss from https://github.com/xingyizhou/CenterNet/blob/master/src/lib/models/losses.py#L42 , the network predicts all 0s.
However, L1/MSE loss works fine.
Have you tried train center point prediction only?
A small learning rate works now.
@samson-wang, could you meantion the learning rate please with MSE and focal loss? Also, for how many batch, do you train your model ? thanks
@DeeperDeeper
I don't understand your first question.
2.
batch size is 2 img/iter. And 50 epochs. On my own dataset.
Most helpful comment
Hi,
Thanks for pointing out our typo. There should be a -1 out of equation (1) for the focal loss. This is exactly the same as the CornerNet paper. We will rectify it soon.
We take the floor of the pixel coordinate before generating the Gaussian. No peak will fall between pixels. Also, please note that we use an adaptive gaussian radius for objects in different sizes.