Open hikrr opened 3 years ago
num_classes in the CenterNet can don't have to include background class, so if I only have one class, num_classes should be set to 1. This will make the denominator log(1) => 0
https://github.com/scheckmedia/centernet-uda/blob/ea2f439a9015bd4d8094448425844955bcff4e0c/utils/image.py#L121-L124
@stagmoose
did you solve?
@twmht I add a bg class in my annotation file and it worked.
You can also add an epsilon for numerical stability like np.log2(c + 1) to the loss.
np.log2(c + 1)
num_classes in the CenterNet can don't have to include background class, so if I only have one class, num_classes should be set to 1. This will make the denominator log(1) => 0
https://github.com/scheckmedia/centernet-uda/blob/ea2f439a9015bd4d8094448425844955bcff4e0c/utils/image.py#L121-L124