Equipment defect detection method and system based on image recognition

By forming a target defect database and using a support vector machine for training, combining edge detection and mask preprocessing, the problems of light changes and difficulty in extracting defect features are solved, intelligent defect detection of mechanical equipment is realized, and detection accuracy is improved Sex and efficiency.

CN118657764BActive Publication Date: 2024-12-27JIANGSU MAIBO INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411132167.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-27
Estimated Expiration
2044-08-19

AI Technical Summary

Technical Problem

The existing equipment defect detection technology based on image recognition is low in image recognition accuracy due to light changes, and it is difficult to extract defect features of different shapes and sizes, resulting in insufficient model training and difficult to achieve real-time online detection and high-precision defect recognition.

Method used

By analyzing the historical defect detection records of similar equipment of the target mechanical equipment, forming a target defect database, and supervised learning based on the principle of support vector machine, obtaining the target defect discriminator, dynamically obtaining the detection image for edge detection and mask preprocessing, and using The target feature information is collected and compared and analyzed in a different way, and the target block is located and inputted to the discriminator for defect discrimination.

Benefits of technology

It realizes intelligent image recognition and judgment of defects in target mechanical equipment, improves the accuracy and efficiency of defect detection, adapts to different detection environments and conditions, and enhances the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657764B_ABST
    Figure CN118657764B_ABST
Patent Text Reader

Abstract

The present application provides a device defect detection method and system based on image recognition, which relates to the field of image recognition technology. The method includes: establishing a target defect database; obtaining a target defect discriminator; calling a first defect detection strategy to perform edge detection on a target detection image to obtain a first detection result; calling a second defect detection strategy to perform mask preprocessing on the target detection image to obtain a first processing result; obtaining a target image feature parameter set; obtaining a first feature saliency map; locating the target block; inputting the target block feature information of the target block into the target defect discriminator to obtain a target defect discrimination result. The present application can solve the technical problems existing in the prior art of difficulty in real-time online detection and high-precision defect identification under different lighting conditions. The goal of achieving flexibility and refinement of the equipment defect detection process is achieved, and the technical effect of improving the accuracy and efficiency of defect detection and thus improving the reliability of the detection results is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a method and system for detecting equipment defects based on image recognition. Background Art

[0002] In the industrial production process, the condition monitoring and defect detection of mechanical equipment are key links to ensure production efficiency and product quality. Traditional mechanical equipment defect detection mainly relies on manual visual inspection, which is not only time-consuming and labor-intensive, but also easily affected by subjective factors, resulting in missed detection or false detection. With the development of image processing technology and machine learning algorithms, the use of computer vision for automated defect detection has become a trend. Existing automated defect detection technologies mostly rely on deep learning models, which usually require a large amount of labeled data for training. However, for specific mechanical equipment, it is often a challenge to obtain a large amount of image data with defect annotations. In addition, different mechanical equipment may have different defect characteristics, which requires the defect detection system to be customized for specific equipment.

[0003] In summary, when extracting equipment defect features based on image recognition, there are technical problems such as high difficulty in extracting features of various defects and low detection accuracy of defect detection models due to changes in image acquisition illumination. Summary of the invention

[0004] The purpose of this application is to provide a method and system for device defect detection based on image recognition, so as to solve the technical problems that the image recognition accuracy of the prior art device defect detection based on image recognition is affected by changes in lighting, and at the same time, due to the difficulty in extracting defect features of different shapes and sizes, the model training is insufficient, and there are difficulties in real-time online detection and high-precision defect recognition under different lighting conditions.

[0005] In view of the above problems, the present application provides a device defect detection method and system based on image recognition.

[0006] In the first aspect, the present application provides an equipment defect detection method based on image recognition, which is implemented by an equipment defect detection system based on image recognition, wherein the equipment defect detection method based on image recognition includes: analyzing historical defect detection records of similar mechanical equipment of the target mechanical equipment, and establishing a target defect database, wherein the target defect database includes multiple groups of image feature information with identification of defect types; establishing a defect training data set based on the multiple groups of image feature information with identification of defect types, and performing supervised learning on the defect training data set based on the support vector machine principle to obtain a target defect discriminator; dynamically acquiring a target detection image of the target mechanical equipment, and calling a first defect detection strategy to perform Perform edge detection to obtain a first detection result; when the first detection result meets the predetermined edge constraint, call the second defect detection strategy to perform mask preprocessing on the target detection image to obtain a first processing result; read the predetermined image feature, and collect features of the first processing result based on the predetermined image feature to obtain a target image feature parameter set; perform comparative difference analysis on the first feature parameter of the first image feature in the target image feature parameter set to obtain a first feature saliency map; normalize the first feature saliency map to obtain a target feature saliency map of the target detection image, and locate the target block based on the target feature saliency map; input the target block feature information of the target block into the target defect discriminator to obtain a target defect discrimination result of the target mechanical equipment.

