Views
No views yet
uv add "canvit-pytorch @ git+https://github.com/m2b3/CanViT-PyTorch.git"1import torch
2from canvit_pytorch.probes import SegmentationProbe
3
4probe = SegmentationProbe.from_pretrained("canvit/probe-ade20k-40k-dv3b-160px").eval()
5
6# [B, H, W, D] DINOv3 ViT-B/16 spatial features at 160px input
7features = torch.randn(1, 10, 10, 768)
8with torch.inference_mode():
9 logits = probe(features) # [B, num_classes, H, W]
10assert logits.shape == (1, 150, 10, 10)Dropout → BatchNorm → Conv1×1.| Hyperparameter | Value |
|---|---|
| Input size | 160 × 160 px |
| Optimizer | AdamW |
| Peak LR | \( 3 \times 10^{-4} \) |
| Weight decay | \( 10^{-3} \) |
| LR schedule | 1,500-step warmup → cosine decay |
| Batch size | 16 |
| Max steps | 40,000 |
| Dropout | 0.1 |
| Augmentation | RandomResizedCrop scale [0.5, 2] + HFlip |
| Precision | bf16 (AMP) |