Skip to content
Snippets Groups Projects

Instructions for Training DINOv2 Model and Saving Predictions

Conda Environment Creation

We use a separate Conda environment for training and generation predictions with DINOv2. Create the DINOv2 Conda environment from our yaml file by running:

conda env create -f dino.yml
conda activate dinov2

NOTE: We trained DINOv2 models on a compute cluster with a ppc64le architecture, rather than the usual x86_64 architecture. As such, the Conda environment may need to be updated for your specific compute setup.

Train Model

  • Update file names and valid timesteps to load for train, validation, and test splits in the dataset script here
  • Run python trainer.py with desired arguments to train a DINOv2 model

Collect Predictions