Skip to content

Y-R-A-V-R-5/layerscale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 YOLOv8 Scaling Study — LayerScale

Is bigger always better?
A systematic study of width vs. depth scaling in YOLOv8 on the KITTI dataset.


📌 Overview

This repository presents a controlled scaling experiment on YOLOv8, analyzing how architectural changes impact:

  • 📊 Accuracy (mAP@50)
  • ⚡ Inference Speed (FPS)
  • 💾 Model Size & Parameters
  • ⏱️ Training Cost

We evaluate 5 model variants across two scaling axes:

  • Width Scaling → Channel counts per layer
  • Depth Scaling → Number of layer repetitions

🧠 Key Findings

  • 🏆 Best Model: depth_0.33
  • Higher Accuracy than baseline (+0.2% mAP@50)
  • +50% Faster Inference
  • 💾 −43% Model Size
  • ⏱️ −35% Training Time

🔥 Insight: Scaling is non-monotonic — bigger models do NOT guarantee better performance.


📊 Results & Visualizations

1. 🏁 Overall Comparison

Full Comparison Core Metrics


2. 📉 Scaling Curves (Width vs Depth)

Scaling Curves

  • Width reduction → sharp accuracy drop
  • Depth reduction → graceful degradation

3. ⚖️ Efficiency Frontier

Efficiency Pareto Surface

  • Identifies optimal trade-offs between speed vs accuracy
  • depth_0.33 lies on the Pareto frontier

4. 🧩 Model Leaderboard

Leaderboard Models


5. 🔍 Per-Class Analysis

Per Class Per Class Gap

  • Smaller model improves minor classes
  • Larger model slightly better on complex classes

6. 🎯 Radar — All-Rounder Model

Radar Frontier

  • Shows overall balance across all metrics

7. 📈 Metric Correlations

Correlation

  • FPS vs Params → -1.0 correlation
  • Recall impacts mAP more than Precision

8. 📊 Class Score Spread

Score Spread

  • Smaller model = more consistent performance

9. ⏱️ Training Cost Analysis

Training Cost

  • Highlights diminishing returns of larger models

⚙️ Experimental Setup

  • Model: YOLOv8
  • Dataset: KITTI (Mini-KITTI subset)
  • Framework: PyTorch / Ultralytics
  • Hardware: GPU (specify if needed)

Variants Tested:

Model Width Depth
Baseline 1.0 1.0
Width 0.5 0.5 1.0
Width 0.33 0.33 1.0
Depth 0.5 1.0 0.5
Depth 0.33 1.0 0.33

🧪 Reproducing the Results

# Clone repo
git clone https://github.com/Y-R-A-V-R-5/layerscale.git
cd layerscale

# Install dependencies
pip install -r requirements.txt

# Run training
python train.py --config configs/depth_033.yaml

About

Studies width & depth scaling to identify diminishing returns, hardware-aware sweet spots, and practical capacity limits. Measures marginal utility of larger models on real hardware, emphasizing empirical understanding over blindly “bigger is better.”

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors