Explain focal loss and why it's used in dense detection.
hardAnswer
- = -^, where is the model's probability for the true class.
- The ^γ term (γ ~ 2) down-weights well-classified examples, keeping the loss focused on hard examples.
- Fixes the extreme class imbalance in one-stage detectors (RetinaNet) where 100k background anchors dominate a few foreground ones.
- Also useful for imbalanced classification.
Check yourself — multiple choice
- Focal loss = plain BCE
- FL down-weights easy examples via ^γ → focuses gradient on hard cases; fixes extreme detection imbalance
- Adds noise to labels
- Only for regression
Focal loss: ^γ down-weights easy examples → attention on hard ones (RetinaNet).
#losses#detection#computer-vision
Practise Deep Learning
214 interview questions in this topic.
Related questions
- How does YOLO / SSD / RetinaNet differ from two-stage detection?
- How does a two-stage detector (Faster R-CNN) work?
- What is Non-Maximum Suppression (NMS) and its variants?
- What are anchor boxes and their downsides?
- How does Mask R-CNN extend Faster R-CNN for instance segmentation?
- What is a Feature Pyramid Network (FPN)?