facebookresearch / dinov2

PyTorch code and models for the DINOv2 self-supervised learning method.
Apache License 2.0
8.29k stars 696 forks source link

Pretrain Dinov2 with custom dataset using Image net 1k weights #431

Open ayushnangia opened 6 days ago

ayushnangia commented 6 days ago

I'm interested in pretraining DINOv2 on my own custom dataset, starting from the ImageNet-1K pretrained weights. Specifically:

  1. Is it possible/recommended to continue pretraining DINOv2 on a custom dataset after initializing with the ImageNet-1K weights?

  2. Are there any existing scripts or examples for doing this kind of continued pretraining with a custom dataset?

  3. If not, what would be the recommended approach? Should I modify the existing training scripts, or implement something new?

  4. Are there any pitfalls or best practices to be aware of when doing this?

  5. How can I evaluate if the continued pretraining is actually improving the model for my dataset/domain?

Any guidance or pointers would be greatly appreciated! I'm hoping to leverage DINOv2's strong performance but adapt it more specifically to my problem domain through additional pretraining.

jaime-1998 commented 5 days ago

Same questions.