Automated Detection of Bacterial Colonies in Petri Dishes Using YOLOv5 and Computer Vision
Abstract
Automation of microbiological analysis is a growing need in both academia and industry due to the repetitive and error-prone nature of manual bacterial colony counting. This work proposes an automated approach based on computer vision and deep learning for the segmentation and detection of bacterial colonies in Petri dish cultures. YOLOv5 convolutional neural network was used, trained on a public dataset composed of images of Escherichia coli, Pseudomonas aeruginosa, and Staphylococcus aureus colonies. The dataset was manually annotated and augmented using data augmentation techniques. Subsequently, preprocessing strategies were applied to enhance image quality, improving edge detection. The results show a significant improvement in evaluation metrics after preprocessing: mean average precision (mAP) increased from 72.1% to 94.6%, accuracy from 70.1% to 92.7%, and recall from 67.1% to 89.3%. These figures significantly exceed results reported in previous work on the same domain and validate the use of models such as YOLOv5 in colony detection tasks without classification by type. This approach offers an effective, rapid and low-cost solution for automating bacterial colony counting, constituting a viable alternative to existing semi-automated methods.