Views
No views yet
vits_distill.ptsafetensors files. No external
DINOv3 weights are downloaded — the DINOv3 model structure is provided by transformers==5.6.2
(built-in dinov3_vit), and the backbone weights here are derivative weights from full-parameter
training of DINOv3. The model code (modeling_page.py) is loaded automatically from
Octopus1/PaGE via auto_map when you pass
trust_remote_code=True.pip install torch torchvision timm "transformers==5.6.2" safetensors pillowtransformers 5.6.2.1from transformers import AutoModel, AutoImageProcessor
2from PIL import Image
3import torch
4
5repo = "Octopus1/page-vits"
6model = AutoModel.from_pretrained(repo, trust_remote_code=True).eval()
7processor = AutoImageProcessor.from_pretrained(repo, trust_remote_code=True)
8
9scene = Image.open("scene.jpg").convert("RGB")
10head = Image.open("head.jpg").convert("RGB")
11
12inputs = processor(scene, head_crops=[head], bboxes=[[(0.10, 0.10, 0.30, 0.40)]])
13
14with torch.no_grad():
15 out = model(inputs)
16
17heatmap = out["heatmap"][0] # [Np, 64, 64]
18inout = out["inout"][0] # [Np]images (list of [B,3,512,512]), head_images (list of [sum(Np),3,256,256]),
bboxes (per-image list of (xmin,ymin,xmax,ymax) in [0,1]).heatmap (list of [Np,64,64], sigmoid), inout (list of [Np], sigmoid).LICENSE).DINOv3_LICENSE.md). Under its
Section 1.b.i, derivative works of DINOv3 (including these backbone weights) are distributed under
the DINO License terms, and DINOv3_LICENSE.md must accompany any redistribution.