Pages
Distillation
Distillation involves taking a trained model and distilling the weights into a new model rather than learning from large quantities of raw data. The trained model is the Teacher Model. Let the teacher model that we want to distill be DinoV2, and the model we want to train be SEMA. For an image, DinoV2 produces intermediate patch features while SEMA produces its own features .
Because of the difference in channel dimensions and spatial resolution, the SEMA features must first be transformed with a small learned projection
A loss function is then constructed so that patch features point in similar directions
It is also possible to enforce the student to align with global latent image representations. This allows the student to inherit whole image semantics, but with the risk that the student discards some spatial detail.
Combining the loss terms
Dino supplies a rich semantic target for each image, rather than slowly iterating through many similar images and refining SEMA from scratch.