Skip to content

psychofict/FARCLUSS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FARCLUSS

Fuzzy Adaptive Rebalancing and Contrastive Uncertainty Learning for Semi-Supervised Semantic Segmentation

Ebenezer Tarubinga · Jenifer Kalafatovich · Seong-Whan Lee

Department of Artificial Intelligence, Korea University, Seoul, Korea

arXiv Project Page Venue License: MIT PyTorch

FARCLUSS Framework

Abstract

Semi-supervised semantic segmentation (SSSS) faces persistent challenges in effectively leveraging unlabeled data, including ineffective utilization of pseudo-labels, the exacerbation of class imbalance biases, and the neglect of prediction uncertainty. Moreover, current approaches often discard uncertain regions through strict thresholding, thereby favouring dominant classes. To address these limitations, we introduce a holistic framework that transforms uncertainty into a learning asset through four principal components: (1) fuzzy pseudo-labeling, which preserves soft class distributions from top-K predictions to enrich supervision; (2) uncertainty-aware dynamic weighting, that modulates pixel-wise contributions via entropy-based reliability scores; (3) adaptive class rebalancing, which dynamically adjusts the loss to counteract long-tailed class distributions; and (4) lightweight contrastive regularization, that encourages compact and discriminative feature embeddings. Extensive experiments on Pascal VOC and Cityscapes demonstrate that our method outperforms current state-of-the-art approaches, with pronounced gains on under-represented classes and ambiguous boundary regions.

Key Contributions

  1. Fuzzy Pseudo-Labeling — retains soft class distributions from the top-K teacher predictions, preserving inter-class ambiguity instead of forcing hard one-hot labels.
  2. Uncertainty-Aware Dynamic Weighting — modulates each pixel's loss contribution via normalized entropy, so confident predictions drive learning while noisy ones are damped.
  3. Adaptive Class Rebalancing — dynamically adjusts per-class loss weights from batch-level pseudo-label frequencies to counteract class imbalance in unlabeled data.
  4. Lightweight Contrastive Regularization — prototype-based contrastive loss that tightens intra-class feature clusters and separates inter-class prototypes without heavy memory overhead.

Built on DeepLabV3+ with ResNet-50/101 backbones and a mean-teacher EMA architecture.

Results

Mean IoU (%) of FARCLUSS across labeled-data partitions. Full state-of-the-art comparison tables are in the paper.

Pascal VOC 2012 — Classic

Backbone 1/16 1/8 1/4 1/2
ResNet-50 72.90 76.18 76.50 77.69
ResNet-101 76.40 78.20 79.00 80.30

Cityscapes

Backbone 1/16 1/8 1/4 1/2
ResNet-50 75.20 77.50 78.00 79.60
ResNet-101 77.20 78.50 80.00 81.00

Installation

pip install -r requirements.txt

Requires PyTorch >= 1.12 and torchvision >= 0.13.

Dataset Preparation

Pascal VOC 2012

data/VOCdevkit/VOC2012/
├── JPEGImages/
├── SegmentationClass/
├── SegmentationClassAug/    # for Blended/SBD setup
└── ImageSets/Segmentation/
    ├── train.txt
    ├── val.txt
    └── trainaug.txt         # for Blended/SBD setup

Cityscapes

data/cityscapes/
├── leftImg8bit/{train,val}/
└── gtFine/{train,val}/

Training

# Pascal VOC Classic, 1/8 labeled, ResNet-101
python train.py --dataset pascal_voc --split classic --labeled_ratio 0.125 \
    --backbone resnet101 --data_root ./data/VOCdevkit/VOC2012

# Pascal VOC Blended (SBD-augmented), 1/4 labeled
python train.py --dataset pascal_voc --split blended --labeled_ratio 0.25 \
    --backbone resnet101 --data_root ./data/VOCdevkit/VOC2012

# Cityscapes, 1/8 labeled
python train.py --dataset cityscapes --labeled_ratio 0.125 \
    --backbone resnet101 --data_root ./data/cityscapes

# Resume from checkpoint
python train.py --dataset pascal_voc --resume checkpoints/farcluss_best.pth
Labeled ratio Flag
1/16 --labeled_ratio 0.0625
1/8 --labeled_ratio 0.125
1/4 --labeled_ratio 0.25
1/2 --labeled_ratio 0.5

Evaluation

python evaluate.py --checkpoint checkpoints/farcluss_best.pth \
    --dataset pascal_voc --data_root ./data/VOCdevkit/VOC2012

# Optionally also report boundary metrics
python evaluate.py --checkpoint checkpoints/farcluss_best.pth \
    --dataset pascal_voc --data_root ./data/VOCdevkit/VOC2012 \
    --compute_bf1 --compute_biou

Repository Structure

FARCLUSS/
├── train.py                     # Training entry point
├── evaluate.py                  # Evaluation (mIoU, Boundary F1, Boundary IoU)
├── requirements.txt
├── assets/                      # Figures used in this README
├── docs/                        # Project page (GitHub Pages)
└── farcluss/                    # Python package
    ├── config.py                # Experiment configurations
    ├── trainer.py               # Training loop (Algorithm 1)
    ├── model/
    │   ├── encoder.py           # ResNet-50/101 with dilated convolutions
    │   ├── aspp.py              # Atrous Spatial Pyramid Pooling
    │   ├── deeplabv3plus.py     # DeepLabV3+ architecture
    │   └── projection_head.py   # 128-D projection for contrastive loss
    ├── losses/
    │   └── farcluss_losses.py   # All loss components (Eq. 2–12)
    ├── dataset/
    │   ├── augmentation.py      # Weak & strong augmentations
    │   ├── pascal_voc.py        # Pascal VOC 2012 (Classic & Blended)
    │   └── cityscapes.py        # Cityscapes dataset
    └── utils/
        ├── ema.py               # EMA teacher update
        ├── lr_scheduler.py      # Polynomial LR decay
        ├── metrics.py           # mIoU evaluation
        └── boundary_metrics.py  # Boundary F1 / Boundary IoU

Hyperparameters

Parameter Value
EMA momentum (α) 0.99
Top-K for fuzzy labels 2
λ_u (unsupervised weight) 0.5
λ_c (contrastive weight) 0.1
Contrastive confidence threshold 0.5
Projection dimension 128
Optimizer SGD (momentum=0.9, weight_decay=1e-4)
LR schedule Polynomial decay (power=0.9)
Initial LR 0.001
Pascal VOC epochs 80
Cityscapes epochs 240

Citation

If you find this work useful, please cite:

@article{tarubinga2026farcluss,
  title         = {FARCLUSS: Fuzzy Adaptive Rebalancing and Contrastive Uncertainty
                   Learning for Semi-Supervised Semantic Segmentation},
  author        = {Tarubinga, Ebenezer and Kalafatovich, Jenifer and Lee, Seong-Whan},
  journal       = {Neural Networks},
  year          = {2026},
  eprint        = {2506.11142},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV}
}

Acknowledgement

This research was supported by the Institute of Information & Communications Technology Planning & Evaluation (IITP) grant, funded by the Korea government (MSIT).

License

Released under the MIT License.

About

[Neural Networks 2026] Fuzzy Adaptive Rebalancing and Contrastive Uncertainty Learning for Semi-Supervised Semantic Segmentation

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages