An image-based rain amount automatic labeling system
Patent Information
- Application Number
- CN202510951464.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2045-07-10
AI Technical Summary
[0007]2.数据质量不佳:受限于设备硬件性能与复杂环境部署壁垒,采集的数据有限,数据范围较小,监测覆盖率不足,动态场景下数据采集存在明显盲区
[0039] Compared with the prior art, the present invention has the following beneficial effects: The image-based automatic rainfall labeling system provided by the present invention realizes the accuracy and diversification of data collection, thereby accurately detecting rainfall intensity.
Smart Images

Figure CN120766286B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an automatic rainfall labeling system, and more particularly to an image-based automatic rainfall labeling system. Background Technology
[0002] With the increasing severity of climate change and extreme weather events, rainfall monitoring systems are playing an increasingly important role in disaster prevention and mitigation, agricultural irrigation, urban water resource management, and routine administrative tasks. Traditional rainfall monitoring methods, such as manual observation and rain gauges at weather stations, can no longer meet the requirements of high efficiency, real-time monitoring, and low cost. In recent years, with the development of sensor technology, Internet of Things (IoT) technology, image processing technology, and big data analytics, automated and intelligent rainfall monitoring systems have gradually become a research hotspot. Existing rainfall monitoring systems mainly include traditional rainfall monitoring technologies, image processing-based rainfall monitoring technologies, and deep learning-based rainfall detection technologies.
[0003] 1. Traditional rainfall monitoring techniques Rainfall sensors, as one of the core devices in rainfall monitoring systems, have been widely used. Traditional rainfall sensors mainly include rain gauges (such as self-recording rain gauges and electronic rain gauges) and buoy sensors. These devices sense changes in rainfall and generate electrical signals, which are then converted into rainfall data. For example, radar-based rainfall monitoring systems can acquire rainfall information in real time over a large area, which has significant application value for large-scale meteorological monitoring. However, these devices suffer from high costs, complex maintenance, small coverage areas, and poor environmental adaptability. For instance, in cargo shipping or loading and unloading, traditional manual inspection methods often suffer from human negligence and delayed warnings, making it difficult for transport ships to take effective waterproofing measures in time when encountering sudden rainfall, resulting in damage such as mold and spoilage of cargo like corn and rice. Therefore, how to achieve real-time, efficient, and wide-area rainfall monitoring using low-cost and easy-to-maintain devices has become a research hotspot in this field.
[0004] 2. Image processing-based rainfall monitoring technology In recent years, image processing-based rainfall monitoring technology has gradually emerged. By using video surveillance equipment and image analysis algorithms, it captures real-time rainfall scenes and analyzes them in conjunction with sensor data, offering advantages such as intuitiveness, convenience, and efficiency. For example, video surveillance-based rainfall monitoring systems use high-definition cameras to monitor rainfall in real time and extract rainfall features using image processing technology. The advantage of this technology lies in providing more accurate visual data for rainfall monitoring, while combining it with sensor data to effectively improve the accuracy and real-time performance of monitoring. However, existing image-based rainfall monitoring systems often suffer from the problem of independent image acquisition and rainfall data processing. Training datasets are often obtained through manual methods or image synthesis, which cannot effectively classify and respond to real-time rainfall conditions. This leads to insufficient generalization ability and low recognition rates when deployed in real-world scenarios. Therefore, effectively combining image data with existing sensor data and using intelligent algorithms for real-time classification and response, training a more accurate and easily deployable visual model, has become crucial for further improving the intelligence level of rainfall monitoring systems.
[0005] 3. Rainfall detection technology based on deep learning With the rapid development of computer vision and deep learning technologies, deep learning, with its self-feature extraction capabilities, has become the mainstream method for raindrop detection. Compared with traditional methods, deep learning-based rainfall recognition systems offer advantages such as high deployment accuracy and good real-time performance, which can serve as an effective supplement to existing rainfall monitoring networks. Although lightweight architectures have demonstrated the feasibility of using neural networks for real-time raindrop monitoring, issues such as low image resolution and insufficient performance generalization ability in complex scenes still exist.
[0006] As can be seen from the above, the existing rainfall monitoring system mainly has the following defects or deficiencies: 1. Data Isolation: Traditional monitoring systems fail to achieve spatiotemporally aligned storage of sensor data, image evidence, and classification labels, resulting in ineffective cross-platform data integration. Existing image-based rainfall monitoring systems often suffer from the independence of image acquisition and rainfall data processing, and lack intelligent classification and real-time response to rainfall conditions. Therefore, effectively combining image data with sensor data and using intelligent algorithms for real-time classification and response is crucial for further improving the intelligence level of monitoring systems.
[0007] 2. Poor data quality: Limited by equipment hardware performance and the barriers of deployment in complex environments, the amount of data collected is limited, the data range is small, the monitoring coverage is insufficient, and there are obvious blind spots in data collection in dynamic scenarios. Raw data heavily relies on manual cleaning, and the processing time for each batch of data is long. Furthermore, there is a lack of effective theoretical support, and it relies heavily on empirical statistical analysis, which deviates from the actual rainfall levels in real-world scenarios.
[0008] 3. Limited classification dimensions: Rainfall characteristics vary from region to region, and even within the same region, rainfall characteristics differ across seasons. Therefore, classification should be tailored to local conditions. Relying solely on a single threshold fails to effectively reflect the current rainfall intensity and hinders future data analysis efforts to better utilize image data for training in computer vision.
[0009] 4. Lack of effective attention mechanism for key raindrop features: Existing models have limited generalization ability under complex backgrounds and variable lighting conditions, insufficient detection accuracy for extreme weather such as light rain and drizzle, and high computational resource requirements, making them difficult to deploy in real time on edge devices.
[0010] The reasons for the existence of the existing defects are as follows: 1. Lack of spatiotemporal alignment mechanism: Sensor data uses a time-series database, while image data is stored in a file system. The two are not associated with a unified metadata tag, resulting in a spatiotemporal mapping gap between rainfall monitoring data and image evidence. There is a lack of time-series aligned records, making it impossible to accurately trace the source of evidence.
[0011] 2. Imperfect triggering mechanism: The photo system does not have a dynamic priority adjustment algorithm. Traditional systems rely on a central server for data analysis, and local devices only serve as data acquisition terminals. They use fixed time thresholds for triggering and cannot adapt to randomly changing rainfall processes.
[0012] 3. Limitations of Traditional Meteorological Standards: Existing rainfall classifications are mainly based on 24-hour cumulative rainfall (e.g., light rain <10mm / 24h), failing to consider the coupling effect between real-time rainfall intensity and short-term cumulative rainfall. Literature shows that using only a single indicator can lead to delayed early warnings for heavy rain. There is a lack of reasonable rainfall intensity classification standards for real-time images, resulting in overly vague classifications of rainfall intensity in images and hindering the recording of short-term heavy rainfall.
[0013] 4. Traditional visual models have low accuracy in rainy scenarios and lack an effective mechanism for focusing on key raindrop features. Especially in extreme weather, the classification error is large, and the models are too large to meet the lightweight deployment requirements of edge devices.
[0014] The difficulties encountered in solving these problems are as follows: 1. Multi-source heterogeneous data fusion: Existing systems lack a unified labeling system. Sensor data (time series database) and image data (file storage) have differences in format and frequency, resulting in low efficiency of cross-platform data association. A unified spatiotemporal labeling system needs to be designed to achieve cross-platform alignment.
[0015] 2. Lack of Standards: The classification standards for short-duration heavy rainfall have not yet been incorporated into the WMO international standards, making it difficult for meteorological departments to directly adopt the algorithm outputs. The coupled modeling of real-time rainfall intensity and cumulative rainfall requires a departure from traditional meteorological standards, and the threshold parameters for real-time rainfall classification standards need to be redefined.
[0016] 3. Disorganized file information: The current system lacks a sound automatic annotation and recording mechanism, and has not achieved effective linkage between the camera and the rainfall detection system, resulting in inadequate data file organization and storage, which affects the efficiency of data collection.
[0017] 4. Difficulty in data collection: There are few rainfall data samples, making it difficult to obtain. Most of the available data consists of generated rainfall images, lacking support from real-world rainfall scenes, which leads to poor performance of trained models in practical applications. Summary of the Invention
[0018] The technical problem to be solved by the present invention is to provide an image-based automatic rainfall labeling system that can achieve accurate and diversified data collection and accurately detect rainfall intensity.
[0019] The technical solution adopted by this invention to solve the above-mentioned technical problems is to provide an image-based automatic rainfall labeling system, including a data collection module that combines fixed rainfall monitoring stations and UAV cruise photography for data collection, and adopts a dynamic triggering photography method to capture real-time images when there are changes in rainfall or at regular intervals; an image recording module that sets corresponding parameters according to target needs and regional characteristics, establishes a spatiotemporal mapping relationship between rainfall data and visual evidence, so that the image is directly related to the corresponding rainfall level; a timestamp synchronization protocol is used to align data in real time, and multi-source data fusion is achieved through a spatiotemporal alignment matrix, recording the collected rainfall intensity, time, and rainfall amount simultaneously; and a rainwater sensitive attention module that captures rainwater features through multi-directional convolution and adopts a multi-stage attention mechanism integration strategy.
[0020] Furthermore, the imaging equipment of the data collection module includes laser imaging equipment, infrared imaging equipment, and ordinary imaging equipment; the fixed rainfall monitoring station adopts a tipping bucket rain gauge and a piezoelectric rain gauge, constructs a data transmission channel through an industrial-grade RS485 serial communication interface, and establishes a master-slave communication architecture based on the Modbus-RTU protocol specification.
[0021] Furthermore, the data collection module adopts a cumulative rainfall change triggering mechanism. When the rainfall change exceeds a preset threshold within a certain period of time, the image acquisition function is activated. The timed shooting triggering mechanism automatically triggers the cruise shooting function when no shooting is performed for several consecutive hours, so as to achieve the continuity of data collection. The shooting decision is based on the rainfall intensity classification model to classify the rainfall in real time, and shooting is triggered only when the set conditions are met.
[0022] Furthermore, the image recording module employs a rainfall-image association model to establish a spatiotemporal mapping relationship between rainfall data and visual evidence. The dynamic threshold function of the rainfall-image association model is as follows:
[0023] It is a quantitative indicator that comprehensively considers both instantaneous rainfall changes and cumulative rainfall, among which This is the instantaneous rainfall variation coefficient. As the cumulative rainfall weighting factor, It is the rainfall per unit time. This is a time window; if long-term accumulation needs to be monitored, such as flood warnings, the window can be increased. If it is necessary to capture instantaneous rainstorms, then increase... The specific process is as follows: First, for , , Perform initial setup; use the configured parameters and compare them with actual rainfall events; if it is found that the response to sudden rainstorms is not sensitive enough, increase the settings appropriately. If it is found that flood warnings caused by cumulative rainfall are not timely, the warning level should be appropriately increased. If the captured rainfall changes do not meet expectations, adjust accordingly. The values were determined; through multiple tests and adjustments, a parameter combination suitable for local rainfall characteristics and application requirements was found.
[0024] Furthermore, the image recording module sets a cumulative rainfall change threshold and a timed shooting strategy. When the cumulative rainfall exceeds a predefined threshold... Or reach a specific time interval At that time, the data collection module is notified to take a picture and capture an image of the current scene.
[0025] Furthermore, the image recording module employs a multi-timescale rainfall analysis method based on an improved sliding window algorithm to achieve three-dimensional statistics of rainfall at the second, minute, and hour levels. Specifically, this includes: setting a discrete time series... , representing the real-time rainfall observation value, defines a sliding window function:
[0026]
[0027] In the formula These correspond to the calculation windows for cumulative rainfall at the second, 10-minute, and hourly levels, respectively. It is the first Rainfall at each sampling point This represents the number of data points within the window. Establish an incremental update mechanism and maintain a circular buffer. Window capacity New data Upon arrival:
[0028] The calculation window only needs to be updated: ; in, It is a circular buffer. Calculate the old data indexes that need to be removed, and recalculate all indices within the window each time. One data point; Finally, the association constraints for windows of different time scales are established using the following formula:
[0029] in, Let m be the cumulative rainfall in the m-th 10-minute window. This is a boundary correction term that addresses the residual problem caused by non-integer multiple alignment of windows.
[0030] Furthermore, the image recording module constructs a classification decision tree based on rainfall level standards, setting the hourly cumulative rainfall... The grading rules are as follows:
[0031] Constructing a spatiotemporal alignment matrix to achieve multi-source data fusion:
[0032] in, Each row of the matrix represents a complete observation record of the same spatiotemporal node. This represents the cumulative rainfall. For category tags, The corresponding image hash value is a unique identifier for the monitored image at the corresponding time.
[0033] Furthermore, the image recording module employs the following timestamp synchronization protocol to eliminate sensor-storage link latency:
[0034] in, This represents the maximum permissible deviation between the two timestamps. The data recorded by the sensor generates a timestamp. The timestamp marked when the storage device receives data This represents the sampling frequency of the sensor.
[0035] Furthermore, the rain-sensitive attention module uses the CBAM attention module to perform orientation enhancement feature calculation and is embedded after the second and last stages of the EfficientNet V2 architecture.
[0036] Furthermore, the rain-sensitive attention module captures rain features through three types of convolution: vertical convolution to detect raindrop stripes, horizontal convolution to detect water surfaces and puddles, and diagonal convolution to capture oblique rain lines formed by wind direction or camera angle. These three types of features are then fused to achieve a multi-level feature representation from local rain patterns to the global rainfall environment. For feature maps The rain-sensitive attention process is represented as follows:
[0037]
[0038] in, Indicates directional enhancement features, It is the ReLU activation function, and BN represents batch normalization. Convolution is used for feature fusion. , and These are the perception features in the vertical, horizontal, and diagonal directions, respectively.
[0039] Compared with the prior art, the present invention has the following beneficial effects: The image-based automatic rainfall labeling system provided by the present invention realizes the accuracy and diversification of data collection, thereby accurately detecting rainfall intensity. Attached Figure Description
[0040] Figure 1 This is a flowchart illustrating the framework of the image-based automatic rainfall labeling system of the present invention. Figure 2 This is a flowchart of the image detection process of the present invention; Figure 3 This is a data storage flowchart for the present invention; Figure 4 This is the CBAM module of the present invention; Figure 5 This invention provides an improved EfficientNetV2_s network structure that integrates an RSA module. Figure 6 The curves showing the comparison of loss and accuracy during each round of training and validation in this invention are shown. Figure 7 This invention, Grad-CAM, demonstrates the visualization effect of rainy day images. Figure 8 This is a radar chart showing the ablation test performance indicators of this invention. Figure 9 The ROC curves and precision-recall curves for different rainfall detection models of this invention are shown. Detailed Implementation
[0041] The present invention will now be further described with reference to the accompanying drawings and embodiments.
[0042] Please see Figures 1-3 The image-based automatic rainfall labeling system provided by this invention includes: The data collection module combines fixed rainfall monitoring stations with drone-based patrol photography. Imaging equipment includes laser imaging, infrared imaging, and conventional imaging, enabling wider-area data acquisition. A dynamic triggering method is employed, capturing real-time images when rainfall changes occur or at scheduled intervals. The drone initiates patrol photography when rain is detected and periodically when there is no rain. For example, a cumulative rainfall change trigger mechanism initiates image acquisition when a significant change in rainfall is detected over a period of time, while a scheduled photography trigger mechanism automatically activates patrol photography after several hours of inactivity, ensuring continuous data collection. To address occasional camera disconnections, the system employs a three-level retry strategy, initializing the camera and stabilizing the video stream to reduce data loss due to network failures. Photography decisions are based on a rainfall intensity classification model, classifying rainfall in real-time and triggering photography only when necessary, thereby optimizing resource utilization efficiency.
[0043] The image recording module employs the RICA algorithm, which allows for parameter setting based on target requirements and regional characteristics. This establishes a spatiotemporal mapping between rainfall data and visual evidence, ensuring a direct correlation between images and corresponding rainfall levels. This improves the comprehensive recording of rainfall events and enhances the accuracy and diversity of data collection. An improved sliding window MSWA algorithm is also designed, enabling multi-scale quantification of rainfall intensity across three time windows based on the characteristics of the required data, thus improving the reference value of the collected data. A timestamp synchronization protocol ensures real-time data alignment. Furthermore, multi-source data fusion is achieved through a spatiotemporal alignment matrix, simultaneously recording the collected rainfall intensity, time, and rainfall amount to ensure the accuracy of image annotation.
[0044] The rain-sensitive attention module captures rainwater features through multi-directional convolution. This attention mechanism is specifically designed to capture the directional characteristics of rainwater. A strategic attention integration strategy was determined, optimally placing the attention module within the EfficientNet V2 architecture to balance performance improvement and computational efficiency. Interpretive analysis of the model using Grad-CAM further demonstrates the effectiveness of the attention mechanism in the EfficientNetV2 network. The designed model possesses both real-time inference capabilities and excellent accuracy, making it suitable for practical deployment.
[0045] The technical problems solved and the effects of this invention are as follows: 1. The classification of rainfall intensity corresponding to real-time images is ambiguous. Rainfall characteristics vary from region to region, and even within the same region, rainfall characteristics differ across seasons. Therefore, rainfall intensity classification should be site-specific, rather than solely based on the cumulative rainfall over one or 12 hours. This invention integrates the RICA and MSWA algorithms. It allows for setting appropriate parameters based on target needs and regional characteristics, establishing a spatiotemporal mapping relationship between rainfall data and visual evidence. This ensures a direct correlation between images and corresponding rainfall levels, thereby improving the comprehensive recording of rainfall events and achieving more accurate and diverse data collection.
[0046] 2. Manual data collection is time-consuming, results in small datasets, and often leads to inaccurate rainfall labeling and biases. Data types are limited and lack diversity, primarily consisting of generated rainfall images without real-world rainfall data support. The small sample size and difficulty in acquisition result in insufficient model generalization ability. This invention combines fixed rainfall monitoring stations with drone-based aerial photography. Imaging equipment includes laser imaging, infrared imaging, and standard imaging modes, enabling wider-area data collection. A dynamic triggering mechanism captures real-time images when rainfall changes or at set intervals. The drone supports aerial photography in rainy conditions and periodic inspections in dry conditions, triggering photography only when necessary, thus optimizing resource utilization efficiency. A timestamp synchronization protocol ensures real-time alignment of multi-source data, guaranteeing labeling accuracy from the source and providing a solid data foundation for model training.
[0047] 3. Traditional visual models suffer from low accuracy in rainy scenarios, especially under extreme weather conditions, exhibiting significant classification errors. Furthermore, their large size makes them unsuitable for lightweight deployment on edge devices. This invention proposes a rain-sensitive attention module that captures rain features through multi-directional convolution. This attention mechanism is specifically designed to capture the directional characteristics of rainwater. A strategic attention integration strategy is determined, optimally placing the attention module within the EfficientNet V2 architecture to balance performance improvement and computational efficiency. Interpretive analysis of the model using Grad-CAM further demonstrates the effectiveness of the attention mechanism within the EfficientNetV2 network. The designed model possesses both real-time inference capabilities and excellent accuracy, making it suitable for practical deployment.
[0048] 4. Manual inspection methods have significant shortcomings in terms of timeliness. Manual inspections cannot achieve real-time online monitoring around the clock, resulting in delayed responses and untimely feedback, leading to delayed early warnings and potential damage such as wet goods or flooding. The model in this invention combines the lightweight EfficientnetV2 architecture with RAS attention to achieve real-time rainfall presence monitoring over the widest area at the lowest cost. This can be used to improve the autonomous decision-making capabilities of artificial intelligence in complex weather conditions, thereby contributing to the creation of a more comprehensive and reliable intelligent early warning system.
[0049] The functions of each module of this invention and their specific implementation methods are described in detail below.
[0050] I. Data Acquisition Module The rainfall monitoring system primarily consists of a tipping bucket rain gauge and a piezoelectric rain gauge. It utilizes an industrial-grade RS485 serial communication interface to construct the data transmission channel and establishes a master-slave communication architecture based on the Modbus-RTU protocol. To meet rainfall monitoring requirements, a dedicated data frame structure is designed to enable sensor data interaction. The specific implementation process is as follows: 1. Data Request Frame Construction The master station equipment periodically sends standard query commands, whose binary data frame structure is: 25 03 00 00 0002 C2 EF The address field is 0x2; the function code is 0x03, used to read the holding register; the starting address is 0x0000, which is the starting address of the rainfall accumulation value register; the number of registers is 0x0002; and the CRC checksum is 0xC2EF, which conforms to the Modbus CRC-16 checksum algorithm.
[0051] 2. Response Data Parsing The rainfall monitoring station equipment returns a valid response frame and extracts the valid data fields. The data reconstruction formula is as follows:
[0052] in, The high-order register is a 16-bit value consisting of the first two bytes of the data field. This is the low-order register, which is a 16-bit value consisting of the last two bytes of the data field. It is an integer value, generated by the high-order register. and low-order registers The final integer value after combination is then subjected to the following physical quantity conversions:
[0053] In the formula, This represents the actual rainfall. The value equals 10, representing the sensor calibration coefficient. This conversion algorithm conforms to the resolution requirements in the "Rainfall Observation Specification" (GB / T 21978-2017). The frame tail CRC checksum 0x8F4A is verified using the Modbus CRC-16 algorithm and matches the calculated value, indicating reliable data integrity.
[0054] 3. Exception handling mechanism This invention integrates a timeout retransmission strategy. A dual protection mechanism of 500ms and CRC check ensures automatic retransmission when a check error or communication timeout is detected (maximum number of retries N). 3) Ensure the reliability of data collection.
[0055] This design achieves reliable multi-node communication through standard industrial protocols, and its parsing algorithm effectively solves the problem of converting raw sensor data into engineering quantities, meeting the requirements of meteorological monitoring systems for real-time and accurate rainfall data.
[0056] II. Image Recording Module The image acquisition module designed in this invention employs a multimodal triggering architecture to achieve visualized recording of meteorological monitoring data. At the hardware level, a pre-configured high-definition video stream acquisition device is integrated via the RTSP protocol to ensure the camera is ready when needed, while the OpenCV library is used to achieve low-latency decoding of the video stream.
[0057] 1. RICA Algorithm The core algorithm layer deploys a Rainfall-Image Correlation Algorithm (RICA). The RICA algorithm establishes a spatiotemporal mapping between rainfall data and visual evidence, ensuring that captured images are directly correlated with corresponding rainfall data, thus providing a comprehensive record of rainfall events. The dynamic threshold function is as follows:
[0058] It is a quantitative indicator that comprehensively considers both instantaneous rainfall changes and cumulative rainfall; it can be understood as the amount of rainfall at that moment. This is the instantaneous rainfall variation coefficient. As the cumulative rainfall weighting factor, It is the rainfall per unit time. For time windows. This represents the instantaneous rate of change of rainfall, that is, the speed at which rainfall increases or decreases per unit of time. It is used to detect sudden rainfall events, such as torrential downpours. If rainfall increases rapidly in a short period of time, it indicates a sudden change in rainfall. If the value is greater than 0, the component will increase significantly, triggering a fast response. This represents cumulative rainfall, used to monitor continuous precipitation. Even with gradual changes in rainfall intensity, prolonged accumulation will trigger a recording. For monitoring long-term accumulation, such as in flood warnings, the value can be increased. If it is necessary to capture instantaneous rainstorms, then increase... 。 Based on the above principles, first... , , Perform initial setup. For example, in an area with relatively stable rainfall but occasional heavy rain, perform initial setup. , , Hours. Use the pre-set parameters and compare them with actual rainfall events. If it is found that the response to sudden heavy rain is not sensitive enough, increase the parameters appropriately. If it is found that flood warnings caused by cumulative rainfall are not timely, the warning level should be appropriately increased. If the time window setting is found to be unreasonable (e.g., the captured rainfall changes do not meet expectations), adjust it. The value is determined through multiple tests and adjustments to find the optimal parameter combination for local rainfall characteristics and application requirements. If local climate conditions are uncertain and only meteorological levels are considered without focusing on short-term rainfall intensity analysis, the 1-hour cumulative rainfall can be selected as the core calculation level to avoid misjudgment due to increased data noise.
[0059] 2. Dynamic triggering mechanism The dynamic triggering mechanism is a key feature of the image recording module. It includes a cumulative rainfall change threshold and a timed shooting strategy. When the cumulative rainfall exceeds a predefined threshold... Or reach a specific time interval At that time, the system automatically captures images of the current scene. This mechanism ensures that the system dynamically responds to changes in rainfall, thus providing timely and relevant visual data. Within the time window... The total rainfall within the area must meet the following conditions:
[0060] Or reach the timed trigger cycle:
[0061] The system activates the image acquisition thread. This provides a powerful and reliable solution for capturing and storing real-time rainfall images. This module significantly enhances the functionality of the rainfall monitoring system, providing valuable visual data for subsequent analysis and research.
[0062] III. Data Processing Module Traditional rainfall analysis methods often focus on a single time scale and lack a comprehensive assessment of rainfall at different time scales. To address this, this invention proposes a multi-time-scale rainfall analysis method based on an improved sliding window algorithm, enabling statistical analysis of rainfall at the second, minute, and hourly levels.
[0063] 1. MSWA Algorithm This study proposes a multi-dimensional rainfall analysis framework based on the Modified Sliding Window Algorithm (MSWA), which achieves multi-scale quantification of rainfall intensity by constructing a three-level time window. Let the discrete time series... This represents the real-time rainfall observation value (sampling interval). =60 s Define the sliding window function:
[0064]
[0065] In the formula These correspond to the calculation windows for cumulative rainfall at the second, 10-minute, and hourly levels, respectively. It is the first Rainfall at each sampling point This represents the number of data points within the window. An incremental update mechanism is established to maintain a circular buffer. Window capacity When new data Upon arrival:
[0066] The calculation window only needs to be updated:
[0067] in, It is a circular buffer. Calculate the old data indexes that need to be removed, and recalculate all indices within the window each time. For each data point, incremental updates require only one addition and one subtraction, reducing computational complexity from... O ( k ) down to O (1). Finally, the association constraints for windows of different time scales are established using the following formula:
[0068] in, Let m be the cumulative rainfall in the m-th 10-minute window. This is a boundary correction term that addresses the residual problem caused by non-integer multiple alignment of windows.
[0069] 2. Rainfall Intensity Grading Model Based on the GB / T 28592-2012 rainfall level standard, a classification decision tree is constructed, with hourly cumulative rainfall as the threshold. The grading rules are as follows:
[0070] Rainfall intensity classification models provide hourly rainfall levels to assess a more comprehensive and accurate rainfall classification, which is beneficial for a variety of meteorological and hydrological applications.
[0071] 3. Structured data association storage Constructing a spatiotemporal alignment matrix to achieve multi-source data fusion:
[0072] in, Each row of the matrix represents a complete observation record of the same spatiotemporal node. This represents the cumulative rainfall. For category tags, The corresponding image hash value is a unique identifier for the monitored image at the corresponding time.
[0073] 4. Timestamp Synchronization Protocol In multi-sensor collaborative systems, inconsistent timestamps can cause serious problems. Misalignment between rainfall intensity data and image frames can distort data fusion. Inability to accurately match rainfall events with water accumulation images can lead to incorrect event associations, hindering further data analysis. Timestamp synchronization protocols eliminate sensor-storage link latency.
[0074] in, This represents the maximum permissible deviation between the two timestamps. The data recorded by the sensor generates a timestamp. The timestamp marked when the storage device receives data This represents the sampling frequency of the sensor.
[0075] Additional time alignment processing will effectively reduce analysis latency and improve data query efficiency.
[0076] IV. Visual Recognition Model in Rainy Weather This invention constructs a rainy day visual recognition model based on EfficientNetV2 and Rain-Sensitive Attention (RSA) mechanism. By designing multi-directional perceptual convolutional kernels that can capture raindrop motion, it focuses on the unique spatial dynamic features of rainy weather.
[0077] 1. EfficientNetv2 model EfficientNetV2 is a convolutional neural network (CNN) model proposed by Google Research in 2021, aiming to achieve superior performance with faster training speed and higher parameter efficiency. Its core idea is to combine training-aware neural architecture search and optimized network structures to achieve efficient feature learning under varying computational resources. EfficientNetV2 directly considers training speed during architecture search through Training-aware NAS, while introducing the Fused-MBConv structure to fuse dilated convolutions with depthwise separable convolutions, improving computational efficiency. The basic structure of each Fused-MBConv block can be represented mathematically as follows:
[0078] in, A 1×1 convolution is used for channel expansion. For fusion convolution operations, For the extrusion-excitation module, This is for skip connections. Furthermore, a progressive learning strategy is employed, dynamically adjusting image size and regularization intensity based on the training progress to optimize the training process.
[0079] Traditional model scaling methods typically scale a single dimension of the network arbitrarily, while EfficientNetV2's composite scaling method improves model performance by balancing the scaling of all three dimensions. Specifically, it uses a composite coefficient to uniformly scale each dimension, thus seamlessly adapting the model to different computational constraints.
[0080]
[0081]
[0082]
[0083]
[0084] in These are composite coefficients, used to control the model size; , , The scaling factor is determined through a grid search. EfficientNetV2 offers several variants to suit different scenario requirements. This invention selects EfficientNetV2-S, a variant that achieves an ideal balance between parameter count and performance.
[0085] EfficientNetV2 outperforms previous CNN architectures on multiple benchmark datasets. Compared to similar models, it offers significantly faster training speeds and a model size reduction of approximately 6.8 times, while maintaining or surpassing the original accuracy. For example, on the ImageNet dataset, EfficientNetV2 achieves a top-1 accuracy of 87.3%, and its training speed is 5-11 times faster than ViT. It is widely used in computer vision tasks such as image classification, object detection, and semantic segmentation, and is also suitable for scenarios with high model efficiency requirements, such as medical image analysis, autonomous driving, and drone navigation, especially showing significant advantages in resource-constrained mobile devices and embedded systems.
[0086] 2. CBAM Module The CBAM module, proposed by Woo et al. (2018), sequentially infers attention maps in both channel and spatial dimensions, then multiplies these attention maps by the input feature map for adaptive feature refinement. This combination improves the model's ability to detect aquatic environments. CBAM's advantages lie in its simplicity and efficiency, allowing for easy integration with existing convolutional neural network structures and significantly enhancing model performance, particularly in tasks such as image classification, object detection, and semantic segmentation. CBAM has been shown to significantly improve performance across multiple visual tasks while maintaining low computational overhead, making it a powerful tool for enhancing the performance of existing CNN models. CBAM, through its channel attention and spatial attention sub-modules, helps the model better focus on relevant features. The overall mathematical expression for CBAM is:
[0087]
[0088] in, This represents element-wise multiplication. As input features, Features after channel attention reweighting This is the final output feature.
[0089] What does channel attention focus on, such as Figure 4 As shown in c, channel features are extracted using global average pooling and global max pooling, and then channel attention weights are generated through a fully connected layer:
[0090] in, , , These weights represent the sigmoid activation function, and are used to enhance feature channels that are relevant to the aquatic environment while suppressing irrelevant channels.
[0091] Spatial attention focuses on where the attention is, such as Figure 4 As shown in Figure b, a spatial attention map is generated by calculating the channel mean and maximum values of the feature map. Then, the attention map is multiplied by the feature map to highlight important spatial regions.
[0092] in, , , Indicates a single output channel Convolution operation.
[0093] 3.Rain-Sensitive Attention Module This invention's rain-sensitive attention module is specifically designed to capture the unique features of rain in images. Unlike general object detection tasks, rainwater appears as semi-transparent, strongly directional stripes. To effectively capture these features, this invention develops a dedicated attention mechanism that enhances rain-related patterns while suppressing irrelevant background information. The module employs direction-aware convolution to enhance rain-specific features, primarily capturing rainwater features through three types of directional convolution: vertical convolution (11×1) to detect raindrop stripes, horizontal convolution (1×11) to detect water surfaces and puddles, and diagonal convolution (7×7) to capture oblique rain lines formed by wind direction or camera angle. These three directional features are then fused, enabling the network to comprehensively understand the rain scene.
[0094] For feature maps The rain-sensitive attention process can be represented as:
[0095]
[0096] in, Indicates directional enhancement features, This refers to the attention module mentioned above, which performs directional enhancement feature calculation. It is the ReLU activation function, and BN represents batch normalization. Convolution is used for feature fusion. , and These are the perceived features in the vertical, horizontal, and diagonal directions, respectively, calculated as follows:
[0097]
[0098]
[0099]
[0100]
[0101] in, Indicates the convolution operation. , and These are directional convolution kernels, used to capture vertical rain streaks, horizontal surface reflections, and diagonal rain streak patterns, respectively. Indicates feature concatenation operation; 1×1 convolutions are used for feature fusion; The attention mechanism of activation functions is strategically deployed in both the early and deep stages of the network. Early features mainly consist of low-level features such as edges and textures, which perfectly match the linear features of rain (vertical rain lines). The larger feature map size allows vertical and horizontal convolutions to more accurately locate the spatial distribution of rain features. Deep features have a rich number of channels (1280), representing high-level semantic information. Deep applications can understand the rain environment in the overall scene and identify more complex rain patterns, such as the light reflection and scattering effects caused by rain.
[0102] The application of a multi-scale attention mechanism enhances both microscopic and macroscopic rainwater features. The attention mechanisms at the two locations complement each other, constructing a complete rainwater feature representation from local to global perspectives. The combination of BatchNorm and ReLU after each attention module improves the stability and non-linear expressive power of the features. By applying the same mechanism to features at different levels, the model focuses more on the true rainwater features rather than the accidental characteristics of the dataset.
[0103] V. Model Training and Configuration By constructing a large-scale real-world dataset of rainfall images, covering different environments and lighting conditions, this invention comprehensively presents various real-world scenarios. On one hand, it strictly controls the sample size for different rainfall intensities to avoid excessive data discrepancies. On the other hand, this invention divides the dataset into a training set (70%), a validation set (15%), and a test set (15%), ensuring that frames from the same video sequence remain in the same set to prevent data leakage.
[0104] 1. Data Preprocessing To improve model training quality and avoid the model learning irrelevant features, this invention preprocesses the images. Surveillance images often contain overlaid timestamps and camera labels, which may bias the model's learning. These artifacts are removed through a masking operation. The masking region is typically located at the top left corner (0 to 160 pixels high, 0 to 960 pixels wide) and the bottom right corner (image height minus 160 to the image height, image width minus 800 to the image width). The masking operation can be represented as:
[0105]
[0106] in It's a mask. It is the original image. It is a mask image, such as Figure 5 As shown, the left side is the original image, and the right side is the masked image. This represents element-wise multiplication, with gradient index as... The size is A gradient-based approach is used to gradually fade the timestamp region, avoiding the introduction of artificial edges that might be mistaken for raindrop features. The masked region is scaled proportionally to the image size to ensure compatibility with various camera configurations. For surveillance camera images, where timestamps and camera markers are typically in fixed positions, soft masking is a simple and efficient preprocessing method. Compared to complete occlusion or cropping, soft masking, through gradual gradation, effectively reduces the influence of irrelevant information while maintaining the natural continuity of the image, avoiding the introduction of artificial boundaries or black blocks that could become new disturbances during model learning. When the model needs to focus on global features such as whether it is raining, this gentle intervention of soft masking is sufficient to guide the model to better focus on truly important visual features, thereby improving model performance.
[0107] All images were uniformly scaled to 384×384 pixels to fit the standard input size of EfficientNet-v2. Channel normalization was applied, using the mean and standard deviation of the ImageNet pre-trained model.
[0108] in and To improve the robustness of the model, this invention implements a comprehensive data augmentation strategy, and the detailed parameter configuration is shown in Table 1.
[0109] 2. Training and Optimization All models were implemented using PyTorch 2.5.0 and trained on a server equipped with an NVIDIA GeForce RTX 4060 Laptop GPU (8GB). To ensure the reproducibility of the experiments, a series of measures were taken: First, a fixed random seed of 42 was used to ensure consistent random initialization results for each experiment, eliminating experimental differences caused by random factors. Second, the batch normalization momentum was set to 0.1 to stabilize parameter updates during training, reduce fluctuations during model training, and improve training stability and convergence speed. Third, the maximum norm of the gradient was set to 1.0 for gradient pruning, effectively avoiding gradient explosion and ensuring normal model training. Finally, the model with the highest F1 score during training was saved as a model checkpoint for subsequent evaluation and analysis of the best model, while also providing a unified benchmark for comparing model performance under different experimental conditions.
[0110] This invention employs a pre-trained EfficientNetV2 model as its basic framework. During model initialization, weights trained on the large-scale ImageNet image dataset are automatically loaded. These pre-trained weights contain rich image feature representation capabilities, providing a high-performance starting point for subsequent rain detection tasks. Then, a rain-sensitive attention mechanism is introduced to modify the model architecture.
[0111] During training, this invention employs a series of training configurations and optimization strategies. First, the AdamW optimizer is selected, which includes weight decay regularization, combined with the initial learning rate. , with weight decay coefficient Parameters are updated. The batch size is set to 16 samples / batch. Considering the potential class imbalance in the dataset, this invention uses weighted cross-entropy loss as the training objective.
[0112] in For category The weight is calculated as the reciprocal of the total number of samples in that category. For the sample Category Indicator variables, Predict samples for the model Category The probability of [something]. Simultaneously, this invention uses a balanced sampler to ensure the balance of different categories of samples in each batch:
[0113] in To draw samples The probability. The maximum number of training rounds is 30. Figure 6 The curves showing the changes in loss function and accuracy during model training are presented. To address the class imbalance problem, referencing the method in the original paper of EfficientNetV2 that combines linear preheating with multi-step decay or cosine annealing, this invention will continue to employ a cosine annealing strategy with preheating, mathematically expressed as follows:
[0114] in It is the first The learning rate of the step. It's the number of preheating steps. It is the total number of steps. This is the minimum learning rate. Experimental results show that after 100 iterations of training, the model exhibits high consistency in accuracy and loss rate on both the training and validation sets. This indicates that the model performs well on the training data and generalizes well to new data without overfitting or underfitting. Notably, the model's accuracy gradually stabilizes around the 20th training iteration, without significant fluctuations. This demonstrates the model's fast convergence speed and high training efficiency, which is crucial for tasks like rainfall determination that require high timeliness and accuracy.
[0115] 3. Grad-CAM Analysis To gain a deeper understanding of the working principles of different attention mechanisms, this invention employs Grad-CAM analysis technology. By directly presenting the model's focus when processing input data, it provides an intuitive window into understanding the working principles of attention mechanisms. Its core value lies in transforming abstract attention weights into a spatially distributed heatmap, thereby revealing the degree of importance the model places on different regions of the input data. Grad-CAM generates the heatmap by calculating the gradient of the target class score relative to the feature map:
[0116] in It is the first The importance weights of each feature map Is the target category The score, It is the first of the last convolutional layer Each feature map. This visualization helps to understand the model's decision-making process and verify whether the model truly "sees" the rainwater features, rather than relying on other irrelevant elements or background in the image to make judgments.
[0117] To gain a deeper understanding of the proposed attention mechanism's ability to perceive rainwater characteristics, this invention employs Grad-CAM technology to visualize and analyze the model's attention regions. For example... Figure 7 As shown, (a) is the original image, (b) is the visualization result of the last feature layer of EfficientNetV2, and (c) is the visualization result of the last feature layer of EfficientNetV2-Ours. The comparison clearly shows that, compared to the basic EfficientNetV2, the model proposed in this invention can more accurately locate rainwater lines. The basic model's attention is more scattered or concentrated in the center region of the image, while the improved model's attention is more accurately distributed on the vertical and diagonal rainwater lines. Figure 7 The heatmap shows a high-response region with directional distribution, largely consistent with the direction of the rain lines. This distribution pattern closely matches the typical attention features of rain-sensitive models, suggesting that the current analysis scenario involves rainy environment perception or directional texture feature recognition tasks, and that the model has learned certain features that represent rain. This also indicates that the addition of the attention mechanism makes its feature extraction more accurate and effectively extracts features from key areas, further demonstrating the effectiveness of the attention mechanism in the EffcientNetV2 network. This heatmap shows that the model indeed correctly focuses on rain features, indicating that its classification decision is based on reasonable visual cues, and providing an interpretable basis for subsequent model optimization and safe deployment.
[0118] The architecture parameters of EfficientNetV2-S of this invention are shown in Table 1:
[0119] Table 1 The details of the data augmentation configuration are shown in Table 2:
[0120] Table 2 The experimental setup details are shown in Table 3, and the loss and accuracy comparison curves for each training and validation round are shown in Table 3. Figure 6 As shown:
[0121] Table 3 Table 4 shows the comparative experiments on the ablation of attention mechanisms:
[0122] Table 4 The performance of the test set on different models is shown in Table 5:
[0123] Table 5 To comprehensively verify the performance of the proposed model in object detection tasks, this invention designed and implemented a series of systematic ablation experiments, focusing on analyzing the impact of different attention mechanisms on model performance. Table 4 presents the detailed test results of each model configuration on the validation set, providing solid data support for in-depth discussion. The radar chart of the ablation experiment performance indicators measured by this invention is shown below. Figure 8 As shown.
[0124] In the experimental architecture construction process, the following variant models were carefully constructed: Efficientnet was used as the base model, and subsequent improvements were made based on this; Efficientnet + CBAM1 embeds the CBAM attention mechanism after the second stage (i.e., after the FusedMBConv1 layer), aiming to explore the performance changes after introducing CBAM into this layer; Efficientnet + CBAM2 goes further, adding the CBAM attention mechanism after the second stage and in the eighth stage (the last layer of the model) to examine the comprehensive effect of multi-layer CBAM stacking on model performance; Efficientnet + CBAM + Rain1 introduces the Rain-Sensitive Attention mechanism after the first stage layer, trying the performance of this new attention mechanism in a specific layer; Efficientnet + CBAM + Rain2 adds the Rain-Sensitive Attention mechanism in both the second and eighth stages, exploring its performance potential under the synergistic effect of different key layers. Efficientnetv2_s consists of a total of 8 stages, as shown in Table 6:
[0125] Table 6 The experimental results clearly and strongly demonstrate that placing the rain-sensitive attention module in stages 2 and 8 achieves a near-perfect balance between performance and computational efficiency. This configuration exhibits outstanding performance across all key metrics, reaching excellent levels of over 95%. It is worth noting that while the recall rate is outstanding when the rain-sensitive attention module is placed only in stage 2, its performance is relatively inferior in overall performance metrics such as accuracy, precision, F1 score, and specificity.
[0126] The ablation experiments provide strong evidence that the proposed architecture successfully achieves an optimal balance between model capacity, computational efficiency, and rainwater detection performance. The rain-sensitive attention module demonstrates significantly better performance than the CBAM module in improving recognition accuracy, primarily due to its enhanced attention to rainwater features and its more refined allocation and processing mechanism for input information.
[0127] The model of this invention was compared with several state-of-the-art rain detection methods. Table 5 summarizes the results on the test set. The EfficientNetV2-Ours model exhibits significant performance advantages over other advanced rain detection methods, achieving the highest scores on a range of key metrics. This fully demonstrates the effectiveness of the proposed rain-sensitive attention mechanism in rain detection tasks. Furthermore, this performance improvement also indicates the success of the innovative design of the attention mechanism and its strategic integration into the EfficientNet V2 architecture.
[0128] Figure 9 It includes two key evaluation curves: the ROC curve and the Precision-Recall curve. The ROC curve shows the relationship between the Total Reduction Rate (TPR) and the Final Reduction Rate (FPR) of the model at different classification thresholds. The closer the curve is to the top left corner (TPR... 1. FPR The higher the AUC (according to the ROC curve), the better the model performance. EfficientNetV2-Ours has the highest AUC and the best curve, leading EfficientNetB0, the ResNet series, and the VGG series in that order. The Precision-Recall curve is more sensitive in imbalanced scenarios, reflecting the balance between the model's precision and recall for positive examples. The higher the curve, the higher the precision for the same recall, and the better the performance. EfficientNetV2-Ours' curve is at the top, indicating the best performance, with the remaining models decreasing in that order, consistent with the ROC curve conclusion, verifying its superior performance in recognition tasks. This performance advantage stems from innovative optimizations in model design. By strengthening the multi-scale perception and dynamic capture mechanism of rainwater features, it not only reduces misclassifications but also optimizes the model's robustness and generalization ability in complex scenarios, providing strong theoretical support for intelligent transportation systems and other related fields.
[0129] In summary, compared with traditional rainfall monitoring methods, the rainfall monitoring system of this invention has significant advantages, mainly in the following aspects: 1. Improved real-time performance and accuracy Traditional rainfall monitoring methods often rely on manual inspections or weather stations, which frequently suffer from monitoring delays, especially when rainfall changes rapidly, potentially leading to omissions or erroneous records. A rain-based visual recognition model based on EfficientNetV2 and RSA possesses real-time inference capabilities and excellent accuracy. It can be lightweightly deployed on camera equipment, promptly informing users of current rainfall levels, meeting the needs of real-time monitoring, and shortening early warning response time.
[0130] 2. Fusion of RICA and MSWA algorithms Most methods for calculating rainfall are not accurate enough, and there is a lack of theoretical basis for determining real-time rainfall intensity levels based on images. Rainfall characteristics vary from region to region; some areas experience frequent short-duration heavy rainfall, while others experience continuous rainfall throughout the season. Judging rainfall intensity solely based on 1-hour or 12-hour rainfall data fails to accurately reflect the current rainfall level and is not conducive to analyzing short-duration rainfall intensity. This invention combines the RICA and MSWA algorithms. Appropriate parameters can be set according to target needs and regional characteristics to establish a spatiotemporal mapping relationship between rainfall data and visual evidence. This ensures a direct correlation between images and corresponding rainfall levels, thereby improving the comprehensive recording of rainfall events and achieving more accurate and diverse data collection.
[0131] 3. Intelligentization and Automation Traditional data collection methods rely heavily on manual intervention and timed data collection, lacking intelligent decision-making mechanisms and often requiring manual post-processing of monitoring data. The automatic labeling system of this invention, through an automated triggering mechanism and intelligent classification function, can intelligently decide based on real-time rainfall and environmental changes, activating drones and fixed equipment camera systems to automatically acquire images and classify rainfall. This intelligent workflow significantly reduces manual intervention by 83%, improving data collection efficiency, especially in continuous rainfall or rapidly changing weather conditions, enabling better response and recording of rainfall events.
[0132] 4. Rain-sensitive attention mechanism Traditional CNN models are weak at discriminating rainfall intensity in light drizzle or complex environments, lacking attention mechanisms tailored to the characteristics of rainy weather. Rain-Sensitive Attention (RSA) is an attention mechanism specifically designed to capture the directional characteristics of raindrops. By designing multi-directional perceptual convolutional kernels that capture raindrop motion and placing the attention module optimally within the EfficientNet V2 architecture, it better focuses on the unique spatial dynamic features of rainy weather during training, accurately capturing the directional distribution patterns of rain, including features such as sloping rain streaks and wet ground. This results in excellent robustness under complex lighting and dynamic backgrounds. Image-based rainfall detection, as an important component of environmental perception systems, leverages its low cost and high efficiency to improve the autonomous decision-making capabilities of artificial intelligence in complex weather conditions, thereby contributing to the creation of more comprehensive and reliable intelligent early warning systems.
[0133] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be defined by the claims.
Claims
1. An image-based automatic rainfall labeling system, characterized in that, include: The data collection module combines fixed rainfall monitoring stations with drone patrol photography to collect data. It adopts a dynamic trigger photography method to capture real-time images when there are changes in rainfall or at regular intervals. The image recording module sets corresponding parameters according to target needs and regional characteristics, and establishes a spatiotemporal mapping relationship between rainfall data and visual evidence, so that the image is directly related to the corresponding rainfall level; The use of a timestamp synchronization protocol enables real-time data alignment, and the use of a spatiotemporal alignment matrix achieves multi-source data fusion, simultaneously recording the collected rainfall intensity, time, and rainfall amount. The rain-sensitive attention module captures rain features through multi-directional convolution and employs a multi-stage attention mechanism integration strategy. The image recording module uses a rainfall-image association model to establish a spatiotemporal mapping relationship between rainfall data and visual evidence. The dynamic threshold function of the rainfall-image association model is as follows: It is a quantitative indicator that comprehensively considers both instantaneous rainfall changes and cumulative rainfall, among which This is the instantaneous rainfall variation coefficient. As the cumulative rainfall weighting factor, It is the rainfall per unit time. This is a time window; if long-term accumulation needs to be monitored, such as flood warnings, the window can be increased. If it is necessary to capture instantaneous rainstorms, then increase... The specific process is as follows: First, for , , Perform initial setup; use the set parameters and compare them with actual rainfall events; If it is found that the response to sudden rainstorms is not sensitive enough, the intensity should be increased appropriately. ; If it is found that flood warnings caused by cumulative rainfall are not timely, the intensity should be appropriately increased. ; If the captured rainfall changes do not meet expectations, adjust. The values were determined; through multiple tests and adjustments, a parameter combination suitable for local rainfall characteristics and application requirements was found. The rain-sensitive attention module uses the CBAM attention module to perform orientation enhancement feature calculation and is embedded after the second and last stages of the EfficientNet V2 architecture; The rain-sensitive attention module captures rain features through three types of convolution: vertical convolution to detect raindrop stripes, horizontal convolution to detect water surfaces and puddles, and diagonal convolution to capture oblique rain lines formed by wind direction or camera angle. It also fuses these three types of features to achieve a multi-level feature representation from local rain patterns to the global rainfall environment. For feature maps The rain-sensitive attention process is represented as follows: in, Indicates directional enhancement features, It is the ReLU activation function, and BN represents batch normalization. Convolution is used for feature fusion. , and These are the perception features in the vertical, horizontal, and diagonal directions, respectively.
2. The image-based automatic rainfall labeling system as described in claim 1, characterized in that, The imaging equipment of the data collection module includes laser imaging equipment, infrared imaging equipment and ordinary imaging equipment; the fixed rainfall monitoring station adopts tipping bucket rain gauge and piezoelectric rain gauge, constructs a data transmission channel through industrial-grade RS485 serial communication interface, and establishes a master-slave communication architecture based on Modbus-RTU protocol specification.
3. The image-based automatic rainfall labeling system as described in claim 1, characterized in that, The data collection module adopts a cumulative rainfall change triggering mechanism. When the rainfall change exceeds a preset threshold within a certain period of time, the image acquisition function is activated. The timed shooting triggering mechanism automatically triggers the cruise shooting function when no shooting is performed for several consecutive hours, so as to achieve the continuity of data collection. The photo-taking decision is based on a rainfall intensity classification model to classify rainfall in real time, and triggers shooting only when the set conditions are met.
4. The image-based automatic rainfall labeling system as described in claim 1, characterized in that, The image recording module sets a cumulative rainfall change threshold and a timed shooting strategy. When the cumulative rainfall exceeds the predefined threshold... Or reach a specific time interval At that time, the data collection module is notified to take a picture and capture an image of the current scene.
5. The image-based automatic rainfall labeling system as described in claim 1, characterized in that, The image recording module employs a multi-timescale rainfall analysis method based on an improved sliding window algorithm to achieve three-dimensional statistical analysis of rainfall at the second, minute, and hourly levels, specifically including: Let discrete time series , representing the real-time rainfall observation value, defines a sliding window function: In the formula These correspond to the calculation windows for cumulative rainfall at the second, 10-minute, and hourly levels, respectively. It is the first Rainfall at each sampling point This represents the number of data points within the window. Establish an incremental update mechanism and maintain a circular buffer. Window capacity New data Upon arrival: The calculation window only needs to be updated: in, It is a circular buffer. Calculate the old data indexes that need to be removed, and recalculate all indices within the window each time. One data point; Finally, the association constraints for windows of different time scales are established using the following formula: in, Let m be the cumulative rainfall in the m-th 10-minute window. This is a boundary correction term that addresses the residual problem caused by non-integer multiple alignment of windows.
6. The image-based automatic rainfall labeling system as described in claim 1, characterized in that, The image recording module constructs a classification decision tree based on rainfall level standards, setting hourly cumulative rainfall... The grading rules are as follows: Constructing a spatiotemporal alignment matrix to achieve multi-source data fusion: in, Each row of the matrix represents a complete observation record of the same spatiotemporal node. This represents the cumulative rainfall. For category tags, The corresponding image hash value is a unique identifier for the monitored image at the corresponding time.
7. The image-based automatic rainfall labeling system as described in claim 1, characterized in that, The image recording module uses the following timestamp synchronization protocol to eliminate sensor-storage link latency: in, This represents the maximum permissible deviation between the two timestamps. The data recorded by the sensor generates a timestamp. The timestamp marked when the storage device receives data This represents the sampling frequency of the sensor.
Citation Information
Patent Citations
Multi-source data fused precipitation estimation model establishment method and precipitation estimation method
CN114943365A
Rainfall prediction method and system for Beijing, Tianjin and Hebei regions
CN119556377A