[0007] In the second aspect, the present application also provides an equipment defect detection system based on image recognition, which is used to execute the equipment defect detection method based on image recognition as described in the first aspect, wherein the equipment defect detection system based on image recognition includes: a database building module, the database building module is used to analyze the historical defect detection records of similar mechanical equipment of the target mechanical equipment, and build a target defect database, the target defect database includes multiple groups of image feature information with identification of defect types; a discriminator training module, the discriminator training module is used to build a defect training data set according to the multiple groups of image feature information with identification of defect types, and perform supervised learning on the defect training data set based on the support vector machine principle to obtain a target defect discriminator; a first detection module, the first detection module is used to dynamically acquire the target detection image of the target mechanical equipment, and call the first defect detection strategy to perform edge detection on the target detection image to obtain a first detection result; a second detection module block, the second detection module is used to call the second defect detection strategy to perform mask preprocessing on the target detection image when the first detection result meets the predetermined edge constraint to obtain a first processing result; a feature collection module, the feature collection module is used to read the predetermined image feature, and based on the predetermined image feature, perform feature collection on the first processing result to obtain a target image feature parameter set; a significant analysis module, the significant analysis module is used to perform comparative difference analysis on the first feature parameter of the first image feature in the target image feature parameter set to obtain a first feature significant map; a significant positioning module, the significant positioning module is used to normalize the first feature significant map to obtain a target feature significant map of the target detection image, and locate the target block based on the target feature significant map; an intelligent discrimination module, the intelligent discrimination module is used to input the target block feature information of the target block into the target defect discriminator to obtain a target defect discrimination result of the target mechanical equipment.

[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0009] By analyzing the historical defect detection records of similar mechanical equipment of the target mechanical equipment, a target defect database is established, and the target defect database includes multiple groups of image feature information with defect type identification; a defect training data set is established according to the multiple groups of image feature information with defect type identification, and supervised learning is performed on the defect training data set based on the support vector machine principle to obtain a target defect discriminator; a target detection image of the target mechanical equipment is dynamically acquired, and a first defect detection strategy is called to perform edge detection on the target detection image to obtain a first detection result; when the first detection result meets the predetermined edge constraint, a second defect detection strategy is called to perform mask preprocessing on the target detection image to obtain a first processing result; a predetermined image feature is read, and based on the predetermined image feature, feature collection is performed on the first processing result to obtain a target image feature parameter set; a first feature parameter of the first image feature in the target image feature parameter set is compared and analyzed to obtain a first feature saliency map; the first feature saliency map is normalized to obtain a target feature saliency map of the target detection image, and a target block is located based on the target feature saliency map; the target block feature information of the target block is input into the target defect discriminator to obtain a target defect discrimination result of the target mechanical equipment. That is to say, by establishing a target defect database and conducting supervised learning, training a target defect discriminator, and achieving the technical goal of intelligent image recognition and judgment of defects in target mechanical equipment, edge detection analysis is performed on the target detection image of the target mechanical equipment, and on the basis of ensuring that the target mechanical equipment does not have various defects in the uniform defect category, the target detection image is analyzed and judged after mask preprocessing, and the target defect discriminator is used to achieve the goal of automatic judgment of the defect type in the non-uniform defect category of the target mechanical equipment. By performing two-stage defect detection on the dynamically acquired target detection image, the dynamically adjusted detection strategy makes the detection process more flexible and able to adapt to different detection environments and conditions, achieving the goal of flexible and refined equipment defect detection process, and achieving the technical effect of improving the accuracy and efficiency of defect detection, thereby improving the reliability of detection results.

[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented according to the contents of the specification, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are specifically cited below. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0012] Figure 1 This is a flow chart of the device defect detection method based on image recognition in this application;

[0013] Figure 2 This is a schematic diagram of the structure of the device defect detection system based on image recognition in this application.

[0014] Description of reference numerals:

[0015] Database building module 11, discriminator training module 12, first detection module 13, second detection module 14, feature collection module 15, significant analysis module 16, significant positioning module 17, intelligent discrimination module 18. DETAILED DESCRIPTION

[0016] This application provides a method and system for device defect detection based on image recognition, which solves the technical problems that the image recognition accuracy of existing device defect detection based on image recognition is affected by changes in illumination, and the model training is insufficient due to the difficulty in extracting defect features of different shapes and sizes, and there are difficulties in real-time online detection and high-precision defect recognition under different illumination conditions. The goal of making the device defect detection process flexible and refined is achieved, and the technical effect of improving the accuracy and efficiency of defect detection and thus improving the reliability of the detection results is achieved.

[0017] Below, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments of the present application. It should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings, rather than all of them.

[0018] For example, please refer to the attached Figure 1 The present application provides a device defect detection method based on image recognition, wherein the device defect detection method based on image recognition is applied to a device defect detection system based on image recognition, and the device defect detection method based on image recognition specifically comprises the following steps:

