Slip ring chamber carbon brush ignition intelligent detection method based on computer vision
By installing a camera in the sliding ring room and using the improved YOLOv5s model for carbon brush ignition detection, the accuracy and real-time problems of traditional manual inspection are solved, real-time monitoring and early warning of carbon brush ignition in the sliding ring room are realized. Reduces the risk of equipment damage.
Patent Information
- Application Number
- CN202411023643.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-24
AI Technical Summary
The traditional sliding ring room carbon brush ignition inspection relies on manual inspection, which has accuracy and reliability problems, and it is impossible to monitor the working status of the carbon brush in real time, resulting in the failure to detect and process the carbon brush ignition in time, affecting the equipment life and the stability of the power system.
Using intelligent detection methods based on computer vision, video data is collected by installing a camera in the slip ring room, image preprocessing and object detection is performed using the improved YOLOv5s model, carbon brush ignition is monitored in real time, and alarm signals are triggered.
Real-time monitoring and early warning of carbon brush ignition in the sliding ring chamber is realized, which reduces potential hidden dangers and equipment damage caused by carbon brush ignition, and improves the accuracy and reliability of detection.
Smart Images

Figure CN119181050A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of intelligent detection of carbon brush ignition in a slip ring chamber, in particular to an intelligent detection method of carbon brush ignition in a slip ring chamber based on computer vision. Background Art
[0002] The slip ring device of the hydro-turbine generator set is mainly composed of carbon brushes, brush holders and their fixing parts (carbon brush holders), brush holders, positive and negative collector rings, insulating parts and excitation leads. Key slots are opened on the surface of the slip rings to dissipate heat and collect carbon powder. During the operation of the unit, sparks are likely to occur at the contact point between the slip ring and the excitation carbon brush due to brush holder vibration, excessive slip ring temperature, uneven current distribution, different positive and negative effects of the slip ring, slip ring surface finish, carbon brush material, etc. If the carbon brush sparking in the slip ring chamber is not discovered and handled in time, it may have a series of serious effects and consequences: First, carbon brush sparking may cause the surface of the generator slip ring to overheat and form a ring fire, which will damage the slip ring and carbon brush and shorten the service life of the equipment. Secondly, when the carbon brush sparks seriously, it may force the generator set to shut down unplanned, affecting the stable operation of the power system. Furthermore, carbon brush sparking may cause electrical short circuits, increase the risk of fire, and pose a threat to the safety of operators and equipment. Finally, carbon brush sparking will also cause equipment damage, requiring more frequent maintenance and replacement of parts, increasing maintenance costs.
[0003] The traditional method of detecting ignition of carbon brushes in slip ring chambers mainly relies on manual inspection and regular maintenance. This method has many shortcomings: affected by the experience of the inspectors, manual inspection is difficult to ensure the accuracy and reliability of detection. Secondly, although regular maintenance can reduce the occurrence of ignition problems to a certain extent, it is unable to monitor the working status of the carbon brushes in real time, making it difficult to detect and deal with problems in a timely manner. In addition, the traditional method also has problems such as inconvenient detection and inability to monitor the working status of the carbon brushes in real time. Summary of the invention
[0004] The purpose of the present invention is to overcome the above-mentioned shortcomings and provide a slip ring chamber carbon brush ignition intelligent detection method based on computer vision to solve the problems raised in the background technology.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a computer vision-based slip ring chamber carbon brush ignition intelligent detection method, which includes the following steps:
[0006] Step 1, create a data set of collector ring carbon brush ignition;
[0007] Step 2: Build an improved YOLOv5s model based on the attention mechanism;
[0008] Step 3: Construct a training set, a validation set, and a test set; the training set is used to train the neural network, the validation set is used to adjust the model hyperparameters, and the test set is used to test the model performance;
[0009] Step 4: Use the training set to train the constructed improved YOLOv5s model, use the validation set to adjust the model's hyperparameters, and then input the test set into the trained deep learning network for performance evaluation;
[0010] Step 5: Save the model and deploy it. Use the trained improved YOLOv5s model to detect the sparking of the collector ring carbon brush. When the carbon brush sparking is detected, an alarm signal is triggered.
[0011] Furthermore, the step 1 specifically includes the following steps:
[0012] Step 1.1, collecting the monitoring video data of the collector ring chamber: four cameras are installed at equal intervals on the circular shell of the collector ring chamber to achieve full coverage monitoring of the collector ring; in the server database, the video clips of the carbon brush not igniting and the video clips of the carbon brush igniting are selected;
[0013] Step 1.2, video frame processing: Use the VideoCapture function in the OpenCV extension library cv2 to perform frame processing on the collected collector ring chamber monitoring video data to obtain an original image data set with a resolution of 1920 pixels × 1080 pixels;
[0014] Step 1.3, image preprocessing: use the Padding function to adjust the original image to a square size, and then scale it proportionally to an image of 640 pixels × 640 pixels;
[0015] Step 1.4, data set annotation: Use the image calibration tool Labelimg to manually calibrate the carbon brushes and sparks in the image to obtain a standard XML format file. All images and XML format files together constitute the carbon brush spark dataset.
[0016] Furthermore, the step 2 specifically includes the following steps:
[0017] Step 2.1, build the classic YOLOv5s model, including the backbone network feature extraction module, the neck structure feature fusion module, and the head structure target detection module;
[0018] In step 2.2, the hybrid attention mechanism modules are respectively inserted into the three branches of the YOLOv5s backbone network that transfer feature maps to the neck structure.
[0019] Furthermore, the classic YOLOv5s model built in step 2.1 is as follows:
[0020] The backbone network structure in YOLOv5s includes Conv module, C3 module, and SPPF module, which are used to extract shallow graphic features and deep semantic features of the image, and pass three feature maps of different scales to the neck structure; the neck structure in YOLOv5s includes Conv module, C3 module, Concat operation, and Upsample operation. It has an upsampling branch and a downsampling branch, which are used to realize the fusion of shallow graphic features and deep semantic features, and pass three feature maps of different scales to the head structure; the head structure in YOLOv5s consists of three 1*1 convolutions, corresponding to three detection layers of different scales. Each detection layer is responsible for predicting the category and location information of the object, and adapts to objects of different sizes through multi-scale detection.
[0021] Furthermore, the hybrid attention mechanism module is specifically:
[0022] The hybrid attention mechanism consists of the input feature map Channel attention map M C ∈R 1×1×C , spatial attention map M S ∈R H×W×1 and spatial attention enhanced feature map Composition, where H represents the height of the feature map, W represents the width of the feature map, and C represents the number of channels of the feature map;
[0023] Perform global average pooling and global maximum pooling operations on X to obtain two vectors of size 1×1×C:
[0024] X avg =AvgPool(X);
[0025] X max =MaxPool(X);
[0026] Among them, AvgPool(·) represents the average pooling operation, MaxPool(·) represents the maximum pooling operation, and X avg represents the output of average pooling, X max represents the output of the maximum pooling;
[0027] X avg and X max The channels are input into the shared multi-layer perceptron MLP respectively, and the results are added together and the channel attention map is obtained through the sigmoid activation function.
[0028] M c =σ(MLP(X avg )+MLP(X max ));
[0029] Where σ represents the sigmoid activation function, MLP(·) represents a multilayer perceptron network with C neurons in the output layer;
[0030] Combine the input feature map X with the channel attention map M c Multiply channel by channel to get the channel attention enhanced feature map
[0031]
[0032]
[0033] in, Represents a channel-by-channel multiplication operation;
[0034] The channel-enhanced feature map X′ is averagely pooled and max-pooled in the channel dimension to obtain two feature maps of size H×W×1:
[0035] X a ' vg =AvgPool(X′);
[0036] X′ max =MaxPool(X′);
[0037] X a ' vg and X′ max Connect them in the channel dimension to form a feature map of size H×W×2, and pass it through a 7×7 convolution layer to obtain a spatial attention map M of size H×W×1. s :
[0038] M s =σ(Conv(7×7,[X a ' vg ; X′ max ]));
[0039] Among them, σ represents the sigmoid activation function;
[0040] The channel-enhanced feature map X′ is combined with the spatial attention map M s Multiply element by element to get the spatial attention enhanced feature map X″:
[0041] X″=M s ⊙X′;
[0042] Among them, ⊙ represents the element-by-element multiplication operation.
[0043] Furthermore, the specific process of constructing the training set, validation set, and test set in step 3 is as follows:
[0044] For the M carbon brush non-ignition image samples and N carbon brush ignition image samples that have been collected and labeled, the two types of image samples are randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:1;
[0045] Then the number of training set samples is: 0.7×M+0.7×N;
[0046] The number of samples in the validation set is: 0.2×M+0.2×N;
[0047] The number of test set samples is: 0.1×M+0.1×N.
[0048] Furthermore, the improved YOLOv5s model constructed by training in step 4 includes the following steps:
[0049] Step 4.1, set the hyperparameters required for training, including epoch, batch_size, learning rate, training optimizer, and loss function; the loss function of the constructed improved YOLOv5s model is:
[0050] Loss=α×bbox_loss+β×cls_loss+λ×obj_loss;
[0051] Where α, β, and λ represent loss weights, bbox_loss represents the bounding box loss calculated using IoU loss, cls_loss represents the confidence loss calculated using binary cross entropy, and obj_loss represents the target detection loss calculated using binary cross entropy;
[0052] Step 4.2, set the model evaluation index: the evaluation index uses four evaluation indicators used for classification tasks, namely accuracy, precision, recall and F1-score; among them, the image with carbon brush ignition is regarded as a positive sample, and the image without carbon brush ignition is regarded as a negative sample, then:
[0053]
[0054]
[0055]
[0056]
[0057] Among them, TP means that the positive sample is successfully predicted as a positive sample, TN means that the negative sample is successfully predicted as a negative sample, FP means that the negative sample is incorrectly predicted as a positive sample, and FN means that the positive sample is incorrectly predicted as a negative sample;
[0058] Step 4.3, initialize the network parameters, and input the training set into the constructed improved YOLOv5s model to start the training process. According to the calculated loss, update the model parameters through the gradient descent algorithm until the training ends. Then freeze the model parameters, input the validation set into the trained improved YOLOv5s model, optimize and adjust the model through the evaluation indicators, and finally, input the test set into the optimized improved YOLOv5s model to evaluate the performance of the model.
[0059] Furthermore, the step 5 comprises the following steps:
[0060] Step 5.1, save the model with the best evaluation index during the verification process, the model includes the model architecture and parameters;
[0061] Step 5.2, in the collector ring room monitoring system, write a real-time video data reading script to realize uninterrupted reading of video data, and pre-process the video data;
[0062] Step 5.3, call the saved improved YOLOv5s model to perform real-time detection of collector ring carbon brush ignition, and return the collector ring carbon brush ignition detection result and prediction status.
[0063] The beneficial effects of the present invention are as follows:
[0064] 1. The present invention uses the monitoring video data obtained by the camera installed in the slip ring chamber to realize real-time monitoring and alarm of carbon brush ignition in the slip ring chamber based on computer vision technology, thereby reducing potential hidden dangers and equipment damage caused by carbon brush ignition.
[0065] 2. The present invention designs an improved YOLOv5s model based on the attention mechanism to realize intelligent detection of carbon brush ignition in the slip ring chamber.
[0066] 3. The patent of this invention proposes an intelligent detection method for carbon brush ignition in the slip ring chamber based on computer vision. Compared with the traditional method relying on manual inspection and regular maintenance, this method can realize real-time monitoring of the working status of the carbon brush in the slip ring chamber with the help of image monitoring system and computer vision technology. It can detect and issue early warning in the early stage of carbon brush ignition, thus reducing a series of impacts and consequences caused by carbon brush ignition. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a flow chart of an intelligent detection method for carbon brush ignition in a slip ring chamber based on computer vision;
[0068] Figure 2 Schematic diagram of the improved YOLOv5s model based on the attention mechanism;
[0069] Figure 3Schematic diagram of the attention convolution module framework. DETAILED DESCRIPTION
[0070] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0071] like Figure 1 As shown, a computer vision-based intelligent detection method for carbon brush ignition in a slip ring chamber is characterized in that it comprises the following steps:
[0072] Step 1, making a collector ring carbon brush ignition data set, including the following steps:
[0073] Step 1.1, collect the monitoring video data of the collector ring chamber: install 4 cameras at equal intervals on the circular shell of the collector ring chamber to achieve full coverage monitoring of the collector ring. Select the video clips of the carbon brush not igniting and the video clips of the carbon brush igniting in the server database.
[0074] Step 1.2, video frame processing: Use the VideoCapture function in the OpenCV extension library cv2 to perform frame processing on the collected collector ring chamber monitoring video data to obtain an original image data set with a resolution of 1920 pixels × 1080 pixels;
[0075] Step 1.3, image preprocessing: use the Padding function to adjust the original image to a square size, and then scale it proportionally to an image of 640 pixels × 640 pixels;
[0076] Step 1.4, data set annotation: Use the image calibration tool Labelimg to manually calibrate the carbon brushes and sparks in the image to obtain a standard XML format file. All images and XML format files together constitute the carbon brush spark dataset.
[0077] Step 2: Build an improved YOLOv5s model based on the attention mechanism (such as Figure 2 and 3 As shown), comprising the following steps:
[0078] Step 2.1, build the classic YOLOv5s model, including the backbone network feature extraction module, the neck structure feature fusion module, and the head structure target detection module;
[0079] In step 2.2, the hybrid attention mechanism modules are respectively inserted into the three branches of the YOLOv5s backbone network that transfer feature maps to the neck structure.
[0080] Preferably, the classic YOLOv5s model is built as described in step 2.1, specifically as follows: the structure of the backbone network in YOLOv5s includes a Conv module (consisting of a Conv2d, a BatchNorm2d and a SiLu activation function), a C3 module (consisting of three Conv modules and a Bottleneck module using a residual connection), and an SPPF (spatial pyramid pooling) module, which is used to extract shallow graphic features and deep semantic features of the image, and pass three feature maps of different scales to the neck structure; the neck structure in YOLOv5s is composed of a Conv module, a C3 module, a Concat operation, and an Upsample operation, with an upsampling branch and a downsampling branch, to achieve better fusion of shallow graphic features and deep semantic features, and pass three feature maps of different scales to the head structure; the head structure in YOLOv5s is composed of three 1*1 convolutions, corresponding to three detection layers of different scales, each detection layer is responsible for predicting the category and position information of the object, and through multi-scale detection, it can better adapt to objects of different sizes.
[0081] Preferably, in step 2.2, a hybrid attention mechanism module is respectively inserted into the three branches of the YOLOv5s backbone network transmitting the feature map to the neck structure, and the hybrid attention mechanism module is specifically as follows:
[0082] The hybrid attention mechanism consists of the input feature map Channel attention map M C ∈R 1×1×C , spatial attention map M S ∈R H×W×1 and spatial attention enhanced feature map Composition, where H represents the height of the feature map, W represents the width of the feature map, and C represents the number of channels of the feature map;
[0083] First, perform global average pooling and global maximum pooling operations on X to obtain two vectors of size 1×1×C:
[0084] X avg =AvgPool(X);
[0085] X max =MaxPool(X);
[0086] Among them, AvgPool(·) represents the average pooling operation, MaxPool(·) represents the maximum pooling operation, and X avg represents the output of average pooling, X max Represents the output of max pooling.
[0087] X avgand X max The channels are input into a shared multi-layer perceptron (MLP) and the results are added together to obtain the channel attention map through the sigmoid activation function.
[0088] M c =σ(MLP(X avg )+MLP(X max ));
[0089] Where σ represents the sigmoid activation function, and MLP(·) represents a multilayer perceptron network with C neurons in the output layer.
[0090] Combine the input feature map X with the channel attention map M c Multiply channel by channel to get the channel attention enhanced feature map
[0091]
[0092]
[0093] in, Represents a channel-by-channel multiplication operation.
[0094] The channel-enhanced feature map X′ is averagely pooled and max-pooled in the channel dimension to obtain two feature maps of size H×W×1:
[0095] X a ' vg =AvgPool(X′);
[0096] X′ max =MaxPool(X′);
[0097] X a ' vg and X′ max Connect them in the channel dimension to form a feature map of size H×W×2, and pass it through a 7×7 convolution layer to obtain a spatial attention map M of size H×W×1. s :
[0098] M s =σ(Conv(7×7,[X a ' vg ; X′ max ]));
[0099] Among them, σ represents the sigmoid activation function.
[0100] The channel-enhanced feature map X′ is combined with the spatial attention map M s Multiply element by element to get the spatial attention enhanced feature map X″:
[0101] X″=M s ⊙X′;
[0102] Among them, ⊙ represents the element-by-element multiplication operation.
[0103] Step 3: Construct a training set, a validation set, and a test set; the training set is used to train the neural network, the validation set is used to adjust the model hyperparameters, and the test set is used to test the model performance;
[0104] Preferably, the training set, validation set and test set are constructed in step 3 as follows:
[0105] For the M carbon brush unignited image samples and N carbon brush ignited image samples that have been collected and labeled, the two types of image samples are randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:1;
[0106] Then the number of training set samples is: 0.7×M+0.7×N;
[0107] The number of samples in the validation set is: 0.2×M+0.2×N;
[0108] The number of test set samples is: 0.1×M+0.1×N.
[0109] Step 4: Use the training set to train the constructed improved YOLOv5s model, use the validation set to adjust the model's hyperparameters, and then input the test set into the trained deep learning network for performance evaluation;
[0110] Preferably, the training constructed improved YOLOv5s model in step 4 comprises the following steps:
[0111] Step 4.1, set the hyperparameters required for training, including epoch, batch_size, learning rate, training optimizer, and loss function; the loss function of the constructed improved YOLOv5s model is:
[0112] Loss=α×bbox_loss+β×cls_loss+λ×obj_loss;
[0113] Where α, β, and λ represent loss weights, bbox_loss represents the bounding box loss calculated using IoU loss, cls_loss represents the confidence loss calculated using binary cross entropy, and obj_loss represents the target detection loss calculated using binary cross entropy;
[0114] Step 4.2, set the model evaluation index: the evaluation index uses four widely used evaluation indexes for classification tasks, namely accuracy, precision, recall and F1-score. Among them, the image with carbon brush ignition is regarded as a positive sample (Positive), and the image without carbon brush ignition is regarded as a negative sample (Negative), then:
[0115]
[0116]
[0117]
[0118]
[0119] Among them, TP means that the positive sample is successfully predicted as a positive sample, TN means that the negative sample is successfully predicted as a negative sample, FP means that the negative sample is incorrectly predicted as a positive sample, and FN means that the positive sample is incorrectly predicted as a negative sample;
[0120] Step 4.3, initialize the network parameters, and input the training set into the constructed improved YOLOv5s model to start the training process. According to the calculated loss, update the model parameters through the gradient descent algorithm until the training ends (the loss value is stable or the iteration ends); then freeze the model parameters, input the validation set into the trained improved YOLOv5s model, optimize and adjust the model through the evaluation indicators, and finally, input the test set into the optimized improved YOLOv5s model to evaluate the performance of the model.
[0121] Step 5: Save the model and deploy it. Use the trained improved YOLOv5s model to detect the sparking of the collector ring carbon brush. When the carbon brush sparking is detected, an alarm signal is triggered.
[0122] Preferably, step 5 includes the following steps:
[0123] Step 5.1, save the model (including model architecture and parameters) when the evaluation index is optimal during the verification process;
[0124] Step 5.2, write a real-time video data reading script to achieve uninterrupted reading of video data and pre-process the video data;
[0125] Step 5.3, call the saved improved YOLOv5s model to perform real-time detection of collector ring carbon brush ignition, and return the collector ring carbon brush ignition detection result and prediction status.
[0126] The above embodiments are only preferred technical solutions of the present invention and should not be regarded as limiting the present invention. The protection scope of the present invention shall be the technical solutions recorded in the claims, including equivalent replacement solutions of the technical features in the technical solutions recorded in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present invention.
Claims
1. A computer vision-based intelligent detection method for carbon brush ignition in a slip ring chamber, characterized in that: It includes the following steps: Step 1, create a data set of collector ring carbon brush ignition; Step 2: Build an improved YOLOv5s model based on the attention mechanism; Step 3: construct training set, validation set and test set; The training set is used to train the neural network, the validation set is used to adjust the model hyperparameters, and the test set is used to test the model performance; Step 4: Use the training set to train the constructed improved YOLOv5s model, use the validation set to adjust the model's hyperparameters, and then input the test set into the trained deep learning network for performance evaluation; Step 5: Save the model and deploy it. Use the trained improved YOLOv5s model to detect the sparking of the collector ring carbon brush. When the carbon brush sparking is detected, an alarm signal is triggered.
2. According to claim 1, a computer vision-based intelligent detection method for slip ring chamber carbon brush ignition, characterized in that: The step 1 specifically includes the following steps: Step 1.1, collecting the monitoring video data of the collector ring chamber: four cameras are installed at equal intervals on the circular shell of the collector ring chamber to achieve full coverage monitoring of the collector ring; in the server database, the video clips of the carbon brush not igniting and the video clips of the carbon brush igniting are selected; Step 1.2, video frame processing: Use the VideoCapture function in the OpenCV extension library cv2 to perform frame processing on the collected collector ring chamber monitoring video data to obtain an original image data set with a resolution of 1920 pixels × 1080 pixels; Step 1.3, image preprocessing: use the Padding function to adjust the original image to a square size, and then scale it proportionally to an image of 640 pixels × 640 pixels; Step 1.4, data set annotation: Use the image calibration tool Labelimg to manually calibrate the carbon brushes and sparks in the image to obtain a standard XML format file. All images and XML format files together constitute the carbon brush spark dataset.
3. According to claim 1, a computer vision-based intelligent detection method for slip ring chamber carbon brush ignition, characterized in that: The step 2 specifically includes the following steps: Step 2.1, build the classic YOLOv5s model, including the backbone network feature extraction module, the neck structure feature fusion module, and the head structure target detection module; In step 2.2, the hybrid attention mechanism modules are respectively inserted into the three branches of the YOLOv5s backbone network that transfer feature maps to the neck structure.
4. According to claim 3, a computer vision-based intelligent detection method for slip ring chamber carbon brush ignition is characterized in that: The classic YOLOv5s model built in step 2.1 is as follows: The backbone network structure in YOLOv5s includes Conv module, C3 module, and SPPF module, which are used to extract shallow graphic features and deep semantic features of the image, and pass three feature maps of different scales to the neck structure; the neck structure in YOLOv5s includes Conv module, C3 module, Concat operation, and Upsample operation. It has an upsampling branch and a downsampling branch, which are used to realize the fusion of shallow graphic features and deep semantic features, and pass three feature maps of different scales to the head structure; the head structure in YOLOv5s consists of three 1*1 convolutions, corresponding to three detection layers of different scales. Each detection layer is responsible for predicting the category and location information of the object, and adapts to objects of different sizes through multi-scale detection.
5. The computer vision-based intelligent detection method for slip ring chamber carbon brush ignition according to claim 3 is characterized in that: The hybrid attention mechanism module is specifically: The hybrid attention mechanism consists of the input feature map Channel attention map M C ∈R 1×1×C , spatial attention map M S ∈R H×W×1 and spatial attention enhanced feature map Composition, where H represents the height of the feature map, W represents the width of the feature map, and C represents the number of channels of the feature map; Perform global average pooling and global maximum pooling operations on X to obtain two vectors of size 1×1×C: X avg =AvgPool(X); X max =MaxPool(X); Among them, AvgPool(·) represents the average pooling operation, MaxPool(·) represents the maximum pooling operation, and X avg represents the output of average pooling, X max represents the output of the maximum pooling; X avg and X max The channels are input into the shared multi-layer perceptron MLP respectively, and the results are added together and the channel attention map is obtained through the sigmoid activation function. M c =σ(MLP(X avg )+MLP(X max )); Where σ represents the sigmoid activation function, MLP(·) represents a multilayer perceptron network with C neurons in the output layer; Combine the input feature map X with the channel attention map M c Multiply channel by channel to get the channel attention enhanced feature map in, Represents a channel-by-channel multiplication operation; The channel-enhanced feature map X′ is averagely pooled and max-pooled in the channel dimension to obtain two feature maps of size H×W×1: X′ avg =AvgPool(X′); X′ max =MaxPool(X′); X a ' vg and X′ max Connect them in the channel dimension to form a feature map of size H×W×2, and pass it through a 7×7 convolution layer to obtain a spatial attention map M of size H×W×1. s : M s =σ(Conv(7×7,[X a ′ vg ;X′ max ])); Among them, σ represents the sigmoid activation function; The channel-enhanced feature map X′ is combined with the spatial attention map M s Multiply element by element to get the spatial attention enhanced feature map X″: X″=M s ⊙X′; Among them, ⊙ represents the element-by-element multiplication operation.
6. The computer vision-based intelligent detection method for slip ring chamber carbon brush ignition according to claim 1, characterized in that: The specific process of constructing the training set, validation set, and test set described in step 3 is as follows: For the M carbon brush non-ignition image samples and N carbon brush ignition image samples that have been collected and labeled, the two types of image samples are randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:1; Then the number of training set samples is: 0.7×M+0.7×N; The number of samples in the validation set is: 0.2×M+0.2×N; The number of test set samples is: 0.1×M+0.1×N.
7. The computer vision-based intelligent detection method for slip ring chamber carbon brush ignition according to claim 1, characterized in that: The training of the improved YOLOv5s model constructed in step 4 includes the following steps: Step 4.1, set the hyperparameters required for training, including epoch, batch_size, learning rate, training optimizer, and loss function; the loss function of the constructed improved YOLOv5s model is: Loss=α×bbox_loss+β×cls_loss+λ×obj_loss; Where α, β, and λ represent loss weights, bbox_loss represents the bounding box loss calculated using IoU loss, cls_loss represents the confidence loss calculated using binary cross entropy, and obj_loss represents the target detection loss calculated using binary cross entropy; Step 4.2, set the model evaluation index: the evaluation index uses four evaluation indicators used for classification tasks, namely accuracy, precision, recall and F1-score; among them, the image with carbon brush ignition is regarded as a positive sample, and the image without carbon brush ignition is regarded as a negative sample, then: Among them, TP means that the positive sample is successfully predicted as a positive sample, TN means that the negative sample is successfully predicted as a negative sample, FP means that the negative sample is incorrectly predicted as a positive sample, and FN means that the positive sample is incorrectly predicted as a negative sample; Step 4.3, initialize the network parameters, and input the training set into the constructed improved YOLOv5s model to start the training process. According to the calculated loss, update the model parameters through the gradient descent algorithm until the training ends. Then freeze the model parameters, input the validation set into the trained improved YOLOv5s model, optimize and adjust the model through the evaluation indicators, and finally, input the test set into the optimized improved YOLOv5s model to evaluate the performance of the model.
8. The computer vision-based intelligent detection method for slip ring chamber carbon brush ignition according to claim 1 is characterized in that: The step 5 comprises the following steps: Step 5.1, save the model with the best evaluation index during the verification process, the model includes the model architecture and parameters; Step 5.2, in the collector ring room monitoring system, write a real-time video data reading script to realize uninterrupted reading of video data, and pre-process the video data; Step 5.3, call the saved improved YOLOv5s model to perform real-time detection of collector ring carbon brush ignition, and return the collector ring carbon brush ignition detection result and prediction status.
Citation Information
Patent Citations
Oil and gas pipeline marker identification method based on neural network
CN111339858A
System and method for identifying contact state of collector ring carbon brush of generator through machine vision
CN115661154A
Intelligent visual detection method for obstacles of underground electric locomotive
CN116630741A
