PixCon β Cityscapes (Clean-Positive Contrastive SSSS)
PixCon model family β Pascal VOC Β· Cityscapes Β· ADE20K Β· π€ Interactive demo Β· π Project page Β· π» Code Β· π Paper
Cityscapes checkpoint for PixCon, a clean-positive pixel-contrastive framework over a DINOv2-Base encoder. PixCon adds one contrastive branch on a UniMatch V2 consistency backbone: a per-class memory bank admitting only labeled pixels the student already classifies correctly (contamination-free positive set, Ο_F = 0, by construction), with no inference-time parameters and no bank-specific threshold. See the Pascal model and the paper for the method and analysis.
- Backbone: DINOv2-Base (ViT-B/14) + DPT-lite decoder, 19 Cityscapes classes.
- This checkpoint: Cityscapes 1/8 split (372 labeled images), single seed.
Results (honest framing)
Compute-matched one-switch comparison against our DINOv2 UniMatch V2 reproduction (single seed):
| Split | PixCon | UniMatch V2 (our repro) | Published UM2-B |
|---|---|---|---|
| 1/16 | 83.20 | 83.16 | 83.6 |
| 1/8 | 83.88 | 83.96 | 84.3 |
PixCon ties the compute-matched baseline (within seed noise) and sits at or slightly below the published UniMatch V2-B figures. Consistent with the paper's thesis: under a foundation-model teacher contamination is already rare, so clean-positive contrast is a no-cost, robust default rather than an accuracy booster. These cells are single-seed (see the paper's Cityscapes table).
Usage
import torch
from torchvision import transforms as T
from PIL import Image
from model.segmentor import PixConSegmentor # from the PixCon code
from core.inference import whole_inference
model = PixConSegmentor(backbone='dinov2_vitb14', nclass=19, pretrained=False).eval()
sd = torch.load('pixcon_cityscapes_1_8.pth', map_location='cpu')
model.load_state_dict(sd, strict=False) # proj_head is inference-unused
norm = T.Compose([T.ToTensor(), T.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))])
img = norm(Image.open('example.jpg').convert('RGB')).unsqueeze(0)
with torch.no_grad():
pred = whole_inference(model, img).argmax(1) # [1, H, W], 19 Cityscapes classes
Interactive demo: psychofict/pixcon-demo.
Citation
@article{tarubinga2026pixcon,
title = {PixCon: Clean-Positive Contrastive Learning for Foundation-Model
Semi-Supervised Segmentation},
author = {Tarubinga, Ebenezer},
journal = {arXiv preprint arXiv:2607.03068},
year = {2026}
}
