Home Knowledge Base Focal loss

Focal loss is a modified cross-entropy loss function designed to address extreme class imbalance — by down-weighting well-classified (easy) examples and focusing training on hard, misclassified samples, focal loss enables single-stage object detectors like RetinaNet to achieve accuracy comparable to two-stage detectors.

Why Focal Loss Matters

Formula

FL(p) = −α(1 − p)^γ log(p), where γ (gamma, typically 2) controls the focusing strength and α balances class weights.

Impact by Example Difficulty

Applications: YOLO, RetinaNet, SSD, medical image segmentation, fraud detection, any task with severe class imbalance.

Focal loss transformed object detection — proving that class imbalance, not architecture, was the main barrier to single-stage detector performance.

focal losshard exampleclass

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.