# Microorganism Detection in Activated Sludge Microscopic Images Using Improved YOLO
## 1 Introduction
The YOLO model can avoid the candidate region generation and redundant feature extraction operations seen in two-stage methods and substantially improve their detection speed. There is currently limited research on microorganism detection tasks in microscopic images of activated sludge. However, some progress has been made in the detection and classification of objects in other similar fields [10]. In early research, [PERSON] et al. developed an effective classification of red tide algae. They achieved favorable results using conventional image processing techniques and machine learning methods such as SVM [11]. [PERSON] et al. studied the shape features of diatoms and proposed an automatic recognition method based on morphological curvature scale contours. This method achieved the efficient automatic identification of diatoms [12]. As deep learning methods based on CNN gained widespread recognition, research gradually shifted towards deep learning. [PERSON] et al. analyzed existing conventional image processing methods and explored the feasibility of deep learning methods in microbial counting [13]. [PERSON] et al. applied a hybrid approach, combining CNN models for the classification of plankton images. They demonstrated that CNN models outperformed conventional image processing methods with higher classification accuracy [14]. To further improve the accuracy of object classification, [PERSON] et al. increased the depth of the CNN model. They validated that networks with more layers led to better classification accuracy [15]. However, there are performance limits to simply increasing the layers of the network model. Researchers have begun to develop different structure-of-network models to effectively enhance the performance of deep learning models [16]. These models perform not only image classification but also object detection tasks. [PERSON] et al. developed Faster R-CNN model, which generates the detection region using the prediction method to perform the task of detecting the location of specific objects in an image [9]. Meanwhile, the YOLO object detection model, with its single-stage detection process and end-to-end efficient detection, gained widespread recognition in practical applications. [PERSON] et al. applied the latest YOLO model to identify algae, achieving a high average accuracy of 89.8% [17]. This demonstrates the YOLO model's advantage in detection tasks. In the practical application of object detection tasks, there are various challenges, such as the irregular shapes of objects. To address these challenges, this study proposed an improvement to the YOLOv5 model using deformable convolutional networks (DCN) and an attention mechanism. Our approach aims to improve the detection performance, specifically for irregular objects. First, we collected and annotated a dataset of microscopic images of activated sludge. Then, the dataset was augmented by implementing deep convolutional generative adversarial networks (DC-GAN). Subsequently, the improved YOLO was trained on the custom dataset. To verify the effectiveness of our proposed improvements, we conducted a comparative analysis with other existing object detection models. The results demonstrate that our improved model outperforms the baseline YOLOv5 as well as the other object detection models in accurately detecting irregularly shaped objects. In summary, there are three main contributions in this study, which can be summarized as follows:  
* The collection and annotation of microscopic images of activated sludge. * The augmentation of a dataset by implementing DC-GAN. * The improvement of the YOLO model based on DCN and an attention mechanism. * A comparative analysis of performance of different object detection models.