A method, system and device for detecting the appearance of an electromechanical device and a storage medium

By combining the improved YOLOv8 model and the safety assessment model, intelligent and automated inspection of the appearance of electromechanical equipment has been achieved, solving the problems of untimely and non-standard manual inspection, improving the accuracy and efficiency of inspection, and ensuring equipment safety.

CN120726045BActive Publication Date: 2025-12-05CHINA IPPR INT ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511220363.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-12-05
Estimated Expiration
2045-08-28

AI Technical Summary

Technical Problem

The current method of visual inspection of electromechanical equipment relies on manual inspection, which has problems such as untimely inspection, non-standard results, and high costs. This leads to untimely equipment maintenance and may cause safety accidents.

Method used

An improved YOLOv8 model and a safety assessment model are used in conjunction with an automatic data acquisition device to collect and process images of the appearance of electromechanical equipment. The YOLOv8 model generates a set of damage parameters, the safety assessment model is used to evaluate the safety level and trigger alarm information, and an inspection report is generated.

Benefits of technology

It has enabled intelligent and automated inspection of the appearance of electromechanical equipment, improved the accuracy and efficiency of inspection, reduced human error, and ensured the safe operation of equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726045B_ABST
    Figure CN120726045B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electromechanical equipment appearance detection method, system, equipment and storage medium, electromechanical equipment appearance detection method includes the following steps: collecting the appearance image of electromechanical equipment to be detected and pre-processing;YOLOv8 model of improvement is inputted into after pre-processing the appearance image of electromechanical equipment, and the damage parameter set of target damage image is generated, damage parameter set includes type, size and position;Damage parameter set is input into safety evaluation model, and the safety level corresponding to target damage image is generated;According to safety level, corresponding alarm information is triggered and detection report is generated.The application can provide the accuracy and efficiency of electromechanical equipment appearance detection by combining the improved YOLOv8 model efficient image recognition technology and safety evaluation model, reduce the error of human judgment, ensure the safe operation of electromechanical equipment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of equipment appearance detection, and in particular to a mechanical and electrical equipment appearance detection method, system, device and storage medium. BACKGROUND

[0002] Mechanical and electrical equipment appearance inspection is an important daily routine inspection work to ensure the safe operation of mechanical and electrical systems or petrochemical devices, but the existing inspection is generally manual inspection. Manual inspection relies on personal experience, and the inspection results vary from person to person. Moreover, the standardization of the inspection criteria is lacking, the cost is high, and the effect is poor, resulting in many mechanical or process equipment and device inspections being not timely or failing to find problems, leading to untimely equipment maintenance and management and serious production safety accidents. SUMMARY

[0003] In view of the deficiencies in the prior art, the present application provides a mechanical and electrical equipment appearance detection method, which overcomes the defects of existing manual inspection, such as untimely inspection or failure to find abnormalities.

[0004] To achieve the above-mentioned purpose, in one aspect, the present application provides a mechanical and electrical equipment appearance detection method, comprising the following steps: collecting and preprocessing the appearance image of the mechanical and electrical equipment to be detected; inputting the preprocessed appearance image of the mechanical and electrical equipment into an improved YOLOv8 model to generate a damage parameter set of the target damage image, the damage parameter set including type, size and position; inputting the damage parameter set into a safety evaluation model to generate a safety level corresponding to the target damage image; triggering corresponding alarm information and generating a detection report according to the safety level.

[0005] The damage parameter set is inputted into the safety evaluation model to generate a safety level corresponding to the target damage image, which further comprises: extracting a damage degree value of the damage parameter set, analyzing the correlation between the damage degree value and historical damage using the safety evaluation model, and outputting a safety level.

[0006] The safety level includes: a first level, indicating that the damage degree value is less than or equal to a first threshold value; a second level, indicating that the damage degree value is greater than the first threshold value and less than or equal to a second threshold value; a third level, indicating that the damage degree value is greater than the second threshold value and less than or equal to a third threshold value; and a fourth level, indicating that the damage degree value is greater than the third threshold value, the third threshold value being greater than the second threshold value and the second threshold value being greater than the first threshold value, the first threshold value, the second threshold value and the third threshold value being obtained from the historical damage.

[0007] The triggering of corresponding alarm information and the generation of a detection report according to the safety level further include: when the safety level is the first level, no alarm information is triggered; when the safety level is the second level, the alarm information is a periodic inspection signal; when the safety level is the third level, the alarm information is a scheduled maintenance signal; and when the safety level is the fourth level, the alarm information is a shutdown signal.

[0008] The collecting of the appearance image of the electromechanical equipment further includes: collecting the appearance image of the electromechanical equipment by using an automatic collecting device, the automatic collecting device including a track, an automatic moving carrier, a rotating holder, and an image collecting unit, the image collecting unit being connected to the rotating holder, the rotating holder being connected to the automatic moving carrier, the automatic moving carrier moving along the track, and the track being arranged circumferentially around the electromechanical equipment.

[0009] The inputting of the preprocessed appearance image of the electromechanical equipment into the improved YOLOv8 model further includes: training the improved YOLOv8 model, including: obtaining damage images of a plurality of measured electromechanical equipment to construct a first data set, labeling the first data set with a damage parameter set, the types including cracks, scratches, corrosion, water leakage, oil leakage, and pits; performing data enhancement processing on the labeled first data set to generate a second data set, the data enhancement processing including rotation, flipping, scaling, or cropping; dividing the second data set into a training set and a validation set, training the improved YOLOv8 model using the training set, and evaluating the trained improved YOLOv8 model using the validation set.

[0010] The training of the improved YOLOv8 model using the training set further includes the following steps: inputting the training set into the improved YOLOv8 model, optimizing the network parameters of the improved YOLOv8 model by combining a direction propagation algorithm with a compound loss function; updating the network parameter weights of the improved YOLOv8 model based on the gradient descent of the direction propagation algorithm, and simultaneously optimizing the position error, confidence error, and classification error of the compound loss function; using the validation set to monitor the training process; and the compound loss function including a position precision loss, a confidence loss, and a classification loss.

[0011] The improved YOLOv8 model includes: replacing the Bottleneck structure inside the C2f module in the YOLOv8 model backbone network with a FasterNet Block, retaining the branch fusion structure of the C2f module, and generating a C2f-Faster module; and increasing the number of FasterNet Blocks in the C2f-Faster module at the 3rd and 4th layers of the YOLOv8 model backbone network.

[0012] The improved YOLOv8 model further comprises: embedding a hybrid attention mechanism HMA at the output end of each C2f-Faster module and the feature fusion node of the neck network of the YOLOv8 model; the hybrid attention mechanism HMA comprises a channel attention module, a spatial attention module and a direction attention module connected in sequence.

[0013] The improved YOLOv8 model further comprises: adding a multi-scale feature enhancement module and a cross-scale feature interaction mechanism to the original feature pyramid network FPN and path aggregation network PAN respectively, comprising: inserting an enhancement module into each of the three feature layers P3, P4 and P5 of the feature pyramid network FPN, and using three different sizes of convolution kernels to extract features for each feature layer; on the basis of the high-resolution to low-resolution transmission of the path aggregation network PAN, a reverse connection from low resolution to high resolution is added, semantic information is injected into the detail features through the jump connection, and the weights are dynamically allocated according to the damage scale corresponding to the plurality of feature layers.

[0014] The improved YOLOv8 model further comprises: introducing an adaptive feature pyramid network AFPN and adding a stride 4 small target detection layer.

[0015] The triggering of the corresponding alarm information and the generation of the detection report according to the safety level further comprises: building an early warning platform based on PyQt, and the early warning platform performs different operations according to the safety level: when the safety level is the first level and the second level, a yellow prompt text is displayed in the interface display bar and a new entry is added to the early warning list; when the safety level is the third level, a modal dialog box is popped up with a prompt sound, and QDesktopServices is automatically called to open the mechanical and electrical equipment location map; when the safety level is the fourth level, in addition to the operation when the safety level is the third level, an email client is called through QProcess to send an emergency email; and the detection report comprises a number, a generation time, a detection period, a detection personnel, equipment basic information and a detection overview.

[0016] In another aspect, the present application also provides a mechanical and electrical equipment appearance detection system adopting the mechanical and electrical equipment appearance detection method described above, comprising: a collection module for collecting and preprocessing the appearance image of the mechanical and electrical equipment to be detected; a first processing module for inputting the preprocessed appearance image of the mechanical and electrical equipment into the improved YOLOv8 model to generate a damage parameter set of the target damage image, the damage parameter set comprising type, size and position; a second processing module for inputting the damage parameter set into a safety evaluation model to generate a safety level corresponding to the target damage image; and a feedback module for triggering corresponding alarm information and generating a detection report according to the safety level.

[0017] In another aspect, the present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the electromechanical equipment appearance detection method as described above.

[0018] In another aspect, the present application also provides a computer readable storage medium for storing a computer program; the computer program is executed by a processor to implement the electromechanical equipment appearance detection method as described above

[0019] From the above scheme, the advantages of the present application are:

[0020] The present application provides an intelligent and automated electromechanical equipment appearance detection solution by combining the improved YOLOv8 model efficient image recognition technology and safety evaluation model, which can greatly improve the accuracy and efficiency of electromechanical equipment appearance detection, reduce human judgment errors, and ensure the safe operation of the equipment. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 is a flowchart of the electromechanical equipment appearance detection method of the present application;

[0022] Figure 2A is a top view of the automatic acquisition device of the present application;

[0023] Figure 2B is a front view of the automatic acquisition device of the present application;

[0024] Figure 3 is Figure 1 is a flowchart of step S20 in the present application;

[0025] Figure 4 is Figure 3 is a flowchart of step S202 in the present application;

[0026] Figure 5 is Figure 1 is a flowchart of step S30 in the present application;

[0027] Figure 6 is Figure 1 is a flowchart of step S40 in the present application;

[0028] Figure 7 is a structural diagram of the early warning platform of the present application;

[0029] Figure 8 is a structural diagram of the electromechanical equipment appearance detection system of the present application;

[0030] Figure 9 is a structural diagram of the electronic device of the present application;

[0031] Among them, the reference signs

[0032] 1 - automatic acquisition device;

[0033] 10 - track;

[0034] 11 - automatically moving carrier;

[0035] 12 - rotating holder;

[0036] 13 - image acquisition unit;

[0037] 2 - electromechanical device;

[0038] 3 - electromechanical device appearance detection system;

[0039] 30 - acquisition module;

[0040] 31 - first processing module;

[0041] 32 - second processing module;

[0042] 33 - feedback module;

[0043] 4 - electronic device;

[0044] 40 - processor;

[0045] 41 - memory;

[0046] 410 - computer program;

[0047] S10~S40, S200~S202, S2020~S2022, S300~S302, S400~S402. DETAILED DESCRIPTION

[0048] The technical solutions of the present application will be described in detail below in combination with the drawings and specific embodiments, so as to further understand the purposes, solutions and effects of the present application, but not as a limitation on the protection scope of the appended claims of the present application.

[0049] The description of "embodiment", "another embodiment", "the embodiment" and the like in the specification means that the described embodiment can include specific features, structures or characteristics, but not every embodiment must include these specific features, structures or characteristics. In addition, such expressions do not mean the same embodiment. Further, when a specific feature, structure or characteristic is described in combination with an embodiment, it is shown that such feature, structure or characteristic is combined into other embodiments within the knowledge of those skilled in the art, whether or not it is explicitly described.

[0050] Certain terminology can also be used in the description for the purpose of reference only, and thus is not intended to be limiting. For example, terms such as "upper", "lower", "left", "right", "front", "back", "rear", "right", "left", "up", "down", "top", "bottom", "forward", "reverse", "clockwise", "counter clockwise", "one", "another", "this", and "that", are not intended to be synonyms for one another. Language should be interpreted as used by those having ordinary skill in the art and is intended to be flexible and accordingly open to change in meaning and interpretation as those having ordinary skill in the art would determine.

[0051] It should be noted that, in the description of the present application, the terms "circumferential", "upper", "lower", "left", "right", and "about" or "approximately" and the like indicate the orientation or positional relationship or parameters and the like based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description content, and do not indicate or imply that the devices or elements referred to must have a particular orientation, a particular size or be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.

[0052] Figure 1 A flowchart of a mechanical and electrical equipment appearance detection method is provided for an embodiment of the present application. The mechanical and electrical equipment appearance detection method comprises:

[0053] S10: Collecting the mechanical and electrical equipment appearance image to be detected and performing preprocessing;

[0054] S20: Inputting the preprocessed mechanical and electrical equipment appearance image into the improved YOLOv8 model to generate a damage parameter set of the target damage image;

[0055] S30: Inputting the damage parameter set into the safety evaluation model to generate a safety level corresponding to the target damage image;

[0056] S40: Triggering corresponding alarm information and generating a detection report according to the safety level.

[0057] In step S10,

[0058] The mechanical and electrical equipment appearance image is collected by an automatic collection device. The automatic collection device comprises a track, an automatic moving carrier, a rotating holder and an image collection unit. The image collection unit is connected to the rotating holder, the rotating holder is connected to the automatic moving carrier, the automatic moving carrier moves along the track, and the track is arranged circumferentially around the mechanical and electrical equipment.

[0059] Specifically, as Figure 2A and Figure 2BAs shown, the automatic acquisition device 1 comprises a track 10, an automatic moving carrier 11, a rotating holder 12 and an image acquisition unit 13, the track 10 is circumferentially arranged around the electromechanical equipment 2, the automatic moving carrier 11 (for example, a track trolley) moves circumferentially along the track 10, the rotating holder 12 with up-down and left-right telescopic function is arranged on the automatic moving carrier 11, the rotating holder 12 is for example a three-dimensional holder or a spherical holder with telescopic mechanism, the rotating holder 12 carries the image acquisition unit 13, and the image acquisition unit 13 is for example a double-lens variable-focus camera or a video camera.

[0060] The automatic moving carrier 11 and the image acquisition unit 13 in the automatic acquisition device 1 can periodically or continuously shoot appearance images of the electromechanical equipment 2. Due to factors such as light, angle and noise in the environment, the appearance images collected may have certain quality problems, and therefore, the appearance images need to be preprocessed such as denoising and contrast enhancement, so as to improve the detection capability of the YOLOv8 model on slight damages such as cracks and scratches. The denoising may for example adopt traditional filtering methods such as Gaussian filtering, median filtering and bilateral filtering, or modern adaptive denoising methods such as non-local mean denoising (NLM) and BM3D (Block-Matching 3D), etc.; the contrast enhancement may for example adopt global contrast adjustment methods such as histogram equalization and Gamma correction, or local contrast enhancement methods such as multi-scale Retinex color restoration and Unsharp Masking, or deep learning-based enhancement methods, etc., which are not limited by the present application.

[0061] In step S20, as shown in Figure 3 Step S20 further comprises:

[0062] Data labeling step S200: acquiring damage images of a plurality of measured electromechanical equipment to construct a first data set, and labeling the first data set to contain damage data set;

[0063] Data processing step S201: performing data enhancement processing on the labeled first data set to generate a second data set;

[0064] Model training step S202: dividing the second data set into a training set and a validation set, training the improved YOLOv8 model by using the training set, and evaluating the trained improved YOLOv8 model by using the validation set.

[0065] Specifically, the damage parameter set includes type, size and location, and the type includes six types of damage, i.e., crack, scratch, corrosion, water leakage, oil seepage and pit. After the data (i.e., the first data set) is labeled, the image data will be used to train the improved YOLOv8 model. In the model training stage, data enhancement needs to be performed first to improve the robustness and generalization ability of the model. The data enhancement methods include rotation, flipping, scaling or cropping, etc. These operations can simulate the changes of the device image in the actual environment, so that the model can learn more device appearance features. The enhanced data set (i.e., the second data set) will be divided into a training set and a validation set, wherein the training set is used to train the improved YOLOv8 model, and the validation set is used to evaluate the performance of the improved YOLOv8 model to ensure that overfitting does not occur during the training process.

[0066] The data set and the experimental environment are, for example:

[0067] In view of the fact that there is less appearance data of existing mechanical and electrical equipment, the present application uses a public data set to combine and collect the required picture data from the network, and then uses the Labelimg tool to label, and then processes and enhances the data to make a data set named MechVision.

[0068] The damage types and the number of data after enhancement are shown in Table 1:

[0069] Table 1 Damage types and number

[0070]

[0071] The label types used for the appearance damage of the mechanical and electrical equipment are divided into the above six types, which are more common in the normal operation of the mechanical and electrical equipment. And the training set, the test set and the validation set are divided according to the ratio of 7:2:1 to achieve good detection performance.

[0072] All experiments in the present application are performed in the host environment shown in Table 2.

[0073] Table 2 Experimental training environment

[0074]

[0075] The training parameter settings are as follows: the optimizer is selected as SGD (Stochastic Gradient Descent), the momentum parameter is 0.937, the initial learning rate is set to 0.001, the epochs are 200, the batcsiz is 32, the close_mosaic is 0, and the workers are 8.

[0076] As shown in Figure 4 , the model training step S202 further includes:

[0077] Feature learning step S2020: input the training set into the improved YOLOv8 model, and optimize the network parameters of the improved YOLOv8 model through the direction propagation algorithm combined with the composite loss function;

[0078] Parameter optimization step S2021: update the network parameter weights of the improved YOLOv8 model based on the gradient descent of the direction propagation algorithm, and simultaneously optimize the position error, confidence error and classification error of the composite loss function;

[0079] Overfitting prevention step S2022: use an independent validation set to monitor the training process, and when the performance of the validation set is detected to decrease, automatically trigger an early stopping mechanism or dynamically adjust the regularization strength.

[0080] Specifically, by inputting the labeled data into the improved YOLOv8 model, the improved YOLOv8 model will learn how to extract the damage parameter set from the mechanical and electrical equipment appearance image, and then judge whether the mechanical and electrical equipment in the appearance image has an abnormality. During the training process, the improved YOLOv8 model uses a convolutional neural network to extract features of the damage parameter set from the appearance image, and optimizes the parameters of the YOLOv8 model through a back propagation algorithm, so that the YOLOv8 model gradually improves the detection ability of the mechanical and electrical equipment abnormalities. During the training process, the composite loss function optimizes the errors in the three aspects of position accuracy, confidence and type, to ensure that the YOLOv8 model can accurately predict the position and type of the target at the same time.

[0081] The improved YOLOv8 model includes:

[0082] 1. Main network enhancement based on FasterNet Block

[0083] (1) Replace Bottleneck in C2f module: replace the Bottleneck structure in all C2f modules in the YOLOv8n backbone network with FasterNet Block. Reduce redundant calculations through "partial convolution" and "channel shuffle". Partial convolution refers to performing depthwise convolution on only 1 / 2 of the input features, and directly retaining the remaining channels, which reduces the amount of calculation while preserving the original feature details; channel shuffle is to shuffle and reorganize the channels after convolution, enhancing cross-channel information interaction and avoiding feature fragmentation caused by "partial convolution".

[0084] (2). Retain the cross-stage connection structure of C2f, name the improved module as "C2f-Faster", and still maintain the "branch-fusion" logic of the original C2f (divide the input features into two parts, one part is directly transmitted, and the other part is processed by multiple FasterNet Blocks and then fused with the former), to ensure the integrity of feature transmission, while reducing the overall delay through the efficient calculation of FasterNet Block.

[0085] (3). Adjustment of the backbone network level: According to the characteristics of mechanical and electrical equipment damage mainly in small and medium scales, one FasterNet Block is added to the 3rd and 4th layers of the backbone network (corresponding to the C3 and C4 modules of the original YOLOv8n), which strengthens the feature extraction of 32x32~64x64 pixel size damage (such damage is mostly scratches and small area rust).

[0086] 2. Hybrid attention mechanism (HMA) that integrates multi-dimensional information

[0087] Enhance the network's attention to damaged areas and suppress the interference of complex backgrounds (such as device surface texture, reflection, and oil stains), especially improve the recognition ability of low-contrast damage (such as shallow scratches and slight depressions).

[0088] (1). Channel attention: Global Average Pooling is performed on the input feature map to obtain statistical information in the channel dimension; two layers of 1x1 convolution (with SiLU activation in between) are used to compress-expand (compression rate is 1 / 4) the statistical information to generate channel weights; multiply the weights with the original feature map to strengthen important channel features.

[0089] (2). Spatial attention: Calculate the "channel mean" and "channel maximum" of the feature map processed by channel attention to obtain two single-channel feature maps; concatenate them and pass them through a 3x3 convolution (Sigmoid activation) to generate spatial weights; multiply the weights with the feature map to enhance the spatial response of the damaged area.

[0090] (3). Directional attention: compress the channels of the feature map processed by spatial attention using 1x1 convolution (compression rate 1 / 4); use 4 groups of direction-specific convolution kernels (horizontal, vertical, 45°, 135°) for deep convolution (Groups equal to the number of compressed channels), to extract edge features in different directions; restore the number of channels through 1x1 convolution and generate direction weights through Sigmoid; multiply the weights with the feature map to strengthen the directional feature response of the damage.

[0091] The three attention modules are cascaded in the order of "channel → space → orientation", and feature loss is ultimately avoided through residual connections (input features + attention-processed features). HMA is inserted into the output of each C2f-Faster module and at the feature fusion node of the neck network.

[0092] 3. Multi-scale feature-enhanced neck network (FPN+PAN improvement)

[0093] Based on the existing FPN (Feature Pyramid Network) + PAN (Path Aggregation Network) in YOLOv8n, a "Multi-Scale Enhancer" and a "Cross-Scale Feature Interaction Mechanism" are added:

[0094] (1) Multi-scale feature enhancement module: An enhancement module is inserted into each of the three feature layers of FPN (corresponding to 8×8, 16×16, and 32×32 strides, i.e., large, medium, and small scale features, respectively). For each feature layer, three different sizes of convolution kernels (3×3, 5×5, and 7×7) are used in parallel to extract features: 3×3 convolution: captures the details of small-scale damage (such as scratches); 5×5 convolution: captures the overall outline of medium-scale damage (such as missing screws); 7×7 convolution: captures the contextual information of large-scale damage (such as dents).

[0095] The original features are concatenated with the results of three convolutions, and then compressed through a 1×1 convolution to enhance the multi-scale representation of the features.

[0096] (2). Cross-scale feature interaction mechanism: In the uplink path of PAN, a "bidirectional feature fusion" is added: In addition to the original "high-resolution feature → low-resolution feature" transmission, a feedback connection of "low-resolution feature (including semantic information) → high-resolution feature (including detail information)" is added. Semantic information is injected into detail features through skip connections to improve the classification accuracy of small damages. "Weighted fusion" is used at each interaction node: According to the damage scale corresponding to the feature layer (e.g., 8×8 stride corresponds to large damage), weights are assigned to features from different sources (semantic features have higher weights) to avoid feature conflicts.

[0097] 4. Introduce an Adaptive Feature Pyramid Network (AFPN) and add a dedicated small target detection layer to extend the detection coverage of small damage from 64×64 pixels to 16×16 pixels.

[0098] (1). For the characteristics of low pixel ratio, weak feature signal and scattered spatial distribution of small damage (such as 0.5-3mm scratch, 1-2mm diameter rust spot, etc.) on the appearance of electromechanical equipment, the original YOLOv8n can only detect targets through 8x8, 16x16, 32x32 three stride detection layers, and the minimum receptive field is 64x64 pixels, which cannot fully cover the small damage feature scale, resulting in high small target missing detection rate. This improvement introduces the adaptive feature pyramid network (AFPN) and increases the small target detection layer, which covers the small damage detection range from 64x64 pixels to 16x16 pixels, aiming to reduce the small target missing detection rate.

[0099] (2).AFPN, as a feature fusion structure upgraded on the basis of traditional FPN, has the core innovation of dynamically adjusting feature fusion weights and enhancing cross-scale semantic transmission, which can perfectly adapt to the needs of small target detection. Among them, dynamic weight fusion assigns dynamic weights to each feature layer through attention mechanism, automatically increases the weight of high-resolution features (containing detailed information) and reduces the weight of low-resolution features (easy to lose small target information) in small target detection related feature layers, ensuring that small damage and subtle features are not diluted; cross-scale semantic enhancement increases semantic injection modules when transmitting features through the "top-down" and "bottom-up" dual paths, and the high-level features (containing rich semantic information) are compressed through 1×1 convolution and injected into low-level high-resolution features (containing detailed information), solving the classification error problem caused by small targets "having details but no semantics"; multi-path feature interaction designs an additional shortcut path for small target features, directly transmitting shallow high-resolution features in the backbone network to the detection layer, reducing the loss of small target features in multiple convolutions. In terms of small target detection layer design and integration, based on the original YOLOv8n three detection layers (corresponding to strides 8, 16, and 32), a new small target detection layer with stride 4 is added, with an input feature map size of 160×160 (obtained by downsampling the 320×320 feature map at the P2 stage of the backbone network by 1 time 2×2 convolution), and a receptive field of 32×32 pixels (corresponding to a 32×32 pixel region in the input image, which covers small-scale damage of 1-3mm), and three groups of small-size anchor boxes (8,12), (12,8), (10,10) (width×height, unit: feature map pixels) are designed to adapt to small-scale damage of different shapes. The new small target detection layer is deeply fused with other feature layers through AFPN, and the process is as follows: 320×320 feature maps are obtained from the P2 stage of the backbone network, and the channels are compressed to 256 through 1×1 convolution; the 160×160 feature maps at the P3 stage are upsampled to 320×320, and the P2 feature maps are fused through the dynamic weight module of AFPN (the weight of high-resolution features is set to 0.7, and the weight of semantic features is set to 0.3); the fused features are processed through 3×3 convolution (group number = 16) and HMA attention module to generate 160×160 small target dedicated feature maps; the feature maps are sent to the newly added stride 4 detection head to output the bounding box, confidence, and class prediction of small targets.Meanwhile, the stride 4 detection head is designed with targeted optimization, containing only 2 layers of 3x3 convolution to avoid excessive compression of small target features, increasing the number of intermediate layer channels from 256 to 384 to enhance the ability to capture weak features, and introducing a 3x3 convolution kernel with edge detection bias (obtained by pre-training on small damage samples) to preferentially extract edge features of small damage.

[0100] (3) To achieve cooperation with other modules, the newly added stride 4 detection layer is additionally added with 1 FasterNet Block in the C2f-Faster module at the P2 stage, strengthening the extraction of small size damage original features; before the small target feature map enters the detection head, the HMA module focuses on enhancing the weights of spatial attention and directional attention (spatial attention weight is increased to 0.4, directional attention weight is increased to 0.3) to more accurately locate the position and edge direction of small damage; in the inference stage, the output results of the four detection layers (stride 4, 8, 16, 32) are fused through adaptive NMS, and the NMS threshold is reduced from 0.6 to 0.3 for small targets (area < 32x32 pixels) detected by stride 4, while the original threshold is maintained for large targets, balancing detection efficiency.

[0101] (4) In terms of loss function, small target adaptation adjustment is made: on the basis of CIoU loss, area adaptive weight is introduced, and for small targets with ground truth area < 32x32 pixels, the positioning loss weight is set to 3.0 (regular target is 1.0); focal loss is used instead of traditional BCE loss, by adjusting the focus parameter (γ=2.0) to reduce the weight of easy-to-classify samples and focus on difficult-to-classify small target samples; a new edge consistency loss is added, which calculates the Euclidean distance between the predicted frame edge and the real frame edge, and applies an additional penalty (weight = 0.2) to the edge shift of small targets, and the total loss formula is total loss = 0.3x classification loss + 0.5x weighted CIoU loss + 0.2x edge consistency loss.

[0102] Through the above improvements, the number of detection layers increases from 3 to 4, and the minimum receptive field decreases from 64x64 pixels to 32x32 pixels, covering more than 95% of the small damage scales of mechanical and electrical equipment, and the small target miss detection rate is expected to decrease from 35% to less than 12%, with a positioning error reduction of 40%, meeting the millimeter-level precision requirements of industrial detection and fundamentally solving the problem of "not visible and inaccurate positioning" of small targets. The improved YOLOv8 model will distinguish the normal state and damage state of mechanical and electrical equipment by learning the following types of visual features:

[0103] Crack: an elongated, linear structure, usually presenting an irregular shape, with a dark or light color (i.e., presenting a dark or light pixel distribution);

[0104] Scratch: a linear or curved mark with a significant contrast with the background, having a directional gradient characteristic;

[0105] Leakage: an abnormal light-reflecting water stain or wet area, accompanied by local texture smoothing;

[0106] Oil seepage: dark (usually black-brown, dark brown) oil stain patches appear on the surface of the equipment, accompanied by abnormal enhancement of local area gloss (mirror reflection formed by grease adhesion);

[0107] Pit: local concave, surface defect, forming a shadow and geometric deformation;

[0108] Corrosion: oxidation, discoloration or irregular patchy color difference on the surface of the metal.

[0109] Finally, through this series of training, the improved YOLOv8 model will be able to detect six types of damage (cracks, scratches, leaks, oil seepage, pits, and corrosion) in the appearance images of the mechanical and electrical equipment to be detected in real time, as well as the location and pixel-level size of each type of damage. The pixel-level size can be converted into physical size by combining the camera or video camera calibration parameters, thereby providing an automated and intelligent analysis tool for the appearance inspection of mechanical and electrical equipment. After a large amount of data training, the improved YOLOv8 model not only has high detection accuracy, but also can cope with different environments, lighting and shooting angles, significantly improving the efficiency and accuracy of equipment inspection.

[0110] In step S30, according to the type, size and location of the target damage image output by the improved YOLOv8 model, the safety evaluation model is used to further evaluate the safety level of the appearance image of the mechanical and electrical equipment combined with historical data.

[0111] As shown in Figure 5 , step S30 further comprises:

[0112] S300: extracting the damage degree value of the damage parameter set,

[0113] S301: analyzing the correlation between the damage degree value and the historical damage using the safety evaluation model, and outputting the safety level.

[0114] The safety level includes: a first level indicating that the damage degree value is less than or equal to a first threshold value; a second level indicating that the damage degree value is greater than the first threshold value and less than or equal to a second threshold value; a third level indicating that the damage degree value is greater than the second threshold value and less than or equal to a third threshold value; and a fourth level indicating that the damage degree value is greater than the third threshold value, the third threshold value being greater than the second threshold value and the second threshold value being greater than the first threshold value, the first threshold value, the second threshold value and the third threshold value being obtained from historical damage.

[0115] Specifically, first, the first threshold value, the second threshold value and the third threshold value are set according to historical damage, and damage degree values of six types of damage, i.e., cracks, scratches, corrosion, water leakage, oil seepage and pits, are extracted. According to the mechanical and electrical equipment operation safety standard and historical damage data, the damage degree value calculation method for the six typical damage types is as follows: the longest axis length of the crack is taken as the damage degree value (unit: mm), accurate to 0.1 mm; the number of scratches per unit area is taken as the damage degree value (unit: strip / cm²), the statistical area is the damage concentration area, and accurate to 0.1 strip / cm²; the percentage of the corrosion area to the total surface area of the mechanical and electrical equipment is taken as the damage degree value (unit: %), accurate to 0.1%; the maximum projection area of the water leakage trace is taken as the damage degree value (unit: cm²), accurate to 0.1 cm²; the maximum projection area of the oil seepage trace is taken as the damage degree value (unit: cm²), accurate to 0.1 cm²; and the vertical distance between the deepest point of the pit and the surface of the equipment is taken as the damage degree value (unit: mm), accurate to 0.01 mm.

[0116] Examples are as follows:

[0117] The first level is slight damage, which does not affect the normal operation of the equipment and satisfies any one of the following conditions: the crack length is less than or equal to a fourth threshold value, for example, 2 mm, indicating that the equipment surface has microcracks without expansion trend; the scratch density is less than or equal to a fifth threshold value, for example, 1.5 strips / cm 2 , indicating that the equipment has scattered shallow scratches with a depth of <0.1 mm; the corrosion area is less than or equal to a sixth threshold value, for example, 2% of the total area of the mechanical and electrical equipment, indicating that the equipment has local pitting without obvious metal matrix exposure; the water leakage area is less than or equal to a seventh threshold value, for example, 0 cm 2 , indicating that the equipment has no visible water stains or leakage traces; the oil seepage area is less than or equal to an eighth threshold value, for example, 0 cm², indicating that the equipment has no visible oil stains or leakage traces; and the pit depth is less than or equal to a ninth threshold value, for example, 0.3 mm, indicating that the equipment surface has slight pits without affecting the structural strength.

[0118] The second level is light damage, which needs to be strengthened monitoring, and meets any one of the following conditions: the fourth threshold < crack length ≦ the tenth threshold, the tenth threshold is, for example, 5 mm, indicating that the equipment has a short straight crack that does not extend to the key parts; the fifth threshold < scratch density ≦ the eleventh threshold, the eleventh threshold is, for example, 3 / cm 2 , indicating that the equipment has local concentrated scratches with a depth of 0.1-0.3 mm; the sixth threshold < corrosion area ≦ the twelfth threshold, the twelfth threshold is, for example, 5% of the total area of the electromechanical equipment, indicating that the equipment has local corrosion spots, and the metal substrate is slightly exposed but not thinned; the seventh threshold < water leakage area ≦ the thirteenth threshold, the thirteenth threshold is, for example, 3 cm 2 , indicating that the equipment has slight water leakage, only forming water stains with a diameter < 2 cm; the eighth threshold < oil seepage area ≦ the fourteenth threshold, the fourteenth threshold is, for example, 3.0 cm², indicating that the equipment has slight oil seepage, only forming oil stains with a diameter < 2 cm; the ninth threshold < pit depth ≦ the fifteenth threshold, the fifteenth threshold is, for example, 0.8 mm, indicating that the equipment has a shallow pit with a diameter < 2 mm, and there is no risk of stress concentration.

[0119] The third level is moderate damage, which needs to be repaired in time, and meets any one of the following conditions: the tenth threshold < crack length ≦ the sixteenth threshold, the sixteenth threshold is, for example, 15% of the thickness of the electromechanical equipment (i.e. the actual arm thickness of the equipment) (for example, when the actual wall thickness is 10 mm, the sixteenth threshold is 1.5 mm), indicating that the crack extends to the non-key stress area and has signs of slow expansion; the eleventh threshold < scratch density ≦ the seventeenth threshold, the seventeenth threshold is, for example, 6 / cm 2 , indicating that the equipment has dense scratches with a depth of 0.3-0.5 mm, which may affect the surface protective layer; the twelfth threshold < corrosion area ≦ the eighteenth threshold, the eighteenth threshold is, for example, 10% of the total area of the electromechanical equipment, indicating that the equipment has regional corrosion, and the metal substrate is significantly thinned but does not exceed the design allowable value; the thirteenth threshold < water leakage area ≦ the nineteenth threshold, the nineteenth threshold is, for example, 8 cm 2 , indicating that the equipment has persistent water leakage, forming a wet area with a diameter of 2-5 cm, which does not affect the electrical components; the fourteenth threshold < oil seepage area ≦ the twentieth threshold, the twentieth threshold is, for example, 8 cm 2 , indicating that the equipment has persistent oil seepage, forming a wet area with a diameter of 2-5 cm, which does not affect the electrical components; the fifteenth threshold < pit depth ≦ the twenty-first threshold, the twenty-first threshold is, for example, 1.5 mm, indicating that the equipment has a deeper pit with a diameter of 2-5 mm, and there is local stress concentration; the key parts (such as sealing surfaces, bearing seats, electrical insulation areas, contact surfaces of moving pairs, and cooling flow channels, etc.) damage reaches the second level standard.

[0120] The fourth grade is a serious damage, which needs emergency treatment, and meets any one of the following conditions: the crack length is greater than the sixteenth threshold value, indicating that the crack penetrates or approaches to penetrate the wall thickness, and there is a risk of structural failure; the scratch density is greater than the seventeenth threshold value, indicating that the equipment has a large area of dense scratches, the depth is greater than 0.5 mm, and the substrate is exposed or the fitting precision is affected; the corrosion area is greater than the eighteenth threshold value, indicating that the equipment has a large area of corrosion, and the metal substrate thickness loss is more than 10% of the design value; the water leakage area is greater than the nineteenth threshold value, indicating that the equipment has serious water leakage, and a water accumulation area with a diameter greater than 5 cm is formed, which has spread to electrical or moving parts; the oil seepage area is greater than the twentieth threshold value, indicating that the equipment has serious oil seepage, and an oil surface area with a diameter greater than 5 cm is formed, which has spread to electrical or moving parts; the pit depth is greater than the twenty-first threshold value, indicating that the equipment has a deep pit with a diameter greater than 5 mm or is located in a stress concentration area; there is a combined damage mode, such as "crack + corrosion", "water leakage + electrical component damage", and the like.

[0121] The threshold value setting is as follows: the key threshold value is related to the equipment itself parameter (such as the crack length is related to the wall thickness), which avoids the applicability problem caused by the uniform value; the upper limit value of each grade is lower than the critical value of the industry safety standard (such as the corrosion area is 10% lower than the 15% early warning value in GB / T 18590); all threshold values have reasonable precision, which is convenient for direct measurement by field detection tools (such as vernier caliper, coating thickness gauge); it is clear that the "combined damage" needs to meet the safety grade of two or more damage types reaching the third grade and above, which avoids excessive judgment.

[0122] The severity of the appearance damage of the electromechanical equipment is evaluated by a safety evaluation model (such as a neural network model). In other embodiments, the safety grade is, for example, "normal", "mild danger", "moderate danger" and "severe danger", and is as follows: normal: the equipment has no significant damage and continues to run; mild danger: the equipment has slight cracks, scratches or corrosion and needs to be checked regularly; moderate danger: the equipment has large cracks or corrosion and needs to be arranged for maintenance; severe danger: the equipment has verified damage and needs to be immediately shut down for maintenance to avoid safety accidents.

[0123] In step S40, as shown in Figure 6 , it further includes:

[0124] S400: when the safety grade is the first grade, no alarm information is triggered;

