dinov2-I16
Patch for DinoV2 training code to support PyTorch 2.4
Fork A fork of zinccat/dinov2-patch; the README may describe the upstream project.
Overview
This is a patch for the original repository to make it work with the latest version of PyTorch (>2.1).
Install the dependencies using the following command:
Then run the following command to install the package:
Then add the training images to data/train.
You can now start the training using torchrun instead of submitit. The following command will start the training on 2 GPUs:
Thanks a lot to https://github.com/csaroff/dinov2 for an example of custom dataset.
:new: [2023-10-26] Added DINOv2 backbones with registers, following Vision Transformers Need Registers.
Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov, Patrick Labatut, Armand Joulin, Piotr Bojanowski
[Paper #1] Paper #2] [Blog] [Demo] [BibTeX]
https://github.com/facebookresearch/dinov2/assets/60359573/f168823e-7922-415a-b429-578badf5c356
A corresponding model card is included in the repository.
From the project’s README on GitHub.
At a glance
| Repository | Kentucky-Open-Science/dinov2-I16 |
|---|---|
| Research area | Forks of other projects |
| Primary language | Jupyter Notebook |
| Languages | Jupyter Notebook 65.6%, Python 34.3%, Shell 0.2% |
| License | Apache-2.0 |
| Stars / forks | 1 / 1 |
| Open issues and pull requests | 4 |
| Created | 2024-09-03 |
| Last push | 2026-03-12 |
| Default branch | main |
| Forked from | zinccat/dinov2-patch — Patch for DinoV2 training code to support PyTorch 2.4 |
What the README covers
- DINOv2: Learning Robust Visual Features without Supervision
- Pretrained models
- Pretrained backbones (via PyTorch Hub)
- Pretrained heads - Image classification
- Pretrained heads - Depth estimation
- Pretrained heads - Semantic segmentation
- Installation
- Data preparation
- ImageNet-1k
- ImageNet-22k
- Training
- Fast setup: training DINOv2 ViT-L/16 on ImageNet-1k
- Long setup: training DINOv2 ViT-L/14 on ImageNet-22k
- Evaluation
- k-NN classification on ImageNet-1k
- Logistic regression classification on ImageNet-1k
- Linear classification with data augmentation on ImageNet-1k
- Notebooks
- License
- Contributing
- Citing DINOv2
Top contributors
- @codybum (196 commits)
- @patricklabatut (27 commits)
- @zinccat (5 commits)
- @qasfb (3 commits)
- @leo-gan (2 commits)
- @goggle (1 commit)
- @Aryanutkarsh (1 commit)
Get the code
git clone https://github.com/Kentucky-Open-Science/dinov2-I16.git