object detection
**Object Detection** is the **computer vision task of localizing and classifying all objects in an image** — outputting bounding boxes and class labels, and serving as the foundation for autonomous driving, surveillance, robotics, and medical imaging.
**Detection Paradigms**
**Two-Stage (R-CNN Family)**:
- Stage 1: Region Proposal Network (RPN) → generate candidate regions.
- Stage 2: Classify and refine each region independently.
- Examples: R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN.
- Pros: Higher accuracy. Cons: Slower (~5 FPS).
**One-Stage (YOLO Family)**:
- Single forward pass predicts all boxes simultaneously.
- Divide image into SxS grid; each cell predicts B bounding boxes.
- YOLOv1 (2016) → YOLOv8 (2023): Accuracy improved to match two-stage.
- YOLOv8: 50+ FPS on GPU, 55 mAP on COCO — standard for real-time detection.
**Anchor-Based vs. Anchor-Free**
- **Anchor boxes**: Predefined aspect ratios/sizes. Network predicts offsets from anchors.
- Problem: Anchor hyperparameters, many candidates, slow.
- **Anchor-free (FCOS, CenterNet)**: Predict from center or feature point directly.
- Simpler, faster, better on objects with unusual aspect ratios.
**Feature Pyramid Network (FPN)**
- Multi-scale feature extraction: Top-down pathway with lateral connections.
- Small objects detected at high-resolution features (early layers).
- Large objects detected at low-resolution features (later layers).
- Standard in all modern detectors.
**DETR (Detection Transformer, 2020)**
- Transformer encoder-decoder with learned object queries.
- No anchors, no NMS — set prediction with Hungarian matching loss.
- Global attention captures long-range relationships.
- Deformable DETR: 10x faster convergence with deformable attention.
**Key Metrics**
- **mAP (mean Average Precision)**: Standard benchmark metric at IoU thresholds.
- COCO dataset: mAP@[.5:.95] — standard benchmark.
- State-of-art (2024): 60+ mAP with ensemble/large models.
Object detection is **the gateway task for visual understanding of scenes** — its algorithms power every camera-based safety system, content moderation tool, and autonomous navigation system deployed at scale today.