page-vitb / README.md
Octopus1's picture
Upload folder using huggingface_hub
7a95550 verified
|
Raw
History Blame
1.93 kB
metadata
license: apache-2.0
library_name: transformers
base_model: []
tags:
  - gaze-estimation
  - gaze-target-estimation
  - dinov3
pipeline_tag: image-feature-extraction

PaGE-ViT-B

Base variant, general scenes. Distilled. Part of the PaGE gaze target estimation family.

  • Backbone: DINOv3 ViT-B/16
  • Params: ~90M
  • Scene input: 512×512, Head input: 256×256, Heatmap output: 64×64
  • Source checkpoint: vitb_distill.pt

Self-contained weights

This checkpoint includes the full DINOv3 backbone weights in its safetensors files. No external DINOv3 weights are downloaded. The model code (modeling_page.py) is loaded automatically from Octopus1/PaGE via auto_map when you pass trust_remote_code=True.

Installation

pip install torch torchvision timm "transformers>=4.56" safetensors pillow

Usage

from transformers import AutoModel, AutoImageProcessor
from PIL import Image
import torch

repo = "Octopus1/page-vitb"
model = AutoModel.from_pretrained(repo, trust_remote_code=True).eval()
processor = AutoImageProcessor.from_pretrained(repo, trust_remote_code=True)

scene = Image.open("scene.jpg").convert("RGB")
head = Image.open("head.jpg").convert("RGB")

inputs = processor(scene, head_crops=[head], bboxes=[[(0.10, 0.10, 0.30, 0.40)]])

with torch.no_grad():
    out = model(inputs)

heatmap = out["heatmap"][0]   # [Np, 64, 64]
inout   = out["inout"][0]     # [Np]

Inputs / Outputs

See the family README for the full input/output spec.

  • Input dict: 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]).
  • Output dict: heatmap (list of [Np,64,64], sigmoid), inout (list of [Np], sigmoid).

License

Apache-2.0.