Implementation of the DINOv2 model as perceptual loss from the PercHead paper
Project description
DINOv2 Perceptual Loss
Still using LPIPS? Try our perceptual loss based on DINOv2 for a more meaningful image supervision of your model!
Implementation from the paper "PercHead: Perceptual Head Model for Single-Image 3D Head Reconstruction & Editing" (CVPR '26).
[Project Page]
1. Installation
pip install dino_loss
2. Usage
from dino_loss import DinoV2Loss
dino_criterion = DinoV2Loss()
dino_criterion.compile() # Optional, for faster loss computation
predicted_images = ... # torch.Tensor [B, 3, H, W] in [0, 1] range
target_images = ... # torch.Tensor [B, 3, H, W] in [0, 1] range
dino_loss = dino_criterion(predicted_images, target_images)
If you find this DINOv2 Perceptual Loss useful, please consider citing:
@inproceedings{oroz2026perchead,
title={Perchead: Perceptual head model for single-image 3d head reconstruction \& editing},
author={Oroz, Antonio and Nie{\ss}ner, Matthias and Kirschstein, Tobias},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={4097--4108},
year={2026}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dino_loss-0.0.1.tar.gz.
File metadata
- Download URL: dino_loss-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ccdc9b3709fb1d6bacc751335fb81abf69e06f49239108b5afe1c7c0f8171f0
|
|
| MD5 |
9f0e03a42929bc0cda0b28f16ccbe9e1
|
|
| BLAKE2b-256 |
2c83b053d04600da7843e4b733377efc78db636805821aed0bd74c5a50b8897b
|
File details
Details for the file dino_loss-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dino_loss-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3824bc02733a83d54ae660e28bb051049ae19791d94f89ed3ccd3a7c8141fea3
|
|
| MD5 |
14b2d3a635391253ff279028cf2f58ed
|
|
| BLAKE2b-256 |
89389b25481b2329f3cf5ce3197dec0093047519d0cf3a8a5a50e223e98757a2
|