synomaly-medical-anomaly-eval
Synomaly Noise and Multi-Stage Diffusion: A Novel Approach for Unsupervised Anomaly Detection in Medical Images — Bi et al. (2024) (arXiv:2411.04004, 2024)
What this evaluates
Evaluates unsupervised anomaly detection in medical imaging by training a generative model on healthy images and reconstructing anomalous inputs. It measures how well the model localizes and segments pathological regions by comparing the reconstruction residuals against ground-truth anomaly masks.
Datasets
Metrics
Dice (primary) — range: [0, 1]
- Dice = 2 * |A ∩ B| / (|A| + |B|), where A and B are the predicted and ground-truth anomaly masks. Measures overlap between predicted and actual anomaly regions.
Precision — range: [0, 1]
- Precision = TP / (TP + FP). Proportion of predicted anomaly pixels that are correctly identified as anomalies.
Recall — range: [0, 1]
- Recall = TP / (TP + FN). Proportion of actual anomaly pixels that are correctly detected by the model.
Input / output format
Input: Anomalous medical image (MRI, CT, or ultrasound) provided as input to the generative model. Ground-truth anomaly segmentation masks are provided only for evaluation.
Output: A reconstructed 'healthy' image and a binary anomaly segmentation mask generated by thresholding the pixel-wise difference between the blurred input and blurred reconstructed image.
Scoring recipe
def compute_metrics(pred_mask, gt_mask):
intersection = np.logical_and(pred_mask, gt_mask).sum()
union = pred_mask.sum() + gt_mask.sum()
dice = 2 * intersection / union if union > 0 else 0.0
precision = intersection / pred_mask.sum() if pred_mask.sum() > 0 else 0.0
recall = intersection / gt_mask.sum() if gt_mask.sum() > 0 else 0.0
return dice, precision, recall
Common pitfalls
- Inference hyperparameters (noise steps T, Gaussian kernel n, threshold Th) are optimized per method via grid search, meaning reported results reflect best-case tuning rather than fixed out-of-the-box settings.
- The anomaly mask is derived from the difference between Gaussian-blurred input and reconstructed images, which smooths residuals and may obscure fine-grained anomaly boundaries.
- The Carotid US dataset is in-house and not publicly released, limiting external reproducibility and cross-dataset generalization checks.
Evidence (verbatim from paper)
The evaluation metrics include the Dice, Precision, and Recall score, to ensure an objective and comprehensive comparison of different approaches.
Citation
@misc{bi2024synomaly,
title={Synomaly Noise and Multi-Stage Diffusion: A Novel Approach for Unsupervised Anomaly Detection in Medical Images},
author={Bi et al. (2024)},
year={2024},
note={arXiv:2411.04004}
}
1---2name: synomaly-medical-anomaly-eval3description: Evaluates unsupervised anomaly detection in medical imaging by training a generative model on healthy images and reconstructing anomalous inputs. It measures how well the model localizes and segments pathological regions by comparing the reconstruction residuals against ground-truth anomaly masks. Use when the user wants to benchmark on BraTS 2023 (Brain MRI), LiTS (Liver CT), Carotid US, or asks about evaluating this task. Reports Dice.4---56# synomaly-medical-anomaly-eval78> Synomaly Noise and Multi-Stage Diffusion: A Novel Approach for Unsupervised Anomaly Detection in Medical Images — Bi et al. (2024) (arXiv:2411.04004, 2024)910## What this evaluates1112Evaluates unsupervised anomaly detection in medical imaging by training a generative model on healthy images and reconstructing anomalous inputs. It measures how well the model localizes and segments pathological regions by comparing the reconstruction residuals against ground-truth anomaly masks.1314## Datasets1516- **BraTS 2023 (Brain MRI)** — total 5159; splits: train (3743), test_anomalous (1000), test_healthy (416); repo https://github.com/yuan-12138/Synomaly17- **LiTS (Liver CT)** — total 7467; splits: train (5820), test_anomalous (1000), test_healthy (647); repo https://github.com/yuan-12138/Synomaly18- **Carotid US** — total 8684; splits: train (7306), test_anomalous (545), test_healthy (833); repo https://github.com/yuan-12138/Synomaly1920## Metrics2122- `Dice` **(primary)** — range: [0, 1]23 - Dice = 2 * |A ∩ B| / (|A| + |B|), where A and B are the predicted and ground-truth anomaly masks. Measures overlap between predicted and actual anomaly regions.24- `Precision` — range: [0, 1]25 - Precision = TP / (TP + FP). Proportion of predicted anomaly pixels that are correctly identified as anomalies.26- `Recall` — range: [0, 1]27 - Recall = TP / (TP + FN). Proportion of actual anomaly pixels that are correctly detected by the model.2829## Input / output format3031**Input**: Anomalous medical image (MRI, CT, or ultrasound) provided as input to the generative model. Ground-truth anomaly segmentation masks are provided only for evaluation.3233**Output**: A reconstructed 'healthy' image and a binary anomaly segmentation mask generated by thresholding the pixel-wise difference between the blurred input and blurred reconstructed image.3435## Scoring recipe3637```python38def compute_metrics(pred_mask, gt_mask):39 intersection = np.logical_and(pred_mask, gt_mask).sum()40 union = pred_mask.sum() + gt_mask.sum()41 dice = 2 * intersection / union if union > 0 else 0.042 precision = intersection / pred_mask.sum() if pred_mask.sum() > 0 else 0.043 recall = intersection / gt_mask.sum() if gt_mask.sum() > 0 else 0.044 return dice, precision, recall45```4647## Common pitfalls4849- Inference hyperparameters (noise steps T, Gaussian kernel n, threshold Th) are optimized per method via grid search, meaning reported results reflect best-case tuning rather than fixed out-of-the-box settings.50- The anomaly mask is derived from the difference between Gaussian-blurred input and reconstructed images, which smooths residuals and may obscure fine-grained anomaly boundaries.51- The Carotid US dataset is in-house and not publicly released, limiting external reproducibility and cross-dataset generalization checks.5253## Evidence (verbatim from paper)5455> The evaluation metrics include the Dice, Precision, and Recall score, to ensure an objective and comprehensive comparison of different approaches.5657## Citation5859```bibtex60@misc{bi2024synomaly,61 title={Synomaly Noise and Multi-Stage Diffusion: A Novel Approach for Unsupervised Anomaly Detection in Medical Images},62 author={Bi et al. (2024)},63 year={2024},64 note={arXiv:2411.04004}65}66```6768- arXiv: 2411.04004