CA-YOLO: An Efficient YOLO-Based Algorithm with Context-Awareness and Attention Mechanism for Clue Cell Detection in Fluorescence Microscopy Images

Can Cui, Xi Chen, Lijun He, Fan LiSensors 2025 · DOI

TL;DR

This paper introduces CA-YOLO, a novel deep learning model designed for accurate and efficient detection of "clue cells" in fluorescence microscopy images, crucial for diagnosing bacterial vaginosis (BV). By incorporating context-aware feature extraction and a shuffle global attention mechanism, CA-YOLO significantly improves sensitivity in detecting these challenging cells, outperforming existing methods and paving the way for more reliable automated BV diagnosis.

What Problem Does This Paper Address?

Bacterial vaginosis (BV) is a common reproductive tract infection with significant health implications. Accurate diagnosis relies on identifying "clue cells" in microscopy images, which are epithelial cells heavily colonized by bacteria. The challenge lies in the subtle visual differences between clue cells and normal epithelial cells: clue cells exhibit a fuzzy, irregular edge and a textured surface due to bacterial presence, while normal cells have smooth edges and uniform surfaces. Existing automated detection methods struggle with this task due to low sensitivity, often missing these crucial clue cells. This is exacerbated by a severe class imbalance in clinical samples, where normal cells vastly outnumber clue cells, making it difficult for models to learn to detect the minority class.

Methods

The authors propose CA-YOLO, an algorithm built upon the YOLOv8 architecture. The core innovations are two custom-designed modules integrated into the YOLOv8 neck:

  • Context-Aware Module (CAM): This module is designed to capture the complex surface texture of clue cells. It analyzes the distribution patterns of bacteria on the cell surface by modeling long-range dependencies within the feature maps. This helps differentiate clue cells from normal cells by recognizing the "bacterial colonization" signature.
  • Shuffle Global Attention Mechanism (SGAM): This module addresses the challenge of fuzzy cell edges. It combines channel and spatial attention with a large receptive field to precisely locate and enhance weak edge features, while simultaneously suppressing background noise. A channel shuffle operation is also incorporated to improve cross-channel information exchange.

Additionally, the authors integrate Focal Loss into the classification loss function. This is a crucial step to combat the class imbalance problem, as it dynamically adjusts the weights of training samples, giving more importance to the difficult-to-classify clue cells and reducing the influence of abundant normal cells.

Datasets

The primary dataset used in this study was collected by Suzhou Tumo Medical Technology Co., Ltd. It comprised 2314 fluorescence microscopy images from 480 patients. These images were preprocessed and cropped to a final input size of 512x512 pixels. The dataset contained 455 images with clue cells and 1859 without. It was split into training (1352 images), validation (576 images), and testing (477 images) sets.

For cross-dataset generalization validation, the authors also utilized the public BCCD (Blood Cell Count and Detection) dataset. This dataset contains 364 microscope images of red blood cells (RBCs), white blood cells (WBCs), and platelets.

Key Insights and Ideas

  • Subtle Features are Key: The paper highlights that the true discriminative features for clue cell detection are not macroscopic size or shape, but rather fine-grained surface texture and edge morphology.
  • Context and Attention Synergy: The combination of CAM (for texture) and SGAM (for edges) proves to be a powerful approach for capturing the nuanced visual cues of clue cells.
  • Focal Loss for Imbalance: Directly addressing class imbalance with Focal Loss is shown to be critical for improving sensitivity, a common pitfall in medical image analysis.
  • YOLOv8 as a Strong Foundation: Leveraging the efficient YOLOv8 architecture provides a solid base for developing a high-performance detection model.
  • Clinical Relevance of Sensitivity: The paper emphasizes that in clinical screening, minimizing missed diagnoses (high sensitivity) is prioritized, even if it means a slight increase in false positives (lower precision), making CA-YOLO particularly valuable.

Key Results

  • Improved Sensitivity: CA-YOLO achieved a sensitivity of 0.778, which is 9.2% higher than the baseline model.
  • Overall Performance: The model demonstrated a strong F1 score of 0.503 on the clue cell dataset, outperforming other compared methods.
  • Attention Module Effectiveness: Ablation studies showed that removing SGAM decreased sensitivity by 1.2%, and removing CAM decreased sensitivity by 1.7% and F1 score by 1.5%, indicating the significant contribution of both modules.
  • Inference Speed: The model achieved an inference speed of 88 FPS on a Tesla V100 GPU, making it suitable for real-time applications.
  • Cross-Dataset Performance: On the BCCD dataset, CA-YOLO achieved a precision of 0.553, recall of 0.926, and F1 score of 0.693, demonstrating good generalization capabilities.

Limitations and Future Work

  • Precision-Recall Trade-off: The authors acknowledge that the achieved F1 score (0.503) reflects a trade-off between precision and recall, driven by the clinical need for high sensitivity. While this is a deliberate choice to prioritize reducing missed diagnoses, it means the model might flag more potential false positives.
  • Dataset Diversity: The model's robustness could be further enhanced by training on more diverse, multi-center datasets.

Future work will focus on:

  • Investigating advanced loss functions and post-processing techniques to improve the F1 score by achieving a better balance between precision and recall without compromising sensitivity.
  • Expanding the dataset to enhance the model's generalization capabilities, aiming for a more balanced, robust, and clinically deployable automated system.

Summary updated

Abstract

Automatic detection of clue cells is crucial for rapid diagnosis of bacterial vaginosis (BV), but existing algorithms suffer from low sensitivity. This is because clue cells are highly similar to normal epithelial cells in terms of macroscopic size and shape. The key difference between clue cells and normal epithelial cells lies in the surface texture and edge morphology. To address this specific problem, we propose an clue cell detection algorithm named CA-YOLO. The contributions of our approach lie in two synergistic and custom-designed feature extraction modules: the context-aware module (CAM) extracts and captures bacterial distribution patterns on the surface of clue cells; and the shuffle global attention mechanism (SGAM) enhances cell edge features and suppresses irrelevant information. In addition, we integrate focal loss into the classification loss to alleviate the severe class imbalance problem inherent in clinical samples. Experimental results show that the proposed CA-YOLO achieves a sensitivity of 0.778, which is 9.2% higher than the baseline model, making the automated BV detection more reliable and feasible.
BibTeX
@inproceedings{cui2025ca,
  author = {Can Cui and Xi Chen and Lijun He and Fan Li},
  title = {{CA-YOLO: An Efficient YOLO-Based Algorithm with Context-Awareness and Attention Mechanism for Clue Cell Detection in Fluorescence Microscopy Images}},
  booktitle = {Sensors},
  year = {2025},
  doi = {10.3390/s25196001},
}
Figure