Views
No views yet

| Split | CW-BASS v2 (gate→floor) | Strict τ=0.95 (our repro) | UniMatch V2-B (reported) |
|---|---|---|---|
| 1/8 (2,526) | 50.58 | 49.10 | 49.8 |
1import torch
2from torchvision import transforms as T
3from PIL import Image
4from model.semseg.dino_segmentor import DINOv2Segmentor # from the CW-BASS v2 code
5from core.inference import whole_inference
6
7model = DINOv2Segmentor(backbone='dinov2_vitb14', nclass=150, pretrained=False).eval()
8sd = torch.load('cwbassv2_ade20k_dinov2b_1over8.pth', map_location='cpu')
9model.load_state_dict(sd, strict=False) # training-only proj_head is inference-unused
10norm = T.Compose([T.ToTensor(), T.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))])
11img = norm(Image.open('example.jpg').convert('RGB')).unsqueeze(0)
12with torch.no_grad():
13 pred = whole_inference(model, img).argmax(1) # [1, H, W], class indices 0..149 (ADE cats 1..150)demo/ folder.1@article{tarubinga2026cwbassv2,
2 title = {CW-BASS v2: Saturation-Aware Pseudo-Label Selection for
3 Semi-Supervised Segmentation under Foundation-Model Teachers},
4 author = {Tarubinga, Ebenezer},
5 year = {2026},
6 journal = {arXiv preprint arXiv:2608.12773},
7 eprint = {2608.12773},
8 archivePrefix = {arXiv},
9 primaryClass = {cs.CV}
10}