Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dino_loss-0.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dino_loss-0.0.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file dino_loss-0.0.2.tar.gz.

File metadata

  • Download URL: dino_loss-0.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for dino_loss-0.0.2.tar.gz
Algorithm Hash digest
SHA256 366a5517d08cb897b10acead9a581a90adc107dd04b23fb012d4a85852ee6536
MD5 3f9bedcd4f88709e128f5576ef414b56
BLAKE2b-256 aab0714346d37ed6ce83900527a0a14d10bd05337a2abcaa32061ee42a3c98db

See more details on using hashes here.

File details

Details for the file dino_loss-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dino_loss-0.0.2-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

Hashes for dino_loss-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20ccb3fd4c40750d0941e51d35c268a37d9bced570971627abc7bf933b4aa9bf
MD5 a383208d623b54417000484a52fe705d
BLAKE2b-256 55363521c2d651061d214b5952438750ba26ea350e28626325cc211bf7177b49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page