class imbalance
While negative samples are much more than positive samples, to deal with the large class imbalance, two ways can be tried:
1) Focal loss: use the focal loss as the loss on the output of the classification subnet;
2) Adding hard negative samples gradually(Hard example mining).
Focal loss:
Address class imbalance by reshaping the standard cross entropy loss such that it down-weights the loss assigned to well-classified examples.
Focal loss is designed to address the one-stage object detection scenario in which there is an extreme imbalance between foreground and background classes during training.
How to choose the hard negative to be included in the computation of loss?
First, N negative samples are randomly selected as a candidate pool;
Second, the negative samples in this pool are sorted in descending order based on their classification confidence scores and the top n samples are selected as the hard negatives.
Comments
Post a Comment