SFT then GRPO (DS-MVTec 82.73 / VisA 70.39).
A Qwen2.5-VL-7B model fine-tuned for explainable industrial anomaly detection (IAD). Given a product image it produces a structured reasoning trace (<think>), a defect <location> and <type> (for anomalies), and a binary <answer>. Research artefact from the MSc thesis Reasoning-Enhanced Vision-Language Models for Explainable Industrial Anomaly Detection (TU Delft, 2026).
Two stages. First supervised fine-tuning on 6,000 teacher-written reasoning traces, which gives aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT. Then GRPO on top of that. This is checkpoint-530 of the GRPO run.
This model also has a second role in the project. It is the policy that Keep-Correct-Revise (KCR) rolls out from. KCR is the recipe where this SFT plus GRPO policy generates its own reasoning traces on Real-IAD images, and those traces are then kept when the verdict is correct, corrected by a teacher when the verdict is wrong, and revised when the verdict is correct but the reasoning is only weakly grounded. The base model is then fine-tuned from scratch on that curated corpus, which produces the thesis headline model aacudad/AnomalyThink-Qwen2.5-VL-7B-KCR.
| Benchmark | Balanced accuracy |
|---|---|
| DS-MVTec (1,670) | 82.73% |
| VisA (2,141) | 70.39% |
Evaluated under a single common harness on the MMAD DS-MVTec and VisA subsets. GRPO clearly lifts the plain SFT baseline here. On the stronger KCR initialisation the thesis finds no comparable gain, so KCR remains SFT only.
Supervised fine-tuning on AnomalyThink-6K, then GRPO with a four-component reward (format, accuracy, type, location) and group size G=4.
The "AnomalyThink" reasoning traces were distilled from Gemini 2.5-Flash on Real-IAD images. Training data: aacudad/AnomalyThink.
| Model | DS-MVTec | VisA | Note |
|---|---|---|---|
…-7B-KCR | 82.80 | 72.07 | thesis headline |
…-7B-SFT | 80.16 | 64.78 | plain SFT baseline |
…-7B-SFT-GRPO | 82.73 | 70.39 | this model |
…-7B-KCR-GRPO | 82.95 | 72.62 | research preview, not a thesis result |
import torch
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
model_id = "aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT-GRPO"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
# Build the structured single-image IAD prompt + image, then generate.
Research on explainable IAD. Known limitations: the model can confidently hallucinate a defect on a normal part (false positive), and GRPO-lineage variants can over-predict the "Missing Parts" type. As the public DS-MVTec/VisA images may appear in VLM pretraining, absolute numbers should be read with that caveat.
@mastersthesis{acudad2026reasoning,
author = {Acudad, A.},
title = {Reasoning-Enhanced Vision-Language Models for Explainable Industrial Anomaly Detection},
school = {Delft University of Technology},
year = {2026},
type = {Master's thesis},
url = {https://resolver.tudelft.nl/uuid:65c62420-79c0-447f-b095-7fb11d4474fc}
}
Thesis: https://resolver.tudelft.nl/uuid:65c62420-79c0-447f-b095-7fb11d4474fc. Code and evaluation files: https://github.com/aacudad/IAD-VLMs.
Apache-2.0 (inherits the Qwen2.5-VL-7B base). Trained on Real-IAD (cite Real-IAD separately, images are not redistributed) with traces distilled from Gemini 2.5-Flash.
SFT then GRPO (DS-MVTec 82.73 / VisA 70.39).
A Qwen2.5-VL-7B model fine-tuned for explainable industrial anomaly detection (IAD). Given a product image it produces a structured reasoning trace (<think>), a defect <location> and <type> (for anomalies), and a binary <answer>. Research artefact from the MSc thesis Reasoning-Enhanced Vision-Language Models for Explainable Industrial Anomaly Detection (TU Delft, 2026).
Two stages. First supervised fine-tuning on 6,000 teacher-written reasoning traces, which gives aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT. Then GRPO on top of that. This is checkpoint-530 of the GRPO run.
This model also has a second role in the project. It is the policy that Keep-Correct-Revise (KCR) rolls out from. KCR is the recipe where this SFT plus GRPO policy generates its own reasoning traces on Real-IAD images, and those traces are then kept when the verdict is correct, corrected by a teacher when the verdict is wrong, and revised when the verdict is correct but the reasoning is only weakly grounded. The base model is then fine-tuned from scratch on that curated corpus, which produces the thesis headline model aacudad/AnomalyThink-Qwen2.5-VL-7B-KCR.
| Benchmark | Balanced accuracy |
|---|---|
| DS-MVTec (1,670) | 82.73% |
| VisA (2,141) | 70.39% |
Evaluated under a single common harness on the MMAD DS-MVTec and VisA subsets. GRPO clearly lifts the plain SFT baseline here. On the stronger KCR initialisation the thesis finds no comparable gain, so KCR remains SFT only.
Supervised fine-tuning on AnomalyThink-6K, then GRPO with a four-component reward (format, accuracy, type, location) and group size G=4.
The "AnomalyThink" reasoning traces were distilled from Gemini 2.5-Flash on Real-IAD images. Training data: aacudad/AnomalyThink.
| Model | DS-MVTec | VisA | Note |
|---|---|---|---|
…-7B-KCR | 82.80 | 72.07 | thesis headline |
…-7B-SFT | 80.16 | 64.78 | plain SFT baseline |
…-7B-SFT-GRPO | 82.73 | 70.39 | this model |
…-7B-KCR-GRPO | 82.95 | 72.62 | research preview, not a thesis result |
import torch
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
model_id = "aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT-GRPO"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
# Build the structured single-image IAD prompt + image, then generate.
Research on explainable IAD. Known limitations: the model can confidently hallucinate a defect on a normal part (false positive), and GRPO-lineage variants can over-predict the "Missing Parts" type. As the public DS-MVTec/VisA images may appear in VLM pretraining, absolute numbers should be read with that caveat.
@mastersthesis{acudad2026reasoning,
author = {Acudad, A.},
title = {Reasoning-Enhanced Vision-Language Models for Explainable Industrial Anomaly Detection},
school = {Delft University of Technology},
year = {2026},
type = {Master's thesis},
url = {https://resolver.tudelft.nl/uuid:65c62420-79c0-447f-b095-7fb11d4474fc}
}
Thesis: https://resolver.tudelft.nl/uuid:65c62420-79c0-447f-b095-7fb11d4474fc. Code and evaluation files: https://github.com/aacudad/IAD-VLMs.
Apache-2.0 (inherits the Qwen2.5-VL-7B base). Trained on Real-IAD (cite Real-IAD separately, images are not redistributed) with traces distilled from Gemini 2.5-Flash.