Teamer-YOLO hydropower industry water and oil seepage identification method based on semi-supervision
Through the semi-supervised Teacher-YOLO method, the teacher-student model and EMA technology are used to solve the problems of high labeling data demand and limited model generalization ability in water seepage and oil seepage identification, and efficient model training and adaptability improvement are achieved. It significantly improves the accuracy and robustness of water seepage and oil identification.
Patent Information
- Application Number
- CN202411043379.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-06
AI Technical Summary
In the identification task of water seepage and oil seepage, the existing technology faces high cost and time consumption labeled data needs, and image processing methods are sensitive to ambient light and noise. Deep learning methods require a large amount of computing resources and may have overfitting problems, which is difficult to Effectively utilize unlabeled data to improve identification accuracy and robustness.
Using the semi-supervised Teacher-YOLO method, through domain adaptation and distribution adaptation data preprocessing, the EMA technology of the teacher-student model is used to update parameters, generate pseudo-labels, and combine integrated learning optimization models to form continuous learning and improvement. process to improve the generalization ability and adaptability of the model.
It significantly reduces the need for labeling data, improves model performance and generalization capabilities, enhances applicability and robustness in water and oil seepage scenarios, ensures the long-term stability and adaptability of the model, and can be dynamically adjusted to adapt to data. Distribution changes.
Smart Images

