CSE445Computer Vision
Tutorials/Self-Supervised Learning for Computer Vision/I-JEPA Predictive Pretraining for YOLO26
SSL-OD-03Advanced 2.5 Hours

I-JEPA Predictive Pretraining for YOLO26

Pretrain the YOLO26 backbone with an I-JEPA-style latent prediction objective. Students sample context and target blocks from the same image, use a context encoder to predict masked target representations, update a target encoder with an exponential moving average, and transfer the learned backbone to football-player detection.

PyTorchUltralyticsAlbumentationsTensorBoard

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. 1Context and target blocksSplit each image into a large visible context and several masked target regions whose representations the model must predict.
  2. 2Multi-block mask samplingSample spatially meaningful target blocks at varied positions and scales while preserving enough visible context for prediction.
  3. 3Context encoderEncode only the visible image regions so the backbone must infer semantic information about the hidden targets.
  4. 4EMA target encoderProduce stable target-block representations with a slowly updated encoder that receives no direct gradient.
  5. 5Latent-space predictionPredict target-region embeddings instead of reconstructing pixels, emphasizing high-level structure over low-level detail.
  6. 6Predictor networkMap context features and target locations to predicted embeddings that can be compared with the target encoder outputs.
  7. 7Stop-gradient targetsBlock gradient flow through the target branch so only the online encoder and predictor receive direct optimization updates.
  8. 8Representation collapse monitoringTrack feature variance and covariance so a constant or low-information latent solution is detected early.
  9. 9YOLO26 backbone checkpoint transferLoad the predictively pretrained encoder weights into YOLO26 before supervised detection fine-tuning.
  10. 10Detection fine-tuningAdapt the transferred representation with labeled bounding boxes while tracking whether SSL accelerates convergence or improves accuracy.

Learning Objectives

  • Explain how I-JEPA learns by predicting representations of masked image regions
  • Implement context and target block sampling for YOLO26 feature maps
  • Train context and EMA target encoders with a latent prediction objective
  • Transfer the I-JEPA-pretrained backbone into YOLO26 detection training

Key Takeaways

  • I-JEPA predicts semantic representations rather than reconstructing masked pixels
  • Large context and target blocks encourage object-level spatial understanding
  • The EMA target encoder supplies stable stop-gradient targets for the predictor
  • A controlled detection baseline is required to measure the value of predictive pretraining

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. 1Visualize context and target blocks over unlabeled football images
  2. 2Implement multi-block mask sampling and latent target extraction
  3. 3Train the YOLO26 backbone with the I-JEPA-style prediction loss and monitor feature variance
  4. 4Fine-tune the transferred backbone and compare it with random, SimCLR, and BYOL initialization

Tools & Libraries

PyTorchUltralyticsAlbumentationsTensorBoard