A power plant resin regeneration backwashing layered identification method and system based on a YOLOv8 model
By introducing the YOLOv8 model into the power plant resin regeneration system and combining it with the EloU loss function and ECA attention mechanism, the accuracy and reliability issues of manual inspection were solved, and automated identification and efficient detection of resin stratification were achieved.
Patent Information
- Application Number
- CN202510513178.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-04-23
AI Technical Summary
In existing technologies, the identification of resin regeneration stratification in power plants relies on manual inspection, which has problems such as high operational intensity, poor accuracy and reliability. Furthermore, the existing YOLOv8 algorithm cannot be effectively applied to the identification of resin regeneration backwash stratification in power plants.
A layered identification method for backwashing resin regeneration in power plants based on the YOLOv8 model is adopted. The EloU loss function and ECA attention mechanism are introduced to reduce the false detection rate and improve the layered identification accuracy. Image data is acquired through a high-definition camera, a YOLOv8 model is built and trained, and EloU is used as the loss function and ECA attention mechanism module for layered identification.
It automates resin layer identification, reduces the frequency of manual operation, improves the accuracy and reliability of identification, reduces the false detection rate, is suitable for resin layer detection under complex conditions, and improves production efficiency and quality.
Smart Images

Figure CN120472461B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power plant resin regeneration backwashing, and particularly relates to a power plant resin regeneration backwashing layered identification method and system based on a YOLOv8 model. BACKGROUND
[0002] In the water treatment system of a power plant, resin regeneration plays an important role. Resin regeneration is to remove the impurity ions adsorbed by the resin through a chemical method to restore the exchange capacity of the resin. Good resin regeneration can prolong the service life of the resin and reduce the operating cost of the power plant, and also plays a key role in the normal operation of the water treatment system of the power plant. If resin regeneration fails, it will lead to deterioration of water quality, affect the performance of thermal equipment, and further cause safety hazards. Effective layering of anion and cation resins is a core link in the regeneration process and directly determines the quality of the regeneration.
[0003] Currently, resin layering identification in power plants in China mainly relies on manual detection, but there are certain limitations. There are many resin layering steps, and the resin interface needs to be monitored by manual operation throughout the process, which causes the operating personnel to have a high work intensity and be easily disturbed by factors such as personal experience and visual fatigue. The judgment difference of different operating personnel will also reduce the accuracy and reliability of the results. Therefore, it is extremely crucial to develop an industrial automatic and intelligent resin layering identification technology for the condensate polishing and regeneration system of a power plant.
[0004] In recent years, with the rapid development of artificial intelligence and machine learning, computer vision has become one of the core technologies in industrial automation. Deep learning, as a new branch of machine learning, has achieved significant breakthroughs in many fields such as speech recognition, target identification, and text processing in recent years. For example, an intelligent visual system designed for the daily operation and maintenance of an intelligent substation has appeared in the prior art. This system aims to comprehensively monitor the operating environment of the intelligent substation and the state of the intelligent substation equipment, and can monitor the operating environment and the state of the substation equipment in real time. The prior art also proposes a matrix 2-norm-based pooling method for monitoring substation personnel, and establishes a convolutional neural network model for monitoring abnormal conditions of substation images. It has been verified that this method is feasible and has strong adaptability, and the recognition accuracy is higher than that of previous methods. Currently, the market mainly uses the YOLO (You Only Look Once) algorithm for target detection. As a single-stage target detection framework, this algorithm has the advantages of fast recognition speed and high accuracy, and can quickly and reliably identify objects in images. Based on this, the prior art proposes a target detection method based on an improved YOLOv8, designs a boundary box regression loss function combining a non-monotonic focusing mechanism and boundary box geometric factors, and a residual global attention mechanism, which improves the accuracy of remote sensing image target detection. However, this technology cannot be practically applied to the specific scenario of power plant resin regeneration backwashing layered identification. SUMMARY
[0005] The application aims to provide a power plant resin regeneration backwashing layering identification method and system based on a YOLOv8 model, use an EloU loss function, reduce the false detection rate, improve the accuracy of model identification layering, and eliminate the interference caused by light and shadow; introduce an ECA attention mechanism module, enhance the model's ability to capture and generalize resin layering, improve the layering identification rate, and further improve the accuracy and reliability of resin layering identification.
[0006] The first aspect of the application is to provide a power plant resin regeneration backwashing layering identification method based on a YOLOv8 model, comprising:
[0007] S1, real-time acquisition of the positive and negative failure resin image data in the resin regeneration positive tower peephole and the resin state image data during the backwashing process;
[0008] S2, establishing a YOLOv8 model, wherein the YOLOv8 model comprises an ECA attention mechanism module, and EIoU is used as a loss function;
[0009] S3, inputting the positive and negative failure resin image data and the resin state image data into the YOLOv8 model, and taking the output of the YOLOv8 model as the backwashing layering identification of the power plant resin regeneration.
[0010] Preferably, the resin state image data in S1 is acquired based on a high-definition camera.
[0011] Preferably, S2 comprises:
[0012] S21, determining the training set, validation set and test set required for establishing the YOLOv8 model;
[0013] S22, establishing the primary architecture of the YOLOv8 model, wherein the primary architecture of the YOLOv8 model comprises an ECA attention mechanism module;
[0014] S23, model training on the primary architecture of the YOLOv8 model.
[0015] Preferably, S21 comprises:
[0016] (1) preprocessing a plurality of historical resin state image data;
[0017] (2) based on opencv+value hash algorithm, taking the light intensity and / or layering position as the basis for judgment, screening and removing image data with high similarity to obtain M available effective layering pictures;
[0018] (3) Randomly extract N invalid hierarchical pictures, merge the M available effective hierarchical pictures and the N invalid hierarchical pictures to form a first data set;
[0019] (4) Crop and / or scale each picture in the first data set to form multiple pictures with different sizes and resolutions, which form a second data set;
[0020] (5) Divide the multiple pictures in the second data set into a training set, a validation set and a test set required for establishing a YOLOv8 model according to a certain proportion and maintain the consistency of the directory structure, including the target structure of images / train or labels / val;
[0021] (6) Label the pictures in the training set.
[0022] Preferably, the preprocessing includes preliminary screening of the multiple historical resin state image data to remove blurred and poor quality image data; labeling the pictures in the training set and the target bounding box based on X-AnyLabeling or LabeImg tools to generate a.txt file in YOLO format, each line of the.txt file containing a class ID, a normalized center coordinate and a width and height.
[0023] Preferably, the S23 comprises:
[0024] (1) Based on the official training source code of YOLOv, hardware configuration and data set characteristics, modify and configure the default parameters for model training, including the size of the pictures in the training set, the period of model training, the number of pictures per batch, the specified data set path, the class name and the number;
[0025] (2) Integrate the EIoU loss function and set the hyperparameters; wherein:
[0026] The integrated EIoU loss function includes: based on the modified bbox_iou calculation logic in the model code, explicitly decompose the width and height difference items and normalize the processing to replace the default bounding box loss function (such as CIoU) of YOLOv8 with EIoU; the hyperparameter setting includes: setting the initial learning rate to 0.01, the momentum to 0.937, and the optimizer to SGD or Adam18; setting the weight ratio of EIoU and classification cross-entropy to balance the regression and classification tasks.
[0027] Preferably, the expression of the EIoU loss function is as shown in the following formula (1):
[0028]
[0029] In formula (1), w c and h c represent the width and height of the minimum enclosing box covering two boxes, and the EIoU loss function is a regression loss function that comprehensively measures the overlap, position offset and shape difference between the predicted box and the real box; the EIoU loss function is divided into three parts, which are IoU loss L IoU , distance loss L dis and direction loss L asp ; wherein L IoU is an intersection over union loss term, calculated as 1-IoU, used to reflect the overlap degree between the predicted box and the real box, and the smaller the value, the larger the overlap area between the two boxes; IoU represents the intersection over union, that is, the intersection area of the predicted box and the real box divided by the union area, used to measure the spatial coincidence degree of the two boxes, ranging from 0 to 1; L dis represents the center point distance loss term, and p 2 (b, b gt ) represents the Euclidean distance square of the predicted box center point b and the real box center point b gt , used to punish the offset amount of the predicted box center point and the real box, and the denominator (w c ) 2 +(h c ) 2 is the square sum of the minimum enclosing box width and height, used for normalization; w c and h c represent the width and height of the minimum enclosing box, that is, the width and height of the minimum rectangular box containing the predicted box and the real box, used to normalize the center point distance and the width and height difference, and eliminate the scale sensitivity; L asp represents the width and height difference loss term, including width difference and height difference , used to explicitly optimize the width and height difference between the predicted box and the real box, and solve the non-linear problem of the relative proportion (such as arctan) in CIoU; w gt and h 9t represent the width and height of the predicted box, used to represent the size of the boundary box generated by the model prediction.
[0030] The second aspect of the application is used to provide a power plant resin regeneration backwashing layered identification system based on YOLOv8, which is used to implement the method of the first aspect, comprising:
[0031] An image acquisition module (101) is used to acquire real-time resin regeneration cathode tower peep window invalid resin image data and resin state image data in the backwashing process;
[0032] The model establishing module (102) is configured to establish a YOLOv8 model, wherein the YOLOv8 model comprises an ECA attention mechanism module, and an EIoU is used as a loss function.
[0033] The backwashing and layering identification module (103) is configured to input the positive and negative failure resin image data and the resin state image data into the YOLOv8 model, and perform backwashing and layering identification on the resin regeneration of the power plant based on the output of the YOLOv8 model.
[0034] The third aspect of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is configured to read and execute the method according to the first aspect.
[0035] The fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, and the plurality of instructions can be read and executed by a processor to perform the method according to the first aspect.
[0036] The method and system of the present application have the following advantages:
[0037] Compared with the traditional manual observation and judgment, the automatic identification system based on the YOLOv8 technology can reduce the frequency and intensity of manual operation. In the traditional resin regeneration backwashing and layering process, the operator needs to frequently observe, judge and operate on site. The automatic identification system can monitor the state of the resin in real time, automatically judge the timing and degree of backwashing and layering, and does not need manual attention and manual operation, thereby greatly reducing the frequency of repeated work of the operator and reducing the labor intensity.
[0038] 1. Direct optimization: EIoU directly decomposes the width-height difference term and normalizes it independently, which is more direct than the arctan ratio calculation of CIoU, and accelerates the convergence of boundary box regression.
[0039] 2. Multi-dimensional error fusion: comprehensive overlap area (I IoU ), center point offset (L dis ) and shape difference (L asp ) are used to comprehensively quantify the prediction box error.
[0040] 3. Normalization processing: the minimum bounding box width and height are used to normalize each loss, which reduces the scale sensitivity and improves the robustness of the model.
[0041] 4、Among different detection algorithms, YOLOv8 has obvious comprehensive performance advantages and is suitable for resin layering detection. The ECA attention mechanism and EIoU bounding box loss function significantly improve the performance of YOLOv8, and the comprehensive performance is better, which helps to accurately detect resin layering under complex conditions; the performance of the improved YOLOv8+ECA+EIoU model is significantly improved, which can effectively learn the key features of resin layering.
[0042] 5、In practical applications, the automatic identification system based on YOLOv8 technology has more advantages than manual observation and judgment. Through integration with other automatic equipment and systems, the automatic control of the entire resin regeneration process can be realized, further improving production efficiency and quality, reducing labor costs, and reducing manual operation, which is of great significance to the automation of the resin regeneration process. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the specific embodiments or related art, the following will briefly introduce the drawings needed to be used in the specific embodiments or related art descriptions. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0044] Figure 1 The flow chart of the power plant resin regeneration backwashing layering identification method based on YOLOv8 provided according to the embodiment of the present application is provided.
[0045] Figure 2 The improved YOLOv8 structure principle diagram provided according to the embodiment of the present application is provided.
[0046] Figure 3 The ECA attention module structure schematic diagram provided according to the embodiment of the present application is provided.
[0047] Figure 4 The detection result schematic diagram based on YOLOv8 technology provided according to the embodiment of the present application is provided.
[0048] Figure 5 The detection result schematic diagram of different distances provided according to the embodiment of the present application is provided.
[0049] Figure 6 The detection result schematic diagram of different light fluxes provided according to the embodiment of the present application is provided.
[0050] Figure 7 The identification effect schematic diagram based on the optimized YOLOv8 technology provided according to the embodiment of the present application is provided.
[0051] Figure 8A power plant resin regeneration backwashing layered identification system architecture diagram based on YOLOv8 is provided according to an embodiment of the present application.
[0052] Figure 9 An electronic device architecture diagram is provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] The technical solutions of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0054] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0055] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0056] Embodiment one
[0057] Referring to Figure 1 The present embodiment provides a power plant resin regeneration backwashing layered identification method based on YOLOv8 model, comprising:
[0058] S1, real-time acquisition of the positive and negative failure resin image data in the resin regeneration positive tower peephole and the resin state image data in the backwashing process;
[0059] S2, establishing a YOLOv8 model, wherein the YOLOv8 model comprises an ECA attention mechanism module, and EIoU is used as a loss function;
[0060] S3, input the yin and yang failure resin image data and the resin state image data into the YOLOv8 model, and take the output of the YOLOv8 model as a backwashing layered identification result of the resin regeneration of the power plant.
[0061] As a preferred embodiment, the resin state image data in S1 is obtained based on a high-definition camera.
[0062] As a preferred embodiment, S2 comprises:
[0063] S21, determining a training set, a validation set and a test set required for establishing a YOLOv8 model;
[0064] In this embodiment, S21 comprises:
[0065] (1) preprocessing a plurality of historical resin state image data;
[0066] In this embodiment, the preprocessing comprises preliminarily screening the plurality of historical resin state image data to remove blurred and poor-quality image data;
[0067] (2) based on an opencv+value hash algorithm, taking illumination intensity and / or layered position as a basis for judgment, screening and removing image data with high similarity to obtain M usable effective layered pictures;
[0068] (3) after randomly extracting N invalid layered pictures, merging the M usable effective layered pictures and the N invalid layered pictures to form a first data set;
[0069] (4) cropping and / or scaling each picture in the first data set to form a plurality of pictures with different sizes and resolutions, and the plurality of pictures with different sizes and resolutions form a second data set;
[0070] (5) dividing the plurality of pictures in the second data set into a training set, a validation set and a test set required for establishing a YOLOv8 model according to a certain ratio and keeping consistency of directory structure, including adopting a target structure of images / train or labels / val.
[0071] In this embodiment, the plurality of pictures in the second data set are divided into the training set, the validation set and the test set according to a ratio of 7:2:1 or 8:1:1.
[0072] (6) labeling the pictures in the training set by layers.
[0073] In this embodiment, the pictures of the training set are annotated and layered based on X-AnyLabeling or LabeImg tool and target bounding box, and a YOLO format.txt file is generated, wherein each line of the.txt file contains a class ID, a normalized center coordinate and a width and height.
[0074] S22, a primary architecture of a YOLOv8 model is established, and the primary architecture of the YOLOv8 model includes an ECA attention mechanism module.
[0075] The core features of the ECA attention mechanism module include:
[0076] 1. Lightweight architecture design
[0077] (1) Full connection layer replacement strategy: by removing the full connection layer (FC layer) in the SE module, a 1x1 convolution layer is used to realize channel weight calculation, which significantly reduces the parameter quantity and calculation complexity. For example, the parameter quantity of the 1x1 convolution layer of the ECA is only 1 / 31 of that of the SE module.
[0078] (2) Dimension preservation mechanism: avoid information loss caused by dimension reduction operation in the SE module, directly preserve the original channel dimension, and enhance the effectiveness of cross-channel interaction.
[0079] 2. Parameter efficiency and calculation optimization
[0080] (1) One-dimensional convolution kernel application: replace the traditional full connection layer with a Conv1D layer, and adjust the cross-channel interaction range through a one-dimensional convolution kernel, balance the calculation efficiency and feature expression ability. For example, in this embodiment, the convolution kernel size is dynamically adjusted according to the number of channels (such as the kernel size k=5 when the number of channels C>64).
[0081] (2) Parameter sparsity: only a small amount of parameters (such as the parameter increase of less than 0.03% in the YOLOv5 improvement case) is needed to achieve performance improvement effect, which is suitable for embedded devices and real-time detection scenarios.
[0082] 3. Adaptive optimization of cross-channel interaction
[0083] (1) Adaptive interaction range: dynamically adjust the convolution kernel size based on the number of channels to ensure that large channel network layers (such as deep feature maps) can capture wider domain dependencies, while shallow layers focus on local interaction.
[0084] (2) Non-full connection dependent learning: replace global dependent learning with local cross-channel interaction to avoid excessive parameterization problems in the SE module while preserving key channel correlations.
[0085] 4. Plug and play feature
[0086] (1)Modular compatibility: Without modifying the backbone network structure, the CNN can be directly embedded into any level (such as the Backbone or Neck layer in the YOLO series).
[0087] (2)Stable performance improvement: In multiple benchmark models (such as ResNet, YOLOv5 / v7), the Top-1 accuracy of the classification task is improved by 1.2-1.8%, and the target detection mAP is improved by 0.5-1.1%.
[0088] 5. Enhanced visualization and interpretability
[0089] Heat map generation support: Through channel weight distribution visualization, the developer can understand the attention degree of the model to different feature channels, and improve the model decision transparency.
[0090] Through the above technical characteristics, the ECA mechanism has significant advantages in lightweight, efficiency and performance balance, and becomes an important improvement direction in the channel attention field of the present application.
[0091] S23, model training is performed on the primary architecture of the YOLOv8 model, including:
[0092] (1) Based on the official training source code of YOLOv, hardware configuration and data set characteristics, modify and configure the default parameters for the model training, including the picture size in the training set, the period of model training, the number of pictures per batch, the specified data set path, the class name and the number of classes;
[0093] (2) Integrate the EIoU loss function and set the hyperparameters; wherein:
[0094] The integrated EIoU loss function includes: based on the modified bbox_iou calculation logic in the model code, explicitly decompose the width-height difference item and normalize the processing to replace the default bounding box loss function (such as CIoU) of YOLOv8 with EIoU; the hyperparameter setting includes: setting the initial learning rate (lr0) to 0.01, the momentum (momentum) to 0.937, and the optimizer to use SGD or Adam18; set the weight ratio of EIoU and other losses (such as classification cross-entropy) to balance the regression and classification tasks.
[0095] Specifically, the role of the EIoU loss function in the model training of the primary architecture of the YOLOv8 model
[0096] The EIoU (Enhanced Intersection over Union) loss function is an improved scheme for the traditional IoU loss function in the field of target detection, which mainly plays the following roles in the model training of the primary architecture of the YOLOv8 model:
[0097] 1. Optimized bounding box regression target
[0098] Precise positioning target: By introducing an independent calculation term for width-height difference, the size deviation between predicted box and real box is directly optimized. Compared to CIoU, which relies on aspect ratio for indirect constraints, EIoU's regression target is more explicit, improving the positioning accuracy of bounding boxes.
[0099] Balancing multi-dimensional errors: Position error (center point offset), shape error (width-height difference), and overlap area error (IoU) are unified in the loss function, avoiding optimization bias caused by a single indicator.
[0100] 2. Accelerate model convergence
[0101] Explicitly decompose width-height influence term: Decompose the width-height difference into an independent square term, explicitly optimize the size deviation of the predicted box, reduce the convergence shock caused by the coupling of the aspect ratio term in CIoU, and improve the training stability by about 15-20%.
[0102] Simplify the calculation logic: Compared to the complex distance measurement term introduced by DIoU and CIoU, the mathematical expression of EIoU is more concise (such as the normalized width-height difference term), reducing the computational complexity and being suitable for real-time detection tasks.
[0103] 3. Enhance model generalization ability
[0104] Small target detection optimization: By independently calculating the width-height difference, avoid large target dominating the loss gradient, and improve the model's sensitivity to small targets. Experiments show that EIoU can improve small target detection accuracy (AP_s) by 0.8-1.5%.
[0105] Adaptability in dense scenes: In scenes with dense targets or severe occlusion, EIoU optimizes precise size error, reducing false positives and false negatives, and improving overall mAP by 0.5-1.2%.
[0106] 4. Collaborative optimization with dynamic weight strategy
[0107] Focal-EIoU combination: Introduce a dynamic weight adjustment mechanism (such as Focal Loss), assign higher weights to difficult samples (such as predicted boxes with large size deviation), alleviate the sample imbalance problem, and further improve the detection robustness in difficult scenarios.
[0108] Summary
[0109] The EIoU loss function significantly improves the model convergence speed, positioning accuracy, and generalization ability in complex scenes during training by explicitly decomposing the width and height error terms and optimizing multi-dimensional regression targets. It is particularly suitable for real-time detection (such as the YOLO series) and small target dense scenes. Its combination with dynamic weight strategies further expands the application boundaries and becomes an important optimization direction in the field of object detection. The EIoU loss function optimizes the bounding box regression through multi-dimensional error, thereby improving the convergence speed and detection accuracy of the YOLOv8 model. At the same time, it cooperates with the data labeling, hyperparameter configuration, and verification optimization process to realize end-to-end efficient object detection model training.
[0110] In this embodiment: Technical correlation analysis of EIoU loss function and YOLOv8
[0111] A. Background and core improvements of EIoU
[0112] EIoU (Enhanced Intersection over Union) is an optimization for the limitations of traditional IoU and its variants (such as CIoU, DIoU). The core improvement is to decompose the aspect ratio influence term, independently calculate the width and height difference of the bounding box, and directly optimize the size deviation of the predicted box and the true box. Compared with CIoU, which indirectly constrains the width and height through the aspect ratio term, EIoU introduces a square term of width and height difference, explicitly optimizing the difference between width and height, thereby accelerating convergence and improving regression accuracy. The formula is expressed as:
[0113] textCopy Code
[0114] EIoULoss = 1 - IoU + (ρ 2 (b,b_gt) / c 2 )+(ρ 2 (w,w_gt) / Cw 2 )+(ρ 2 (h,h_gt) / Ch 2 )
[0115] where ρ 2 represents the Euclidean distance, and Cw and Ch are normalization coefficients.
[0116] B. Integration and adaptation of YOLOv8 to EIoU
[0117] YOLOv8 uses CIoU as the default bounding box regression loss function, but its framework supports flexible replacement with improved loss functions such as EIoU and SIoU. When implementing, modify the loss calculation module (e.g., bbox_iou.py), replace the IoU calculation part with the mathematical expression of EIoU, and adjust the loss weight parameters. For example, in the official code repository of YOLOv8, EIoU is integrated by adding the calculation logic of the independent width and height difference term.
[0118] Performance advantages of C.EIoU in YOLOv8
[0119] Convergence speed improvement: EIoU explicitly optimizes the width and height difference, reducing the convergence oscillation caused by the coupling of the aspect ratio term in CIoU, making the training process more stable and improving the convergence speed by about 15-20%.
[0120] Detection accuracy improvement: Experiments on the COCO dataset show that EIoU can improve the mAP of YOLOv8 by 0.5-1.2%, especially in small targets (AP_s) and dense scenarios (AP_m).
[0121] Synergistic optimization with Focal Loss: Combined with the Focal-EIoU strategy (dynamically adjusting the difficulty sample weight), further alleviates the class imbalance problem and improves the model's detection ability for difficult samples.
[0122] D.Comparison of EIoU with other IoU variants
[0123] Relative to CIoU: EIoU discards the coupled aspect ratio term in CIoU, avoiding the problem of ignoring actual size differences due to aspect ratio approximation, and achieving higher regression accuracy.
[0124] Relative to SIoU: SIoU introduces an angle penalty term to optimize the alignment of the boundary box direction, while EIoU focuses on the direct optimization of size differences, and the two can be used complementarily.
[0125] Relative to WIoU: WIoU adjusts the loss weight through a dynamic focusing mechanism, while EIoU improves regression efficiency by explicitly decomposing width and height differences, and the two improve different dimensions.
[0126] E.EIoU solves the inherent defects of traditional IoU variants in boundary box regression by decoupling the aspect ratio term and explicitly optimizing the width and height difference. Its integration in YOLOv8 significantly improves the convergence speed and detection accuracy of the model, especially when combined with strategies such as Focal Loss, further enhancing the robustness in complex scenarios.
[0127] (3) Model training of the primary architecture of the YOLOv8 model based on the training set and the EIoU loss function; including:
[0128] A. Start the training instruction;
[0129] pythonCopy Code
[0130] from ultralytics import YOLO
[0131] model = YOLO('yolov8n.pt') # Load the pre-trained model
[0132] results = model.train(data='my_yolov8n.yaml', epochs=100, imgsz=640, batch=16, device='0')
[0133] Support multi-GPU training (device='0,1') and mixed precision acceleration (amp=True).
[0134] B. Monitor the training process, including:
[0135] Based on the TensorBoard tracking loss curve (such as loss / box corresponding to the EIoU loss), mAP index and learning rate change; and periodically evaluate the performance of the model based on the validation set, and control to avoid overfitting through the val frequency parameter.
[0136] As a preferred embodiment, the expression of the EIoU loss function is as shown in the following formula (1):
[0137]
[0138] In formula (1), w c and h c represent the width and height of the smallest enclosing box covering two boxes, the EIoU loss function is a regression loss function that comprehensively measures the overlap, position offset and shape difference between the predicted box and the real box; the EIoU loss function is divided into three parts, respectively: IoU loss L IoU , distance loss L dis and direction loss L asp ; wherein L IoUThe Intersection over Union (IoU) loss term, calculated as 1 - IoU, reflects the degree of overlap between the predicted and ground truth boxes; a smaller value indicates a larger overlap area. IoU represents the Intersection over Union ratio, calculated as the area of the intersection of the predicted and ground truth boxes divided by the area of their union, measuring the spatial overlap between the two boxes, ranging from [0,1]. dis ρ represents the center point distance loss term. 2 (b,b gt ) represents the center point b of the predicted bounding box and the center point b of the ground truth bounding box. gt The squared Euclidean distance is used to penalize the offset between the center point of the predicted box and the ground truth box. The denominator (w) c ) 2 +(h c ) 2 The sum of squares of the width and height of the minimum bounding box, used for normalization; w c and h c This represents the width and height of the smallest bounding box, i.e., the width and height of the smallest rectangle that simultaneously contains both the predicted and ground truth boxes. It is used to normalize the center point distance and the difference in width and height, eliminating scale sensitivity; L asp This represents the loss term for width and height differences, including width differences. and height differences Used to explicitly optimize the difference in width and height between the predicted bounding box and the ground truth bounding box, solving the nonlinear problem of relative proportions (such as arctan) in CIoU; w and h represent the width and height of the predicted bounding box, used to represent the size of the bounding box generated by the model prediction; w gt and h gt This represents the width and height of the ground truth bounding box, used to label the actual size of the target in the data. This preserves the effective characteristics of CIoU loss. Simultaneously, EIoU loss directly minimizes the difference in width and height between the target box and the anchor box, resulting in faster convergence and better localization.
[0139] Application Examples
[0140] (I) Operating Environment
[0141] The experiment was conducted on a Windows 10 operating system with an Intel i5-12400KF processor and an Nvidia GeForce RTX 4060 graphics card. The deep learning framework used was PyTorch + CUDA 11.3 + cuDNN, the programming platform was VS Code, and the programming language was Python 3.8. All comparison algorithms were run in the same environment.
[0142] (II) Data Acquisition
[0143] The research object of this study is the resin regeneration Yangta spy window positive and negative failure resin. The image data comes from the resin regeneration workshop of a certain thermal power plant in Shandong. During the backwashing process, high-definition cameras are installed at key points to obtain image data of the resin state. The images are transmitted in real time to the analysis system running the YOLOv8 model. According to the regeneration frequency of the power plant, videos were taken from February 2023 to May 2024, and a total of 36 hours of video was obtained. By extracting one frame every 150 frames, a total of 21601 pictures were obtained, of which 7156 were effective layered pictures.
[0144] (III) Dataset making
[0145] The images were preliminarily screened to remove blurred and poor-quality images. The opencv+value hash algorithm was used to screen pictures with high similarity, mainly from light intensity and layered position discrimination, to remove pictures with high similarity. Finally, 1673 usable effective layered pictures were obtained. 500 invalid layered pictures were randomly extracted, and finally a total of 2173 pictures were obtained. The pictures were cropped, cut and scaled to different sizes and resolutions. The picture data was divided into training set, validation set and test set in the ratio of 8:2:2, and the training set pictures were labeled and layered using the LabeImg tool.
[0146] (IV) Model training
[0147] According to the official training source code of YOLOv, combined with the characteristics of hardware configuration and dataset, the default parameters were modified. The picture size was set to 640 pixels, the training period was 200 times, and the number of images per batch was 32.
[0148] (V) Improved YOLOv8 algorithm
[0149] To solve the problem of high false detection rate of the original YOLOv8 model in detecting resin layering targets, the algorithm was improved. ① Since the features of resin layering are similar to horizontal shadows, it is easy to misjudge. It is proposed to use EIoU loss function to reduce the false detection rate. ② Since the positive and negative resin color difference of resin layering is not obvious, the ECA attention mechanism module is added to improve the recognition rate of layering. The improved YOLOv8 structure is shown in Figure 2
[0150] CIoU cannot effectively measure the difference between the target box and the anchor point, which leads to slow convergence speed of the BBR (Boundary Box Regression) model optimization and inaccurate positioning. Therefore, EIoU is introduced as the loss function of the model:
[0151]
[0152] where: w c and h c is the width and height of the minimum enclosing box that covers both boxes, and the loss function is divided into three parts: IoU loss L IoU , distance loss L dis , and direction loss L asp . In this way, we can retain the effective features of the C IoU loss. At the same time, the E IoU loss directly minimizes the difference between the target box and the anchor box in width and height, making the convergence faster and the positioning effect better.
[0153] The core idea of the EIoU loss function is to improve the accuracy and efficiency of the bounding box. It optimizes object detection in the following aspects: (1) increase the center point distance loss: by minimizing the distance between the predicted box and the real box center point, the positioning accuracy of the bounding box is improved; (2) consider the size difference: by punishing the difference in width and height, EIoU ensures that the predicted box is closer to the real box in shape; (3) combine the minimum enclosing box size: combine the loss function with the size of the minimum enclosing box containing the predicted box and the real box, so that the loss is more sensitive to the size and position of the object.
[0154] In the process of evaluating the actual application effect of YOLOv8 algorithm, in addition to the influence of the bounding box regression loss function on the accuracy and stability of the algorithm, the attention mechanism is also an important influencing factor. Attention mechanism can make the model focus more on the key information area when processing hierarchical graphs, thus playing an important role in feature extraction and target recognition, and thus greatly affecting the overall performance of YOLOv8 algorithm.
[0155] YOLOv8 algorithm usually uses SE attention mechanism, which is a method of adding attention mechanism in the channel dimension. The advantage of ECA mechanism compared to SE mechanism is its higher computational efficiency and information integrity, and the principle of ECA attention module is shown in Figure 3 . ECA avoids the complex dimension reduction and dimension increase process in SE mechanism through a simplified one-dimensional convolution operation, thereby reducing additional computational cost and model parameters. This simplification allows ECA to effectively improve model performance without significantly increasing computational burden. At the same time, since ECA does not need to reduce and increase the dimension of the feature map, it can better preserve the information of the feature map, thus achieving better performance in channel attention mechanism.
[0156] Summary and comparison (ECA vs. SE module)
[0157]
[0158]
[0159] (VI) Experimental evaluation indicators
[0160] In the experiment, precision (P), recall (R), mean average precision (mAP), model memory usage and detection speed are used as evaluation indicators.
[0161] The precision is based on the predicted results, which refers to the proportion of correct predictions among all positive samples. The prediction of positive examples includes positive examples (TP) and negative examples (FP). The expression of precision is:
[0162]
[0163] The recall is based on the actual sample, which represents the proportion of correctly predicted positive examples in all actual positive samples. In the actual positive sample, TP is correctly predicted and FN is incorrectly predicted. The expression of recall is
[0164]
[0165] The P-R curve of the model can be drawn with precision as the vertical axis and recall as the horizontal axis. The area under the curve is the average precision, and the expression is
[0166] For a target detection task containing N categories, the calculation method of mean average precision is
[0167] In the actual application scenario of target detection, the network model not only needs to have high accuracy, but also needs to have important evaluation indicators such as memory usage and detection speed. Model memory usage (MB) and detection speed (f·s -1 ) are used to measure.
[0168] (Seven) Results and analysis
[0169] 1. Performance comparison of standard YOLO detection algorithm
[0170] In recent years, the YOLO series algorithm has been continuously updated, and each generation has its own characteristics and application scenarios. In order to select the most suitable algorithm for resin regeneration backwashing layering identification, the detection results of mainstream YOLO series algorithms on the data set are quantitatively analyzed, and the results are shown in Table 1.
[0171] The detection results show that the YOLOv8 algorithm performs best in precision, recall and mAP value, with a stable precision of 95.8%, a recall of 89.4% and an mAP value of 64.5%. The memory usage and detection speed of YOLOv8 are better than those of the previous generation, and the detection speed can reach 150f / s.
[0172] After analyzing and comparing the performance of each algorithm, the comprehensive performance of YOLOv8 algorithm is obviously superior, and the target detection network can be used to accurately detect the resin layer under various uncertain factors such as light and distance.
[0173] Table 1 Performance of different detection algorithms
[0174]
[0175] 2, Influence of different attention mechanisms on YOLOv8 performance
[0176] Adding attention mechanism can improve the detection accuracy of YOLOv8 algorithm based on the original basis, adapt to feature changes, and improve the generalization ability. In order to evaluate the improvement effect of attention mechanism on YOLOv8 network, CBAM, SE and ECA attention mechanisms are used to improve YOLOv8 network respectively, and the improved network is trained for 300 times. Then the performance of the above three attention mechanisms is evaluated, and the performance of YOLOv8 based on different attention mechanisms is shown in Table 2.
[0177] By analyzing the detection results, it can be concluded that the detection effect based on YOLOv8+ECA is better than that of YOLOv8+CBAM. The precision and recall are 0.6 and 0.5 percentage points higher than those of YOLOv8+CBAM, respectively, indicating that the proportion of correct samples in the positive examples identified by YOLOv8+ECA is higher, and more true examples can be found, reducing the missed detection. The overall average detection accuracy of the two is equivalent. In terms of model memory usage and detection speed, YOLOv8+ECA is 1.5 MB smaller than YOLOv8+CBAM, while the detection rate is increased by 0.4f / s, which to some extent saves resources and improves smoothness.
[0178] YOLOv8+ECA and YOLOv8+SE. The precision and mAP of YOLOv8+ECA are 1.5 and 0.8 percentage points higher than those of YOLOv8+SE, respectively, indicating that the correct proportion of YOLOv8+ECA in the positive examples is slightly higher, and the average detection accuracy is significantly improved. However, the recall rate is 0.8 percentage points lower than that of YOLOv8+SE, which indicates that YOLOv8+ECA may have more misjudgments in the positive examples. The model memory usage and the number of images detected per second of the two are close, indicating that they perform equally in terms of resource consumption and detection speed.
[0179] In summary, through the above detailed comparative analysis, it can be clear that the three attention mechanisms all play a role in improving the YOLOv8 network. Among them, the ECA attention mechanism has relatively more significant advantages in comprehensive performance, especially in the accurate detection of resin layering under various uncertain factors such as light and distance.
[0180] Table 2 YOLOv8 performance based on different attention mechanisms
[0181]
[0182] 3. Influence of different bounding box loss functions on YOLOv8 performance
[0183] In YOLOv8, different bounding box loss functions mainly affect the performance in target positioning accuracy. In order to evaluate the improvement effect of bounding box loss function on YOLOv8 network, YOLOv8 network is improved based on EIoU, SIoU, WIoU, DIoU, and FocusIoU bounding box loss functions, respectively. After improvement, training is carried out for 300 times, and then the performance of the above five kinds of bounding box loss functions is evaluated. Table 3 is the performance comparison of several bounding box loss functions.
[0184] Based on the analysis of the detection results, the precision and recall based on EIoU are 97.9% and 91.7%, respectively, which are the highest among the five bounding box loss functions, indicating that the proportion of correct resin layering samples identified as positive examples is relatively high, and the missed detection rate is the lowest. Similarly, the mAP value based on EIoU is 0.5-1.1 percentage points higher than the other four loss functions, indicating that it has a higher advantage in detection accuracy. In addition, the differences in model memory usage and detection speed of several functions are not large, showing a negative correlation relationship. The model with higher memory usage has faster detection speed. The model based on EIoU has a medium level of memory usage and the number of images detected per second among the five loss functions.
[0185] In summary, through the above detailed comparative analysis, it can be clear that the three attention mechanisms all play a role in improving the YOLOv8 network. Among them, the ECA attention mechanism has relatively more significant advantages in comprehensive performance, especially in the accurate detection of resin layering under various uncertain factors such as light and distance.
[0186] Table 3 YOLOv8 performance based on different bounding box loss functions
[0187]
[0188]
[0189] 4. Detection results based on improved YOLOv8
[0190] The performance of YOLOv8 before and after improvement is shown in Table 4. The backwashing layered original image obtained in the last 70 times of resin regeneration process was input into the improved YOLOv8 detection algorithm for training, and the performance of the model was obviously improved compared with that before the algorithm improvement and optimization.
[0191] Table 4 Performance of YOLOv8 before and after improvement
[0192]
[0193] The precision of the obtained model is 97.8%, which indicates that the model can accurately judge the resin layering condition in most images and has strong learning and judgment ability for resin layering features. The recall rate is 93.4%, which means that the model rarely misses special layering conditions and fully learns the diversity of certain special layering features. Compared with the small improvement of precision and recall rate, the improved YOLOv8+ECA+EIoU has obvious improvement in average detection accuracy compared with the initial model or the addition of attention mechanism and bounding box loss function alone. The mAP is 72.5%, which reflects the high overall detection accuracy of the model on different types of resin layering, indicating that the model can effectively distinguish different types of layering. Figure 4 The resin layering targets at different distances from the peephole and different light intensities can be accurately identified, indicating that the model has learned the key features of resin layering, and the algorithm can effectively detect resin layering targets. The identification effect of resin layering is shown in Figure 4 .
[0194] 4. Discussion
[0195] (1) Detection effect at different distances
[0196] During backwashing, a high-definition camera is installed near the peephole to collect image data of the resin state. The distance from the camera to the peephole will have multiple effects on backwashing layering automatic identification. A suitable distance can allow the camera to capture clear and complete layering images, which helps the automatic identification system to more accurately analyze the layering state.
[0197] In view of the fact that the wide-angle picture of the camera with focal length 2.8mm and below has an arc at the periphery, causing refraction and distortion of light, which greatly affects the automatic recognition effect. Therefore, a 4mm focal length camera is used to collect the original graph. The distance from the peep window is about 1:1 with the proportion of the field of view coverage. When the distance from the peep window is less than 4cm, the camera field of view cannot be focused clearly. When the distance from the peep window is more than 12cm, the camera is difficult to accurately judge the layering due to too many external influencing factors. In order to evaluate the detection effect of YOLOv8 algorithm under different distances, resin layering graphs are taken under the conditions that the camera is 4cm, 8cm and 12cm away from the peep window, and the detection effect is evaluated by using YOLOv8 algorithm. Table 5 is the performance comparison of the camera being 4cm, 8cm and 12cm away from the peep window. Figure 5 For detection results at different distances, from left to right are 4cm, 8cm and 12cm.
[0198] When the distance between the camera and the peep window is 8cm, the precision and recall rates in the algorithm monitoring results reach 98% and 93.3% respectively, and the average detection accuracy also reaches 85.7%. It proves that the comprehensive detection performance is the most significant. When the distance between the camera and the peep window is 4cm, the detection result decreases significantly compared with the 8cm distance. It is speculated that the reason is that the camera is too close to the peep window, the field of view is too small, and the entire anti-washing layering area cannot be observed completely, at the same time, image distortion may occur, which affects the judgment of the relative position and overall structure of each layer by the automatic identification system, and is also not conducive to the accurate identification of anti-washing layering. When the distance between the camera and the peep window is 12cm, the comprehensive detection effect is the worst, among which the precision rate is 85.2%, the recall rate is 81.5%, and the average detection accuracy is only 67.2%. The reason is analyzed as follows: the camera is too far away from the peep window, resulting in the loss of details of the resin image. Then the boundary of layering and the specific state of each layer cannot be seen clearly, which makes it difficult for the automatic identification system to accurately judge the layering situation and reduces the recognition accuracy.
[0199] After analyzing and comparing the performance of the algorithm at different distances, the comprehensive performance of YOLOv8 algorithm is the most significant when the distance between the camera and the peep window is 8cm, and the accurate detection of resin layering can be realized at this distance.
[0200] Table 5 recognition effect at different distances
[0201]
[0202] (2) Detection effect under different light flux
[0203] The environment for resin regeneration in thermal power plants is relatively complex, and the light conditions are mostly not ideal. If there is not enough light in some relatively dark equipment rooms for the camera to accurately capture the resin layering, a fill light can effectively improve this situation. Proper fill light can ensure consistent image quality of resin layering at different times of the day or different equipment operating states. This facilitates the automatic recognition algorithm to accurately determine resin layering based on stable image features, improving the reliability and accuracy of recognition.
[0204] To evaluate the detection effect of YOLOv8 algorithm under different light flux conditions, different power fill lights were installed under the condition that the camera was 8 cm away from the peephole, and the detection effect was evaluated using YOLOv8 algorithm. Table 6 compares the performance of fill lights with 100 lm, 500 lm, and 900 lm. Figure 6 The detection results under different fill light fluxes are shown from left to right as 100 lm, 500 lm, and 900 lm.
[0205] From the detection results, it can be seen that when the fill light flux is 500 lm, the precision and recall rates of the detection results are 97.7% and 93.8%, respectively, indicating that under 500 lm light flux, the correct cases are more and the missed detection rate is very low in the resin samples identified as layering. The average algorithm accuracy is 86.1%, indicating that the overall detection effect is better. When the light flux is 100 lm, the detection indicators are significantly reduced. The reason may be that when the light flux is too low, the image obtained by the camera is relatively dark. This may cause the boundary of resin layering to be unclear, and some light-colored or resin layers are difficult to distinguish clearly in low light environments. When the light flux is increased to 900 lm, the precision of the detection result is reduced to 92.3%, the recall rate is reduced to 88.4%, and the average detection accuracy is reduced by 5.3% compared to 500 lm. The overall detection result is worse than 500 lm. The reason is that the light flux is too large, causing reflection or halo phenomenon. Strong reflection or halo covers the details of resin layering, making the system unable to accurately capture the true state of the resin layer.
[0206] After analyzing and comparing the performance of the algorithm under different light fluxes, the comprehensive performance of YOLOv8 algorithm is most significant when the fill light intensity is 500 lm, and accurate detection of resin layering can be achieved under this light flux.
[0207] Table 6 Recognition effect under different light fluxes
[0208]
[0209] (3) Actual application effect
[0210] Taking a certain thermal power plant in Shandong as an example, the camera used for image acquisition is installed 8 cm away from the resin regeneration backwashing layered peephole window of the power plant, ensuring that the overall picture of resin layering can be clearly captured. Under the effect of 100 lm light supplement, the optimized YOLOv8 technology is used for resin regeneration backwashing layering identification. During May 2024 to November 2024, a total of 60 backwashing layers were completed on site. The detection results are displayed above the detection frame, with 0 indicating successful layering identification and 1 indicating unsuccessful layering identification. Figure 7 Based on the identification effect of the optimized YOLOv8 technology, the automatic identification results of 60 layers were all determined to be successful.
[0211] From the visualized images of the results, it can be seen that the boundary box predicted by the model closely fits the actual resin layering boundary, the shape is accurate, and the labeled class is correct, which indicates that the model performs well in positioning and classification. For resin structure, the model can clearly and accurately outline the boundary, and the color distinction is obvious, indicating that the model has learned the features of different layers well. This accurate identification provides precise guidance for backwashing operations. Operators can adjust the water flow rate, time and other parameters of backwashing more reasonably according to the output results of the model.
[0212] Compared with traditional manual observation and judgment, the automatic identification system based on YOLOv8 technology can reduce the frequency and intensity of manual operation. In the traditional resin regeneration backwashing layering process, operators need to frequently observe, judge and operate on site. The automatic identification system can monitor the state of the resin in real time, automatically determine the timing and degree of backwashing layering, and does not require constant human attention and manual operation, greatly reducing the frequency of repeated work by operators and reducing labor intensity.
[0213] Through integration with other automated equipment and systems, automatic control of the entire resin regeneration process can be achieved, further improving production efficiency and quality, and reducing labor costs.
[0214] Embodiment Two
[0215] As shown in Figure 8 The present embodiment provides a YOLOv8-based power plant resin regeneration backwashing layering identification system for implementing the method of the first aspect, comprising:
[0216] The image acquisition module 101) is used to acquire real-time image data of the positive and negative failure resins in the resin regeneration positive tower peephole and the resin state image data during the backwashing process;
[0217] The model establishment module 102 is used to establish a YOLOv8 model, wherein the YOLOv8 model comprises an ECA attention mechanism module, and EIoU is used as a loss function;
[0218] The backwashing layering identification module 103 is configured to input the positive and negative failure resin image data and the resin state image data into the YOLOv8 model, and perform backwashing layering identification on the resin regeneration of the power plant based on the output of the YOLOv8 model.
[0219] The application further provides a memory storing a plurality of instructions for implementing the method of the first embodiment.
[0220] As shown in Figure 9 The application further provides an electronic device including a processor 301 and a memory 302 connected to the processor 301, and the memory 302 stores a plurality of instructions, which can be loaded and executed by the processor to enable the processor to perform the method of the first embodiment.
[0221] From the above description of the embodiments, those skilled in the art can clearly understand that the above embodiments can be implemented by software, or can be implemented by means of software plus necessary universal hardware platforms. Based on such understanding, the technical solutions of the above embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and includes a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform the methods described in the embodiments of the application.
[0222] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the application, and not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the application.
Claims
1. A power plant resin regeneration backwash layering identification method based on a YOLOv8 model, characterized by, The application relates to a method for identifying resin regeneration backwashing and layering in a power plant, and belongs to the technical field of power plant resin regeneration. S1, real-time acquisition of anion and cation failure resin image data in a resin regeneration cation tower sight window and resin state image data in a backwashing process; S2, establishing a YOLOv8 model, wherein the YOLOv8 model comprises an ECA attention mechanism module, and EIoU is used as a loss function; S3, inputting the anion and cation failure resin image data and the resin state image data into the YOLOv8 model, and taking the output of the YOLOv8 model as a basis for backwashing and layering identification of power plant resin regeneration; The resin state image data in S1 is acquired based on a high-definition camera; S2 comprises: S21, determining a training set, a verification set and a test set required for establishing a YOLOv8 model; S22, establishing a primary architecture of the YOLOv8 model, wherein the primary architecture of the YOLOv8 model comprises an ECA attention mechanism module; S23, model training of the primary architecture of the YOLOv8 model; S21 comprises: (1) preprocessing of a plurality of historical resin state image data; (2) screening and removing image data with high similarity based on opencv+value hash algorithm, taking illumination intensity and / or layering position as a basis, to obtain M available effective layering pictures; (3) randomly extracting N invalid layering pictures, and combining the M available effective layering pictures and the N invalid layering pictures to form a first data set; (4) cropping and / or scaling each picture in the first data set to form a plurality of pictures with different sizes and resolutions, and the plurality of pictures with different sizes and resolutions form a second data set; (5) dividing the plurality of pictures in the second data set into the training set, the verification set and the test set required for establishing the YOLOv8 model according to a certain proportion, and keeping the consistency of the directory structure, including the target structure of images / train or labels / val; (6) picture layering annotation of the training set; The preprocessing comprises preliminary screening of the plurality of historical resin state image data to remove blurred and poor-quality image data; picture layering annotation and target bounding box of the training set are performed based on X-AnyLabeling or LabeImg tools, and a YOLO format.txt file is generated, wherein each line of the.txt file comprises a class ID, a normalized center coordinate and a width and height; S23 comprises: (1) modifying and configuring default parameters for the model training based on the official training source code of YOLOv, hardware configuration and data set characteristics, wherein the default parameters comprise picture size in the training set, model training period, picture quantity of each batch, specified data set path, class name and quantity; (2) integrating an EIoU loss function and performing hyperparameter setting; wherein: The integrated EIoU loss function comprises: based on modifying the bbox_iou calculation logic in the model code, explicitly decomposing the width-height difference term and normalizing processing, replacing the default bounding box loss function of YOLOv8 with EIoU; the hyperparameter setting comprises: setting the initial learning rate to 0.01, the momentum to 0.937, and the optimizer to use SGD or Adam18; setting the weight ratio of EIoU and classification cross-entropy, balancing the regression and classification tasks; The expression of the EIoU loss function is as shown in the following formula (1): (1) In formula (1): w c and h c represent the width and height of the minimum enclosing box covering two boxes, and the EIoU loss function is a regression loss function that comprehensively measures the overlap, position offset and shape difference between the predicted box and the real box; the EIoU loss function is divided into three parts, which are IoU loss L IoU , distance loss L dis and direction loss L asp ; wherein L IoU is an intersection over union loss term, calculated as 1-IoU, used to reflect the overlap degree between the predicted box and the real box, and the smaller the value, the larger the overlap area between the two boxes; IoU represents the intersection over union, that is, the intersection area of the predicted box and the real box divided by the union area, used to measure the spatial coincidence of the two boxes, ranging from 0 to 1; L dis represents the center point distance loss term, and ρ 2 (b, b gt ) represents the Euclidean distance square of the predicted box center point b and the real box center point b gt , used to punish the offset amount of the predicted box center point and the real box, and the denominator (w c ) 2 +(h c ) 2 is the square sum of the minimum enclosing box width and height, used for normalization; w c and h c represent the width and height of the minimum enclosing box, that is, the width and height of the minimum rectangular box containing the predicted box and the real box, used to normalize the center point distance and the width and height difference, and eliminate the scale sensitivity; L asp represents the width and height difference loss term, including width difference and height difference used to explicitly optimize the width and height difference between the predicted box and the real box, and solve the nonlinear problem of the relative proportion in CIoU; w and h represent the width and height of the predicted box, used to represent the size of the boundary box generated by the model prediction; w gt and h 9t represent the width and height of the real box, used to represent the actual size of the target in the labeled data.
2. A YOLOv8-based power plant resin regeneration backwash layering identification system for implementing the method of claim 1, characterized in that, Comprise: The image acquisition module (101) is used for acquiring the negative-positive failure resin image data in the resin regeneration negative tower sight window and the resin state image data in the backwashing process in real time; The model establishing module (102) is used for establishing a YOLOv8 model, wherein the YOLOv8 model comprises an ECA attention mechanism module, and EIoU is used as a loss function; The backwashing layer identification module (103) is used for inputting the negative-positive failure resin image data and the resin state image data into the YOLOv8 model, and identifying the backwashing layer of the power plant resin regeneration based on the output of the YOLOv8 model.
3. An electronic device, comprising: The computer readable storage medium stores a plurality of instructions, and the processor can read and execute the method of claim 1.
4. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions, and the processor can read and execute the method of claim 1.
Citation Information
Patent Citations
Dynamic simulation test device and method for resin high tower separation
CN119349709A