Figure CN119091271A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision target recognition and relates to a water and oil seepage recognition method in the hydropower industry based on semi-supervised Teacher-YOLO. Background Art
[0002] In the past few decades, computer vision technology has made significant progress and has been widely used in various fields, including security monitoring, autonomous driving, industrial inspection, etc. Object recognition, as a core task of computer vision, aims to enable computers to automatically identify and classify objects in images or videos. With the development of deep learning technology, the accuracy and efficiency of object recognition have been greatly improved.
[0003] However, in specific application scenarios, such as water and oil seepage identification, target recognition faces unique challenges. Water and oil seepage often occurs in industrial equipment, pipelines or buildings, and automatic identification of such situations is crucial for maintenance work and disaster prevention and mitigation. However, acquiring a large amount of labeled water and oil seepage image data is often costly and time-consuming, and in actual environments, the various forms of water and oil seepage and the complex background bring additional difficulties to accurate identification.
[0004] In this context, semi-supervised learning methods came into being. They are between fully supervised learning and unsupervised learning, and can effectively use a large amount of unlabeled data and a small amount of labeled data to train models. In this way, semi-supervised learning can not only reduce the dependence on labeled data and reduce the cost of labeling, but also improve the generalization ability of the model, making it better adapted to unseen data.
[0005] Although semi-supervised learning has shown its potential in many fields, in the specific task of water and oil seepage identification, how to design an effective semi-supervised learning strategy and how to make full use of unlabeled data to improve recognition accuracy and robustness are still issues worth studying. In addition, the diversity of water and oil seepage phenomena and the complexity of the background also require the model to have higher discrimination ability and adaptability.
[0006] The current solution is to use the threshold segmentation method of image processing and the object detection method based on deep learning; the threshold segmentation method of image processing includes (1) preprocessing: preprocessing the input image, usually including graying, denoising, edge detection and other operations, so as to better extract the features of the water seepage and oil seepage area; (2) threshold segmentation: select an appropriate threshold to divide the preprocessed image into two areas: water seepage and oil seepage area and non-water seepage and oil seepage area. This can be achieved by simple pixel value comparison, for example, marking pixels greater than a certain threshold as water seepage and oil seepage areas. (3) shape and position analysis: shape and position analysis is performed on the segmented water seepage and oil seepage area to determine whether there is water seepage and oil seepage phenomenon. Use morphological operations and contour detection and other techniques to further process and analyze the water seepage and oil seepage area.
[0007] The defects of the threshold segmentation method of image processing are: A. Sensitive to ambient light and image noise: Since the threshold segmentation method relies on the threshold setting of pixel values, it is easy to cause inaccurate segmentation results when the light changes greatly or the image quality is poor. B. The threshold needs to be set manually: The selection of the threshold usually needs to be adjusted according to the specific application scenario, and different thresholds may be required for different images, which increases the complexity and uncertainty of the method. C. High requirements for the type and shape of water and oil seepage: Some types and shapes of water and oil seepage may not be easily detected by simple threshold segmentation methods, and additional processing and analysis steps are required.
[0008] The object detection method based on deep learning includes (1) data collection and annotation: collect a large amount of image data containing water seepage and oil leakage, and annotate these data to mark the location and shape of the water seepage and oil leakage. (2) Model selection and training: select a suitable deep learning model, such as convolutional neural network (CNN) or object detection model (such as Faster R-CNN, etc.), and use the annotated data to train the model so that it can learn the characteristics of water seepage and oil leakage. (3) Model evaluation and tuning: evaluate the trained model, and tune the model based on the evaluation results to improve its generalization ability on unknown data. (4) Application and deployment: apply the trained model to actual images to detect and locate water seepage and oil leakage, and perform corresponding processing and feedback based on the detection results.
[0009] The defects of deep learning-based object detection methods are: A. A large amount of labeled data is required: Deep learning models usually require a large amount of labeled data for training, and the quality of the labeled data has a great impact on the performance of the model, so data collection and labeling is a time-consuming and labor-intensive process. B. The training process is complex and requires a lot of computing resources: Training deep learning models requires a lot of computing resources, including high-performance computing devices and large-capacity storage space, and the training process usually takes a long time. C. Limited generalization ability: Deep learning models may have overfitting problems, that is, they perform well on training data, but have limited generalization ability on unknown data, so they need to be properly tuned and verified for different scenarios. Summary of the invention
[0010] The purpose of the present invention is to provide a water and oil seepage identification method in the hydropower industry based on semi-supervised Teacher-YOLO, which is used to solve the problem of how to effectively use a large amount of unlabeled data to assist in the training of the target detection model, thereby improving the performance and generalization ability of the model.
[0011] In order to solve the above problems, the technical solution of the present invention is: A semi-supervised water and oil seepage identification method comprises the following steps: Step S1: Data preprocessing: Perform domain adaptation and distribution adaptation on the labeled water seepage and oil seepage data and the unlabeled water seepage and oil seepage data, and automatically calculate the threshold of PLA label division of the pseudo-label in each epoch; Step S2: Model training: In the training of the teacher-student model, the parameters of the teacher model are updated by the student model through EMA; Step S3: Model evaluation: Use the validation set to evaluate the trained student model; the validation set should contain unseen annotated data to test the generalization ability of the model; Step S4: Model fine-tuning: fine-tuning the model based on the results of model evaluation; Step S5: Data feedback loop: collect new water and oil seepage data, including new data distribution or water and oil seepage scenarios that have never been encountered; and further train and optimize the model based on the new data to form a continuous learning and improvement process; Step S6: Actual deployment and monitoring: Deploy the trained model to the actual water and oil seepage detection system and monitor its performance in real time. This stage needs to consider the computational efficiency and real-time performance of the model to ensure that it can run efficiently in the actual environment.
[0012] The beneficial effects of the present invention are: (1) The "teacher-student" solution paradigm provides a powerful framework for semi-supervised object detection, which can effectively use unlabeled data to improve model performance. By introducing a "teacher" network to generate pseudo labels, the training data set can be expanded, thereby reducing the need for labeled data. The "student" network continuously optimizes itself through ensemble learning, while updating the parameters of the "teacher" network, achieving continuous improvement in model performance. The advantage of this method lies in its simple and effective design, which has enabled semi-supervised object detection to achieve significant results in water and oil seepage identification.
[0013] (2) Enhance the generalization ability of the model: In the "teacher-student" solution paradigm, since the "teacher" model generates pseudo labels using unlabeled data, this process increases the model's ability to process unseen data. By learning these pseudo labels, the "student" model can not only improve its performance on the training data, but also show better generalization ability on unlabeled data. This strategy of learning from a large amount of unlabeled data significantly improves the applicability and robustness of the model in water and oil seepage scenarios.
[0014] (3) Dynamic learning and adaptive adjustment capabilities: The dynamic update mechanism in the "teacher-student" mode (such as using EMA technology to update the parameters of the "teacher" model) provides the model with the ability to self-correct. As the training process progresses, the performance of the "student" model gradually improves, and the pseudo-labels it generates become more accurate. These more accurate pseudo-labels will in turn further improve the performance of the "teacher" model through the update of the "teacher" model. This self-circulating update mechanism enables the entire system to dynamically adjust according to the current learning state, thereby more accurately adapting to changes in the training process and ensuring stability and reliability during long-term training. In addition, this feature also enables the model to adapt to the ever-changing data distribution, enhancing the model's detection and analysis capabilities in complex water and oil seepage scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The present invention will be further described below in conjunction with the accompanying drawings: Figure 1 It is a structural schematic diagram of the present invention, Figure 2 Identify the effect diagram of the actual hydropower scene. Figure 3 Identify the renderings of actual hydropower scenes. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] The semi-supervised Teacher-YOLO method for identifying water and oil seepage in the hydropower industry includes the following steps.
[0018] Step S1: Data preprocessing: In the data preprocessing stage, the network convergence is accelerated by performing domain adaptation and distribution adaptation on the labeled water seepage and oil seepage data and the unlabeled water seepage and oil seepage data, and automatically calculating the threshold of PLA label division of the pseudo-label in each epoch.
[0019] Step S2: Model training: In the model training phase, it is usually to improve the robustness and generalization ability of the model. In the training of the teacher-student model, the parameters of the teacher model will be updated by the student model through the EMA technique. The advantage of this method is that it can reduce jitter and noise during training by maintaining the smooth parameters of the teacher model, thereby helping the student model to learn more stably.
[0020] The training method of the teacher-student model includes the following steps: The first step is to initialize the parameters of the teacher model and the student model; Step 2: Use the teacher model for forward propagation: Use the teacher model to forward propagate the input data to get the output; Step 3: Calculate the loss function: Compare the output of the teacher model with the true label and calculate the loss function; Step 4: Back propagation updates the student model parameters: Use the loss function for back propagation to update the parameters of the student model; Step 5: Update the teacher model parameters through EMA: When updating the parameters of the teacher model, the gradient descent method is not used directly, but the EMA technique is used; For each parameter, use the following formula to update:
[0021] in: represents the teacher model parameters after EMA update at time step t; are the EMA parameters at time step t-1; θ (t) are the actual parameters of the student model at time step t; β is a hyperparameter close to 1 that controls the weight given to past parameter values, thus determining how much influence the historical parameters have on the new parameters.
[0022] In this way, the parameters of the teacher model take into account the weighted average of historical parameters each time they are updated, making the update process smoother and reducing the jitter of the model during training. This helps improve the generalization ability of the model because the EMA parameters can more stably reflect the long-term trend of the data rather than being affected by short-term fluctuations.
[0023] Step S3: Model evaluation: In the model evaluation phase, the trained student model is evaluated using the validation set. The validation set should contain unseen labeled data to test the generalization ability of the model. Evaluation indicators may include accuracy, recall, F1 score, etc. These indicators can fully reflect the performance of the model in the task of water and oil seepage identification.
[0024] Step S4: Model fine-tuning: In the model fine-tuning stage, based on the results of the model evaluation, the model needs to be fine-tuned to further improve the performance. The fine-tuning process may include adjusting the learning rate, changing certain layers of the network structure, or introducing more regularization techniques during the training process to prevent overfitting. In addition, the training strategy can be adjusted specifically based on the performance of the model on a specific type of water and oil seepage identification task.
[0025] Step S5: Data feedback loop: In the data feedback loop stage, more water and oil seepage data may be collected over time, including new data distributions or water and oil seepage scenarios that have never been encountered. These new data can be used to further train and optimize the model, forming a process of continuous learning and improvement. By continuously feeding the newly collected data back into the training process, it can be ensured that the model gradually adapts to the new data distribution over time, maintaining its accuracy and robustness.
[0026] Step S5: Data feedback loop: During the data feedback loop stage, more water and oil seepage data may be collected over time, including new data distributions or water and oil seepage scenarios that have never been encountered. These new data can be used to further train and optimize the model, forming a process of continuous learning and improvement. By continuously feeding back the newly collected data into the training process, it can be ensured that the model gradually adapts to the new data distribution over time, maintaining its accuracy and robustness. After the above steps, combined with the actual hydropower scene material pictures, the recognition effect diagram is as follows Figure 2 and 3As shown, step S6: actual deployment and monitoring: In the actual deployment and monitoring stage, the trained model is deployed to the actual water and oil seepage detection system, and its performance is monitored in real time. This stage needs to consider the computational efficiency and real-time performance of the model to ensure that it can run efficiently in the actual environment. At the same time, a monitoring mechanism should be set up to track the operating status and recognition accuracy of the model. Once performance degradation or new problems are found, the model can be adjusted or retrained in time.
[0027] In step S2, the teacher-student model is trained as semi-supervised training. Semi-supervised training technology represents a strategy for jointly training neural networks using limited labeled data and a large amount of unlabeled data. In the current semi-supervised target detection research, the "teacher-student" solution paradigm is adopted. In this paradigm, by introducing the "teacher" network, the pseudo labels generated by unlabeled data are used to guide the "student" network to learn the full data distribution, thereby improving the model performance. At the same time, the "student" network updates the parameters of the "teacher" network in an integrated learning manner, forming a flywheel effect of mutual learning.
[0028] This scheme is extended on the YOLO single-stage Anchor_base detector, and its structure is as follows Figure 1 As shown, where: (1) Student network based on YOLO: The student network receives two parts of data: labeled data enhanced by Mosaic data, which is trained using supervised learning, including classification loss, regression loss, target loss, and domain adaptation loss; unlabeled data enhanced by Mosaic data and mask data, which is trained using pseudo labels, including classification loss, regression loss, and target loss.
[0029] (2) Teacher Network Receive unlabeled data augmented with Mosaic data, and the predicted results are used to guide the training of the student model.
[0030] (3) Pseudo-label assigner According to the classification scores of pseudo labels, they are divided into reliable pseudo labels and unreliable pseudo labels. Among them, reliable pseudo labels are used for supervised learning and participate in classification loss, regression loss, and target loss. Unreliable pseudo labels use soft loss to train the student model, that is, only obj>0.99 participates in the target loss calculation.
[0031] The present invention provides a powerful framework for semi-supervised target detection through the "teacher-student" solution paradigm, which can effectively use unlabeled data to improve model performance, enhance the generalization ability and dynamic learning and adaptive adjustment ability of the model, and significantly improve the applicability and robustness of the model in water and oil seepage scenarios through the strategy of learning a large amount of unlabeled data, so that the entire system can be dynamically adjusted according to the current learning state, so as to more accurately adapt to changes in the training process, ensure stability and reliability in the long-term training process, and enable the model to adapt to the constantly changing data distribution, thereby enhancing the detection and analysis capabilities of the model in complex water and oil seepage scenarios in the hydropower industry.
[0032] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A semi-supervised Teacher-YOLO method for identifying water and oil seepage in the hydropower industry is characterized by: The steps include: Step S1: Data preprocessing: Perform domain adaptation and distribution adaptation on the labeled water and oil seepage data and the unlabeled water and oil seepage data, and automatically calculate the threshold for PLA label division of the pseudo-labels in each epoch; Step S2: Model training: In the training of the teacher-student model, the parameters of the teacher model are updated by the student model through EMA; Step S3: Model evaluation: Use the validation set to evaluate the trained student model; The validation set should contain unseen labeled data to test the generalization ability of the model; Step S4: Model fine-tuning: Based on the results of model evaluation, fine-tune the model; Step S5: Data feedback loop: Collect new water and oil seepage data, including new data distributions or unprecedented water and oil seepage scenarios; and further train and optimize the model based on the new data, forming a continuous learning and improvement process; Step S6: Deployment and Monitoring: Deploy the trained model to an actual water and oil seepage detection system and monitor its performance in real time. This phase requires consideration of the model's computational efficiency and real-time performance to ensure it can operate efficiently in a real-world environment.
2. The semi-supervised Teacher-YOLO method for identifying water and oil seepage in the hydropower industry according to claim 1 is characterized in that: In step S3, the evaluation metrics may include precision, recall, and F1 score.
3. The semi-supervised Teacher-YOLO method for identifying water and oil seepage in the hydropower industry according to claim 1 is characterized in that: In step S4, the fine-tuning process includes adjusting the learning rate, changing the preset layers of the network structure, or introducing regularization techniques during the training process to prevent overfitting.
4. The semi-supervised Teacher-YOLO method for identifying water and oil seepage in the hydropower industry according to claim 1 is characterized in that: In step S6, a monitoring mechanism is set up to track the running status and recognition accuracy of the model. Once performance degradation or new problems are found, the model is adjusted or retrained in a timely manner.
5. The semi-supervised Teacher-YOLO method for identifying water and oil seepage in the hydropower industry according to any one of claims 1 to 4, characterized in that: In step S2, the training method of the teacher-student model includes the following steps: The first step is to initialize the parameters of the teacher model and the student model; Step 2: Use the teacher model for forward propagation: Use the teacher model to forward propagate the input data to obtain the output; Step 3: Calculate the loss function: Compare the output of the teacher model with the true label and calculate the loss function; Step 4: Back propagation to update student model parameters: Use the loss function for back propagation to update the parameters of the student model; Step 5. Update the teacher model parameters through EMA: When updating the parameters of the teacher model, instead of using the gradient descent method directly, the EMA technique is used; for each parameter, the following formula is used for update: in: represents the teacher model parameters after EMA update at time step t; are the EMA parameters at time step t-1; θ (t) are the actual parameters of the student model at time step t; β is a hyperparameter close to 1 that controls the weight of past parameter values, thereby determining the influence of historical parameters on new parameters.
Citation Information
Patent Citations
Unmanned aerial vehicle inspection defect classification method and device based on similarity consistency self-distillation
CN115457006A
Learning device, learning method, and recording medium
WO2022162839A1
