A water gauge detection method and system based on a pre-trained model and a storage medium
By employing a two-stage optimization method based on a pre-trained model and intelligent deviation analysis, the problems of low efficiency and poor adaptability of traditional water gauge detection have been solved, achieving high-precision and low-cost water level monitoring and improving detection accuracy and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional water level gauge detection methods rely on manual reading, which is inefficient and easily affected by human factors. Existing models lack adaptability and accuracy in different deployment environments, and data collection and processing are incomplete, making it impossible to effectively utilize local data for optimization.
A two-stage optimization method based on a pre-trained model is adopted, which combines intelligent deviation analysis and closed-loop iteration mechanism. The deep learning model is trained by collecting diverse water level gauge data, and local labeled data is generated by comparing with external sensor data. The model is optimized to adapt to the local environment through manual screening and fine-tuning training.
It has achieved high-precision, highly adaptable, and low-maintenance water level monitoring, improved detection accuracy and adaptability, reduced misjudgments, and enhanced the system's intelligence level and data quality control.
Smart Images

Figure CN120220070B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultrasound imaging technology, and in particular to a water level detection method, apparatus, and storage medium based on a pre-trained model. Background Technology
[0002] Water gauges, as important tools for measuring water levels, are widely used in water conservancy, shipping, and ports. Traditional water gauge detection methods often rely on manual reading, which is inefficient and easily affected by human factors, making it difficult to guarantee accuracy. With the development of computer vision technology, automatic detection of water gauges using image recognition technology has become a research hotspot. However, existing water gauge detection models have poor adaptability to different deployment environments, their detection accuracy needs improvement, and their data acquisition and processing methods are not perfect, failing to effectively utilize local data to optimize models and better meet practical application needs. Summary of the Invention
[0003] This invention proposes a water level detection method and system based on a pre-trained model. This method overcomes the pain points of traditional water level detection methods, such as low efficiency, poor model generalization, and uncontrollable data quality, through a two-stage model optimization process of "pre-training and local fine-tuning," combined with intelligent deviation analysis and a closed-loop iterative mechanism. It achieves a high-precision, highly adaptable, and low-maintenance water level monitoring solution with significant industry application value. The technical solution of this invention is implemented as follows:
[0004] A water level detection method based on a pre-trained model includes the following steps: collecting various water level data accumulated and labeled by the company over a long period of time; using a deep learning algorithm to train the collected water level data to construct a water level detection network model; collecting water level data and generating local data; using the pre-trained model to detect local water level images and read the detected water level information; and based on the pre-trained model, inputting the generated high-quality local training data into the model for fine-tuning training to enable it to better adapt to the characteristics and environmental conditions of local water levels.
[0005] As a preferred technical solution, the water gauge data also includes water gauge images of different types and under different environments, including water gauge images taken under different lighting conditions, different water qualities, and different angles.
[0006] As a preferred technical solution, the deep learning algorithm is one of the convolutional neural network, fully connected neural network or recurrent neural network. It is used to train the collected water level data to build a water level detection network model.
[0007] As a preferred technical solution, water level data is collected in real time by installing radar or other water level detection equipment at the location of the water gauge. At the same time, the collected water level data is subjected to noise reduction and filtering preprocessing to remove noise interference from the data. The filtering process uses the Kalman filter algorithm to smooth the data, ensuring that the collected water level data is accurate and stable.
[0008] As a preferred technical solution, generating local data includes the following steps:
[0009] Step S1: Use a pre-trained model to detect local water level images and read the detected water level information;
[0010] Step S2: Compare the water level information detected by the pre-trained model with the water level data collected by the external sensor. If the deviation is less than the preset threshold, the data detected by the pre-trained model is considered to be correct and can be directly used for subsequent analysis and recording. If the deviation is greater than the threshold, the corresponding water level image is extracted and combined with the results of the external sensor to generate new labeled data. These new labeled data are saved as a supplement to the local data.
[0011] Step S3: Once a certain amount of local labeled data has been accumulated, the data is output through the output module and manually screened. The manual screening checks for errors in the labeled data and removes samples that may have labeling errors, thereby obtaining high-quality local training data for subsequent model fine-tuning training.
[0012] A water level detection system based on a pre-trained model includes:
[0013] The image acquisition unit collects various water gauge data accumulated and labeled by the company over a long period of time and transmits them to the data preprocessing unit;
[0014] The data preprocessing unit is used to preprocess the water level data collected by the image acquisition unit and convert it into the standard format and size required by the pre-trained model;
[0015] The pre-trained model storage and retrieval unit stores the pre-trained water level detection model and provides a data interaction interface with other units. When it receives a detection request sent by the data comparison and local data generation unit, it can quickly retrieve the pre-trained model from the model storage database and load it into memory so as to quickly detect the input water level image and obtain water level information.
[0016] The data comparison and local data generation unit receives water level detection information output by the pre-trained model and water level data collected by external sensors, and parses and converts these data to enable effective comparison and analysis; it handles the deviation between the water level detected by the pre-trained model and the water level data from external sensors, providing strong support for data quality control and model optimization of the water gauge detection system; when the deviation exceeds a threshold, it extracts the corresponding water gauge image from the storage path of the image acquisition unit and combines it with the accurate water level data from the external sensors to generate new labeled data.
[0017] Manual annotation and filtering unit: Data is manually annotated and filtered.
[0018] The fine-tuning training and model update unit, based on the pre-trained model architecture, uses a deep learning framework to load training data and fine-tune the model parameters. It employs the backpropagation algorithm to continuously adjust the model's weights and biases based on the loss function values of the training set data, enabling the model to better adapt to the characteristics and environmental conditions of the local water gauge and improve the accuracy of water level detection.
[0019] As a preferred technical solution, the data comparison and local data generation unit includes the following modules:
[0020] Data receiving and parsing module: Receives water level detection information output by the pre-trained model and water level data collected by external sensors, and parses and converts this data to enable effective comparison and analysis;
[0021] The deviation calculation and judgment module performs deviation analysis on both time and spatial scales to comprehensively evaluate the model's accuracy in dynamic water level change scenarios. It calculates the deviation between the water level detected by the pre-trained model and the water level measured by the sensor in each region, and uses a probability distribution method to determine whether there is a significant deviation in the water level data. When new water level data comparison results are received, the probability of the current deviation value appearing in the corresponding probability distribution model is calculated. If the deviation value falls in the low probability region of the probability distribution, it is judged as a significant anomaly, requiring further local data generation and model optimization. If the deviation value is in the high probability region, the data is considered reasonable and normal under the current environmental conditions and can be directly used for subsequent data analysis or model validation without triggering complex data processing procedures.
[0022] The deviation correlation analysis and anomaly tracing module determines the quantitative relationship between various factors and water level deviation by establishing a multiple linear regression model or using correlation analysis algorithms in deep learning. When a significant deviation is found, the established correlation model is used to trace the anomaly and provide more targeted feedback information for subsequent data correction and model training.
[0023] The local data generation module extracts the corresponding water level image from the image acquisition unit's storage path when the deviation exceeds a threshold. It then combines this image with accurate water level data from external sensors to generate new labeled data. The labeled information includes the water level image's feature information, accurate water level values, and relevant environmental parameters. This new labeled data is stored in the local labeled data storage area, providing data support for subsequent model fine-tuning and training.
[0024] As a preferred technical solution, the fine-tuning training and model update unit includes:
[0025] The training data loading module reads high-quality training data that has been manually selected from the local training data storage area and divides it into training set and validation set according to a certain ratio for fine-tuning training and performance verification of the model.
[0026] The model fine-tuning training module, based on the pre-trained model architecture, uses a deep learning framework to load training data and fine-tunes the model's parameters. It employs the backpropagation algorithm to continuously adjust the model's weights and biases based on the loss function values of the training set data, enabling the model to better adapt to the characteristics and environmental conditions of the local water gauge.
[0027] The model evaluation and validation module periodically evaluates and validates the model's performance using validation set data during fine-tuning training. It calculates metrics such as accuracy, recall, and mean squared error, and adjusts training parameters and strategies based on the evaluation results to ensure continuous optimization of model performance. When the model's performance on the validation set meets the preset performance requirements, training stops, and the newly trained model is saved to the model storage database of the pre-trained model storage and retrieval unit. This updates the original pre-trained model so that a better-performing model can be used for water level detection in subsequent water level detection.
[0028] As a preferred technical solution, the data preprocessing unit includes:
[0029] The image enhancement module enhances the acquired water level gauge images by adjusting brightness, enhancing contrast, and sharpening the image to improve image quality and clarity, and enhance the recognizability of water level gauge markings and water level lines, thus facilitating subsequent model detection and data processing.
[0030] The noise reduction and filtering module uses median filtering and Gaussian filtering algorithms to remove noise interference in the image, and at the same time uses wavelet transform to further smooth the image and reduce image noise caused by environmental factors.
[0031] The image standardization module converts preprocessed images into the standard format and size required by the pre-trained model, ensuring that the image data can be accurately recognized and processed by the model, thereby improving the model's detection efficiency and accuracy.
[0032] A non-temporary storage medium for storing a program that causes a pre-trained model-based water level detection system to perform the above-described pre-trained model-based water level detection method.
[0033] Compared with existing technologies, this solution has the following advantages:
[0034] (1) High accuracy and versatility: The deep learning model is trained by using diverse water level data (covering different environments, lighting, angles, etc.) during the pre-trained model building stage. The initial detection accuracy is over 95%, which has good versatility and initial performance, laying the foundation for subsequent local optimization.
[0035] (2) Local data optimization and adaptability enhancement: By comparing external sensor data with model detection results, local labeled data is dynamically generated, and data quality is ensured through manual screening. The pre-trained model is fine-tuned using local data, which significantly improves the model's adaptability and detection accuracy in specific environments, solving the problem of poor adaptability of traditional methods.
[0036] (3) Intelligent deviation analysis and adaptive judgment: The innovative introduction of multi-scale deviation analysis (time trend, spatial distribution), deviation judgment based on probability distribution and deviation correlation tracing mechanism can more accurately identify abnormal data and reduce misjudgment. At the same time, through the correlation analysis of environmental and physical factors, the cause of abnormality can be quickly located and the level of system intelligence can be improved.
[0037] (4) Efficient data processing and quality control: The data preprocessing unit improves the quality of input data through image enhancement, noise reduction filtering and standardization operations; the manual annotation and screening unit strictly reviews local data to avoid the impact of annotation errors on model training and ensure the high reliability of training data.
[0038] (5) System closed-loop optimization and continuous improvement: Through regular verification and parameter adjustment of the fine-tuning training and model update units, dynamic optimization of model performance is achieved. The updated model can replace the old version in real time, forming a closed-loop process of "data acquisition-local optimization-model update", which continuously improves detection stability and accuracy.
[0039] (6) Multi-dimensional environmental adaptability: The system comprehensively considers various environmental factors such as light, water quality, physical state of water gauge (tilt, cleanliness), and seasonal changes. Through probability distribution modeling and correlation analysis, it enhances the adaptability to complex scenarios and meets the actual needs of water conservancy, shipping and other fields. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This invention provides a workflow for the intelligent management of ultrasound images.
[0042] Figure 2 This is a schematic diagram of the data governance module of a water level detection method based on a pre-trained model according to the present invention; Detailed Implementation
[0043] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0044] Reference Figure 1 This invention provides a water level detection method based on a pre-trained model, comprising the following steps: collecting various water level data accumulated and labeled over a long period of time by the company; using a deep learning algorithm to train the collected water level data to construct a water level detection network model; collecting water level data and generating local data; using the pre-trained model to detect local water level images and read the detected water level information; and based on the pre-trained model, inputting the generated high-quality local training data into the model for fine-tuning training to better adapt it to the characteristics of local water levels and environmental conditions. This method, through a two-stage model optimization process of "pre-training + local fine-tuning," combined with intelligent deviation analysis and a closed-loop iteration mechanism, overcomes the pain points of traditional water level detection such as low efficiency, poor model generalization, and uncontrollable data quality. It achieves a high-precision, highly adaptable, and low-maintenance water level monitoring solution, possessing significant industry application value.
[0045] Reference Figures 1-2 As shown, the specific steps are as follows:
[0046] Pre-trained model construction:
[0047] We collect various water level data accumulated and labeled by the company over a long period of time. These data cover water level images of different types and environments, including but not limited to water level images taken under different lighting conditions, with different water quality, and from different angles.
[0048] Deep learning algorithms, such as convolutional neural networks (CNNs), are used to train the collected water level gauge data to build a water level gauge detection network model. Through extensive training on large amounts of data, the model learns the characteristics of the water level gauge and the patterns of water level readings. After optimization and adjustments, the model is ensured to achieve a detection accuracy of over 95% in most application scenarios. This pre-trained model will serve as the basis for subsequent local model fine-tuning, possessing good versatility and initial accuracy.
[0049] 1. Data Acquisition:
[0050] 1) Install radar or other water level detection equipment at the location of the water gauge to collect water level data in real time.
[0051] 2) Perform preprocessing operations such as denoising and filtering on the collected water level data. Denoising can be achieved by using methods such as median filtering and wavelet transform to remove noise interference from the data. Filtering can be achieved by using algorithms such as Kalman filtering to smooth the data, ensuring that the collected water level data has high accuracy and stability, and providing a reliable data foundation for subsequent data comparison and model training.
[0052] 2. Generate local data
[0053] 1) Use a pre-trained model to detect local water level images and read the detected water level information.
[0054] 2) Compare the water level information detected by the pre-trained model with the water level data collected by external sensors. If the deviation is less than a preset threshold, the data detected by the pre-trained model is considered correct and can be directly used for subsequent analysis and recording. If the deviation is greater than the threshold, the corresponding water level image is extracted and combined with the results of the external sensors to generate new labeled data. This new labeled data is saved as a supplement to the local data.
[0055] 3) Once a certain amount of locally labeled data has been accumulated, this data is displayed through the output module for manual screening. During the manual screening process, the labeled data is carefully checked for errors, such as inaccurate labeling positions or incorrect water level labels. Samples with potential labeling errors are removed to obtain high-quality local training data for subsequent model fine-tuning training.
[0056] 3. Fine-tuning training
[0057] Based on a pre-trained model, high-quality local training data is input into the model for fine-tuning. During fine-tuning, the model's parameters are adjusted to better adapt to the characteristics and environmental conditions of the local water level gauge. By learning from local data, the newly generated model achieves higher accuracy and stability in local water level gauge detection, thus enabling more precise water level measurement.
[0058] The specific components of the water level gauge detection system are as follows:
[0059] The water level detection system of the present invention includes an image acquisition unit, a data preprocessing unit, a pre-trained model storage and retrieval unit, a data comparison and local data generation unit, a manual annotation and screening unit, and a fine-tuning training and model update unit. The specific composition and function of each unit are as follows:
[0060] 1. Image acquisition unit
[0061] High-definition camera: It adopts a camera with high resolution and low light performance, which can clearly capture water level images under different lighting conditions, ensuring the clarity and detail of the images, and providing accurate raw image data for subsequent water level detection.
[0062] Gimbal and bracket: The gimbal enables multi-angle rotation and precise adjustment of the camera. The bracket is used to fix the camera and gimbal, so that they are stably installed in a suitable position near the water gauge to obtain the best shooting angle and adapt to the image acquisition needs of the water gauge at different heights and positions.
[0063] Image transmission module: Transmits the acquired water level gauge images to the data preprocessing unit in real time. It can use wired transmission (such as Ethernet) or wireless transmission (such as Wi-Fi, 4G / 5G network) to ensure the stability and timeliness of data transmission and reduce the impact of transmission delay on detection timeliness.
[0064] 2. Data Preprocessing Unit
[0065] Image enhancement module: Enhances the acquired water level gauge images, including but not limited to brightness adjustment, contrast enhancement, and image sharpening, to improve image quality and clarity, enhance the recognizability of water level gauge markings and water level lines, and facilitate subsequent model detection and data processing.
[0066] The noise reduction and filtering module uses algorithms such as median filtering and Gaussian filtering to remove noise interference in the image. At the same time, it uses wavelet transform and other methods to further smooth the image, reduce image noise caused by environmental factors (such as water flow fluctuations, changes in lighting, etc.), and improve the stability and reliability of the image.
[0067] Image standardization module: Converts preprocessed images into the standard format and size required by the pre-trained model, ensuring that the image data can be accurately recognized and processed by the model, thereby improving the model's detection efficiency and accuracy.
[0068] 3. Pre-trained model storage and retrieval unit
[0069] Model storage database: High-performance storage devices (such as solid-state drive arrays) are used to store pre-trained water level detection models, ensuring secure storage and fast retrieval of model data. The database has comprehensive data management functions, enabling version management and backup of models, so that different versions of pre-trained models can be quickly restored and switched when needed.
[0070] Model call interface: Provides a data interaction interface with other units. When it receives a detection request sent by the data comparison and local data generation unit, it can quickly call the pre-trained model from the model storage database and load it into memory so as to quickly detect the input water level image and obtain water level information.
[0071] 4. Data comparison and local data generation unit
[0072] Data receiving and parsing module: Receives water level detection information output by the pre-trained model and water level data collected by external sensors (such as radar water level gauges), and parses and converts these data to enable effective comparison and analysis.
[0073] Deviation Calculation and Judgment Module:
[0074] Multiscale bias analysis:
[0075] Traditional bias calculations typically involve simply calculating the numerical difference between the water level detected by the pre-trained model and the water level data from external sensors on a single scale. However, this module innovatively introduces a multi-scale analysis method. First, on the time scale, it considers not only the comparison of water level data at the current moment but also analyzes the bias in the trend of water level data over a past period (e.g., the past hour, with 10-minute intervals). By calculating the difference in the rate of change of water level—that is, the difference between the water level change trend predicted by the pre-trained model and the water level change trend actually monitored by the external sensor—the accuracy of the model in dynamic water level change scenarios can be more comprehensively evaluated.
[0076] Spatially, the distribution of water level deviations across different scale regions of the water gauge is considered. The water gauge image is divided into multiple sub-regions (e.g., upper, middle, and lower regions), and the deviation between the water level detected by the pre-trained model and the water level measured by the sensor is calculated for each region. This multi-region analysis helps to discover differences in the model's detection accuracy at different parts of the water gauge, potentially revealing local detection errors caused by factors such as wear and tear on the scale, occlusion, or uneven lighting, providing more detailed information for subsequent targeted data processing and model optimization.
[0077] Bias judgment based on probability distribution:
[0078] Abandoning the traditional fixed threshold judgment method, this module adopts a probability distribution-based approach to determine whether there are significant deviations in water level data. First, through statistical analysis of a large amount of historical water level data (including pre-trained model detection results and sensor measurement data), a probability distribution model of the water level data for each water gauge under different environmental conditions (such as different seasons, different weather conditions, and different water flow velocities) is established. For example, a Gaussian mixture model (GMM) is used to fit the distribution characteristics of the water level data, obtaining parameters such as the mean, variance, and weights of each Gaussian component of the water level data under different conditions.
[0079] When new water level data comparison results are received, the probability of the current deviation value appearing in the corresponding probability distribution model is calculated. If the deviation value falls in the low probability region of the probability distribution (e.g., below the 5% probability interval), the deviation is determined to be significantly abnormal, requiring further local data generation and model optimization. Conversely, if the deviation value is in the high probability region, the data is considered reasonable and normal under the current environmental conditions and can be directly used for subsequent data analysis or model validation without triggering complex data processing procedures. This probability-based judgment method can more adaptively adapt to the characteristics of different water gauges and various complex and changing real-world environments, effectively reducing the occurrence of misjudgments and improving the stability and reliability of the system.
[0080] Deviation correlation analysis and anomaly tracing:
[0081] While calculating water level deviation, this module also analyzes the correlation between the deviation and other relevant factors. In addition to considering environmental factors (such as the season, weather, and water flow velocity mentioned above), it also incorporates the physical state information of the water gauge itself (such as tilt angle and surface cleanliness) into the analysis. By establishing a multiple linear regression model or using correlation analysis algorithms in deep learning (such as variants of autoencoders for feature extraction and correlation modeling), the quantitative relationship between each factor and water level deviation is determined.
[0082] When significant deviations are detected, the established correlation model is used for anomaly tracing. For example, if analysis reveals a strong correlation between water level deviation and the tilt angle of the water gauge, and a large deviation is detected, the system will automatically indicate that the anomaly may be caused by the tilt of the water gauge and record the relevant information. This not only helps operators quickly locate and resolve problems but also provides more targeted feedback for subsequent data correction and model training. Through this deviation correlation analysis and anomaly tracing mechanism, the causes of water level deviations can be understood more deeply, further optimizing the performance and data quality of the water gauge detection system and improving the overall system's intelligence and maintainability.
[0083] Through the above innovative process, the deviation calculation and judgment module can more accurately and intelligently handle the deviation between the water level detected by the pre-trained model and the water level data from external sensors, providing strong support for data quality control and model optimization of the water gauge detection system.
[0084] Local data generation module: When the deviation exceeds a threshold, the corresponding water level image is extracted from the storage path of the image acquisition unit and combined with accurate water level data from external sensors to generate new labeled data. The labeled information includes the feature information of the water level image, the accurate water level value, and relevant environmental parameters (such as light intensity, water temperature, etc.). This new labeled data is stored in the local labeled data storage area to provide data support for subsequent model fine-tuning training.
[0085] 5. Manual labeling and screening unit
[0086] Data visualization platform: Displays the data in the local annotation data storage area on the screen in a visual way. Annotators can intuitively view the image content, annotation information and related environmental parameters of each set of annotation data, which facilitates manual annotation and filtering operations.
[0087] Manual annotation tools: Provides a series of convenient annotation tools, such as mouse click annotation, drawing tools, text input boxes, etc. Annotators can correct and improve the annotation data according to the image content and actual water level, ensuring the accuracy and completeness of the annotation information.
[0088] 6. Screening and Review Module: Annotators review each piece of displayed data, judging whether there are any errors or inaccuracies based on experience and actual conditions, such as deviations in water level marking positions or incorrect environmental parameter recordings. Problematic data is marked as invalid and deleted from the local annotation data storage area; high-quality annotation data that passes the review is marked as valid data and stored in the local training data storage area, providing reliable training samples for fine-tuning training.
[0089] 7. Fine-tuning training and model update unit
[0090] Training data loading module: Reads high-quality training data that has been manually selected from the local training data storage area, and divides it into training set and validation set according to a certain ratio for fine-tuning training and performance verification of the model.
[0091] Model fine-tuning training module: Based on the pre-trained model architecture, this module uses deep learning frameworks (such as TensorFlow, PyTorch, etc.) to load training data and fine-tune the model's parameters. It employs the backpropagation algorithm to continuously adjust the model's weights and biases based on the loss function values of the training set data, enabling the model to better adapt to the characteristics and environmental conditions of the local water level gauge and improve the accuracy of water level detection.
[0092] Model Evaluation and Validation Module: During fine-tuning training, validation set data is used periodically to evaluate and validate the model's performance. Metrics such as accuracy, recall, and mean squared error are calculated. Training parameters and strategies are adjusted based on the evaluation results to ensure continuous optimization of model performance. When the model's performance on the validation set meets the preset performance requirements, training stops, and the newly trained model is saved to the model storage database of the pre-trained model storage and retrieval unit. The original pre-trained model is updated so that a better-performing model can be used for water level detection in subsequent water level detection tasks.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A water level detection system based on a pre-trained model, characterized in that, Including: The image acquisition unit collects the water gauge data accumulated by the company over a long period of time and transmits it to the data preprocessing unit. The data preprocessing unit is used to preprocess the water level data collected by the image acquisition unit and convert it into the standard format and size required by the pre-trained model; The pre-trained model storage and retrieval unit stores the pre-trained water level detection model and provides a data interaction interface with other units. When it receives a detection request from the data comparison and local data generation unit, it retrieves the pre-trained model from the model storage database and loads it into memory so as to quickly detect the input water level image and obtain water level information. The data comparison and local data generation unit receives water level detection information output by the pre-trained model and water level data collected by external sensors, and parses and converts these data to enable effective comparison and analysis; it handles the deviation between the water level detected by the pre-trained model and the water level data from external sensors, providing strong support for data quality control and model optimization of the water gauge detection system; when the deviation exceeds a threshold, it extracts the corresponding water gauge image from the storage path of the image acquisition unit and combines it with the accurate water level data from the external sensors to generate new labeled data. The manual annotation and filtering unit involves manually annotating and filtering the data. The fine-tuning training and model update unit, based on the pre-trained model architecture, uses a deep learning framework to load training data and fine-tunes the model parameters. It employs the backpropagation algorithm to continuously adjust the model's weights and biases based on the loss function values of the training set data, enabling the model to better adapt to the characteristics and environmental conditions of the local water gauge and improve the accuracy of water level detection. The data comparison and local data generation unit includes the following modules: The data receiving and parsing module receives water level detection information output by the pre-trained model and water level data collected by external sensors, and parses and converts these data to enable effective comparison and analysis. The deviation calculation and judgment module performs deviation analysis on both temporal and spatial scales to comprehensively evaluate the model's accuracy in dynamic water level change scenarios. It calculates the deviation between the water level detected by the pre-trained model and the water level measured by the sensor within each region, using a probability distribution method to determine if there is a significant deviation in the water level data. When new water level data comparison results are received, the probability of the current deviation value appearing in the corresponding probability distribution model is calculated. If the deviation value falls in a low-probability region of the probability distribution, it is judged as a significant anomaly, requiring further local data generation and model optimization. If the deviation value is in a high-probability region, the data is considered reasonable and normal under the current environmental conditions and can be directly used for subsequent data analysis or model validation without triggering complex data processing procedures. Spatially, considering the water level deviation distribution in different scale areas of the water gauge, the water gauge image is divided into multiple sub-regions. The deviation between the water level detected by the pre-trained model and the water level measured by the sensor is calculated for each region. Analysis of multiple regions reveals differences in the model's detection accuracy at different parts of the water gauge, reflecting local detection errors caused by various factors, providing more detailed information for subsequent targeted data processing and model optimization. The deviation correlation analysis and anomaly tracing module determines the quantitative relationship between various factors and water level deviation by establishing a multiple linear regression model or using correlation analysis algorithms in deep learning. When a significant deviation is found, the established correlation model is used to trace the anomaly and provide more targeted feedback information for subsequent data correction and model training. The local data generation module extracts the corresponding water level image from the storage path of the image acquisition unit when the deviation exceeds a threshold, and combines it with the accurate water level data from external sensors to generate new labeled data. The labeled information includes the feature information of the water level image, the accurate water level value, and related environmental parameters. These new labeled data are stored in the local labeled data storage area to provide data support for subsequent model fine-tuning training.
2. The water level detection system based on a pre-trained model as described in claim 1, characterized in that, The fine-tuning training and model update unit includes: The training data loading module reads high-quality training data that has been manually selected from the local training data storage area and divides it into training set and validation set according to a certain ratio for fine-tuning training and performance verification of the model. The model fine-tuning training module, based on the pre-trained model architecture, uses a deep learning framework to load training data and fine-tunes the model's parameters. It employs the backpropagation algorithm to continuously adjust the model's weights and biases based on the loss function values of the training set data, enabling the model to better adapt to the characteristics and environmental conditions of the local water level gauge. The model evaluation and validation module periodically evaluates and validates the model's performance using validation set data during fine-tuning training. It calculates metrics such as accuracy, recall, and mean squared error, and adjusts training parameters and strategies based on the evaluation results to ensure continuous optimization of model performance. When the model's performance on the validation set meets the preset performance requirements, training stops, and the newly trained model is saved to the model storage database of the pre-trained model storage and retrieval unit. This updates the original pre-trained model so that a better-performing model can be used for water level detection in subsequent water level detection.
3. The water level detection system based on a pre-trained model as described in claim 1, characterized in that, The data preprocessing unit includes: The image enhancement module enhances the acquired water level gauge images by adjusting brightness, enhancing contrast, and sharpening the image to improve image quality and clarity, and enhance the recognizability of water level gauge markings and water level lines, thus facilitating subsequent model detection and data processing. The noise reduction and filtering module uses median filtering and Gaussian filtering algorithms to remove noise interference in the image, and at the same time uses wavelet transform to further smooth the image and reduce image noise caused by environmental factors. The image standardization module converts preprocessed images into the standard format and size required by the pre-trained model, ensuring that the image data can be accurately recognized and processed by the model, thereby improving the model's detection efficiency and accuracy.
Citation Information
Patent Citations
Water gauge tide gauge method based on deep learning
CN117593601A
Automobile reliability improving method, device and equipment based on FMEA data and medium
CN119150664A