Skip to main content

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}
}

Metadata

Release files for dino-loss 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dino-loss 0.0.2
File Size Uploaded
dino_loss-0.0.2.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dino-loss 0.0.2
File Interpreter ABI Platform
dino_loss-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / dino_loss-0.0.2.tar.gz

Download URL dino_loss-0.0.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
366a5517d08cb897b10acead9a581a90adc107dd04b23fb012d4a85852ee6536
BLAKE2b-256 checksum
How to use checksums
aab0714346d37ed6ce83900527a0a14d10bd05337a2abcaa32061ee42a3c98db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.6

Release files / dino_loss-0.0.2-py3-none-any.whl

Download URL dino_loss-0.0.2-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20ccb3fd4c40750d0941e51d35c268a37d9bced570971627abc7bf933b4aa9bf
BLAKE2b-256 checksum
How to use checksums
55363521c2d651061d214b5952438750ba26ea350e28626325cc211bf7177b49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page