Papers › Self-Supervised One-Shot Learning for Automatic Segmentation of StyleGAN Images

Self-Supervised One-Shot Learning for Automatic Segmentation of StyleGAN Images

10 Mar 2023arXiv:2303.05639archive 2025-07-28

Ankit Manerikar, Avinash C. Kak

We propose a framework for the automatic one-shot segmentation of synthetic images generated by a StyleGAN. Our framework is based on the observation that the multi-scale hidden features in the GAN generator hold useful semantic information that can be utilized for automatic on-the-fly segmentation of the generated images. Using these features, our framework learns to segment synthetic images using a self-supervised contrastive clustering algorithm that projects the hidden features into a compact space for per-pixel classification. This contrastive learner is based on using a novel data augmentation strategy and a pixel-wise swapped prediction loss that leads to faster learning of the feature vectors for one-shot segmentation. We have tested our implementation on five standard benchmarks to yield a segmentation performance that not only outperforms the semi-supervised baselines by an average wIoU margin of 1.02 % but also improves the inference speeds by a factor of 4.5. Finally, we also show the results of using the proposed one-shot learner in implementing BagGAN, a framework for producing annotated synthetic baggage X-ray scans for threat detection. This framework was trained and tested on the PIDRay baggage benchmark to yield a performance comparable to its baseline segmenter based on manual annotations.

PaperPDFCode

Code

avm-debatr/bagganhq officialmentioned in papermentioned on GitHubpytorch report
avm-debatr/ganecdotes officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Data AugmentationImage GenerationImage SegmentationOne-Shot LearningOne-Shot SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Adaptive Instance NormalizationConvolutionDense ConnectionsFeedforward NetworkR1 RegularizationStyleGAN

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections