Intelligent electric power machine room defect identification method and system
By applying a neural network model based on self-attention mechanism in the power computer room, an intelligent defect identification system is built, and equipment failure and safety risks caused by relying on manual inspection in the existing technology is solved, real-time identification and reporting of equipment defects in the power computer room is realized, and the safety and stability of equipment operation are improved.
Patent Information
- Application Number
- CN202411647997.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-28
AI Technical Summary
The identification of defects in existing power room depends on manual inspection, making it difficult to detect equipment failures or potential fire risks in a timely manner, resulting in unstable equipment operation or serious accidents.
An intelligent power room defect recognition system is built using a neural network model based on self-attention mechanism, through transfer learning and feedback optimization training. The system collects historical image data, performs preprocessing and sample proliferation, generates training sample sets, and uses neural network models to identify defects in the power room in real time.
Real-time or near-real-time identification and reporting of equipment defects in the power room is realized, reducing the time and cost of manual inspection, and improving the safety and stability of equipment operation.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an intelligent power room defect identification method and system, belonging to the technical field of intelligent power room. Background Art
[0002] The power room is a special room or facility used for power supply, distribution and power management in an enterprise or organization. It occupies an important position in the management of modern power facilities. The power room is mainly composed of power distribution equipment, UPS equipment, diesel generator equipment, etc. These equipment work together to ensure the stability and safety of power supply.
[0003] However, the current defect identification of power machine rooms relies entirely on manual inspections. If they are not discovered in time, it may easily lead to the normal operation of the equipment in the power machine room, or even cause failures or even fires. Therefore, an intelligent power machine room defect identification method is urgently needed. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention proposes an intelligent power room defect identification method and system.
[0005] The technical solution of the present invention is as follows:
[0006] In one aspect, the present invention provides an intelligent method for identifying defects in a power room, comprising the following steps:
[0007] Collect historical image data in the power room, including defect-free images and defective images, and pre-process the image data to form a training sample set;
[0008] Establish a neural network model based on the self-attention mechanism, initialize the neural network model using transfer learning, and input the training sample set into the initialized neural network model for training;
[0009] During the training process, the neural network model is optimized by using feedback optimization. When the maximum number of training iterations is reached or the recognition accuracy of the neural network model reaches a preset value, the training is terminated to obtain a trained machine room defect recognition model.
[0010] The real-time image data of the target power room is obtained and input into the trained room defect recognition model to obtain the defect recognition results.
[0011] As a preferred implementation, the step of preprocessing the image data includes image normalization processing, specifically:
[0012] The collected image data is converted from RGB image to grayscale image, and the following formula is used:
[0013]
[0014] V (x,y) =MAX;
[0015] Among them, L (x,y) is the gray value of the (x, y) coordinate after conversion to a grayscale image, δ is the correction coefficient, α represents the standard spatial distance, and H s is the hue value of sampling point s, S s is the saturation value of sampling point s, V s is the brightness value of sampling point s, H (x,y) is the hue value of the (x, y) coordinate in the original image, S (x,y) is the saturation value of the (x, y) coordinate in the original image, V (x,y) is the brightness value of the (x, y) coordinate in the original image; R, G, B are the red value, green value and blue value of the corresponding pixel respectively, mod6 is the modulus operation; θ = MAX-MIN; MAX is the maximum value among R, G, B, and MIN is the minimum value among R, G, B;
[0016] The converted grayscale image is normalized as follows:
[0017]
[0018] Among them, L (x,y) ′ Represents the grayscale value of the normalized grayscale image at the (x, y) coordinate, L max Represents the maximum grayscale value of all coordinates in the original grayscale image, L min Represents the minimum grayscale value among all coordinates in the original grayscale image.
[0019] As a preferred implementation, the step of preprocessing the image data further includes a sample multiplication step, specifically:
[0020] Determine all the types of defects in the computer room, and establish a corresponding number of GAN generation networks according to the number of the types of defects in the computer room, wherein the GAN generation network includes a generator and a discriminator, wherein the generator generates a new defect image according to random noise, and the discriminator is used to identify the similarity between the new defect image and the original defect image;
[0021] Each GAN generation network is used to generate defect images of the corresponding defect type, so that the difference in the number of defect images of each defect type is less than a preset range, and the difference between the number of defect-free images and the total number of defect images is less than a preset range.
[0022] As a preferred implementation, the self-attention mechanism cuts the input image data into n image blocks, and obtains the average grayscale value L1, L2, L3, ... L of each image block. n, and convert the average gray value of each image block into a feature vector through a fully connected layer;
[0023] The self-attention mechanism calculates the attention weight of each image block by using query vector, key vector and value vector, where the query vector corresponds to the average grayscale value of the image block, and both the key vector and the value vector use feature vectors.
[0024] On the other hand, the present invention also provides an intelligent power room defect identification system, comprising:
[0025] The data acquisition module is used to collect historical image data in the power room, including defect-free images and defective images, and pre-process the image data to form a training sample set;
[0026] The model building module is used to build a neural network model based on the self-attention mechanism, initialize the neural network model using transfer learning, and input the training sample set into the initialized neural network model for training;
[0027] The model training module is used to optimize the neural network model by means of feedback optimization during the training process. When the maximum number of training iterations is reached or the recognition accuracy of the neural network model reaches a preset value, the training is terminated to obtain a trained machine room defect recognition model;
[0028] The recognition module is used to obtain real-time image data of the target power room and input it into the trained room defect recognition model to obtain defect recognition results.
[0029] As a preferred implementation, the step of preprocessing the image data includes image normalization processing, specifically:
[0030] The collected image data is converted from RGB image to grayscale image, and the following formula is used:
[0031]
[0032]
[0033] V (x,y) =MAX;
[0034] Among them, L (x,y) is the gray value of the (x, y) coordinate after conversion to a grayscale image, δ is the correction coefficient, α represents the standard spatial distance, and H S is the hue value of sampling point s, S S is the saturation value of sampling point s, V s is the brightness value of sampling point s, H (x,y) is the hue value of the (x, y) coordinate in the original image, S (x,y)is the saturation value of the (x, y) coordinate in the original image, V (x,y) is the brightness value of the (x, y) coordinate in the original image; R, G, B are the red value, green value and blue value of the corresponding pixel respectively, mod6 is the modulus operation; θ = MAX-MIN; MAX is the maximum value among R, G, B, and MIN is the minimum value among R, G, B;
[0035] The converted grayscale image is normalized as follows:
[0036]
[0037] Among them, L (x,y) ′ Represents the grayscale value of the normalized grayscale image at the (x, y) coordinate, L max Represents the maximum grayscale value of all coordinates in the original grayscale image, L min Represents the minimum grayscale value among all coordinates in the original grayscale image.
[0038] As a preferred implementation, the step of preprocessing the image data further includes a sample multiplication step, specifically:
[0039] Determine all the types of defects in the computer room, and establish a corresponding number of GAN generation networks according to the number of the types of defects in the computer room, wherein the GAN generation network includes a generator and a discriminator, wherein the generator generates a new defect image according to random noise, and the discriminator is used to identify the similarity between the new defect image and the original defect image;
[0040] Each GAN generation network is used to generate defect images of the corresponding defect type, so that the difference in the number of defect images of each defect type is less than a preset range, and the difference between the number of defect-free images and the total number of defect images is less than a preset range.
[0041] As a preferred implementation, the self-attention mechanism cuts the input image data into n image blocks, and obtains the average grayscale value L1, L2, L3, ... L of each image block. n , and convert the average gray value of each image block into a feature vector through a fully connected layer;
[0042] The self-attention mechanism calculates the attention weight of each image block by using query vector, key vector and value vector, where the query vector corresponds to the average grayscale value of the image block, and both the key vector and the value vector use feature vectors.
[0043] On the other hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment of the present invention when executing the program.
[0044] In yet another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.
[0045] The present invention has the following beneficial effects:
[0046] 1. The present invention greatly shortens the time of defect detection and improves work efficiency by training a defect recognition model based on a neural network. Compared with traditional manual inspections, the intelligent recognition system can detect and report defects in real time or near real time, reduce the burden on operation and maintenance personnel, and reduce labor costs.
[0047] 2. In the image preprocessing step, the present invention converts the image into a grayscale image by combining the RGB model and the HSV model, and performs grayscale value normalization to reduce the noise impact caused by shooting lighting, shadows and other factors.
[0048] 3. The present invention reduces the impact caused by the imbalance in the number of image samples of different defect types by means of sample proliferation, thereby improving the recognition accuracy of the neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 For the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0052] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0053] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0054] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0055] Embodiment 1:
[0056] See also Figure 1 This embodiment provides an intelligent power room defect identification method, comprising the following steps:
[0057] S100: Several cameras, drones, inspection robots and manual collection of historical image data from all directions and angles in the power room can be installed as needed to ensure that the collected data covers all key equipment and areas in the room, including but not limited to transformers, switch cabinets, cable trays, air conditioning systems, etc. The historical image data is classified into defect-free images and defective images, and the image data is preprocessed to form a training sample set; the preprocessing includes confirming the defect type of the collected defective images and marking their relevant location information;
[0058] S200, establishing a neural network model based on a self-attention mechanism, and initializing the neural network model using transfer learning. The neural network model may adopt a convolutional neural network (CNN), a YOLO series (such as YOLOv5), a Faster R-CNN model, etc.; inputting the training sample set into the initialized neural network model for training;
[0059] S300. During the training process, the neural network model is optimized by using feedback optimization. Cross-validation, early stopping and other techniques can also be used to prevent overfitting. The loss function of the neural network model can be cross entropy loss, mean square error loss, etc. The formula of the cross entropy loss function is:
[0060] Where N is the number of input training samples, C is the number of defect categories, and y ic is the true label (0 or 1) of whether the training sample i belongs to category c, and pic is the probability that the model predicts that the training sample i belongs to category c;
[0061] The formula of the mean square error loss function is:
[0062]
[0063] Where N is the number of samples, yi is the true value of training sample i, is the value predicted by the model for sample i;
[0064] The model is trained through back-propagation, the gradient is calculated based on the loss value, and the model parameters are updated through the back-propagation algorithm.
[0065] The parameter update formula of the gradient descent algorithm is:
[0066]
[0067] Among them, θt is the parameter value at the current moment, θt+1 is the updated parameter value, η is the learning rate, is the gradient of the loss function with respect to the parameters θ.
[0068] When the maximum number of training iterations is reached or the recognition accuracy of the neural network model reaches a preset value, the training is terminated to obtain a trained machine room defect recognition model;
[0069] S400. Obtain real-time image data of the target power room and input it into the trained room defect recognition model to obtain defect recognition results. The model can automatically detect the defect type in the image and provide the location information of the defect. The staff can perform relevant operations based on the location information. Once a defect is detected, the system should immediately trigger the alarm mechanism to notify relevant personnel to handle it, and the alarm information should include detailed information on the defect type, location and severity so that personnel can respond quickly.
[0070] As a preferred implementation of this embodiment, the step of preprocessing the image data includes image normalization processing, specifically:
[0071] The collected image data is converted from RGB image to grayscale image, and the following formula is used:
[0072]
[0073] V (x,y) =MAX;
[0074] Among them, L (x,y) is the gray value of the (x, y) coordinate after conversion to a grayscale image, δ is the correction coefficient, α represents the standard spatial distance, and H s is the hue value of sampling point s, S s is the saturation value of sampling point s, V s is the brightness value of sampling point s, H (x,y) is the hue value of the (x, y) coordinate in the original image, S (x,y) is the saturation value of the (x, y) coordinate in the original image, V (x,y) is the brightness value of the (x, y) coordinate in the original image; R, G, B are the red value, green value and blue value of the corresponding pixel respectively, mod6 is the modulus operation; θ = MAX-MIN; MAX is the maximum value among R, G, B, and MIN is the minimum value among R, G, B;
[0075] The converted grayscale image is normalized as follows:
[0076]
[0077] Among them, L (x,y) ′ Represents the grayscale value of the normalized grayscale image at the (x, y) coordinate, L max Represents the maximum grayscale value of all coordinates in the original grayscale image, L min Represents the minimum grayscale value among all coordinates in the original grayscale image.
[0078] As a preferred implementation of this embodiment, the step of preprocessing the image data further includes a sample multiplication step, specifically:
[0079] Determine all the types of defects in the computer room, and establish a corresponding number of GAN generation networks according to the number of the types of defects in the computer room, wherein the GAN generation network includes a generator and a discriminator, wherein the generator generates a new defect image according to random noise, and the discriminator is used to identify the similarity between the new defect image and the original defect image;
[0080] Each GAN generation network is used to generate defect images of the corresponding defect type, so that the difference in the number of defect images of each defect type is less than a preset range, and the difference between the number of defect-free images and the total number of defect images is less than a preset range.
[0081] As a preferred implementation of this embodiment, the self-attention mechanism cuts the input image data into n image blocks, and obtains the average grayscale value L1, L2, L3, ... L of each image block. n , and convert the average gray value of each image block into a feature vector through a fully connected layer;
[0082] The self-attention mechanism calculates the attention weight of each image block by using query vector, key vector and value vector, where the query vector corresponds to the average grayscale value of the image block, and both the key vector and the value vector use feature vectors.
[0083] Embodiment 2:
[0084] This embodiment provides an intelligent power room defect identification system, including:
[0085] A data acquisition module is used to collect historical image data in the power room, including defect-free images and defective images, and pre-process the image data to form a training sample set; this module is used to implement the function of step S100 in the first embodiment, and will not be repeated here;
[0086] A model building module, used to establish a neural network model based on a self-attention mechanism, initialize the neural network model using transfer learning, and input the training sample set into the initialized neural network model for training; this module is used to implement the function of step S200 in the first embodiment, which will not be described in detail here;
[0087] A model training module is used to optimize the neural network model by means of feedback optimization during the training process. When the maximum number of training iterations is reached or the recognition accuracy of the neural network model reaches a preset value, the training is terminated to obtain a trained machine room defect recognition model. This module is used to implement the function of step S300 in the first embodiment, which will not be described in detail here.
[0088] The recognition module is used to obtain real-time image data of the target power room and input it into the trained room defect recognition model to obtain defect recognition results; this module is used to implement the function of step S400 in Example 1 and will not be repeated here.
[0089] As a preferred implementation of this embodiment, the step of preprocessing the image data includes image normalization processing, specifically:
[0090] The collected image data is converted from RGB image to grayscale image, and the following formula is used:
[0091]
[0092]
[0093] V (x,y) =MAX;
[0094] Among them, L (x,y) is the gray value of the (x, y) coordinate after conversion to a grayscale image, δ is the correction coefficient, α represents the standard spatial distance, and H s is the hue value of sampling point s, S s is the saturation value of sampling point s, V s is the brightness value of sampling point s, H (x,y) is the hue value of the (x, y) coordinate in the original image, S (x,y) is the saturation value of the (x, y) coordinate in the original image, V (x,y) is the brightness value of the (x, y) coordinate in the original image; R, G, B are the red value, green value and blue value of the corresponding pixel respectively, mod6 is the modulus operation; θ = MAX-MIN; MAX is the maximum value among R, G, V, MIN is the minimum value among R, G, B;
[0095] The converted grayscale image is normalized as follows:
[0096]
[0097] Among them, L (x,y) ′ represents the grayscale value of the normalized grayscale image at the (x, y) coordinate, L max Represents the maximum grayscale value of all coordinates in the original grayscale image, L min Represents the minimum grayscale value among all coordinates in the original grayscale image.
[0098] As a preferred implementation of this embodiment, the step of preprocessing the image data further includes a sample multiplication step, specifically:
[0099] Determine all the types of defects in the computer room, and establish a corresponding number of GAN generation networks according to the number of the types of defects in the computer room, wherein the GAN generation network includes a generator and a discriminator, wherein the generator generates a new defect image according to random noise, and the discriminator is used to identify the similarity between the new defect image and the original defect image;
[0100] Each GAN generation network is used to generate defect images of the corresponding defect type, so that the difference in the number of defect images of each defect type is less than a preset range, and the difference between the number of defect-free images and the total number of defect images is less than a preset range.
[0101] As a preferred implementation of this embodiment, the self-attention mechanism cuts the input image data into n image blocks, and obtains the average grayscale value L1, L2, L3, ... L of each image block. n , and convert the average gray value of each image block into a feature vector through a fully connected layer;
[0102] The self-attention mechanism calculates the attention weight of each image block by using query vector, key vector and value vector, where the query vector corresponds to the average grayscale value of the image block, and both the key vector and the value vector use feature vectors.
[0103] Embodiment three:
[0104] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment of the present invention when executing the program.
[0105] Embodiment 4:
[0106] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any embodiment of the present invention is implemented.
[0107] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0108] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0110] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0111] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An intelligent method for identifying defects in a power room, characterized in that: The following steps are involved: Collect historical image data in the power room, including defect-free images and defective images, and pre-process the image data to form a training sample set; Establish a neural network model based on the self-attention mechanism, initialize the neural network model using transfer learning, and input the training sample set into the initialized neural network model for training; During the training process, the neural network model is optimized by using feedback optimization. When the maximum number of training iterations is reached or the recognition accuracy of the neural network model reaches a preset value, the training is terminated to obtain a trained machine room defect recognition model. The real-time image data of the target power room is obtained and input into the trained room defect recognition model to obtain the defect recognition results.
2. According to claim 1, an intelligent power room defect identification method is characterized in that: The step of preprocessing the image data includes image normalization processing, specifically: The collected image data is converted from RGB image to grayscale image, and the following formula is used: V (x,y) =MAX; Among them, L (x,y) is the gray value of the (x, y) coordinate after conversion to a grayscale image, δ is the correction coefficient, α represents the standard spatial distance, and H s is the hue value of sampling point s, S s is the saturation value of sampling point s, V s is the brightness value of sampling point s, H (x,y) is the hue value of the (x, y) coordinate in the original image, S (x,y) is the saturation value of the (x, y) coordinate in the original image, V (x,y) is the brightness value of the (x, y) coordinate in the original image; R, G, B are the red value, green value and blue value of the corresponding pixel respectively, mod6 is the modulus operation; θ = MAX-MIN; MAX is the maximum value among R, G, B, and MIN is the minimum value among R, G, B; The converted grayscale image is normalized as follows: Among them, L (x,y) ′ represents the grayscale value of the normalized grayscale image at the (x, y) coordinate, L max Represents the maximum grayscale value of all coordinates in the original grayscale image, L min Represents the minimum grayscale value among all coordinates in the original grayscale image.
3. The intelligent power room defect identification method according to claim 1 is characterized in that: The step of preprocessing the image data also includes a sample multiplication step, specifically: Determine all the types of defects in the computer room, and establish a corresponding number of GAN generation networks according to the number of the types of defects in the computer room, wherein the GAN generation network includes a generator and a discriminator, wherein the generator generates a new defect image according to random noise, and the discriminator is used to identify the similarity between the new defect image and the original defect image; Each GAN generation network is used to generate defect images of the corresponding defect type, so that the difference in the number of defect images of each defect type is less than a preset range, and the difference between the number of defect-free images and the total number of defect images is less than a preset range.
4. The intelligent power room defect identification method according to claim 1 is characterized by: The self-attention mechanism cuts the input image data into n image blocks and obtains the average grayscale value L1, L2, L3, ...L of each image block. n , and convert the average gray value of each image block into a feature vector through a fully connected layer; The self-attention mechanism calculates the attention weight of each image block by using query vector, key vector and value vector, where the query vector corresponds to the average grayscale value of the image block, and both the key vector and the value vector use feature vectors.
5. An intelligent power room defect identification system, characterized in that: include: The data acquisition module is used to collect historical image data in the power room, including defect-free images and defective images, and pre-process the image data to form a training sample set; The model building module is used to build a neural network model based on the self-attention mechanism, initialize the neural network model using transfer learning, and input the training sample set into the initialized neural network model for training; The model training module is used to optimize the neural network model by means of feedback optimization during the training process. When the maximum number of training iterations is reached or the recognition accuracy of the neural network model reaches a preset value, the training is terminated to obtain a trained machine room defect recognition model; The recognition module is used to obtain real-time image data of the target power room and input it into the trained room defect recognition model to obtain defect recognition results.
6. The intelligent power room defect identification system according to claim 5 is characterized in that: The step of preprocessing the image data includes image normalization processing, specifically: The collected image data is converted from RGB image to grayscale image, and the following formula is used: V (x,y) =MAX; Among them, L (x,y) is the gray value of the (x, y) coordinate after conversion to a grayscale image, δ is the correction coefficient, α represents the standard spatial distance, and H s is the hue value of sampling point s, S s is the saturation value of sampling point s, V s is the brightness value of sampling point s, H (x,y) is the hue value of the (x, y) coordinate in the original image, S (x,y) is the saturation value of the (x, y) coordinate in the original image, V (x,y) is the brightness value of the (x, y) coordinate in the original image; R, G, B are the red value, green value and blue value of the corresponding pixel respectively, mod6 is the modulus operation; θ = MAX-MIN; MAX is the maximum value among R, G, B, and MIN is the minimum value among R, G, B; The converted grayscale image is normalized as follows: Among them, L (x,y) ′ represents the grayscale value of the normalized grayscale image at the (x, y) coordinate, L max Represents the maximum grayscale value of all coordinates in the original grayscale image, L min Represents the minimum grayscale value among all coordinates in the original grayscale image.
7. The intelligent power room defect identification system according to claim 5 is characterized in that: The step of preprocessing the image data also includes a sample multiplication step, specifically: Determine all the types of defects in the computer room, and establish a corresponding number of GAN generation networks according to the number of the types of defects in the computer room, wherein the GAN generation network includes a generator and a discriminator, wherein the generator generates a new defect image according to random noise, and the discriminator is used to identify the similarity between the new defect image and the original defect image; Each GAN generation network is used to generate defect images of the corresponding defect type, so that the difference in the number of defect images of each defect type is less than a preset range, and the difference between the number of defect-free images and the total number of defect images is less than a preset range.
8. The intelligent power room defect identification system according to claim 1 is characterized by: The self-attention mechanism cuts the input image data into n image blocks and obtains the average grayscale value L1, L2, L3, ...L of each image block. n , and convert the average gray value of each image block into a feature vector through a fully connected layer; The self-attention mechanism calculates the attention weight of each image block by using query vector, key vector and value vector, where the query vector corresponds to the average grayscale value of the image block, and both the key vector and the value vector use feature vectors.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.