[0019] Step 1: Analyze the historical defect detection records of similar mechanical equipment of the target mechanical equipment, and establish a target defect database, wherein the target defect database includes multiple groups of image feature information with identification of defect types.

[0020] Specifically, the historical defect detection records of the target mechanical equipment are analyzed, and a target defect database is established based on these data. This database contains multiple sets of image feature information, each of which corresponds to a specific defect type. Through historical data analysis, potential defects of the target mechanical equipment are predicted and identified, thereby improving the maintenance efficiency and safety of the mechanical equipment.

[0021] First, collect historical defect detection records of similar mechanical equipment of the target mechanical equipment. These records may include images, text descriptions or other relevant data. Next, process and analyze these data to extract image feature information. These feature information can represent the typical characteristics of each defect. Then, classify and identify these feature information according to the defect type to build a target defect database. In addition, in order to improve the accuracy and practicality of the database, the database can be continuously updated and optimized, and new defect types and feature information can be added. Finally, using this database, image recognition technology can be used to detect whether the target mechanical equipment has similar defects.

[0022] Establishing a comprehensive and accurate target defect database through historical data analysis to predict and identify potential defects of mechanical equipment can help improve the maintenance efficiency of mechanical equipment, reduce the risk of failures, and thus improve overall work efficiency and safety.

[0023] Step 2: construct a defect training data set based on the multiple groups of image feature information with identification of defect types, and perform supervised learning on the defect training data set based on the support vector machine principle to obtain a target defect discriminator.

[0024] Specifically, a defect training data set is formed based on multiple sets of image feature information with defect type identification, and supervised learning is performed on this data set using the support vector machine principle to obtain a target defect discriminator. Through machine learning technology, automatic identification and classification of mechanical equipment defects can be achieved, improving the efficiency and accuracy of defect detection.

[0025] First, a special defect training data set is formed based on the collected image feature information. This data set contains image features of various defect types, such as mechanical cracks caused by long-term cyclic loads, loose bolts caused by long-term vibration or insufficient tightening torque, and local, non-uniform defects such as increased fit clearance. Provide basic data for subsequent machine learning. Next, the support vector machine (SVM) principle is used to perform supervised learning on the defect training data set. In this process, the SVM algorithm learns how to distinguish different defect types based on image features. In addition, in order to improve the performance of the discriminator, it may be necessary to tune and verify the parameters of the SVM model. Finally, through this learning process, a target defect discriminator is obtained, which can identify the defect type of new image data.

[0026] By developing a target defect discriminator that can automatically identify and classify mechanical equipment defects, it is possible to accurately determine the defect type based on image feature information, thereby improving the automation level and accuracy of defect detection, reducing the need for manual intervention, and improving detection efficiency and reliability.

[0027] Step three: dynamically acquire a target detection image of the target mechanical equipment, and call a first defect detection strategy to perform edge detection on the target detection image to obtain a first detection result.

[0028] Further, it includes: the first defect detection strategy is used to detect the defect type in the uniform defect category, including: obtaining the target image reference of the target mechanical equipment; according to the first defect detection strategy, performing edge recognition on the target image reference and the target detection image in turn to obtain the target reference edge and the target image edge respectively; and taking the edge deviation between the target reference edge and the target image edge as the first detection result.

[0029] Specifically, the target detection image of the target mechanical equipment is dynamically acquired, and the first defect detection strategy is applied to perform edge detection on the image to identify and detect the defect type in the uniform defect category. By comparing the edge difference between the target image benchmark and the actual detection image, the first detection result, i.e., the edge deviation, is obtained, which can effectively identify the uniform defects in the mechanical equipment and provide key information for subsequent maintenance and repair.

[0030] First, dynamically acquire the target detection image of the target mechanical equipment to ensure that the image is clear and can accurately reflect the current status of the equipment. Next, acquire the target image benchmark, which is the standard image of the equipment in a normal state, for subsequent comparative analysis. Then, according to the first defect detection strategy, edge recognition is performed on the target image benchmark and the target detection image in turn. This strategy is specially designed to detect uniform defects. Through algorithm processing, the target benchmark edge and the target image edge are obtained respectively. Exemplary uniform defects include wear, thermal damage, corrosion, etc. In addition, the two edges are compared and the deviation between the two is calculated. Finally, the edge deviation between the target benchmark edge and the target image edge is used as the first detection result. This result directly reflects whether there are uniform defects in the equipment and the degree and location of the defects.

[0031] By comparing and analyzing the edge detection of the target detection image and the reference image, the defect types in the uniform defect category can be identified and quantified, which can quickly locate and evaluate the defects of mechanical equipment, so as to take corresponding maintenance measures to ensure the reliability of the equipment and extend its service life.

[0032] Step 4: When the first detection result meets the predetermined edge constraint, the second defect detection strategy is called to perform mask preprocessing on the target detection image to obtain a first processing result.

