---
title: 'ADClick-Seg: Efficient Anomaly Segmentation'
url: https://www.emergentmind.com/topics/adclick-seg
type: topic
---

# ADClick-Seg: Efficient Anomaly Segmentation

Searching arXiv for the cited ADClick/ADClick-Seg paper and closely related anomaly-detection work to ground the article.
{"query":"ti:\"Towards Efficient Pixel Labeling for Industrial Anomaly Detection and Localization\"","max_results":5}
Searching the exact title on arXiv.
to=arxiv_search  全民彩票  天天爱彩票网站?
{"query":"ti:\"Towards Efficient Pixel Labeling for Industrial Anomaly Detection and Localization\"","max_results":10}
to=arxiv_search code
<assistant to="arxiv_search">{"query":"ti:\"Towards Efficient Pixel Labeling for Industrial Anomaly Detection and Localization\"","max_results":10}</assistant>

ADClick-Seg is a segmentation-oriented extension of the ADClick interactive labeling model for anomaly detection and localization under a weakly supervised regime. Rather than relying on fully annotated masks, it is trained on pseudo-masks generated by ADClick from only $3$ to $5$ human clicks per defective image. In the 2024 technical report, the model ingests residual features capturing normal-vs-anomaly discrepancies, category-specific language prompts, and, during training, sparse click maps, and produces dense pixel-wise anomaly probability maps; the reported results include AP $= 86.4\%$ on MVTec AD and AP $= 78.4\%$, PRO $= 98.6\%$ on KSDD2 [2407.03130].

## 1. Problem setting and conceptual role

Industrial anomaly detection (AD) is commonly framed so that manual labeling of anomalous pixels can be avoided, because pixel annotation is costly. This leads many AD methods to operate as one-class classifiers trained on defect-free data only. The ADClick/ADClick-Seg line is positioned between these two extremes: it leverages real defective images, but replaces dense manual masks with interactive annotation requiring only a few clicks per image [2407.03130].

Within that pipeline, ADClick functions as an Interactive Image Segmentation (IIS) algorithm that efficiently generates anomaly masks for defective images, while ADClick-Seg uses those inferred masks as weak labels for downstream anomaly detection and localization. The 2024 report explicitly describes ADClick-Seg as an “enhanced model” obtained by fine-tuning on weak labels inferred by ADClick, whereas the later 2025 version describes it as “a cross-modal framework that aligns visual features and textual prompts via a prototype-based approach” [2509.05034].

A notable terminological feature is that benchmark tables in the 2024 report are labeled “Supervised Anomaly Localization” and “Supervised Anomaly Detection,” even though the training masks are pseudo-masks generated from interactive clicks rather than fully manual annotations. This reflects the use of pixel-level supervision derived from weak labeling rather than the absence of pixel supervision altogether [2407.03130].

## 2. Core architecture and representational design

In the 2024 formulation, the backbone is a WideResNet-50 pretrained on ImageNet-1K, denoted $\Psi_{\rm CNN}$, and the last three convolutional stages (layer-1, layer-2, layer-3) are harvested for residual computation. The central visual input is not the raw image, but a residual tensor obtained by location-aware patch matching between the test image and a bank of defect-free reference images. If $I_{\rm tst}\in\mathbb R^{H\times W\times 3}$ and $\Psi_{\rm CNN}(I_{\rm tst})=F_{\rm tst}\in\mathbb R^{h_f\times w_f\times d_f}$ with flattened features $\{f^j_{\rm tst}\}_{j=1}^M$, the residual construction is defined as follows [2407.03130]:
$$
\Theta_{\rm knn} = K\text{-nearest image indices by global similarity},
$$
$$
F_j = \{f^i_{\rm ref} \mid \theta^i_{\rm ref}\in\Theta_{\rm knn} \wedge \|\eta^j_{\rm tst}-\eta^i_{\rm ref}\|_2<\sigma\},
$$
$$
f^*_j = \arg\min_{f^i_{\rm ref}\in F_j} \|f^j_{\rm tst}-f^i_{\rm ref}\|_2,
$$
$$
r_j = f^j_{\rm tst} - f^*_j.
$$
The set $\{r_j\}$ is then reassembled into $R_{\rm tst}\in\mathbb R^{h_f\times w_f\times d_f}$.

Language enters through defect-specific prompts. In the 2024 report, ChatGPT generates $U=40$ candidate prompts from templates such as “Give n phrases describing the {def} defect on a {obj}.” Invalid prompts are pruned, BERT encodes each $\phi_u\rightarrow\psi_{\rm BERT}(\phi_u)$, and the representation is averaged:
$$
V_{\rm lang} = \frac{1}{U}\sum_{u=1}^U \psi_{\rm BERT}(\phi_u)\in\mathbb R^{Q\times Z}.
$$
Pixel-Word Attention Modules (PWAMs) from LAVT integrate $V_{\rm lang}$ with intermediate visual features [2407.03130].

