Accurately segmenting objects without any manual annotations remains one of the core challenges in computer vision. In this work, we introduce Selfment, a fully self-supervised framework that segments foreground objects directly from raw images without human labels, pretrained segmentation models, or any post-processing. Selfment first constructs patch-level affinity graphs from self-supervised features and applies NCut to obtain an initial coarse foreground--background separation. We then introduce Iterative Patch Optimization (IPO), a feature-space refinement procedure that progressively enforces spatial coherence and semantic consistency through iterative patch clustering. The refined masks are subsequently used as supervisory signals to train a lightweight segmentation head with contrastive and region-consistency objectives, allowing the model to learn stable and transferable object representations. Despite its simplicity and complete absence of manual supervision, Selfment sets new state-of-the-art (SoTA) results across multiple benchmarks. It achieves substantial improvements on Fmax over previous unsupervised saliency detection methods on ECSSD (+4.0%), HKUIS (+4.6%), and PASCAL-S (+5.7%). Moreover, without any additional fine-tuning, Selfment demonstrates remarkable zero-shot generalization to camouflaged object detection tasks (e.g., 0.910Sm on CHAMELEON and 0.792Fβω on CAMO), outperforming all existing unsupervised approaches and even rivaling the SoTA fully supervised methods.
Figures & tables
Figure 1: We propose Selfment , a fully self-supervised framework for foreground segmentation that generates highly detailed and accurate saliency maps without any human-annotated labels or post-processing.
Figure 2: An overview of Selfment. The input image is first encoded by a self-supervised backbone to produce dense patch features. These features define a patch-level affinity graph, from which we derive an initial foreground-background split using the second-smallest eigenvector of the NCut. We then apply Iterative Patch Optimization to improve spatial coherence and semantic consistency. The refined masks then serve as supervisory signals for training a lightweight segmentation head.
ECSSD [ 37 ]
DUTS [ 45 ]
HKUIS [ 21 ]
PASCAL-S [ 23 ]
Fmax
IoU
Acc.
Fmax
IoU
Acc.
Fmax
IoU
Acc.
Fmax
IoU
Acc.
HS [ 47 ]
67.3
50.8
84.7
50.4
36.9
82.6
-
-
-
-
-
-
wCtr [ 54 ]
68.4
51.7
86.2
52.2
39.2
83.5
-
-
-
-
-
-
WSC [ 22 ]
68.3
49.8
85.2
52.8
38.4
86.2
-
-
-
-
-
-
DeepUSPS [ 27 ]
58.4
44.0
79.5
42.5
30.5
77.3
-
-
-
-
-
-
BigBiGAN [ 44 ]
78.2
67.2
89.9
60.8
49.8
87.8
-
-
-
-
-
-
Table 1: Comparison of unsupervised saliency detection methods. We evaluate Selfment against state-of-the-art unsupervised methods on ECSSD [ 37 ] , DUTS [ 45 ] , HKUIS [ 21 ] , and PASCAL-S [ 23 ] . Best results are bolded .
Figure 3: Comparison with previous state-of-the-art methods on the unsupervised saliency detection task. All methods are evaluated without any post-processing at an inference resolution of 1280×1280 .
Figure 4: Comparison with previous state-of-the-art on the camouflaged object detection tasks.
CHAMELEON [ 42 ]
CAMO [ 19 ]
COD10K [ 9 ]
NC4K [ 26 ]
Sm↑
Fβω↑
Eξ↑
MAE
Sm↑
Fβω↑
Eξ↑
MAE
Sm↑
Fβω↑
Eξ↑
MAE
Sm↑
Fβω↑
Eξ↑
MAE
Fully-Supervised Methods
BGNet [ 43 ]
.901
.851
.954
.027
.812
.749
.870
.073
.831
.722
.901
.033
.851
.788
.907
.044
SINetv2 [ 8 ]
.888
.816
.961
.030
.820
.743
.882
.070
.815
.680
.887
.037
.847
.770
.903
.048
ZoomNet [ 29 ]
.902
.845
.958
.023
.820
.752
.878
.066
.838
.729
.888
.029
.853
.784
.896
.043
FSPNet [ 15 ]
.908
.851
.965
.023
.856
.799
.899
.050
.851
.735
.895
.026
.879
.816
.915
.035
Table 2: Comparison of camouflaged object detection methods. We evaluate Selfment against state-of-the-art methods on CHAMELEON [ 42 ] , CAMO [ 19 ] , COD10K [ 9 ] , and NC4K [ 26 ] . Best results are bolded .
Figure 5: Comparison of segmentation performance among TokenCut [ 46 ] , SelfMask [ 38 ] , FOUND [ 40 ] , and Selfment using DINO-Base, DINOv3-Huge+, and DINOv3-7B as backbones. Metrics are reported on the ECSSD [ 37 ] dataset.
Figure 6: Ablation study on the main components of the Selfment pipeline. From left to right, we progressively add NCut, Iterative Patch Optimization (IPO), and self-supervised learning (SSL).
Configuration
BCE
Dice
Con.
Fmax
IoU
Acc
NCut (baseline)
74.7
63.9
86.2
+ IPO
79.5
73.2
87.8
Self-supervised training
✓
88.3
80.4
94.4
+ Dice loss
✓
✓
88.9
81.3
94.7
+ Contrastive loss
✓
✓
88.9
81.4
94.7
+ Dice & Contrastive loss
✓
✓
✓
89.1
81.5
94.8
Table 3: Ablation study of individual components. Each module is added cumulatively to the previous configuration. BCE: binary cross-entropy loss; Dice: soft Dice loss; Con.: contrastive similarity loss.
Figure 7: An illustration showing the progressive refinement of the mask across iterations of the IPO procedure.
Fmax
IoU
Acc
<CLS>
29.2
20.5
54.0
K-Means
59.2
55.1
71.7
NCut
74.7
63.9
86.2
Table 4: Comparison of initial bipartition methods on segmentation performance. Metrics reported on the ECSSD dataset.
Figure 8: Qualitative comparison of how Selfment and TokenCut behave as input resolution increases.
Figure 9: Failure cases on unsupervised saliency detection.