aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT

Model

AnomalyThink-Qwen2.5-VL-7B-SFT

0

6 commits

1 linked in READMEs

updated Sep 18, 2026

See the code

README

AnomalyThink-Qwen2.5-VL-7B-SFT

Supervised-fine-tuning-only baseline (DS-MVTec 80.16 / VisA 64.78).

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).

What this model is

This is the plain starting point of the AnomalyThink family. The base model is fine-tuned directly on 6,000 teacher-written reasoning traces. There is no reinforcement-learning stage and no self-distillation loop. Use it as the reference point that the later models are measured against.

It is not the Keep-Correct-Revise (KCR) model. KCR is the recipe where an SFT plus GRPO policy generates its own traces, which are then kept when correct, corrected by a teacher when wrong, and revised when correct but weakly grounded, after which the base model is fine-tuned on that curated result. The KCR model is released separately as aacudad/AnomalyThink-Qwen2.5-VL-7B-KCR.

Results (MMAD subsets, balanced accuracy)

BenchmarkBalanced accuracy
DS-MVTec (1,670)80.16%
VisA (2,141)64.78%

Evaluated under a single common harness on the MMAD DS-MVTec and VisA subsets. This is the SFT-only headline before any RL stage.

Training

Supervised fine-tuning on the AnomalyThink-6K corpus. 6,000 Gemini-2.5-Flash traces, vision encoder frozen, epoch 3 of 4.

The "AnomalyThink" reasoning traces were distilled from Gemini 2.5-Flash on Real-IAD images. Training data: aacudad/AnomalyThink (folder anomalythink_6k).

The AnomalyThink Qwen family

ModelDS-MVTecVisANote
…-7B-KCR82.8072.07thesis headline
…-7B-SFT80.1664.78this model
…-7B-SFT-GRPO82.7370.39this model plus GRPO
…-7B-KCR-GRPO82.9572.62research preview, not a thesis result

Usage

import torch
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
model_id = "aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT"
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.

Intended use and limitations

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.

Citation

@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.

License

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.

anomaly-detection
conversational
endpoints_compatible
image-text-to-text
industrial-anomaly-detection
qwen2_5_vl
reasoning
safetensors
text-generation-inference
transformers
vision-language-model

aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT

Model

AnomalyThink-Qwen2.5-VL-7B-SFT

0

6 commits

1 linked in READMEs

updated Sep 18, 2026

See the code

README

AnomalyThink-Qwen2.5-VL-7B-SFT

Supervised-fine-tuning-only baseline (DS-MVTec 80.16 / VisA 64.78).

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).

What this model is

This is the plain starting point of the AnomalyThink family. The base model is fine-tuned directly on 6,000 teacher-written reasoning traces. There is no reinforcement-learning stage and no self-distillation loop. Use it as the reference point that the later models are measured against.

It is not the Keep-Correct-Revise (KCR) model. KCR is the recipe where an SFT plus GRPO policy generates its own traces, which are then kept when correct, corrected by a teacher when wrong, and revised when correct but weakly grounded, after which the base model is fine-tuned on that curated result. The KCR model is released separately as aacudad/AnomalyThink-Qwen2.5-VL-7B-KCR.

Results (MMAD subsets, balanced accuracy)

BenchmarkBalanced accuracy
DS-MVTec (1,670)80.16%
VisA (2,141)64.78%

Evaluated under a single common harness on the MMAD DS-MVTec and VisA subsets. This is the SFT-only headline before any RL stage.

Training

Supervised fine-tuning on the AnomalyThink-6K corpus. 6,000 Gemini-2.5-Flash traces, vision encoder frozen, epoch 3 of 4.

The "AnomalyThink" reasoning traces were distilled from Gemini 2.5-Flash on Real-IAD images. Training data: aacudad/AnomalyThink (folder anomalythink_6k).

The AnomalyThink Qwen family

ModelDS-MVTecVisANote
…-7B-KCR82.8072.07thesis headline
…-7B-SFT80.1664.78this model
…-7B-SFT-GRPO82.7370.39this model plus GRPO
…-7B-KCR-GRPO82.9572.62research preview, not a thesis result

Usage

import torch
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
model_id = "aacudad/AnomalyThink-Qwen2.5-VL-7B-SFT"
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.

Intended use and limitations

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.

Citation

@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.

License

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.

anomaly-detection
conversational
endpoints_compatible
image-text-to-text
industrial-anomaly-detection
qwen2_5_vl
reasoning
safetensors
text-generation-inference
transformers
vision-language-model