# When Bigger is Worse: A Practitioner's Guide to Model Selection Under Data Scarcity
> *Submitted to Environmental Data Science. Under review.*
---
## Overview
This repository contains the code and results for a systematic efficiency analysis of the YOLO11 model family on rooftop photovoltaic (PV) detection in Madagascar. We study how **model size**, **dataset fraction**, and **input resolution** jointly affect detection efficiency in a data-scarce Earth observation setting.
**Key finding:** the smallest model (YOLO11-N, 2.6M parameters) achieves both the highest absolute mAP₅₀ (0.617) *and* a **24× efficiency advantage** over the largest variant (YOLO11-X) — directly contradicting the standard scaling intuition.
*Left: mAP₅₀ as a function of the overparameterization ratio ρ = params/N_train, ranging from ~300 (YOLO11-N, 100% data) to ~80,000 (YOLO11-X, 10% data). A negative log-linear trend confirms that higher overparameterization consistently predicts lower detection performance. Right: mAP₅₀ vs. inference speed (FPS) across all 38 experimental configurations — small high-resolution configurations lie at the apex of the Pareto frontier.*
---
## Repository structure
```
.
├── data/ # Dataset splits
│ ├── train_images.json # Training split (image paths + bounding boxes)
│ ├── val_images.json # Validation split (image paths + bounding boxes)
│ └── test_images.json # Test split (image paths + bounding boxes)
├── src/ # Replication scripts
│ ├── scaling_law_study.py # Main experiment runner
│ └── run_all_experiments.py # Run all experiments
├── notebooks/
│ └── analysis.ipynb # Results analysis and figures
├── results/
│ ├── results.csv # Pre-computed results (38 runs)
│ ├── results.json # Pre-computed results (38 runs)
│ └── results_zs.csv # Results in zero-shot setting
│ └── results_zs.json # Results in zer …