Artifact-Aware Fungal Detection in Dermatophytosis: A Transformer-Based Approach for KOH Microscopy

Rana Gursoy1, Abdurrahim Yilmaz2, Baris Kizilyaprak3

  • 1Department of Mechatronics Engineering, Yildiz Technical University, Istanbul 34220, Turkey.

Insights

A new AI system using RT-DETR accurately detects fungal hyphae in potassium hydroxide (KOH) microscopy images, improving diagnosis of dermatophytosis by reducing errors from artifacts and variability.

Area of Science:

  • Medical Mycology
  • Artificial Intelligence in Medicine
  • Image Analysis

Background:

  • Potassium hydroxide (KOH) microscopy is standard for dermatophytosis diagnosis but faces challenges with artifacts and inter-observer variability.
  • Accurate identification of fungal hyphae is crucial for timely and effective treatment.

Purpose of the Study:

  • To develop and evaluate a transformer-based object detection framework (RT-DETR) for precise fungal structure localization in KOH microscopy images.
  • To benchmark the RT-DETR model against convolutional neural network (CNN) based detectors.

Main Methods:

  • A dataset of 2540 KOH microscopy images was manually annotated to distinguish fungal elements from artifacts.
  • The RT-DETR model was trained and validated using five-fold stratified cross-validation.
  • Performance was compared against YOLOv11 and Faster R-CNN under identical conditions.

Main Results:

  • RT-DETR achieved a mean Average Precision (AP@0.50) of 89.73% ± 1.48%, with high precision (0.921 ± 0.014) and recall (0.831 ± 0.011).
  • The model demonstrated high image-level sensitivity (0.989 ± 0.022) with minimal missed cases.
  • RT-DETR outperformed CNN-based detectors in accuracy and artifact suppression.

Conclusions:

  • A transformer-based AI system shows technical feasibility for detecting fungal regions in KOH microscopy.
  • This AI system can serve as a valuable decision-support tool for clinicians.
  • Further multi-center validation is needed to confirm clinical generalizability.