Anomaly detection is a critical task in computer vision with profound implications for medical imaging, where identifying pathologies early can directly impact patient outcomes. While recent unsupervised anomaly detection approaches show promise, they require substantial normal training data and struggle to generalize across anatomical contexts. We introduce D$^2$4FAD, a novel dual distillation framework for few-shot anomaly detection that identifies anomalies in previously unseen tasks using only a small number of normal reference images. Our approach leverages a pre-trained encoder as a teacher network to extract multi-scale features from both support and query images, while a student decoder learns to distill knowledge from the teacher on query images and self-distill on support images. We further propose a learn-to-weight mechanism that dynamically assesses the reference value of each support image conditioned on the query, optimizing anomaly detection performance. To evaluate our method, we curate a comprehensive benchmark dataset comprising 13,084 images across four organs, four imaging modalities, and five disease categories. Extensive experiments demonstrate that D$^2$4FAD significantly outperforms existing approaches, establishing a new state-of-the-art in few-shot medical anomaly detection. Code is available at https://github.com/ttttqz/D24FAD.
翻译:异常检测是计算机视觉领域的关键任务,对医学成像具有深远意义,早期识别病理可直接改善患者预后。尽管近期无监督异常检测方法展现出潜力,但它们需要大量正常训练数据,且难以在不同解剖场景间泛化。我们提出D$^2$4FAD,一种新颖的双蒸馏小样本异常检测框架,仅需少量正常参考图像即可识别未见任务中的异常。该方法利用预训练编码器作为教师网络,从支持图像和查询图像中提取多尺度特征,同时学生解码器学习在查询图像上蒸馏教师知识,并在支持图像上进行自蒸馏。我们进一步提出可学习的加权机制,根据查询图像动态评估各支持图像的参考价值,从而优化异常检测性能。为评估本方法,我们构建了一个包含13,084张图像的综合性基准数据集,涵盖四个器官、四种成像模态和五类疾病。大量实验表明,D$^2$4FAD显著优于现有方法,为小样本医学异常检测确立了新的技术标杆。代码发布于https://github.com/ttttqz/D24FAD。