The segmentation head distinguishes ADClick-Seg from ADClick. ADClick uses an MLP-based mask decoder plus iterative click feedback to refine masks. ADClick-Seg removes that complex MLP head “to avoid overfitting small AD datasets”; instead, it concatenates resized cross-attended multi-scale features, applies a linear patch-embedding, and adds them to the embedded residual features. In the conceptual diagram, $[R_{\rm tst} + \text{PWAM outputs}] \rightarrow \text{Swin-Transformer backbone} \rightarrow \text{linear decoder} \rightarrow \text{anomaly map } A(x,y)$, and there is no click input at test time [2407.03130].

The later 2025 summary presents a closely related but differently parameterized description: a ViT image branch pre-trained on COCO/LVIS, a residual branch with two Swin-Transformer blocks, Zero-Conv fusion, and a dense decoder. This suggests a revised exposition or implementation variant, but the recurring structural elements remain residual features, language-conditioned fusion, and dense anomaly scoring [2509.05034].

## 3. Interactive labeling and pseudo-mask generation

ADClick-Seg depends on the quality of ADClick-generated pseudo-masks. On each real defective image, $3$–$5$ positive/negative clicks are manually provided, and ADClick iteratively predicts a mask $M_T$ via Eq. (1) in ADClick; these masks then serve as weak labels for ADClick-Seg [2407.03130].

In the 2025 description of ADClick, the interaction process is formalized using a click sequence
$$
\mathcal C=\{\mathbf C_t=(x_t,y_t,\beta_t)^\top\},\quad \beta_t\in\{0,1\},
$$
where $\beta_t=1$ denotes a positive anomaly click and $\beta_t=0$ a negative click. Starting from $M_0=\mathbf 0$, each new click updates the mask through
$$
M_t = \Phi_{\rm Click}\bigl(\mathfrak R,\;M_{t-1},\;\mathbf C_t,\;\mathbf l,\;I_{\rm tst}\bigr).
$$
This interactive branch is trained with a normalized focal loss; the summary notes that no Dice loss nor cross-entropy are explicitly mentioned in the paper [2509.05034].

The quantitative role of ADClick as a labeling tool is substantial. The 2024 abstract reports that ADClick generates high-quality anomaly labels with AP $= 94.1\%$ on MVTec AD based on only $3$ to $5$ manual click annotations per training image [2407.03130]. The 2025 results further report IIS performance on MVTec-AD and KolektorSDD2, including NoC@80, where ADClick achieves NoC@80 $= 5.6$ and 5-click AP/PRO/Pixel-AUROC/mIoU of $96.1/98.3/99.7/81.1$, outperforming FocSAM, GPCIS, and SimpleClick in that table [2509.05034].

## 4. Weakly supervised training mechanics

The 2024 report describes ADClick-Seg training as semi-supervised segmentation using pseudo-masks together with click strengthening and tri-valued supervision. Around click sites, the mask is confidence-boosted according to [2407.03130]
$$
\tilde M(x,y)=
\begin{cases}
1 & \text{if } \min_{+\text{clicks}}\|(x,y)-\alpha^+\|<d,\\
0 & \text{if } \min_{-\text{clicks}}\|(x,y)-\alpha^-\|<d,\\
M(x,y) & \text{otherwise.}
\end{cases}
$$

The strengthened mask is converted into a tri-valued label map:
$$
\hat M(x,y)=
\begin{cases}
1 & \text{if } \tilde M>0.5+\delta,\\
0 & \text{if } \tilde M<0.5-\delta,\\
0.5 & \text{else,}
\end{cases}
\qquad \delta\sim U(0,0.1).
$$
No loss is back-propagated where $\hat M=0.5$, a mechanism referred to as “label abandon” [2407.03130].

The loss is the Normalized Focal Loss (NFL) over pixels where $\hat M\neq 0.5$:
$$
\zeta_{x,y} = \hat M(x,y) - A(x,y), \qquad
\epsilon_{x,y}=1[\hat M(x,y)\neq 0.5],
$$
$$
L_{\mathrm{NFL}}
= - \sum_{x,y} \epsilon_{x,y} \cdot |\zeta_{x,y}|^\gamma \log(1-|\zeta_{x,y}|)
\Big/
\sum_{x,y} \epsilon_{x,y} \cdot |\zeta_{x,y}|^\gamma.
$$
The report states that $\gamma$ and the normalization follow Sofiiuk et al. [2407.03130].

