CSE445Computer Vision
Tutorials/Self-Supervised Learning for Computer Vision/DINOv3-Guided Feature Distillation into YOLO26
SSL-OD-04Advanced 3 Hours

DINOv3-Guided Feature Distillation into YOLO26

Use a frozen DINOv3 vision foundation model as a semantic teacher for the YOLO26 backbone. Students extract dense patch-level teacher representations, align them with multi-scale YOLO26 feature maps, and jointly optimize feature-distillation and object-detection losses.

PyTorchUltralyticsDINOv3TensorBoard

Code Structure Note

These notes are provided only to help students understand the code structure. Students should review, optimize, and adapt the code before using it in assignments, projects, or experiments.

Topics CoveredStudy each concept as part of the complete pipeline: understand its role, implement it, and verify its effect during transfer to YOLO26.
  1. 1Frozen teacher modelKeep DINOv3 fixed so its semantic knowledge acts as a stable training target for the YOLO26 student.
  2. 2DINOv3 patch tokensRetain spatial patch representations from DINOv3 rather than reducing the image to one global embedding.
  3. 3Dense visual representationsPreserve localized semantic information across the image for transfer into detection and segmentation features.
  4. 4Teacher–student learningTrain a compact task model to reproduce useful internal representations from a stronger pretrained teacher.
  5. 5Multi-scale YOLO26 featuresAlign teacher knowledge with several detector feature levels so both small and large objects receive guidance.
  6. 6Feature adaptersUse learnable projection layers to reconcile teacher and student channel dimensions and feature conventions.
  7. 7Spatial resizing and projectionMatch feature-map resolution and channel width before calculating teacher–student alignment.
  8. 8Cosine feature alignmentMinimize directional disagreement between corresponding teacher and student feature vectors.
  9. 9Distillation lossQuantify representation mismatch and balance it against the detector's classification, box, and localization objectives.
  10. 10Joint detection trainingOptimize semantic feature transfer and task-specific detection performance in one controlled training procedure.

Learning Objectives

  • Extract dense patch tokens from a frozen DINOv3 teacher
  • Align teacher tokens with multi-scale YOLO26 feature maps
  • Combine feature-distillation and object-detection objectives
  • Evaluate whether teacher guidance improves localization and classification

Key Takeaways

  • DINOv3 remains frozen and serves only as a semantic teacher
  • Adapters reconcile spatial and channel differences between teacher and student features
  • The deployed detector remains YOLO26 after distillation

Notebook Resources

Jupyter Notebook

Student action area

Use this section to practice the tutorial code. Kaggle opens the prepared notebook, Colab lets you experiment in your own runtime, and the .ipynb download is best for local editing or submission.

Kaggle: follow the official tutorial notebook.
Colab: modify and rerun quickly.
IPYNB: keep a local copy.

Hands-On Exercises

  1. 1Extract and visualize DINOv3 patch-level feature maps
  2. 2Build adapters for the selected YOLO26 feature scales
  3. 3Train with cosine feature-alignment and detection losses
  4. 4Inspect prediction and feature-map failure cases

Tools & Libraries

PyTorchUltralyticsDINOv3TensorBoard