[0033] Further, it includes: obtaining target ambient light information of the target mechanical equipment, and comparing the target ambient light information with the target ambient light benchmark to obtain an ambient light deviation; generating an ambient light compensation mask based on the ambient light deviation, and performing ambient light compensation mask preprocessing on the target detection image based on the second defect detection strategy to obtain a first preprocessing result; generating a background mask based on the edge of the target image, and performing background mask preprocessing on the first preprocessing result based on the second defect detection strategy to obtain a second preprocessing result; and using the second preprocessing result as the first processing result.

[0034] Specifically, under the condition that the first detection result meets the predetermined edge constraint, the second defect detection strategy is applied to perform mask preprocessing on the target detection image to obtain the first processing result. The predetermined edge constraint means that the edge deviation between the target detection image and the target image benchmark is less than a certain deviation range. The key to this solution is to improve image quality through mask preprocessing and reduce the impact of environmental factors on defect detection, so as to more accurately identify and evaluate the defects of mechanical equipment.

[0035] First, when the first detection result meets the predetermined edge constraint, that is, the edge deviation between the target detection image and the target image benchmark is within a certain range, it means that the target mechanical equipment does not have defects in the uniform defect category, such as corrosion, wear, etc., and the second defect detection strategy is called at this time. Next, the target ambient light information of the target mechanical equipment is obtained, and compared with the target ambient light benchmark to calculate the ambient light deviation. Then, an ambient light compensation mask is generated based on the ambient light deviation to correct the uneven illumination problem in the image. Based on the second defect detection strategy, the target detection image is preprocessed with an ambient light compensation mask to obtain a first preprocessing result. In addition, a background mask is generated based on the edge of the target image to separate the foreground and background of the image. The second defect detection strategy is applied again, and the first preprocessing result is preprocessed with a background mask to obtain a second preprocessing result. Finally, the second preprocessing result is used as the first processing result to provide clearer and more accurate image data for subsequent defect analysis.

[0036] By performing mask preprocessing and ambient light compensation on the target detection image, the image quality is improved, the impact of environmental factors on defect detection is reduced, and the accuracy and reliability of defect detection are ensured, thereby improving the maintenance efficiency and safety of mechanical equipment.

[0037] Step 5: Read predetermined image features, and collect features of the first processing result based on the predetermined image features to obtain a target image feature parameter set.

[0038] Further, it includes: the predetermined image features at least include brightness features, color features and direction features, wherein the color features include red channel features, green channel features and blue channel features.

[0039] Specifically, the predetermined image features are read, and based on these features, the first processing result is subjected to feature collection to obtain a target image feature parameter set. The predetermined image features include brightness features, color features, and direction features, wherein the color features are further subdivided into red channel features, green channel features, and blue channel features. By extracting and collecting key feature parameters of the image, data support is provided for subsequent image analysis and defect recognition.

[0040] First, the predetermined image features are read, which are pre-defined to describe specific aspects of the image. Next, based on these predetermined image features, feature collection is performed on the first processing result. This involves algorithmic processing of the image data to identify and quantify key features such as brightness, color, and orientation. In particular, color features not only include overall color information, but are also subdivided into features of the red channel, green channel, and blue channel to more comprehensively describe the color properties of the image. Then, through this feature collection process, a target image feature parameter set is obtained, which is a data set containing multiple feature parameters, each of which corresponds to a specific feature of the image.

[0041] Extract and collect the key feature parameters of the image to generate the target image feature parameter set, which can fully reflect the characteristics of the image such as brightness, color and direction, and provide an important basis for subsequent image analysis and defect identification. In this way, the accuracy and efficiency of image analysis can be improved, so as to more effectively identify and evaluate the defects of mechanical equipment.

[0042] Step six: performing a comparative difference analysis on the first feature parameter of the first image feature in the target image feature parameter set to obtain a first feature saliency map.

[0043] Further, it includes: the first feature parameters include multiple parameters of multiple pixels in the first processing result; using the central-surrounding operator to perform difference analysis on the multiple parameters to obtain a first central-surrounding difference map of the first image feature; and using the first central-surrounding difference map as the first feature saliency map.

[0044] Specifically, a comparative difference analysis is performed on the first feature parameter of the first image feature in the target image feature parameter set to obtain a first feature saliency map. The core of the analysis is to highlight the salient area related to the first feature in the image by analyzing the differences between the image feature parameters, so as to better identify and locate defects.

[0045] First, the first feature parameters of the first image feature in the target image feature parameter set are determined. These parameters may include multiple parameters of multiple pixels, such as brightness, color, or texture. Next, a difference analysis is performed on these parameters using a center-surround operator. The center-surround operator is an image processing technique that compares the difference between each pixel in an image and its surrounding pixels. Through this analysis, a first center-surround difference map of the first image feature can be obtained, which shows the degree of difference in feature parameters between each pixel in the image and its surrounding pixels. Then, the first center-surround difference map is used as a first feature saliency map, which highlights the salient areas in the image associated with the first feature, which may be defects or other features of interest.

[0046] By comparing the difference analysis, a first feature saliency map is generated to highlight the salient areas in the image related to the first feature. Such a saliency map can help operators and maintenance personnel quickly identify and locate potential defects or other key features of mechanical equipment, thereby improving the efficiency and accuracy of image analysis.

[0047] Step 7: Normalize the first feature saliency map to obtain a target feature saliency map of the target detection image, and locate the target block based on the target feature saliency map.

[0048] Further, it includes: reading a predetermined saliency threshold, and screening pixels in the target feature saliency map using the predetermined saliency threshold as a screening constraint to form the target block.

[0049] Specifically, the first feature saliency map is normalized to obtain a target feature saliency map of the target detection image, and the target block is located based on this map. Through normalization and saliency threshold screening, the key area related to the target feature, i.e., the target block, is accurately identified and extracted from the image.

[0050] First, the first feature saliency map is normalized to eliminate the difference in image intensity and ensure the accuracy of image analysis. The normalized image is called the target feature saliency map, which highlights the area in the image that is related to the target feature. Next, the predetermined saliency threshold is read, which is a pre-set value used to filter the pixels in the saliency map. Then, the pixels in the target feature saliency map are filtered using the predetermined saliency threshold as the filtering constraint. This means that only those pixels with a saliency exceeding the threshold will be selected. Finally, these selected pixels are combined into a target block, which contains the area in the image that is most relevant to the target feature. Through normalization and screening based on the saliency threshold, the target block is located from the target feature saliency map. Such a target block can accurately identify the area in the image that is most relevant to the target feature, providing accurate positioning information for subsequent image analysis and defect identification.

[0051] Step eight: input the target block feature information of the target block into the target defect discriminator to obtain the target defect discrimination result of the target mechanical equipment.

[0052] Specifically, the target block feature information of the target block is input into the target defect discriminator to obtain the target defect discrimination result of the target mechanical equipment. The core is to use machine learning technology to automatically identify and classify the defects of mechanical equipment by analyzing the feature information of the target block, thereby realizing rapid evaluation of the equipment status and fault diagnosis.

[0053] First, extract the feature information of the target block, which may include the texture, color, shape and other attributes of the block. This feature information is the basis for the target defect discriminator to make decisions. Next, input these target block feature information into the target defect discriminator. The target defect discriminator is a machine learning-based model that has been trained to learn how to identify and classify defects based on the input feature information. Then, the discriminator calculates and analyzes the input feature information and outputs the target defect discrimination result of the target mechanical equipment. This result may include information such as the type, location, and degree of the defect.

[0054] By inputting the characteristic information of the target block into the target defect discriminator, the target defect discrimination result of the target mechanical equipment is automatically obtained. Such automated analysis can improve the speed and accuracy of defect detection, reduce the need for manual intervention, and thus improve the maintenance efficiency and reliability of mechanical equipment.

[0055] Further, it includes: extracting the first image feature information from the multiple groups of image feature information with defect type identification, the first image feature information corresponding to the first defect type; reading the defect category classification plan, and judging whether the first defect type belongs to a predetermined defect category according to the defect category classification plan; if it does, marking the first image feature information as having a first defect, and forming a first data set based on the first image feature information and the first defect; obtaining the second image feature information with a first non-defective mark, and forming a second data set based on the second image feature information and the first non-defective; combining the first data set and the second data set in a predetermined ratio to obtain the defect training data set.

[0056] Specifically, the first image feature information is extracted from multiple sets of image feature information with defect type identification, and the defect type corresponding to the feature information is determined according to the defect classification plan to determine whether it belongs to the predetermined defect category. If so, the first image feature information is marked as defective, and two data sets are formed with the first defect-free image feature information. Finally, the two data sets are combined according to a predetermined ratio to obtain a defect training data set. The core lies in preparing and constructing a training data set for machine learning to ensure that the model can effectively learn and identify different defect types.

[0057] First, extract the first image feature information corresponding to the first defect type from multiple sets of image feature information. Next, read the defect category classification plan, which is a predefined rule used to determine whether the defect type belongs to a predetermined defect category. Then, determine whether the first defect type belongs to a predetermined defect category according to the plan. If so, mark the first image feature information with a first defect to identify the association between these feature information and a specific defect type. Then, based on these marked first image feature information, form a first data set with the first defective label. In addition, obtain the second image feature information with a first defect-free mark, and form a second data set with the first defect-free label. Finally, combine the first data set with the second data set according to a predetermined ratio to obtain a defect training data set, which will be used to train a machine learning model to identify and classify defects.

[0058] By extracting and labeling image feature information and combining data sets according to predetermined ratios, the diversity and balance of the training data sets can be ensured, thereby improving the performance and accuracy of machine learning models in defect identification and classification.

