Downloads · 30 days
0
psychofict/pixcon-cityscapes
pixcon-cityscapes is a image segmentation model from psychofict. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as apache-2.0.
[](https://arxiv.org/abs/2607.03068) [](https://huggingface.co/spaces/psychofict/pixcon-demo)
Downloads · 30 days
0
Access
Public
Updated Jul 7, 2026
Repo size
398 MB
Likes
0
Public
Click a slice to open those files.
.pth397 MB · 100%
From the Hugging Face model README
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.
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).
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.
@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}
}