Controlled experiment comparing YOLO11n object detection trained from scratch vs. COCO-pretrained transfer learning on African Wildlife (4 classes). Includes formal LaTeX report, modular codebase, and reproducible Kaggle pipeline.
YOLO11n: Training from Scratch vs Transfer Learning
A controlled experiment comparing weight initialization strategies for object detection on African Wildlife
---
## Overview
This repository contains a **controlled experiment** comparing two weight initialization strategies for the **YOLO11n** (nano) object detection model on the Ultralytics African Wildlife dataset (4 classes: buffalo, elephant, rhino, zebra). Both models share identical architecture, hyperparameters, and training schedules — the **only** variable is weight initialization: **random** (scratch) vs. **COCO-pretrained** (transfer learning).
> **Key finding**: Transfer learning outperforms scratch training across every metric, with the most significant gap in localization quality (mAP50-95: **+17.0 pp**). The pretrained model achieves near-convergence by epoch 30, while the scratch model is still improving at epoch 50.
---
## Results
### Quantitative Comparison
| Metric | Scratch | Transfer | Δ (Delta) |
|---|:---:|:---:|:---:|
| **mAP50** | 0.899 | **0.978** | +7.8 pp |
| **mAP50-95** | 0.664 | **0.834** | +17.0 pp |
| **Precision** | 0.848 | **0.980** | +13.3 pp |
| **Recall** | 0.841 | **0.926** | +8.5 pp |
*Evaluated on the held-out test split (227 images, 375 instances). Metrics computed with `conf=0.001`, `iou=0.6`.*
### Per-Class Performance (mAP50)
| Class | Scratch | Transfer | Δ |
|---|:---:|:---:|:---:|
| Buffalo | 0.750 | 0.833 | +8.3 pp |
| Elephant | 0.585 | 0.798 | +21.4 pp |
| Rhino | 0.750 | 0.913 | +16.4 pp |
| Zebra | 0.571 | 0.789 | +21.8 pp |
### Qualitative Comparison
*Both models correctly detect the elephant, but the transfer model assigns substantially higher confidence (0.92 vs 0.76) with a tighter bounding box.*
### Training Dynamics
Scratch model — training curves (click to expand)
Losses decrease steadily but metrics show instability in early epochs. The model is still improving at epoch 50, suggesting 300+ epochs would be needed for …