[0059] Further, it includes: extracting second image feature information from the multiple groups of image feature information with defect type identification, the second image feature information corresponds to a second defect type; taking the union of the first defect type and the second defect type to obtain a defect type set; reading the defect category classification plan, the defect category classification plan is used to classify the defect type set; wherein the defect category classification plan includes uniform defect categories and non-uniform defect categories, the uniform defect categories include wear, thermal damage and corrosion, and the non-uniform defect categories include fractures and loose gaps; the non-uniform defect categories are used as the predetermined defect categories.

[0060] Specifically, extract the second image feature information from multiple groups of image feature information with defect type identification, and the information corresponds to the second defect type. Then, the union of the first defect type and the second defect type is obtained to obtain a defect type set, and the defect category classification plan is used to divide and classify this set. The defect category classification plan includes uniform defect categories and non-uniform defect categories, among which the uniform defect categories include wear, thermal damage and corrosion, and the non-uniform defect categories include fractures and loose gaps. In this scheme, the non-uniform defect category is designated as a predetermined defect category. The core of this scheme is to classify and categorize defect types in order to more effectively detect and identify defects.

[0061] First, extract the second image feature information corresponding to the second defect type. Next, take the union of the first defect type and the second defect type to obtain a defect type set. This set contains all relevant defect types. Then, read the defect category division plan, which is a predefined rule for dividing and classifying the defect type set. According to the plan, the defect types are divided into uniform defect categories and non-uniform defect categories. Uniform defect categories include wear, thermal damage, and corrosion, which usually show a uniform distribution in the image. Non-uniform defect categories include fractures and loose gaps, which show an uneven distribution in the image. Finally, the non-uniform defect category is used as a predetermined defect category, which means that in subsequent defect detection and analysis, special attention will be paid to defects in this category. By classifying and categorizing defect types, it can help improve the pertinence and accuracy of defect detection, thereby more effectively identifying and repairing defects in mechanical equipment and ensuring the reliability and safety of the equipment.

[0062] In summary, the device defect detection method based on image recognition provided by this application has the following technical effects:

[0063] By analyzing the historical defect detection records of similar mechanical equipment of the target mechanical equipment, a target defect database is established, and the target defect database includes multiple groups of image feature information with defect type identification; a defect training data set is established according to the multiple groups of image feature information with defect type identification, and supervised learning is performed on the defect training data set based on the support vector machine principle to obtain a target defect discriminator; a target detection image of the target mechanical equipment is dynamically acquired, and a first defect detection strategy is called to perform edge detection on the target detection image to obtain a first detection result; when the first detection result meets the predetermined edge constraint, a second defect detection strategy is called to perform mask preprocessing on the target detection image to obtain a first processing result; a predetermined image feature is read, and based on the predetermined image feature, feature collection is performed on the first processing result to obtain a target image feature parameter set; a first feature parameter of the first image feature in the target image feature parameter set is compared and analyzed to obtain a first feature saliency map; the first feature saliency map is normalized to obtain a target feature saliency map of the target detection image, and a target block is located based on the target feature saliency map; the target block feature information of the target block is input into the target defect discriminator to obtain a target defect discrimination result of the target mechanical equipment. That is to say, by establishing a target defect database and conducting supervised learning, training a target defect discriminator, and achieving the technical goal of intelligent image recognition and judgment of defects in target mechanical equipment, edge detection analysis is performed on the target detection image of the target mechanical equipment, and on the basis of ensuring that the target mechanical equipment does not have various defects in the uniform defect category, the target detection image is analyzed and judged after mask preprocessing, and the target defect discriminator is used to achieve the goal of automatic judgment of the defect type in the non-uniform defect category of the target mechanical equipment. By performing two-stage defect detection on the dynamically acquired target detection image, the dynamically adjusted detection strategy makes the detection process more flexible and able to adapt to different detection environments and conditions, achieving the goal of flexible and refined equipment defect detection process, and achieving the technical effect of improving the accuracy and efficiency of defect detection, thereby improving the reliability of detection results.

[0064] Embodiment 2: Based on the same inventive concept as the device defect detection method based on image recognition in the above embodiment, the present application also provides a device defect detection system based on image recognition, please refer to the attached Figure 2 , the equipment defect detection system based on image recognition comprises:

[0065] The database building module 11 is used to analyze the historical defect detection records of similar mechanical equipment of the target mechanical equipment and build a target defect database, wherein the target defect database includes multiple groups of image feature information with identification of defect types.

[0066] The discriminator training module 12 is used to form a defect training data set according to the multiple groups of image feature information with identification of defect types, and perform supervised learning on the defect training data set based on the support vector machine principle to obtain a target defect discriminator.

[0067] The first detection module 13 is used to dynamically acquire a target detection image of the target mechanical equipment, and call a first defect detection strategy to perform edge detection on the target detection image to obtain a first detection result.

[0068] The second detection module 14 is used to call a second defect detection strategy to perform mask preprocessing on the target detection image to obtain a first processing result when the first detection result meets the predetermined edge constraint.

