Abstract:
Protected agriculture plays a critical role in ensuring global food security by enabling stable crop production under controlled environmental conditions. However, climate change–driven extreme weather events have increased flood-related risks, posing growing threats to the safety, productivity, and sustainability of solar greenhouse cultivation. In practical greenhouse production, timely and accurate monitoring of waterlogging is essential for reducing crop losses, improving environmental regulation, and supporting scientific management decisions. Nevertheless, accurate segmentation of greenhouse waterlogging remains challenging because of limited monitoring visibility, uneven illumination, strong specular reflections, and the pronounced scale diversity of inundated areas. These adverse conditions often result in blurred boundaries, ambiguous textures, and unstable visual characteristics between flooded and non-flooded regions. In addition, satellite- and drone-based remote sensing is often unsuitable for greenhouse-scale applications because of resolution limitations and operational constraints. To address these challenges, this study developed an end-to-end image-based segmentation framework, termed the Residual Multiscale Cascade Encoder–Decoder (RMCED) network, for delineating waterlogging areas inside solar greenhouses. The proposed architecture adopted the middle four stages of ResNet-50 as the encoder to balance network depth and computational cost while extracting multi-level semantic features. This encoder design enabled the model to effectively capture both low-level texture patterns and high-level contextual representations, thereby improving discrimination between waterlogged areas and surrounding background regions. The decoder was designed as a multiscale cascaded attention decoder, which progressively restored spatial resolution through the hierarchical fusion of low- and high-level features. This design enhanced the network’s ability to identify fine spatial boundaries and accurately localize small-scale flooded regions that are often overlooked by conventional models. To ensure effective information flow, long skip connections were introduced between the encoder and decoder, thereby reducing feature degradation and semantic loss during feature transmission and improving the preservation of structural details. A key contribution of this work was the introduction of a Lighting-Aware Convolutional Block Attention Module (LA-CBAM). Compared with the original Convolutional Block Attention Module, LA-CBAM incorporated multi-kernel convolution filters and Sobel-gradient operations to improve both illumination robustness and edge sensitivity. The multi-kernel design enabled the model to capture contextual cues across different receptive fields and to better adapt to the diverse spatial scales of greenhouse waterlogging patterns. Meanwhile, the Sobel operation extracted gradient-based texture transitions and boundary-related information, strengthening boundary awareness under varying light intensities and reflective interference. As a result, the proposed network maintained strong discrimination capability even in complex greenhouse environments with reflections and uneven brightness, and it showed better adaptability to irregular and fragmented flooded regions. The model was trained and validated on a self-constructed dataset of 571 pixel-wise annotated images collected in a solar greenhouse under natural operating conditions. All images were resized and normalized using ImageNet statistics to match the pretrained ResNet-50 encoder. Comparative experiments with mainstream segmentation models, including U-Net, DeepLabV3+, and PSPNet, showed that RMCED outperformed representative baselines on the proposed dataset, achieving 93.22% precision and 91.08% recall. Ablation studies further demonstrated that LA-CBAM improved the Dice coefficient by approximately 3.7%, while the multiscale cascaded decoder enhanced edge continuity and object completeness. Overall, this study presented an efficient and robust framework for greenhouse waterlogging monitoring, providing a promising technical basis for flood risk assessment, waterlogging management, and related image-based monitoring tasks in protected agricultural systems.