# Microorganism Detection in Activated Sludge Microscopic Images Using Improved YOLO
## 1 Introduction  
The quality of water is a critical factor for human health, ecological balance, and sustainable development. There are numerous factors contributing to water pollution. The most significant causes stem from human daily life as well as industrial and agricultural practices. Wastewater generated during social production activities contains substantial amounts of organic compounds, heavy metals, hazardous chemicals, and other pollutants [1]. These substances exhibit toxicity and bioaccumulation within aquatic ecosystems. They could potentially exert long-term effects on aquatic organisms and the ecological food chain. Consequently, applying effective and scientific technologies to address the treatment of wastewater has become an urgent task. Researchers have proposed various effective methods of wastewater treatment, including physical-chemical processes, biological treatments, and membrane separation. Among these methods, the activated sludge method has received significant attention as a widely applied biological treatment method. The fundamental principle of the activated sludge method involves the degradation of organic substances and contaminants in wastewater, transforming them into harmless compounds through suitable environmental conditions and microorganisms [2]. Microorganisms, including protozoa and metazoans, within theactivated sludge play a pivotal role in achieving treatment effects. Notably, the quantity and diversity of these microorganisms exhibit noticeable fluctuations with changes in process operational conditions [3]. Therefore, monitoring changes in microbial communities is significant when dealing with wastewater. We can apply appropriate measures through changes in microbial species and their quantities. Several techniques have been applied to monitor microorganisms within activated sludge, such as microscopic observation, DNA sequencing [4], and fluorescence in situ hybridization (FISH) [5]. On the one hand, microscopic observation, although effective, is time-consuming, demands substantial human resource investment, and is subject to errors. On the other hand, DNA sequencing and FISH demand meticulous sample preparation and have high implementation costs. Therefore, the above methods have high costs of practical application. With the development and widespread application of computer vision, this technology offers an automated, efficient, and accurate approach to identifying microorganisms within activated sludge. Object detection methods based on convolutional neural networks (CNN) are essential in computer vision research [6]. They aim to automatically detect objects in images using deep learning models [7]. These methods have significantly improved the object detection performance of computer vision methods and are now mainstream approaches. Early CNN-based object detection methods followed a two-stage process [8]. First, they would generate candidate object regions using methods like selective search. Then, they would perform feature extraction on each candidate region and use a classifier for object classification and bounding box regression. Regions with a CNN (R-CNN) is one of the representative methods, using support vector machines (SVM) for object classification and introducing bounding box regression to fine-tune candidate region positions for better accuracy [9]. However, two-stage object detection models have limitations. Candidate region generation and object classification are computationally independent, resulting in a high complexity and slower detection speed. To address these issues and improve speed and accuracy, a single-stage YOLO (You Only Look Once) model is developed. The YOLO model treats object detection as an end-to-end regression problem, directly predicting object positions and classes from input images. Single-stage methods perform feature extraction and prediction across the entire image.