Optimization details are explicit: AdamW with learning rate $3\times 10^{-5}$, weight decay $0.05$, and EMA on weights; input resolution $512\times 512$; random pseudo clicks with maximum $3$; and standard IIS augmentation, specifically flips and random crops applied to image, clicks, and residuals. The implementation notes list hyperparameters $K=50$ neighbors, $\sigma=3.2$, click radius $d\approx 3$ px, and $\delta\in[0,0.1]$; pretraining on all subcategories, excluding the test one, is recommended for maximizing generalization [2407.03130].

## 5. Inference behavior and prompt handling

ADClick-Seg does not require click input at test time in the 2024 formulation; the model segments anomalies from residual and language features alone [2407.03130]. This separates the annotation phase, where clicks are necessary to generate pseudo-labels, from the deployed segmentation phase, where inference is fully dense and click-free.

Handling unknown defect type is prompt-driven. In the 2024 report, inference proceeds by evaluating $P$ possible language representations $V_{{\rm lang},i}$ and taking the per-pixel maximum across them. The 2025 formulation makes this explicit by defining per-defect-type anomaly maps $\{A_i\in\mathbb R^{H_I\times W_I}\mid i=1,\dots,P\}$ and aggregating them as [2509.05034]
$$
\hat A[x,y] = \max_{i=1\dots P} A_i[x,y].
$$
The same summary states that, for ADClick interactive segmentation, inference randomly picks one prompt and reuses its linguistic embedding $\mathbf l$, while pure anomaly localization runs the full Fusion Decoder for all $P$ defect types and combines them through $\max_i$ [2509.05034].

This prompt strategy has an operational consequence already noted in the 2024 discussion: category names are required at training, and unknown test defects require multi-pass inference. A plausible implication is that semantic prompt coverage is part of the effective hypothesis class, especially when the defect taxonomy is incomplete [2407.03130].

## 6. Empirical performance, strengths, and limitations

The reported evaluation metrics are AP, PRO, Pixel-AUROC, and Image-AUROC, with AP defined as Average Precision of anomaly-mask predictions and PRO as Per-Region Overlap, the average region-based IoU [2407.03130]. Across the 2024 supervised tables, ADClick-Seg (weak) obtains the following results [2407.03130]:

| Benchmark setting | ADClick-Seg result | Comparative note |
|---|---:|---|
| MVTec AD, supervised anomaly localization (total average) | AP 86.4, PRO 98.2, Pixel-AUROC 99.6 | CPR (weak) reports AP 86.0, PRO 98.3, Pixel-AUROC 99.6 |
| MVTec AD, supervised anomaly detection | Image-AUROC 99.6% | CPR reports 99.7%; PRN reports 99.4% |
| KSDD2, supervised results | AP 78.4, PRO 98.6, Pixel-AUROC 99.6, Image-AUROC 98.0 | PRN reports 72.5/94.9/97.6/96.4; SemiREST (weak) reports 72.1/97.5/99.1/97.4 |

The 2024 report states that ADClick-Seg “achieves new state-of-the-art AP in the weakly-supervised setting” on KSDD2, and the discussion claims that it “beats fully-supervised SOTA in AP, PRO, and AUROC on MVTec AD and KSDD2” [2407.03130]. The 2025 multi-class table reports ADClick-Seg (Res+Lang+Img) in the unsupervised setting on MVTec-AD at AP $= 80.0\%$, PRO $= 97.5\%$, Pixel-AUROC $= 99.1\%$, and Image-AUROC $= 99.0\%$, compared with WeakREST at $79.0/97.3/99.1/98.8$; on KolektorSDD2, ADClick-Seg (Res+Img) reports AP $= 77.0\%$, PRO $= 98.1\%$, Pixel-AUROC $= 99.6\%$, and Image-AUROC $= 97.0\%$ [2509.05034].

The strengths identified in the 2024 analysis are high accuracy using only $3$–$5$ clicks per image for label generation, and strong generalization across categories attributed to stable residual features from location-aware matching, language guidance encoding fine-grained defect semantics, and tri-valued training that avoids noisy labels. The report also records rare failure cases: extremely small or texture-like anomalies can be under-segmented, and logical anomalies outside known category prompts can be missed [2407.03130].

The limitations are equally explicit. ADClick-Seg adds complexity through cross-modal modules such as BERT and PWAM, requires category names at training, and depends on pseudo-mask quality, so gross click mistakes or out-of-distribution defects may degrade training [2407.03130]. A separate interpretive issue appears in the 2025 version: although the abstract refers to a “prototype-based approach,” the method section “does not provide any equations for prototypes in visual/text spaces, nor any contrastive or alignment losses”; instead, all cross-modal alignment is said to be performed implicitly via cross-attention plus the shared Fusion Decoder [2509.05034]. This makes the documented core of ADClick-Seg more securely identified with residual matching, language-guided fusion, and weakly supervised dense prediction than with an explicitly specified prototype-learning objective.

Source: https://www.emergentmind.com/topics/adclick-seg