[0069] The feature collection module 15 is used to read predetermined image features and collect features of the first processing result based on the predetermined image features to obtain a target image feature parameter set.

[0070] The salient analysis module 16 is used to perform a comparative difference analysis on a first feature parameter of a first image feature in the target image feature parameter set to obtain a first feature salient map.

[0071] The salient positioning module 17 is used for normalizing the first feature salient map to obtain a target feature salient map of the target detection image, and positioning the target block based on the target feature salient map.

[0072] The intelligent discrimination module 18 is used to input the target block feature information of the target block into the target defect discriminator to obtain the target defect discrimination result of the target mechanical equipment.

[0073] Furthermore, the database building module 11 in the image recognition-based equipment defect detection system is also used to: extract the first image feature information from the multiple groups of image feature information with defect type identification, the first image feature information corresponding to the first defect type; read the defect category classification plan, and determine whether the first defect type belongs to a predetermined defect category according to the defect category classification plan; if it does, mark the first image feature information as having a first defect, and form a first data set based on the first image feature information and the first defect; obtain the second image feature information with a first non-defective mark, and form a second data set based on the second image feature information and the first non-defective; combine the first data set and the second data set in a predetermined ratio to obtain the defect training data set.

[0074] Furthermore, the database building module 11 in the image recognition-based equipment defect detection system is also used to: extract second image feature information from the multiple groups of image feature information with defect type identification, the second image feature information corresponds to a second defect type; take the union of the first defect type and the second defect type to obtain a defect type set; read the defect category classification plan, the defect category classification plan is used to classify the defect type set; wherein the defect category classification plan includes uniform defect categories and non-uniform defect categories, the uniform defect categories include wear, thermal damage and corrosion, and the non-uniform defect categories include fractures and loose gaps; the non-uniform defect categories are used as the predetermined defect categories.

[0075] Furthermore, the database building module 11 in the image recognition-based equipment defect detection system is also used for: the first defect detection strategy is used to detect the defect type in the uniform defect category, including: obtaining the target image reference of the target mechanical equipment; according to the first defect detection strategy, performing edge recognition on the target image reference and the target detection image in turn to obtain the target reference edge and the target image edge respectively; and taking the edge deviation between the target reference edge and the target image edge as the first detection result.

[0076] Furthermore, the database building module 11 in the image recognition-based equipment defect detection system is also used to: obtain target ambient light information of the target mechanical equipment, and compare the target ambient light information with the target ambient light benchmark to obtain an ambient light deviation; generate an ambient light compensation mask based on the ambient light deviation, and perform ambient light compensation mask preprocessing on the target detection image based on the second defect detection strategy to obtain a first preprocessing result; generate a background mask based on the edge of the target image, and perform background mask preprocessing on the first preprocessing result based on the second defect detection strategy to obtain a second preprocessing result; and use the second preprocessing result as the first processing result.

[0077] Furthermore, the feature collection module 15 in the image recognition-based equipment defect detection system is also used for: the predetermined image features include at least brightness features, color features and direction features, wherein the color features include red channel features, green channel features and blue channel features.

[0078] Furthermore, the significant analysis module 16 in the image recognition-based equipment defect detection system is also used for: the first feature parameters include multiple parameters of multiple pixels in the first processing result; use the central-surrounding operator to perform difference analysis on the multiple parameters to obtain a first central-surrounding difference map of the first image feature; and use the first central-surrounding difference map as the first feature significant map.

[0079] Furthermore, the salient positioning module 17 in the image recognition-based device defect detection system is also used to: read a predetermined salient threshold, and use the predetermined salient threshold as a screening constraint to screen pixels in the target feature salient map and form the target block.

[0080] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. Figure 1 The device defect detection method based on image recognition and the specific examples in the first embodiment are also applicable to the device defect detection system based on image recognition in the present embodiment. Through the above detailed description of the device defect detection method based on image recognition, those skilled in the art can clearly understand the device defect detection system based on image recognition in the present embodiment, so for the sake of brevity of the specification, it will not be described in detail here. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0081] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0082] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.

Claims