[0125] S401: when the safety grade is the second grade, the alarm information is a regular check signal;

[0126] S402: when the safety grade is the third grade, the alarm information is an arrangement for maintenance signal;

[0127] S403: when the safety grade is the fourth grade, the alarm information is a shutdown signal.

[0128] Specifically, when the safety level is the first level, it indicates that the equipment has no significant damage and continues to run; when the safety level is the second level, it indicates that the equipment has slight cracks, scratches or corrosion and needs to be checked regularly; when the safety level is the third level, it indicates that the equipment has large cracks or corrosion and needs to be arranged for maintenance; and when the safety level is the fourth level, it indicates that the equipment has verified damage and needs to be immediately shut down for maintenance to avoid safety accidents.

[0129] Once the abnormality of the appearance of the equipment is detected, the early warning mechanism is automatically triggered, and alarm information is sent to the equipment maintenance personnel in real time, so that the failure of the equipment can be found and handled in the shortest time. The appearance detection method of the electromechanical equipment can also automatically generate a detection report to help decision makers evaluate the long-term running condition of the equipment.

[0130] Specifically, the early warning platform built based on PyQt in the present application is as follows: Figure 7As shown, the early warning platform can take full advantage of its graphical interface development advantages to realize lightweight, localized mechanical and electrical equipment appearance detection and early warning functions. The main interface uses the QMainWindow framework of PyQt, with a device list tree (QTreeWidget) on the left side, displaying a three-level structure of factory, workshop, and equipment, supporting right-click selection of "start monitoring"; the middle area is a real-time video stream window (QGraphicsView), which reads industrial camera pictures through OpenCV and embeds them into the interface. After each frame of image is inferred by the improved YOLOv8n model, a red rectangular frame is drawn on the picture in real time to mark the abnormal area, and damage parameter text (such as "scratch density: 2.8 lines / cm², grade: second grade") is superimposed beside the frame; the right side is a device status panel (QWidget), which displays the current running parameters (detection frame rate) and the latest detection result summary of the device using QLabel. When the improved YOLOv8 model detects equipment abnormalities, the early warning platform triggers the early warning mechanism through QTimer, and according to the damage level (i.e. safety level), the following operations are performed: for the first and second levels, display yellow prompt text in the interface status bar (QStatusBar), and add a new entry in the early warning list (QListWidget); for the third level, a modal dialog box (QMessageBox) is popped up with a system prompt sound (QSound), and PyQt's QDesktopServices is automatically called to open the device location map; for the fourth level, in addition to the above operations, PyQt's QProcess is used to call the system email client to send an emergency email (containing damage image attachments). The platform has a built-in SQLite database (connected through PyQt's QSqlDatabase), which automatically stores the abnormal records of each detection, including timestamp, device ID, damage type, level, and other information. Maintenance personnel can fill in the processing results through the "maintenance record" sub-window (QDialog), input text descriptions with QTextEdit, upload processed photos through QFileDialog, and write data into the database through QSqlQuery to form a closed-loop management.

[0131] The detection report needs to fully reflect the appearance state of the equipment and the detection process. In the detection data of the PyQt-based early warning platform, the detection report should include multiple core contents. The detection report basic information includes report number (automatically generated, in the format of "year-month-day + equipment ID + serial number", such as "20250812-P001-003"), generation time, detection period (such as "August 1, 2025 - August 12, 2025"), detection personnel (operator name logged in the platform), and equipment basic information (name, model, installation location, and cumulative running time). The detection overview statistics are presented in table form, including the total number of detections, the number of abnormal detections, the proportion of each level of damage, the average processing time (calculated based on maintenance records), and the distribution of different types of damage. The abnormal detail list lists each abnormal record in chronological order, and each record includes the abnormal occurrence time (accurate to the minute), the damage location (with a device schematic and a red mark, generated by platform screenshot), the damage parameters (such as "corrosion area: 6.2%, level: third level"), the early warning method, and the processing record (maintenance personnel name, processing measures, and completion time).

[0132] Based on the PyQt platform detection data, the report generation can be achieved in multiple ways. Using PyQt's QTextDocument as a report template carrier, combined with the python-docx library to generate a Word format report. Through deep learning algorithms, the invention not only can judge whether the appearance of the equipment has problems, but also can evaluate the severity of the damage in real time, so as to provide a scientific basis for equipment maintenance and avoid equipment failure and production safety accidents.

[0133] The following is a system embodiment corresponding to the above method embodiment. The present embodiment can be implemented in cooperation with the above-mentioned embodiments. The related technical details mentioned in the above-mentioned embodiments are still valid in the present embodiment. In order to reduce repetition, they will not be repeated here. Correspondingly, the related technical details mentioned in the present embodiment can also be applied in the above-mentioned embodiments.

[0134] As shown in Figure 8 , it is a structural diagram of an electromechanical equipment appearance detection system 3 provided by another embodiment of the present application. The electromechanical equipment appearance detection system 3 comprises:

[0135] The acquisition module 30 is configured to acquire and pre-process the appearance image of the electromechanical equipment 2 to be detected.

[0136] The first processing module 31 is configured to input the pre-processed appearance image of the electromechanical equipment 2 into the improved YOLOv8 model to generate a damage parameter set of the target damage image, wherein the damage parameter set includes type, size and position.

[0137] The second processing module 32 is configured to input the damage parameter set into a safety evaluation model to generate a safety level corresponding to the target damage image.

[0138] The feedback module 33 is configured to trigger corresponding alarm information and generate a detection report according to the safety level.

[0139] In addition, those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the mechanical and electrical equipment appearance detection system 3 can refer to the corresponding process in the foregoing mechanical and electrical equipment appearance detection method embodiments, and will not be described here.

[0140] Figure 9 A structural schematic diagram of an electronic device 4 is provided for another embodiment of the present application. The electronic device 4 can specifically include at least one processor 40 and at least one memory 41. The memory 41 is configured to store a computer program 410, which is loaded and executed by the processor 40 to implement the related steps of the mechanical and electrical equipment appearance detection method disclosed in any of the foregoing embodiments, such as the steps shown in Figure 1 .

[0141] In addition, the memory 41 as a carrier for storing resources can be a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the storage mode can be temporary storage or permanent storage.

[0142] The computer program 410 can further include computer programs capable of completing other specific work in addition to the computer programs capable of completing the mechanical and electrical equipment appearance detection method executed by the electronic device 4 disclosed in any of the foregoing embodiments.

[0143] Another embodiment of the present application further discloses a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are loaded and executed by a processor to implement the steps of the mechanical and electrical equipment appearance detection method disclosed in any of the foregoing embodiments, such as the steps shown in Figure 1 .

[0144] In summary, by combining the improved YOLOv8 model efficient image recognition technology and deep learning algorithm, the present application provides an intelligent and automated mechanical and electrical equipment appearance detection solution, which can greatly improve the accuracy and efficiency of equipment inspection, reduce human judgment errors, and ensure the safe operation of equipment. This application can effectively prevent production safety accidents caused by the fact that equipment appearance problems are not discovered in time, and has important industrial application value.

[0145] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are merely illustrative, but not restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, which all belong to the protection scope of the present application.

Claims

1. A method of detecting the appearance of an electromechanical device, characterized by, The method comprises the following steps: Collecting and preprocessing the appearance image of the electromechanical equipment to be detected; Inputting the preprocessed appearance image of the electromechanical equipment into an improved YOLOv8 model to generate a damage parameter set of the target damage image, wherein the damage parameter set comprises type, size and position; Inputting the damage parameter set into a safety assessment model to generate a safety level corresponding to the target damage image; Triggering corresponding alarm information and generating a detection report according to the safety level; The improved YOLOv8 model comprises: adding a multi-scale feature enhancement module and a cross-scale feature interaction mechanism to the original feature pyramid network (FPN) and path aggregation network (PAN) respectively, which comprises: Inserting an enhancement module into each of the three feature layers P3, P4 and P5 of the feature pyramid network (FPN), and using three different sizes of convolution kernels to extract features for each feature layer; On the basis of the high-resolution-to-low-resolution transmission of the path aggregation network (PAN), a reverse connection from low resolution to high resolution is added, semantic information is injected into the detail features through the jump connection, and the weights are dynamically allocated according to the damage scales of the three feature layers; The improved YOLOv8 model further comprises: introducing an adaptive feature pyramid network (AFPN) and adding a stride 4 small target detection layer.

2. The method of claim 1, wherein The safety level corresponding to the target damage image is generated by inputting the damage parameter set into the safety assessment model, which further comprises: Extracting the damage degree value of the damage parameter set, Using the safety assessment model to analyze the correlation between the damage degree value and the historical damage, and outputting a safety level.

3. The method according to claim 2, wherein The safety level comprises: a first level, indicating that the damage degree value is less than or equal to a first threshold; a second level, indicating that the damage degree value is greater than the first threshold and less than or equal to a second threshold; a third level, indicating that the damage degree value is greater than the second threshold and less than or equal to a third threshold; and a fourth level, indicating that the damage degree value is greater than the third threshold, the third threshold is greater than the second threshold, and the second threshold is greater than the first threshold, and the first threshold, the second threshold and the third threshold are obtained from the historical damage.

4. The method of claim 3, wherein The corresponding alarm information is triggered and the detection report is generated according to the safety level, which further comprises: When the safety level is the first level, no alarm information is triggered; When the safety level is the second level, the alarm information is a periodic inspection signal; When the safety level is the third level, the alarm information is a maintenance arrangement signal; When the safety level is the fourth level, the alarm information is a shutdown signal.

5. The method of claim 1, wherein The appearance image of the electromechanical equipment to be detected is collected by an automatic collection device, which comprises a track, an automatic moving carrier, a rotating holder and an image collection unit, the image collection unit is connected to the rotating holder, the rotating holder is connected to the automatic moving carrier, the automatic moving carrier moves along the track, and the track is arranged circumferentially around the electromechanical equipment. ​ 6. The method of claim 1, wherein The improved YOLOv8 model inputted with the pretreated electromechanical equipment appearance image further comprises: A first data set is constructed by acquiring damage images of a plurality of measured electromechanical equipment, and the first data set is labeled with the damage parameter set, wherein the types include cracks, scratches, corrosion, water leakage, oil leakage and pits; The labeled first data set is subjected to data enhancement processing to generate a second data set, and the data enhancement processing includes rotation, flipping, scaling or cropping; The second data set is divided into a training set and a validation set, the improved YOLOv8 model is trained by using the training set, and the trained improved YOLOv8 model is evaluated by using the validation set.

7. The electro-mechanical device appearance inspection method according to claim 1, wherein The improved YOLOv8 model comprises: The Bottleneck structure inside the C2f module in the YOLOv8 model backbone network is replaced by a FasterNet Block, and the branch fusion structure of the C2f module is retained to generate a C2f-Faster module; The number of FasterNet Blocks is increased in the C2f-Faster module at the 3rd and 4th layers of the YOLOv8 model backbone network.

8. The method according to claim 7, wherein The improved YOLOv8 model further comprises: embedding a hybrid attention mechanism HMA at the output end of each C2f-Faster module and the feature fusion node of the neck network of the YOLOv8 model; the hybrid attention mechanism HMA comprises a channel attention module, a spatial attention module and a direction attention module connected in sequence.

9. The method according to claim 4, wherein The triggering of corresponding alarm information and the generation of a detection report according to the safety level further comprise: An early warning platform is built based on PyQt, and the early warning platform performs different operations according to the safety level: When the safety level is the first level and the second level, a yellow prompt text is displayed in the interface display bar and a new entry is added to the early warning list; When the safety level is the third level, a modal dialog box is popped up with a prompt sound, and QDesktopServices is automatically called to open the electromechanical equipment location map; When the safety level is the fourth level, in addition to the operation when the safety level is the third level, an emergency email is sent by calling the email client through QProcess; The detection report includes number, generation time, detection period, detection personnel, equipment basic information and detection profile.

10. An electro-mechanical device appearance inspection system characterized by comprising: An electromechanical equipment appearance detection method is adopted, comprising: A collection module is used to collect electromechanical equipment appearance images to be detected and perform pretreatment; A first processing module is used to input the pretreated electromechanical equipment appearance image into an improved YOLOv8 model to generate a damage parameter set of a target damage image, wherein the damage parameter set includes type, size and position; A second processing module is used to input the damage parameter set into a safety evaluation model to generate a safety level corresponding to the target damage image; A feedback module is used to trigger corresponding alarm information and generate a detection report according to the safety level.

11. An electronic device, comprising: Comprise: a memory for storing a computer program; a processor for executing the computer program to implement the electromechanical device appearance detection method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, a computer program product for storing a computer program; the computer program is executed by a processor to implement the electromechanical device appearance detection method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Fire detection method fusing YOLOv8 and RT-DETR

    CN117974973A

  • YOLOv8-MSDA network model and conveyor belt damage monitoring method

    CN119337942A