Ducdata1808's picture
Upload folder using huggingface_hub
c9bc259 verified
|
Raw History Blame Contribute Delete
3.9 kB

πŸ† MMAD Remake β€” Unified Industrial Anomaly Detection Benchmark

Welcome to the MMAD Remake Benchmark Dataset, a comprehensive, unified Multimodal Visual Question Answering (VQA) and detailed image captioning benchmark built for evaluating Frontier Vision-Language Models (VLMs) across industrial quality control and visual anomaly detection.


πŸ“Œ Dataset Overview

  • Combined Datasets (4 Sources):
    1. GoodsAD: Supermarket goods anomaly detection (4,875 images)
    2. MVTec AD: Industrial surface & object anomaly detection (5,354 images)
    3. VisA: High-resolution printed circuit boards & multi-instance objects (10,821 images)
    4. MVTec LOCO AD: Structural and logical constraint anomalies (3,122 images)
  • Total Images: 24,172 high-resolution images
  • Total VQA Question Set: ~120,000+ multiple-choice questions across 7 core industrial subtasks.
  • Caption Model: Qwen2-VL-2B-Instruct
  • VQA Generator Model: Qwen2.5-7B-Instruct (4-bit Quantized)

πŸ“‚ Directory Structure

MMAD_remake_Benchmark/
β”œβ”€β”€ images/                             # Contains image files organized by source dataset
β”‚   β”œβ”€β”€ goodsad/                        # 6 supermarket product categories
β”‚   β”œβ”€β”€ mvtecad/                        # 15 industrial object & texture categories
β”‚   β”œβ”€β”€ visa/                           # 12 PCB & multi-instance categories
β”‚   └── mvtecloco/                      # 5 logical constraint categories
β”œβ”€β”€ mmad_remake_captions.json           # Unified image captions across all 24,172 images
β”œβ”€β”€ mmad_remake_questions.json          # Unified Multiple-Choice VQA Benchmark questions
β”œβ”€β”€ mmad_remake_metadata.csv            # Overview metadata table for easy filtering
└── README.md                           # Benchmark documentation

πŸ“‘ Core VQA Subtasks Evaluated

  1. Anomaly Detection: Binary verification (Yes / No) if a defect exists.
  2. Anomaly Classification: Identifying the exact defect category/type.
  3. Anomaly Localization: Identifying the relative spatial location of the defect.
  4. Attribute QA: Inquiring about physical attributes (colors, OCR text, branding, material).
  5. Structural Reasoning: Evaluating component alignment, symmetry, and structural integrity.
  6. Logical Reasoning: Checking for missing parts, extra items, or placement constraint violations.
  7. Complex Decision Making: Final Quality Control pass/reject determination.

πŸ› οΈ Usage Example (Python PyTorch / HuggingFace)

import os
import json
import pandas as pd
from PIL import Image

BENCHMARK_ROOT = "./MMAD_remake_Benchmark"
QUESTIONS_FILE = os.path.join(BENCHMARK_ROOT, "mmad_remake_questions.json")

with open(QUESTIONS_FILE, "r", encoding="utf-8") as f:
    benchmark_data = json.load(f)

print(f"Total benchmark samples: {len(benchmark_data)}")

# Load a sample item
sample = benchmark_data[0]
image_full_path = os.path.join(BENCHMARK_ROOT, sample["image_path"])

# Open image
img = Image.open(image_full_path)
print(f"Sample Global ID: {sample['global_id']} (Source: {sample['dataset_source']})")
print(f"Loaded image: {image_full_path} (Size: {img.size})")

# Iterate questions
for q in sample["questions"]:
    print(f"\n[{q['subtask']}] {q['question']}")
    for opt in q["options"]:
        print(f"  {opt}")
    print(f"Correct Answer: {q['answer']}")

πŸ“œ License & Citation

The original images belong to their respective dataset creators (PKU-GoodsAD, MVTec Software GmbH, Amazon Research). Please cite the original papers when conducting non-commercial research using this benchmark:

@inproceedings{mmad_remake_2026,
  title={MMAD Remake: A Unified Multimodal Benchmark for Industrial Visual Anomaly Detection},
  author={Celesnity Research},
  year={2026}
}