1. A device defect detection method based on image recognition, characterized in that: include: Analyze the historical defect detection records of similar mechanical equipment of the target mechanical equipment to establish a target defect database, wherein the target defect database includes multiple groups of image feature information with identification of defect types; A defect training data set is formed according to the plurality of groups of image feature information with identification of defect types, and supervised learning is performed on the defect training data set based on the support vector machine principle to obtain a target defect discriminator; Dynamically acquire a target detection image of the target mechanical equipment, and call a first defect detection strategy to perform edge detection on the target detection image to obtain a first detection result; When the first detection result meets the predetermined edge constraint, calling the second defect detection strategy to perform mask preprocessing on the target detection image to obtain a first processing result; Reading a predetermined image feature, and collecting features of the first processing result based on the predetermined image feature to obtain a target image feature parameter set; Performing a comparative difference analysis on a first feature parameter of a first image feature in the target image feature parameter set to obtain a first feature saliency map; Normalizing the first feature saliency map to obtain a target feature saliency map of the target detection image, and locating the target block based on the target feature saliency map; Inputting target block feature information of the target block into the target defect discriminator to obtain a target defect discrimination result of the target mechanical equipment; The second defect detection strategy is called to perform mask preprocessing on the target detection image to obtain a first processing result, including: Acquiring target ambient light information of the target mechanical equipment, and comparing the target ambient light information with a target ambient light reference to obtain an ambient light deviation; generating an ambient light compensation mask based on the ambient light deviation, and performing ambient light compensation mask preprocessing on the target detection image based on the second defect detection strategy to obtain a first preprocessing result; Generate a background mask based on the edge of the target image, and perform background mask preprocessing on the first preprocessing result based on the second defect detection strategy to obtain a second preprocessing result; The second preprocessing result is used as the first processing result.

2. The device defect detection method based on image recognition according to claim 1, characterized in that: include: Extracting first image feature information from the plurality of groups of image feature information having identifications of defect types, wherein the first image feature information corresponds to a first defect type; Reading a defect classification plan, and judging whether the first defect type belongs to a predetermined defect category according to the defect classification plan; If yes, mark the first image feature information as having a first defect, and form a first data set based on the first image feature information and the first defect; Acquire second image feature information having a first defect-free mark, and form a second data set based on the second image feature information and the first defect-free mark; The first data set and the second data set are combined in a predetermined ratio to obtain the defect training data set.

3. The device defect detection method based on image recognition according to claim 2 is characterized in that: include: Extracting second image feature information from the plurality of groups of image feature information having identifications of defect types, wherein the second image feature information corresponds to a second defect type; Taking the union of the first defect type and the second defect type to obtain a defect type set; Reading the defect category classification plan, wherein the defect category classification plan is used to classify the defect type set; The defect classification plan includes uniform defect categories and non-uniform defect categories. The uniform defect categories include wear, thermal damage and corrosion, and the non-uniform defect categories include fractures and loose gaps. The non-uniform defect category is used as the predetermined defect category.

4. The device defect detection method based on image recognition according to claim 3 is characterized in that: The first defect detection strategy is used to detect defect types in the uniform defect category, including: Acquire a target image reference of the target mechanical equipment; According to the first defect detection strategy, edge recognition is performed on the target image reference and the target detection image in sequence to obtain a target reference edge and a target image edge respectively; An edge deviation between the target reference edge and the target image edge is used as the first detection result.

5. The device defect detection method based on image recognition according to claim 1, characterized in that: The predetermined image features include at least brightness features, color features and direction features, wherein the color features include red channel features, green channel features and blue channel features.

6. The device defect detection method based on image recognition according to claim 1, characterized in that: include: The first characteristic parameters include a plurality of parameters of a plurality of pixels in the first processing result; Performing difference analysis on the multiple parameters using a center-surround operator to obtain a first center-surround difference map of the first image feature; The first center-surrounding difference map is used as the first feature saliency map.

7. The device defect detection method based on image recognition according to claim 1, characterized in that: A predetermined saliency threshold is read, and pixels in the target feature saliency map are screened using the predetermined saliency threshold as a screening constraint to form the target block.

8. Equipment defect detection system based on image recognition, characterized in that: The steps for implementing the device defect detection method based on image recognition as described in any one of claims 1 to 7 include: A database building module, the database building module is used to analyze the historical defect detection records of similar mechanical equipment of the target mechanical equipment, and build a target defect database, the target defect database includes multiple groups of image feature information with identification of defect types; A discriminator training module, the discriminator training module is used to form a defect training data set according to the plurality of groups of image feature information with identification of defect types, and perform supervised learning on the defect training data set based on the support vector machine principle to obtain a target defect discriminator; A first detection module, wherein the first detection module is used to dynamically acquire a target detection image of the target mechanical equipment, and call a first defect detection strategy to perform edge detection on the target detection image to obtain a first detection result; A second detection module, wherein the second detection module is used to call a second defect detection strategy to perform mask preprocessing on the target detection image to obtain a first processing result when the first detection result meets the predetermined edge constraint; A feature collection module, the feature collection module is used to read a predetermined image feature, and based on the predetermined image feature, perform feature collection on the first processing result to obtain a target image feature parameter set; A saliency analysis module, the saliency analysis module is used to perform a comparative difference analysis on a first feature parameter of a first image feature in the target image feature parameter set to obtain a first feature saliency map; A salient positioning module, the salient positioning module is used to normalize the first feature salient map to obtain a target feature salient map of the target detection image, and locate the target block based on the target feature salient map; An intelligent discrimination module is used to input the target block feature information of the target block into the target defect discriminator to obtain a target defect discrimination result of the target mechanical equipment.