← Latest papers
💻 computer science

MIRAGE: Model-agnostic Industrial Realistic Anomaly Generation and Evaluation for Visual Anomaly Detection

MIRAGE is a fully automated, training-free pipeline that leverages black-box generative models, vision-language models, and a dual-branch change detection module to generate realistic industrial anomaly images and pixel-level masks without requiring real defect data, thereby enhancing visual anomaly detection performance and providing a large-scale open-source dataset.

Original authors: Jinwei Hu, Francesco Borsatti, Arianna Stropeni, Davide Dalle Pezze, Manuel Barusco, Gian Antonio Susto

Published 2026-03-17
📖 5 min read🧠 Deep dive

Original authors: Jinwei Hu, Francesco Borsatti, Arianna Stropeni, Davide Dalle Pezze, Manuel Barusco, Gian Antonio Susto

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a quality inspector at a factory that makes thousands of identical products every day, like glass bottles or electronic chips. Your job is to spot the "bad" ones—those with scratches, cracks, or dents.

The problem? You've never seen a bad one. The factory is so perfect that you only have photos of "good" products. Traditional AI models try to learn what "perfect" looks like and then scream "ALARM!" if anything looks even slightly different. But this is tricky; sometimes a shadow looks like a scratch, or a smudge looks like a crack, leading to false alarms.

To fix this, you'd love to show the AI photos of real defects. But in a perfect factory, real defects don't exist (or are too rare to collect).

Enter MIRAGE. Think of MIRAGE as a magical "What-If" machine that can create fake, but incredibly realistic, photos of broken products so the AI can learn from them.

Here is how MIRAGE works, broken down into simple steps:

1. The "Imagination" Engine (The Generative Model)

Most previous methods tried to build their own "imagination" engine from scratch, which was like trying to build a new car engine every time you wanted to drive. It was expensive, slow, and hard to upgrade.

MIRAGE is different. It doesn't build an engine; it rents a super-car.

  • The Analogy: Imagine you want to see what a "scratched bottle" looks like. Instead of painting it yourself, you call a professional artist (an AI model called Gemini) via a phone app (API).
  • You say: "Here is a photo of a perfect bottle. Now, imagine it has a scratch on the side."
  • The artist instantly sends back a photo that looks so real, you can almost feel the scratch.
  • The Magic: If a better artist becomes available next year, you just change the phone number you call. You don't have to rebuild the whole system.

2. The "Bouncer" (The Quality Filter)

Sometimes, the artist gets it wrong. They might draw a scratch that looks like a crack, or they might accidentally change the color of the bottle.

  • The Analogy: MIRAGE has a strict bouncer at the door (a CLIP-based filter). Before the fake photo is allowed into the training room, the bouncer checks: "Does this photo actually look like a scratched bottle, or is it just a blue bottle?"
  • If the photo doesn't match the description perfectly, the bouncer kicks it out. This ensures the AI only learns from high-quality examples.

3. The "X-Ray Vision" (The Mask Generator)

This is the trickiest part. When the artist draws a scratch, the AI needs to know exactly which pixels are the scratch and which are the bottle. It needs a "mask" (a stencil) to highlight the damage.

  • The Problem: The artist might change the lighting slightly or shift the angle, making it hard to tell what changed just by looking at the pixels.
  • The MIRAGE Solution: It uses a two-brain approach:
    1. The Semantic Brain: This brain reads the text ("scratch") and looks for anything that looks like a scratch.
    2. The Structural Brain: This brain ignores the text and just looks for any physical change in the shape or texture between the perfect photo and the fake one.
  • The Result: It combines these two views. If the Semantic Brain says "That looks like a scratch" AND the Structural Brain says "The texture changed there," BAM! It draws a perfect stencil around the defect. It does this without needing to be taught how to do it first.

4. The "Grand Experiment" (The Results)

The team tested MIRAGE against other methods using two famous industrial datasets (MVTec AD and VisA).

  • The Human Test: They showed real humans photos of real defects vs. MIRAGE's fake defects. The humans couldn't tell the difference most of the time! MIRAGE's fake defects were rated almost as realistic as real ones.
  • The AI Test: They trained a new AI inspector using only MIRAGE's fake photos. This new inspector became incredibly good at finding real defects, beating all other methods.

Why This Matters

  • No Real Defects Needed: You don't need to wait for a factory to break to train your AI.
  • Cheap and Easy: It doesn't require super-expensive computers. You just use an internet connection to call the "artist."
  • Future-Proof: As AI gets better, MIRAGE just swaps the "artist" for a better one.
  • Open Source: The team released over 13,000 of these fake defect photos and masks for free, so anyone can use them to build better safety systems.

In short: MIRAGE is a plug-and-play system that uses the power of modern AI artists to dream up perfect examples of "what could go wrong," allowing factories to train their safety systems without ever needing a single real broken product.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →