Skip to content

cirmuw/arepas

Repository files navigation

Code repository for the 2025 MICCAI Workshop MLMI paper

AREPAS: Anomaly Detection in Fine-Grained Anatomy with Reconstruction-Based Semantic Patch-Scoring

Normal fine-grained tissue variability, such as that present in pulmonary anatomy, is a major challenge for existing generative anomaly detection (AD) methods.
Here, we propose a novel generative AD approach addressing this issue. It consists of an image-to-image translation for anomaly-free reconstruction and a subsequent patch similarity scoring between observed and generated image pairs for precise anomaly localization.


Method

MICCAI25

AREPAS uses two networks:

  1. Reconstruction network
    Designed to reconstruct the real image without anomalies from the Canny-edge representation of the observed image.

  2. Patch similarity network
    A Siamese network trained using randomly sampled patch pairs:

    • Same spatial locations → label 1
    • Different spatial locations → label 0

    These patch pairs are used to train the network with a contrastive loss.

During inference, an ensemble of patch-level similarity scores is computed from identical locations in the real and reconstructed image pairs and aggregated to obtain an anomaly heatmap.


How to use

The provided notebook contains a simplified demonstration of how to run AREPAS:

  1. Load the example dataset.
  2. Run the reconstruction network to generate anomaly-free images.
  3. Sample patch pairs from real and reconstructed images.
  4. Compute patch-level similarity scores.
  5. Aggregate scores to produce an anomaly heatmap.

See the notebook for detailed instructions and example outputs.

About

code repository for MICCAI workshop MLMI paper: AREPAS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors