Manuscript Offprint

arXiv:2609.08570

Effects of model architecture and learning strategies on deep learning-based recognition of activated sludge microscopic images and comparison with quantitative image analysis

Suguru Hakoshima, Tomohiro Tobino, Fumiyuki Nakajima

Abstract

Microscopic image analysis has long been recognized as a promising approach for monitoring activated sludge. In recent years, deep learning-based image analysis has been increasingly adopted in this field because of its high performance. However, previous studies on microscopic image analysis of activated sludge have rarely explored transformer-based models or self-supervised foundation models and have instead relied on CNNs and supervised ImageNet pretraining. In addition, previous studies often downsampled image sizes, but the effects of downsampling have not been sufficiently investigated, and the relationship between downsampling strategies and image analysis performance remains unclear. Furthermore, no study has quantitatively compared deep learning performance with quantitative image analysis (QIA), which was widely used before the emergence of deep learning. In this study, to examine how model architecture and learning strategies affect performance in microscopic image analysis of activated sludge and to quantitatively determine whether deep learning outperforms QIA, we prepared three types of activated sludge samples, classified their microscopic images, and evaluated classification accuracy. Our results showed that transformer-based architectures and alternative pretraining methods were effective in terms of classification accuracy. Our downsampling analysis showed that using overly small images reduced accuracy, but increasing image size beyond a certain point did not improve it further. In addition, the analysis indicated that, to achieve high classification accuracy, maintaining the field of view was a more effective downsampling strategy than maintaining resolution. Finally, our comparison between deep learning and QIA showed that deep learning outperformed QIA in terms of accuracy.

*t_tobino@esc.u-tokyo.ac.jp

1 Introduction

Activated sludge is a biological wastewater treatment process widely used in municipal wastewater treatment plants (WWTPs). It plays a crucial role in preventing water pollution, protecting aquatic ecosystems, and supporting sustainable environmental management by removing organic matter and nutrients from wastewater. In recent years, image analysis-based artificial intelligence (AI) has achieved remarkable success [1–5]. In activated sludge systems, AI-driven image analysis has increasingly been explored for process condition monitoring and for the detection and prediction of operational problems. In particular, several studies [6–11] have applied deep learning techniques to microscopic images of activated sludge in order to improve process understanding and control.

Before the widespread application of deep learning to microscopic image analysis of activated sludge, quantitative image analysis (QIA) was the predominant analytical framework. [12]. In typical QIA-based approaches, microscopic images were first binarized, and floc structures were characterized using morphological parameters [13]. These morphological parameters were subsequently analyzed to investigate their relationships with various operational and performance indicators, including sludge settling performance [13–16], effluent water quality [17] and dewaterability [16]. Although QIA technologies provided powerful analytical tools, the binarization step was laborious and depended on semi-automated, operator-dependent procedures [6]. Consequently, convolutional neural networks (CNNs), a type of deep learning method, began to be applied to the microscopic image analysis of activated sludge to achieve automated image processing [6]. To date, CNN-based approaches in microscopic image analysis of activated sludge have been reported to enable the estimation of settling performance [7, 8] and MLSS [10], as well as the detection of protozoa [11, 18, 19].

However, previous studies that apply deep learning to the analysis of microscopic images of activated sludge still face several limitations. First, the architectural design and training strategies of deep learning models remain insufficiently investigated. Although several studies [6, 7] have compared different CNN architectures, transformer-based models [3] have not yet been systematically evaluated, despite their increasing prominence in recent years. Moreover, most prior work [6, 7, 10] has relied on supervised pre-training on ImageNet, whereas more recent strategies, such as self-supervised learning [5], have yet to be thoroughly applied. In addition, images are generally downsampled before model training because processing large images requires substantial memory [20]. However, few studies have investigated how image downsampling affects analytical performance, and the choice of resizing strategy has received little attention. Most studies resize images while maintaining the field of view, and no study has systematically compared this approach with downsampling that maintains the resolution. Comparisons between QIA and deep learning also remain limited. Previous study [6] has described QIA as a semi-automated approach with several limitations and have utilized CNNs as an alternative. Although we agree with this assessment, there has been little experimental evidence that deep learning outperforms QIA in the analysis of microscopic images of activated sludge, particularly in terms of analytical performance.

The objectives of this research were to examine, from the standpoint of analytical capabilities, how various training conditions, including model architecture, pre-training strategies, and microscopic image characteristics, influence deep learning performance, and to compare deep learning and QIA from the same perspective. We prepared three types of activated sludge samples and constructed a benchmark classification task in which microscopic images obtained from the samples were classified by sample type using deep learning and QIA. Here, we show that image size affects model performance, whereas model size has little effect. We also demonstrate that models pretrained using self-supervised learning and Vision Transformer (ViT) achieve sufficient performance, that maintaining the field of view in microscopic images is more important than maintaining spatial resolution, and that deep learning outperforms QIA in terms of both analytical performance and the number of images required.

References (35)