REVIEW 4 major objections 5 minor 27 references
Zero-Shot Industrial Anomaly Segmentation with Image-Aware Prompt Generation
T0 review · 4 major / 5 minor · reviewed 2026-08-16 · deepseek-v4-flash
Pith's one-line read IAP-AS claims that per-image, LLM-generated prompts improve zero-shot anomaly segmentation by up to 10% in F1-max across seven industrial datasets.
desk verdict The prompt-generation idea is real and the gains are plausible, but the size threshold is computed from the test image itself, which confounds the zero-shot claim and needs clarification before the numbers can be trusted. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the Image-Aware Prompt (IAP), a text prompt generated per image by merging object tags from an image tagging model with an LLM instruction that asks for anomalous nouns; the final prompt combines these LLM-generated adjective clauses, the object tag set, and fixed words like "abnormal" and "defect". This prompt carries the argument: it is fed to an open-set detector, whose boxes are filtered by a size threshold, and the surviving boxes are given to a promptable segmentation model whose masks are weighted by confidence to produce the anomaly score.
What would settle it
Run the full IAP-AS pipeline on any dataset while computing the size threshold from a separate set of normal images instead of from the test image; if the F1-max gain over fixed prompts shrinks toward zero, the reported improvement comes from test-image information in the threshold, not from the prompt generation itself.
Extended reading notes
Core claim
The central claim is that a prompt built from the image's own tags—for example, leather, brown, fabric, material—expanded by an LLM into a list like cut, hole, split, blemish, tear, mark, lets an open-vocabulary detector find defects that a generic "abnormal" prompt misses. The paper attributes the gain to three cooperating components: image tagging, LLM-based prompt expansion, and a size filter that removes detections larger than a per-image threshold. On the MVTec-AD dataset the fully integrated system reaches 40.13 F1-max versus 24.73 for the same pipeline without these components, and it reports improved or competitive results on six other industrial datasets that include both objects and textures.
Load-bearing premise
The method assumes that a size threshold computed from the very image being tested, using only normal-object tags, is a legitimate zero-shot filter rather than a way of leaking information from the test image into the prediction.
Editorial extensions
If this is right
- Replacing fixed prompts with image-tag-derived prompts is a drop-in change for text-guided zero-shot anomaly segmentation pipelines, since it does not require retraining.
- Because prompts are generated per image, the method can adapt to products whose surface material or object type changes across a production line, where a single fixed prompt would fail.
- Image tagging, LLM prompting, and size filtering are complementary: the ablation shows each component contributes, and the full combination performs best.
- The gains hold across both object and texture industrial datasets, suggesting the mechanism is not specific to one defect type.
- The method's output masks are weighted by detector confidence, giving a per-pixel anomaly score suitable for downstream quality-control decision rules.
Reading between the lines
- A fair comparison would need to verify whether the per-image size threshold is computed from the test image itself; if so, part of the reported gain may be test-time adaptation, and a clean zero-shot evaluation should derive the threshold from normal images only.
- Because the tags come from a fixed-vocabulary image tagging model, images containing objects outside that vocabulary may produce poor prompts; extending the approach with a tagging model that outputs free-form attributes could be tested.
- The same prompt-generation mechanism could in principle be applied to other text-guided dense prediction tasks, such as referring segmentation or open-vocabulary detection, by swapping the anomaly-specific instruction in the LLM query.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes IAP-AS, a zero-shot anomaly segmentation method that generates image-aware text prompts by combining an image tagging model (RAM) and an LLM (LLaMA-3-8B), then feeds these prompts to a Grounding DINO + SAM pipeline. The claimed contribution is that dynamic, context-aware prompts replace fixed prompts and improve F1-max by up to about 10% over existing zero-shot baselines across seven industrial datasets. The method comprises a preprocessing stage (object tagging, size-threshold extraction, LLM prompting) and a segmentation stage (anomaly region generation, size filtering, SAM masking, score aggregation). The paper reports quantitative results in Table 1, an ablation in Table 3, and qualitative examples.
Significance. If the claims hold, the work would demonstrate a simple and potentially impactful way to improve zero-shot anomaly segmentation: replacing manually fixed prompts with automatic, image-conditioned prompt generation. The paper releases code, uses several standard industrial anomaly datasets, and includes an ablation study. These are positive features. The central question is whether the reported gains are actually attributable to the image-aware prompting mechanism or to a test-image-derived size filter that the comparison methods do not receive. Because that confound is not resolved, the significance of the contribution is currently uncertain but the underlying idea is worth exploring.
major comments (4)
- [Algorithm 1 lines 7 and 14] The size threshold Sthreshold is computed on line 7 as GroundingDINO(Ia, Tn), where Ia denotes the anomalous (test) images, and is then used on line 14 to filter detections from those same images. This means the method uses information from the test image itself to determine which detection boxes to keep, which is a form of test-time adaptation rather than a pure zero-shot procedure. The comparison methods in Table 1 do not have access to such a per-image adaptive filter. The abstract and Section 5.2 attribute the F1-max gains to the image-aware prompts, but the ablation in Table 3 shows that the largest jump occurs only when filtering is combined with tagging (O O O: 40.13 vs. O O X: 33.08), and that LLM prompting without tagging (X O X: 33.66) outperforms tagging with LLM but without filtering (O O X: 33.08). This interaction pattern is consistent with the test-derived threshold, not the LLM prompt, being the decisive component. The authors should recompute Sthreshold from normal images only (or fix it a priori) and re-run the experiments and ablation to verify whether the prompt-based gains persist without this test-image leak.
- [§5.1] The implementation details in Section 5.1 state that 'a size threshold of 0.8 filtered out unusually sized bounding boxes,' which suggests a fixed constant. This directly contradicts Algorithm 1, line 7, where Sthreshold is computed per test image from GroundingDINO(Ia, Tn), and also contradicts the Step 1-2 text, which says the threshold is the maximum size of detected regions in the input image. Additionally, the Step 1-2 text says the threshold 'filters out smaller regions,' whereas Eq. (3) defines J = {i | bi < Sthreshold}, which retains only boxes smaller than the threshold. These inconsistencies make the reported configuration ambiguous and the method impossible to reproduce as described. Please clarify which threshold definition is actually used and provide the exact filtering rule.
- [Table 1] No error bars, standard deviations, or significance tests are reported. Since the method involves a random selection of normal images (random value r in Algorithm 1), the results may vary across runs, and the claimed improvements (e.g., up to 10.99% F1-max on BTAD) may lie within noise. The authors should report mean and standard deviation over multiple random seeds and, ideally, a significance test for the headline comparisons against SAA+ and the CLIP-based baselines.
- [§5.1] The comparison is not fully controlled: WinCLIP, SAA+, and SDP are described as using 'dataset-specific Few-Shot prompts combined with object names,' while IAP-AS additionally uses a per-image test-derived size threshold. To isolate the contribution of the image-aware prompt generation, the authors should add an ablation variant that uses the IAP-AS pipeline with a fixed size threshold (or no size filtering) and compares against a variant that uses the test-derived threshold without the LLM-generated prompts. This would directly address whether the reported gains come from the prompts or from the adaptive filter.
minor comments (5)
- [Keywords] The keyword 'Large language model (LMM)' appears to be a typo; it should read 'Large language model (LLM)' for consistency with the rest of the text.
- [Table 1] The caption contains a typo: 'trainig-free' should be 'training-free'.
- [§4.1] The description of the size threshold is unclear: it says 'the threshold is calculated as the maximum size of detected regions in the input image Ia' but does not specify how 'size' is measured (area, width, height, or diagonal). Please define the size metric explicitly.
- [§4.1] The notation Pad_j is introduced but the index j is not defined, and the relationship between Pad_j and the final prompt P_final is described only in words. Please define the composition of P_final formally.
- [§3] The problem definition states that segmentation masks are generated with SAM and anomaly scores are computed as a weighted sum, but it does not define how the confidence scores si are obtained when multiple masks overlap or how the final pixel-level score is thresholded for AP/F1-max computation. Please clarify the evaluation protocol.
Circularity Check
No circular derivation; the test-image-derived size threshold is a leakage confound, not a circular step.
full rationale
The central derivation chain is self-contained: normal-image tags T_n are extracted by RAM, combined with an LLM to form P_final, GroundingDINO produces candidate boxes from P_final, and SAM converts filtered boxes to masks. The paper compares against external fixed-prompt baselines and includes a fixed-prompt ablation, so the image-aware prompt claim has independent empirical content. The only data-dependent parameter that weakens the zero-shot label is S_threshold, computed in Algorithm 1 line 7 as GroundingDINO(I_a, T_n) from the anomalous/test image itself and then applied in Eq. (3) to filter detections from the same image. The ablation (Table 3) shows the filtering step produces the largest jump (33.08 to 40.13 on MVTec-AD), so part of the reported gain may come from per-image test-time adaptation rather than from the prompt-generation mechanism. This is a correctness and attribution concern, not a circularity in the derivational sense: the final masks are not equivalent by construction to the prompt or to the threshold, and the LLM-prompting component alone also improves over the fixed-prompt baseline (24.73 to 33.66). There is no self-citation chain, no imported uniqueness theorem, no ansatz smuggled via citation, and no renaming of a known result as a new derivation. F1-max is an oracle threshold metric, but it is applied equally to all compared methods. The score reflects the mild test-time confound rather than a genuine circular derivation.
Assumptions & free parameters
free parameters (4)
- Box and text thresholds =
0.2 for object datasets, 0.1 for texture datasets
- Size threshold Sthreshold =
Maximum detected region size from the test image (or 0.8 as a fixed ratio in Section 5.1)
- IoU threshold =
0.5
- Random seed r =
111
assumptions (5)
- domain assumption Grounding DINO can localize arbitrary anomaly nouns generated by LLaMA on industrial images.
- domain assumption RAM image tagging produces correct, useful object tags on normal industrial images.
- domain assumption LLaMA-3-8B outputs non-redundant anomaly nouns that match the visual appearance of defects in the target domain.
- domain assumption SAM produces accurate pixel masks from Grounding DINO bounding boxes.
- domain assumption F1-max and AP computed on test ground truth are appropriate summary measures of zero-shot performance.
Cite this review
Pith. "Pith review of Zero-Shot Industrial Anomaly Segmentation with Image-Aware Prompt Generation." pith.science (2026). https://pith.science/paper/RFNM5Q3J
@misc{pith2026250413560,
author = {Pith},
title = {Pith review of: Zero-Shot Industrial Anomaly Segmentation with Image-Aware Prompt Generation},
year = {2026},
howpublished = {\url{https://pith.science/paper/RFNM5Q3J}},
note = {Machine review of arXiv:2504.13560}
}
read the original abstract
Anomaly segmentation is essential for industrial quality, maintenance, and stability. Existing text-guided zero-shot anomaly segmentation models are effective but rely on fixed prompts, limiting adaptability in diverse industrial scenarios. This highlights the need for flexible, context-aware prompting strategies. We propose Image-Aware Prompt Anomaly Segmentation (IAP-AS), which enhances anomaly segmentation by generating dynamic, context-aware prompts using an image tagging model and a large language model (LLM). IAP-AS extracts object attributes from images to generate context-aware prompts, improving adaptability and generalization in dynamic and unstructured industrial environments. In our experiments, IAP-AS improves the F1-max metric by up to 10%, demonstrating superior adaptability and generalization. It provides a scalable solution for anomaly segmentation across industries
Figures
Reference graph
Works this paper leans on
- [1]
- [2]
- [3]
-
[4]
arXiv preprint arXiv:2305.10724 (2023)
Cao, Y., Xu, X., Sun, C., Cheng, Y., Du, Z., Gao, L., Shen, W.: Segment any anomaly without training via hybrid prompt regularization. arXiv preprint arXiv:2305.10724 (2023)
arXiv 2023
- [5]
-
[6]
The Visual Computer 36(1), 85–96 (2020), https://github.com/abin24/ Magnetic-tile-defect-datasets./
Huang, Y., Qiu, C., Yuan, K.: Surface defect saliency of magnetic tile. The Visual Computer 36(1), 85–96 (2020), https://github.com/abin24/ Magnetic-tile-defect-datasets./
work page 2020
-
[7]
In: CVPR
Jeong, J., Zou, Y., Kim, T., Zhang, D., Ravichandran, A., Dabeer, O.: Winclip: Zero-/few-shot anomaly classification and segmentation. In: CVPR. pp. 19606– 19616 (2023)
2023
- [8]
Show all 27 references
-
[9]
In: ICCV
Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T., Whitehead, S., Berg, A.C., Lo, W.Y., et al.: Segment anything. In: ICCV. pp. 4015–4026 (2023) 12 S.Y. Park et al
2023
-
[10]
In: CVPR
Lee, M., Choi, J.: Text-guided variational image generation for industrial anomaly detection and segmentation. In: CVPR. pp. 26519–26528 (2024)
2024
-
[11]
In: AAAI
Li, J., Wang, X., Zhao, H., Wang, S., Zhong, Y.: Anomaly segmentation for high- resolution remote sensing images based on pixel descriptors. In: AAAI. pp. 4426– 4434 (2023)
2023
-
[12]
Neurocomputing618, 129122 (2025)
Li, S., Cao, J., Ye, P., Ding, Y., Tu, C., Chen, T.: Clipsam: Clip and sam collabo- ration for zero-shot anomaly segmentation. Neurocomputing618, 129122 (2025)
2025
-
[13]
In: WACV
Li, Y., Goodge, A., Liu, F., Foo, C.S.: Promptad: Zero-shot anomaly detection using text prompts. In: WACV. pp. 1093–1102 (2024)
2024
-
[14]
In: ECCV
Liu, S., Zeng, Z., Ren, T., Li, F., Zhang, H., Yang, J., Jiang, Q., Li, C., Yang, J., Su, H., et al.: Grounding dino: Marrying dino with grounded pre-training for open-set object detection. In: ECCV. pp. 38–55 (2025)
2025
-
[15]
In: CVPR
Lüddecke, T., Ecker, A.: Image segmentation using text and image prompts. In: CVPR. pp. 7086–7096 (2022)
2022
-
[16]
In: NeurIPS
Ma, H., Zhang, C., Bian, Y., Liu, L., Zhang, Z., Zhao, P., Zhang, S., Fu, H., Hu, Q., Wu, B.: Fairness-guided few-shot prompting for large language models. In: NeurIPS. pp. 43136–43155 (2023)
2023
-
[17]
In: ISIE
Mishra, P., Verk, R., Fornasier, D., Piciarelli, C., Foresti, G.L.: Vt-adl: A vision transformer network for image anomaly detection and localization. In: ISIE. pp. 01–06 (2021), http://avires.dimi.uniud.it/papers/btad/btad.zip
2021
-
[18]
In: ICML
Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: ICML. pp. 8748–8763 (2021)
2021
-
[19]
Journal of Intelligent Manufacturing31(3), 759–776 (2020), https://www.vicos.si/resources/kolektorsdd/
Tabernik, D., Šela, S., Skvarč, J., Skočaj, D.: Segmentation-based deep-learning approach for surface-defect detection. Journal of Intelligent Manufacturing31(3), 759–776 (2020), https://www.vicos.si/resources/kolektorsdd/
2020
-
[20]
arXiv preprint arXiv:2302.13971 (2023)
Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al.: Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971 (2023)
2023 arXiv
-
[21]
In: CVPR
Wang, Z., Lu, Y., Li, Q., Tao, X., Guo, Y., Gong, M., Liu, T.: Cris: Clip-driven referring image segmentation. In: CVPR. pp. 11686–11695 (2022)
2022
-
[22]
Wieler, M., Hahn, T., Hamprecht, F.A.: Weakly supervised learning for in- dustrial optical inspection (2007),https://conferences.mpi-inf.mpg.de/dagm/ 2007/prizes.html
2007
-
[23]
Computer-Aided Civil and Infrastructure Engineering38(11), 1536–1554 (2023)
Yong, G., Jeon, K., Gil, D., Lee, G.: Prompt engineering for zero-shot and few- shot defect detection and classification using a visual-language pretrained model. Computer-Aided Civil and Infrastructure Engineering38(11), 1536–1554 (2023)
2023
-
[24]
In: GeoAI@SIGSPATIAL
Zhang, J., Zhou, Z., Mai, G., Hu, M., Guan, Z., Li, S., Mu, L.: Text2seg: Zero- shotremotesensingimagesemanticsegmentationviatext-guidedvisualfoundation models. In: GeoAI@SIGSPATIAL. pp. 63–66 (2024)
2024
-
[25]
In: CVPR
Zhang, Y., Huang, X., Ma, J., Li, Z., Luo, Z., Xie, Y., Qin, Y., Luo, T., Li, Y., Liu, S., et al.: Recognize anything: A strong image tagging model. In: CVPR. pp. 1724–1732 (2024)
2024
-
[26]
arXiv preprint arXiv:2406.20076 (2024)
Zhang, Y., Cheng, T., Hu, R., Liu, L., Liu, H., Ran, L., Chen, X., Liu, W., Wang, X.: Evf-sam: Early vision-language fusion for text-prompted segment anything model. arXiv preprint arXiv:2406.20076 (2024)
2024 arXiv
-
[27]
Computers & Industrial Engineering 177, 109045 (2023)
Zipfel,J.,Verworner,F.,Fischer,M.,Wieland,U.,Kraus,M.,Zschech,P.:Anomaly detection for industrial quality assurance: A comparative evaluation of unsuper- vised deep learning models. Computers & Industrial Engineering 177, 109045 (2023)
2023
Reviewed August 16, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.