Water gauge detection method and system based on pre-training model and storage medium
Through the water ruler detection method based on the pre-trained model, combined with intelligent deviation analysis and closed-loop iteration mechanism, the existing water ruler detection methods are solved, and water level monitoring with high accuracy, high adaptability and low operation and maintenance costs are achieved.
Patent Information
- Application Number
- CN202510360873.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-25
AI Technical Summary
The existing water ruler detection methods are inefficient, poor generalization of models, and uncontrollable data quality, making it difficult to meet practical application needs.
The water ruler detection method based on the pre-trained model is adopted, and the dual-stage model optimization of the 'pre-training and local fine-tuning' is combined with intelligent deviation analysis and closed-loop iteration mechanism to generate high-quality local training data for model fine-tuning.
It realizes a water level monitoring solution with high accuracy, high adaptability and low operation and maintenance costs, significantly improving detection accuracy and adaptability, and reducing operation and maintenance costs.
Smart Images

Figure CN120220070A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ultrasonic imaging technology, and in particular to a water gauge detection method, method, device and storage medium based on a pre-trained model. Background Art
[0002] As an important water level measurement tool, water gauges are widely used in the fields of water conservancy, shipping, ports, etc. Traditional water gauge detection methods often rely on manual reading, with low efficiency and being easily affected by human factors, making it difficult to guarantee accuracy. With the development of computer vision technology, using image recognition technology to automatically detect water gauges has become a research hotspot. However, existing water gauge detection models have poor adaptability in different deployment environments, the detection accuracy needs to be improved, and the methods of data collection and processing are not perfect enough to effectively utilize local data to optimize the model to better meet the actual application requirements. Summary of the Invention
[0003] The present invention proposes a water gauge detection method and system based on a pre-trained model. This method optimizes the model through a two-stage model of "pre-training and local fine-tuning", combines intelligent deviation analysis and a closed-loop iteration mechanism, overcomes the pain points of traditional water gauge detection such as low efficiency, poor model generalization, and uncontrollable data quality, and realizes a water level monitoring solution with high precision, high adaptability, and low operation and maintenance costs, having significant industrial application value. The technical solution of the present invention is realized as follows:
[0004] A water gauge detection method based on a pre-trained model includes the following steps: collecting various water gauge data accumulated and labeled by the company for a long time, using deep learning algorithms to train the collected water gauge data, and constructing a water gauge detection network model; collecting water level data and generating local data; using the pre-trained model to detect local water gauge pictures and read the detected water level information; based on the pre-trained model, inputting the locally generated high-quality training data into the model for fine-tuning training to enable it to better adapt to the characteristics and environmental conditions of local water gauges.
[0005] As a preferred technical solution, the water gauge data is water gauge images of different types and in 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 a convolutional neural network, a fully connected neural network, or a recurrent neural network, and a water gauge detection network model is constructed by training the collected water gauge data.
[0007] As a preferred technical solution, other water level detection devices such as radar are installed at the location of the water gauge to collect water level data in real time; at the same time, the collected water level data is preprocessed by denoising and filtering to remove noise interference in the data. The filtering process uses the Kalman filtering algorithm to smooth the data to ensure the accuracy and stability of the collected water level data.
[0008] As a preferred technical solution, generating local data includes the following steps:
[0009] Step S1: Use the pre-trained model to detect the local water gauge picture 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 between the two is less than the pre-set threshold, it is considered that the data detected by the pre-trained model is correct, and this data can be directly used for subsequent analysis and recording; if the deviation is greater than the threshold, the corresponding water gauge picture is extracted, and new annotation data is generated in combination with the results of the external sensor, and these new annotation data are saved as a supplement to the local data.
[0011] Step S3: When the local annotation data accumulates to a certain amount, these data are output through the output module and manually screened. Check whether there are errors in the annotation data through manual screening, and remove the samples that may have annotation errors, so as to obtain high-quality local training data for subsequent model fine-tuning training.
[0012] A water gauge detection system based on a pre-trained model includes:
[0013] An image acquisition unit that collects various water gauge data accumulated and annotated by the company for a long time and transmits it to the data preprocessing unit;
[0014] A data preprocessing unit for preprocessing the water gauge data collected by the image acquisition unit and converting it into the standard format and size required by the pre-trained model;
[0015] A pre-trained model storage and call unit that stores the pre-trained water gauge detection model and provides a data interaction interface with other units. When receiving the 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 the memory for rapid detection of the input water gauge image to obtain the water level information;
[0016] Data comparison and local data generation unit, which receives the water level detection information output by the pre-trained model and the water level data collected by external sensors, parses and converts the formats of these data to enable effective comparison and analysis; processes the deviation between the water level detected by the pre-trained model and the water level data of the external sensors, providing strong support for the data quality control and model optimization of the water gauge detection system; when the deviation is greater than the threshold, extracts the corresponding water gauge image from the storage path of the image acquisition unit, and combines it with the accurate water level data of the external sensors to generate new annotation data;
[0017] Manual annotation and screening unit, which manually annotates and screens the data;
[0018] Fine-tuning training and model update unit, based on the pre-trained model architecture, uses a deep learning framework to load the training data, fine-tunes the parameters of the model, adopts the backpropagation algorithm, and continuously adjusts the weights and biases of the model according to the loss function value of the training set data, so that the model can 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 reception and parsing module: Receives the water level detection information output by the pre-trained model and the water level data collected by external sensors, and parses and converts the formats of these data to enable effective comparison and analysis;
[0021] Deviation calculation and judgment module, which conducts deviation analysis from the time scale and space scale, comprehensively evaluates the accuracy of the model in the dynamic water level change scenario, calculates the deviation values between the water level detected by the pre-trained model and the water level measured by the sensor in each area respectively, and uses the method based on probability distribution to determine whether there is a significant deviation in the water level data. When receiving the comparison result of the new water level data, calculates the occurrence probability of the current deviation value in the corresponding probability distribution model. If the deviation value falls in the low probability area of the probability distribution, it is determined that the deviation is a significant anomaly and further local data generation and model optimization operations are required; while if the deviation value is in the high probability area, it is considered that the data is reasonable normal data under the current environmental conditions and can be directly used for subsequent data analysis or model verification without triggering complex data processing processes;
[0022] Deviation correlation analysis and anomaly tracing module, by establishing a multiple linear regression model or using an association analysis algorithm in deep learning, determines the quantitative relationship between each factor and the water level deviation. When a significant deviation is found, uses the established correlation model for anomaly tracing and provides more targeted feedback information for subsequent data correction and model training;
[0023] The local data generation module, when the deviation is greater than the threshold, extracts the corresponding water gauge image from the storage path of the image acquisition unit, and combines it with the accurate water level data of the external sensor to generate new labeled data. The labeling information includes the feature information of the water gauge image, the accurate water level value, and the relevant 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.
[0024] As a preferred technical solution, the fine-tuning training and model update unit includes:
[0025] The training data loading module reads the high-quality training data that has been manually screened from the local training data storage area, and divides it into a training set and a validation set according to a certain ratio for the 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 the training data and fine-tune the parameters of the model. It adopts the backpropagation algorithm and continuously adjusts the weights and biases of the model according to the loss function value of the training set data, so that the model can better adapt to the characteristics and environmental conditions of the local water gauge.
[0027] The model evaluation and verification module, during the fine-tuning training process, regularly uses the validation set data to evaluate and verify the performance of the model, calculates indicators such as the accuracy rate, recall rate, and mean square error of the model, and adjusts the training parameters and strategies according to the evaluation results to ensure the continuous optimization of the model performance; when the performance of the model on the validation set reaches the preset index requirements, stop the training, and save the trained new model to the model storage database of the pre-trained model storage and call unit to update the original pre-trained model, so as to use a model with better performance for water level detection in subsequent water gauge detections.
[0028] As a preferred technical solution, the data preprocessing unit includes:
[0029] The image enhancement module performs enhancement processing on the collected water gauge image, including brightness adjustment, contrast enhancement, and image sharpening operations, to improve the quality and clarity of the image, enhance the recognition of the water gauge scale and water level line, and facilitate subsequent model detection and data processing.
[0030] The denoising and filtering module uses median filtering and Gaussian filtering algorithms to remove the noise interference in the image, and at the same time uses wavelet transform method to further smooth the image to reduce the image noise caused by environmental factors.
[0031] The image standardization module uniformly converts the preprocessed image into the standard format and size required by the pre-trained model to ensure that the image data can be accurately recognized and processed by the model, and improve the detection efficiency and accuracy of the model.
[0032] A non - temporary storage medium for storing a program, which is used to make a water gauge detection system based on a pre - trained model perform the following actions: execute the above - mentioned water gauge detection method based on a pre - trained model.
[0033] Compared with the prior art, the present solution has the following beneficial effects:
[0034] (1) High accuracy and generality. By using diverse water gauge data (covering different environments, lighting, angles, etc.) during the pre - training model construction stage to train the deep - learning model, the initial detection accuracy reaches over 95%, with good generality and initial performance, laying a foundation for subsequent local optimization.
[0035] (2) Local data optimization and adaptability improvement. By comparing the external sensor data with the model detection results, local labeled data is dynamically generated, and the data quality is ensured through manual screening. The pre - trained model is fine - tuned using local data, significantly improving the adaptability and detection accuracy of the model in a specific environment and solving the problem of poor adaptability of traditional methods.
[0036] (3) Intelligent deviation analysis and adaptive judgment. Innovatively introducing multi - scale deviation analysis (time trend, spatial distribution), deviation judgment based on probability distribution, and deviation correlation tracing mechanism, it can more accurately identify abnormal data, reduce misjudgment. At the same time, through the correlation analysis of environmental and physical factors, the cause of the anomaly can be quickly located, improving the intelligent level of the system.
[0037] (4) Efficient data processing and quality control. The data pre - processing unit improves the quality of the input data through image enhancement, denoising filtering, and standardization operations; the manual annotation and screening unit strictly reviews the local data, avoiding the impact of mislabeling on model training and ensuring the high reliability of the training data.
[0038] (5) System closed - loop optimization and continuous improvement. Through the regular verification and parameter adjustment of the fine - tuning training and model update unit, the dynamic optimization of the 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" to continuously improve the detection stability and accuracy.
[0039] (6) Multi - dimensional environmental adaptability. The system comprehensively considers various environmental factors such as lighting, water quality, physical state of the water gauge (tilt, cleanliness), and seasonal changes. Through probability distribution modeling and correlation analysis, the adaptability to complex scenarios is enhanced to meet the actual needs of fields such as water conservancy and shipping. Description of the Drawings
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0041] Figure 1 This is the ultrasonic imaging digital intelligent management workflow of the present invention;
[0042] Figure 2 This is a schematic diagram of the data governance module of a water gauge detection method based on a pre-trained model of the present invention; Detailed implementation manners
[0043] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0044] Refer to Figure 1 , the present invention provides a water gauge detection method based on a pre-trained model, including the following steps: Collect various water gauge data accumulated and labeled by the company for a long time, and use deep learning algorithms to train the collected water gauge data to construct a water gauge detection network model; Collect water level data and generate local data; Use the pre-trained model to detect the local water gauge pictures and read the detected water level information; Based on the pre-trained model, input the locally generated high-quality training data into the model for fine-tuning training to make it better adapt to the characteristics and environmental conditions of the local water gauge. This method optimizes the model through a two-stage model of "pre-training + local fine-tuning", combines intelligent deviation analysis and closed-loop iteration mechanisms, overcomes the pain points of traditional water gauge detection such as low efficiency, poor model generalization, and uncontrollable data quality, and realizes a water level monitoring solution with high precision, high adaptability, and low operation and maintenance costs, and has significant industry application value.
[0045] Refer to Figures 1-2 As shown, the specific method steps are as follows:
[0046] Construction of the pre-trained model:
[0047] Collect various water gauge data accumulated and labeled by the company for a long time. These data cover water gauge images of different types and in different environments, including but not limited to water gauge images taken under different lighting conditions, different water qualities, and different angles.
[0048] Using deep learning algorithms, such as convolutional neural networks (CNNs), train the collected water gauge data to construct a water gauge detection network model. Through a large amount of data training, the model can learn the characteristics of the water gauge and the rules of water level reading. After optimization and adjustment, ensure that the detection accuracy of the model reaches over 95% in most application scenarios. This pre-trained model will serve as the basis for subsequent fine-tuning of the local model, with good generality and initial accuracy.
[0049] 1. Data collection:
[0050] 1) Install other water level detection devices such as radar 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. Median filtering, wavelet transform and other methods can be used for denoising to remove noise interference in the data, and algorithms such as Kalman filtering can be used for filtering to smooth the data, ensuring that the collected water level data has high accuracy and stability, providing a reliable data basis for subsequent data comparison and model training.
[0052] 2. Generate local data
[0053] 1) Use the pre-trained model to detect the local water gauge pictures 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 between the two is less than the pre-set threshold, it is considered that the data detected by the pre-trained model is correct, and this data can be directly used for subsequent analysis and recording; if the deviation is greater than the threshold, extract the corresponding water gauge pictures, and generate new labeled data in combination with the results of external sensors, and save these new labeled data as a supplement to the local data.
[0055] 3) When the local labeled data accumulates to a certain amount, display these data through the output module for manual screening. During the manual screening process, carefully check whether there are errors in the labeled data, such as inaccurate labeling positions and incorrect water level value labeling, and remove the samples that may have labeling errors, so as to obtain high-quality local training data for subsequent model fine-tuning training.
[0056] 3. Fine-tuning training
[0057] Based on the pre-trained model, input the locally generated high-quality training data into the model for fine-tuning training. During the fine-tuning training process, adjust the parameters of the model so that it can better adapt to the characteristics and environmental conditions of the local water gauge. By learning the local data, the newly generated model can achieve higher accuracy and stability in local water gauge detection, thus measuring the water level more accurately.
[0058] The specific composition of the water gauge detection system is as follows:
[0059] The water gauge detection system of the present invention includes an image acquisition unit, a data preprocessing unit, a pre-trained model storage and call unit, a data comparison and local data generation unit, an artificial annotation and screening unit, and a fine-tuning training and model update unit. The specific composition and functions of each unit are as follows:
[0060] 1. Image acquisition unit
[0061] High-definition camera: A camera with high resolution and low illumination performance is adopted, which can clearly capture the water gauge image under different lighting conditions, ensuring the clarity and detail integrity of the image, and providing accurate original image data for subsequent water level detection.
[0062] Pan-tilt and bracket: The pan-tilt can realize multi-angle rotation and precise adjustment of the camera, and the bracket is used to fix the camera and the pan-tilt, so that it is stably installed at a suitable position near the water gauge to obtain the best shooting angle and adapt to the water gauge image acquisition requirements at different heights and positions.
[0063] Image transmission module: Transmits the collected water gauge image to the data preprocessing unit in real time. Wired transmission (such as Ethernet) or wireless transmission (such as Wi-Fi, 4G / 5G network) can be adopted to ensure the stability and timeliness of data transmission and reduce the impact of transmission delay on the detection timeliness.
[0064] 2. Data preprocessing unit
[0065] Image enhancement module: Performs enhancement processing on the collected water gauge image, including but not limited to operations such as brightness adjustment, contrast enhancement, and image sharpening, to improve the quality and clarity of the image, enhance the recognition of water gauge scales and water level lines, and facilitate subsequent model detection and data processing.
[0066] Denoising filter module: Uses algorithms such as median filtering and Gaussian filtering to remove noise interference in the image, and at the same time uses methods such as wavelet transform to further smooth the image, reducing image noise caused by environmental factors (such as water flow fluctuations, lighting changes, etc.), and improving the stability and reliability of the image.
[0067] Image standardization module: Uniformly converts the preprocessed image into the standard format and size required by the pre-trained model to ensure that the image data can be accurately recognized and processed by the model, and improve the detection efficiency and accuracy of the model.
[0068] 3. Pre-trained model storage and call unit
[0069] Model storage database: A high-performance storage device (such as a solid-state drive array) is used to store the pre-trained water gauge detection model, ensuring the secure storage and fast reading of model data. The database has a complete data management function, which can perform version management and backup of the model, so that different versions of the pre-trained model can be quickly restored and switched when needed.
[0070] Model call interface: Provide a data interaction interface with other units. When receiving 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 for rapid detection of the input water gauge image to obtain water level information.
[0071] 4. Data comparison and local data generation unit
[0072] Data reception and parsing module: Receive the water level detection information output by the pre-trained model and the water level data collected by external sensors (such as radar water level gauges), and parse and convert the format of these data so that they can be effectively compared and analyzed.
[0073] Deviation calculation and judgment module:
[0074] Multi-scale deviation analysis:
[0075] Traditional deviation calculations usually only perform simple numerical difference calculations on the water level detected by the pre-trained model and the water level data of external sensors at a single scale. However, this module innovatively introduces a multi-scale analysis method. First, on the time scale, not only the water level data comparison at the current moment is considered, but also the deviation of the water level data change trend in the past period of time (such as the past 1 hour, at 10-minute intervals) is analyzed. By calculating the difference in the water level change rate, that is, the difference between the water level change trend predicted by the pre-trained model and the actual water level change trend monitored by external sensors, the accuracy of the model in dynamic water level change scenarios can be more comprehensively evaluated.
[0076] On the spatial scale, consider the water level deviation distribution in different scale regions of the water gauge. Divide the water gauge image into multiple sub-regions (such as upper, middle, and lower regions), and calculate the deviation values between the water level detected by the pre-trained model and the water level measured by the sensor in each region. This multi-region analysis helps to discover the detection accuracy differences of the model in different parts of the water gauge, and may reveal local detection errors caused by factors such as wear, occlusion, or uneven illumination of some scales of the water gauge, providing more detailed information for subsequent targeted data processing and model optimization.
[0077] Deviation judgment based on probability distribution:
[0078] Abandoning the traditional fixed-threshold judgment method, this module adopts a method based on probability distribution to determine whether there are significant deviations in water level data. First, through the statistical analysis of a large amount of historical water level data (including the detection results of the pre-trained model and sensor measurement data), a probability distribution model of water level data for each water gauge under different environmental conditions (such as different seasons, different weather, different water flow velocities, etc.) is established. For example, the Gaussian mixture model (GMM) is used to fit the distribution characteristics of water level data to obtain parameters such as the mean, variance of water level data in different states, and the weights of each Gaussian component.
[0079] When receiving the comparison results of new water level data, calculate the occurrence probability of the current deviation value in the corresponding probability distribution model. If the deviation value falls in the low-probability region of the probability distribution (for example, the probability interval below 5%), then determine that this deviation is a significant anomaly and further local data generation and model optimization operations are required; while if the deviation value is in the high-probability region, it is considered that this data is reasonable normal data under the current environmental conditions and can be directly used for subsequent data analysis or model verification 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 changeable actual 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 the water level deviation, this module also deeply analyzes the correlation between the deviation and other relevant factors. In addition to considering environmental factors (such as the seasons, weather, water flow velocities, etc. mentioned above), the physical state information of the water gauge itself (such as tilt angle, surface cleanliness, etc.) is also included in the analysis scope. By establishing a multiple linear regression model or using association analysis algorithms in deep learning (such as variants of autoencoders for feature extraction and correlation modeling), the quantitative relationship between each factor and the water level deviation is determined.
[0082] When a significant deviation is found, use the established correlation model for anomaly tracing. For example, if the analysis finds that there is a strong correlation between the water level deviation and the tilt angle of the water gauge, and a large deviation is currently detected, the system will automatically prompt that the detection anomaly may be caused by the tilt of the water gauge and record the relevant information. This not only helps the operator quickly locate and solve problems, but also provides more targeted feedback information for subsequent data correction and model training. Through this deviation correlation analysis and anomaly tracing mechanism, the reasons for the water level deviation can be understood more deeply, further optimizing the performance and data quality of the water gauge detection system and improving the intelligence level and maintainability of the entire system.
[0083] Through the above innovative process, the deviation calculation and judgment module can process the deviation between the water level detected by the pre-trained model and the water level data of the external sensor more accurately and intelligently, providing strong support for the data quality control and model optimization of the water gauge detection system.
[0084] Local data generation module: When the deviation is greater than the threshold, the corresponding water gauge image is extracted from the storage path of the image acquisition unit, and combined with the accurate water level data of the external sensor to generate new annotation data. The annotation information includes the feature information of the water gauge image, the accurate water level value, and relevant environmental parameters (such as light intensity, water temperature, etc.). These new annotation data are stored in the local annotation data storage area to provide data support for subsequent model fine-tuning training.
[0085] 5. Manual annotation and screening unit
[0086] Data display platform: The data in the local annotation data storage area is displayed visually on the display screen. The annotator can intuitively view the image content, annotation information, and relevant environmental parameters of each group of annotation data, facilitating manual annotation and screening operations.
[0087] Manual annotation tool: Provide a series of convenient annotation tools, such as mouse click annotation, brush tool, text input box, etc. The annotator can correct and improve the annotation data according to the image content and actual water level situation to ensure the accuracy and integrity of the annotation information.
[0088] 6. Screening and review module: The annotator reviews the displayed data one by one, and judges whether there are errors or inaccuracies in the annotation data according to experience and actual situation, such as water level annotation position deviation, environmental parameter recording error, etc. Mark the problematic data as invalid data and delete it from the local annotation data storage area; mark the high-quality annotation data that passes the review as valid data and store it in the local training data storage area to provide reliable training samples for fine-tuning training.
[0089] 7. Fine-tuning training and model update unit
[0090] Training data loading module: Read the high-quality training data after manual screening from the local training data storage area, and divide it into a training set and a validation set according to a certain ratio for model fine-tuning training and performance verification.
[0091] Model fine-tuning training module: Based on the pre-trained model architecture, use deep learning frameworks (such as TensorFlow, PyTorch, etc.) to load training data and fine-tune the parameters of the model. Adopt the backpropagation algorithm to continuously adjust the weights and biases of the model according to the loss function value of the training set data, so that the model can better adapt to the characteristics and environmental conditions of the local water gauge and improve the accuracy of water level detection.
[0092] Model evaluation and verification module: During the fine-tuning training process, regularly use the validation set data to evaluate and verify the performance of the model, calculate indicators such as the accuracy, recall rate, and mean square error of the model, and adjust the training parameters and strategies according to the evaluation results to ensure the continuous optimization of the model performance. When the performance of the model on the validation set reaches the preset index requirements, stop the training, save the trained new model to the model storage database of the pre-trained model storage and call unit, and update the original pre-trained model, so as to use a model with better performance for water level detection in subsequent water gauge detections.
[0093] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A water gauge detection method based on a pre-trained model, characterized in that: The following steps are involved: Collect various water gauge data that the company has accumulated and labeled over a long period of time, use deep learning algorithms to train the collected water gauge data, and build a water gauge detection network model; collect water level data and generate local data; use pre-trained models to detect local water gauge images and read the detected water level information; based on the pre-trained model, input the generated local high-quality training data into the model for fine-tuning training, so that it can better adapt to the characteristics and environmental conditions of the local water gauge.
2. A water gauge detection method based on a pre-training model as claimed in claim 1, characterized in that: The water gauge data also includes water gauge images of different types and in different environments, including water gauge images taken under different lighting conditions, different water qualities, and different angles.
3. A water gauge detection method based on a pre-training model as claimed in claim 1, characterized in that: The deep learning algorithm is one of a convolutional neural network, a fully connected neural network or a recurrent neural network. By training the collected water gauge data, a water gauge detection network model is constructed.
4. A water gauge detection method based on a pre-training model as claimed in claim 1, characterized in that: By installing radar and other water level detection equipment at the location of the water gauge, water level data is collected in real time. At the same time, the collected water level data is subjected to denoising and filtering preprocessing operations to remove noise interference in the data. The filtering process uses the Kalman filtering algorithm to smooth the data to ensure that the collected water level data is accurate and stable.
5. A water gauge detection method based on a pre-training model as claimed in claim 1, characterized in that: Generating local data comprises the following steps: Step S1: Use the pre-trained model to detect the local water gauge image and read the detected water level information; 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 between the two 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 gauge image is extracted, and new annotation data is generated in combination with the results of the external sensor. These new annotation data are saved as a supplement to the local data. Step S3: When a certain amount of local annotated data has accumulated, these data are output through the output module and manually screened. The annotated data are checked for errors through manual screening, and samples that may have annotated errors are removed to obtain high-quality local training data for subsequent model fine-tuning training.
6. A water gauge detection system based on a pre-trained model, characterized in that: Included are: Image acquisition unit, which collects various water gauge data accumulated and marked by the company over a long period of time and transmits them to the data preprocessing unit; A data preprocessing unit, used to preprocess the water gauge data collected by the image acquisition unit and convert it into a standard format and size required by the pre-training model; The pre-trained model storage and calling unit stores the pre-trained water gauge detection model and provides a data interaction interface with other units. When receiving 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 the memory, so as to quickly detect the input water gauge image and obtain the water level information; The data comparison and local data generation unit receives the water level detection information output by the pre-trained model and the water level data collected by the external sensor, and parses and converts the data into a format to enable effective comparison and analysis; it processes the deviation between the water level detected by the pre-trained model and the water level data of the external sensor, providing strong support for the data quality control and model optimization of the water gauge detection system; when the deviation is greater than the threshold, the corresponding water gauge image is extracted from the storage path of the image acquisition unit, and combined with the accurate water level data of the external sensor to generate new annotation data; Manual labeling and screening unit, manually labeling and selecting data; The fine-tuning training and model updating unit, based on the pre-trained model architecture, uses the deep learning framework to load training data, fine-tunes the model parameters, and adopts the back-propagation algorithm to continuously adjust the model's weights and biases according to the loss function value of the training set data, so that the model can better adapt to the characteristics and environmental conditions of the local water gauge and improve the accuracy of water level detection.
7. A water gauge detection system based on a pre-training model as claimed in claim 6, characterized in that: The data comparison and local data generation unit includes the following modules: Data receiving and parsing module: receives the water level detection information output by the pre-trained model and the water level data collected by the external sensor, and parses and converts the data into a format to enable effective comparison and analysis; The deviation calculation and judgment module performs deviation analysis on both time and space scales, comprehensively evaluates the accuracy of the model in dynamic water level change scenarios, calculates the deviation between the water level detected by the pre-trained model and the water level measured by the sensor in each area, and determines whether there is a significant deviation in the water level data based on the probability distribution method. When receiving new water level data comparison results, calculate the probability of the current deviation value in the corresponding probability distribution model. If the deviation value falls in the low probability area of the probability distribution, the deviation is judged to be a significant anomaly, and further local data generation and model optimization operations are required; if the deviation value is in the high probability area, the data is considered to be reasonable and normal data under the current environmental conditions, and can be directly used for subsequent data analysis or model verification without triggering complex data processing procedures; The deviation correlation analysis and anomaly tracing module determines the quantitative relationship between various factors and water level deviation by establishing a multivariate linear regression model or using the association analysis algorithm 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, when the deviation is greater than the threshold, extracts the corresponding water gauge image from the storage path of the image acquisition unit, and generates new annotation data in combination with the accurate water level data of the external sensor. The annotation information includes the characteristic information of the water gauge image, the accurate water level value, and the relevant environmental parameters. These new annotation data are stored in the local annotation data storage area to provide data support for subsequent model fine-tuning training.
8. A water gauge detection system based on a pre-trained model as claimed in claim 6, characterized in that: The fine-tuning training and model updating unit includes: The training data loading module reads high-quality training data that has been manually screened from the local training data storage area, and divides it into training sets and validation sets in a certain proportion for fine-tuning training and performance verification of the model. The model fine-tuning training module is based on the pre-trained model architecture and uses the deep learning framework to load training data to fine-tune the model parameters. The back-propagation algorithm is used to continuously adjust the model weights and biases according to the loss function value of the training set data, so that the model can better adapt to the characteristics of the local water gauge and environmental conditions. The model evaluation and verification module regularly uses the verification set data to evaluate and verify the performance of the model during the fine-tuning training process, calculates the model's accuracy, recall rate, mean square error and other indicators, and adjusts the training parameters and strategies based on the evaluation results to ensure that the model's performance is continuously optimized; when the model's performance on the verification set meets the preset indicator requirements, the training is stopped, and the trained new model is saved in the model storage database of the pre-trained model storage and call unit, and the original pre-trained model is updated so that a better-performing model can be used for water level detection in subsequent water gauge detection.
9. A water gauge detection system based on a pre-trained model as claimed in claim 6, characterized in that: The data preprocessing unit comprises: The image enhancement module performs enhancement processing on the collected water gauge image, including brightness adjustment, contrast enhancement, and image sharpening operations, so as to improve the quality and clarity of the image, enhance the recognition of the water gauge scale and water level line, and facilitate subsequent model detection and data processing; The denoising filter module uses median filtering and Gaussian filtering algorithms to remove noise interference in the image, and uses wavelet transform method to further smooth the image to reduce image noise caused by environmental factors; The image standardization module converts the 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 detection efficiency and accuracy of the model.
10. A non-temporary storage medium, characterized in that: It is used to store a program, which is used to enable a water gauge detection system based on a pre-trained model as described in claims 6 to 9 to perform the following actions: execute a water gauge detection method based on a pre-trained model as described in any one of claims 1 to 5 above.
Citation Information
Patent Citations
Asset management optimization method and system based on asset big data platform
CN116303376A
Data anomaly detection method and device, computer equipment and storage medium
CN117370969A
Water gauge tide gauge method based on deep learning
CN117593601A
Automobile reliability improving method, device and equipment based on FMEA data and medium
CN119150664A
Hydropower station equipment state-based data prediction model subdivision method and system
CN119397398A