Views
No views yet

| Split | CW-BASS v2 (gate→strict) | UniMatch V2-B (reported) |
|---|---|---|
| 1/16 | 83.16 | 83.6 |
| 1/8 | 83.96 | 84.3 |
| 1/4 | 83.99 | 84.5 |
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=19, pretrained=False).eval()
8sd = torch.load('cwbassv2_cityscapes_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], 19 Cityscapes classescore.inference.slide_inference (sliding-window) is also available.
Run it locally with the Gradio app in the repo's 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}