Contamination detection in the cultivation of leukocyte based on image sparsity evaluation

Lianghong Wu, Zhiyang Li, Liang Chen, Cili Zuo, Hongqiang ZhangInternational Journal of Automation and Control 2024 · DOI

Abstract

In biomedical research, maintaining sterile cell cultures is critical, yet detecting contamination remains a labor-intensive and subjective process. This paper introduces a Sparse Matrix Clustering (SMC) method designed to automatically identify bacterial and fungal contamination in leukocyte cultures. By evaluating image sparsity through local adaptive binarization and unsupervised clustering, the proposed system achieves a 99.8% detection accuracy, offering a robust and efficient alternative to manual microscopic inspection.

Introduction

Cell culture is a foundational technique in modern biology, but it is perpetually threatened by biological contaminants such as bacteria and fungi. Traditional detection methods rely on manual observation of turbidity or morphological changes under a microscope, which is slow, subjective, and requires specialized expertise. While deep learning models show promise, they often require large, labeled datasets that are difficult to obtain in specific laboratory contexts. This research addresses the need for an unsupervised, automated solution that can handle the low-contrast and noisy environments typical of real-world laboratory imaging.

Methodology

The core of the proposed approach is the Sparse Matrix Clustering (SMC) framework, which treats the blank background of a culture image as a sparse matrix. The pipeline consists of four primary stages:

  1. Preprocessing: Images are converted to greyscale and enhanced using "Unsharp Masking" to highlight fine particles like bacteria while suppressing background noise.
  2. Local Adaptive Binarization (LAB): To account for uneven lighting and shadows, the image is divided into sub-blocks. LAB ensures that foreground details are captured accurately across the entire frame.
  3. Sparsity Evaluation: The system calculates the ratio of non-zero pixels in each block to create a Sparsity Scoring Map. This map serves as a statistical signature of the culture's cleanliness.
  4. Dynamic Thresholding and Clustering: A dynamic threshold ($TH$) is calculated based on the histogram of the scoring map to adapt to different cultivation stages. Finally, K-means clustering categorizes the images based on global sparsity and pixel standard deviation.
Mathematical framework for sparsity scoring and dynamic thresholding.

Experimental Results

The SMC method was validated using a dataset of 1,368 high-resolution images of in vitro cultured leukocyte cells, including samples with blur, ghosting, and shadow occlusion. The algorithm demonstrated exceptional performance compared to traditional and deep learning-based clustering methods:

  • Accuracy: The SMC method achieved 99.8% accuracy, significantly outperforming Information Entropy (93.5%) and Deep Autoencoder-Based Clustering (91.8%).
  • Clustering Quality: Metrics such as the Adjusted Rand Index (ARI) and Normalized Mutual Information (NMI) reached 0.992 and 0.999, respectively, indicating near-perfect alignment with ground-truth labels.
  • Computational Efficiency: The entire dataset was processed in approximately 86.5 seconds, proving the method's suitability for real-time laboratory monitoring.
Visualization of the unsupervised K-means clustering separating contaminated and uncontaminated samples.

Conclusion

The Sparse Matrix Clustering method provides a highly accurate, unsupervised solution for detecting contamination in cell cultures. By focusing on the statistical disappearance of the "sparse" background rather than identifying specific contaminants, the system remains robust against noise and varying lighting conditions. Future work will explore hybrid models that combine this statistical approach with deep learning for broader contaminant profiling across diverse cell types.

Summary updated

BibTeX
@article{wu2024contamination,
  author = {Lianghong Wu and Zhiyang Li and Liang Chen and Cili Zuo and Hongqiang Zhang},
  title = {{Contamination detection in the cultivation of leukocyte based on image sparsity evaluation}},
  journal = {International Journal of Automation and Control},
  year = {2024},
  doi = {10.1504/ijaac.2025.142984},
}
Figure