CN114549997B - X-ray image defect detection method and device based on regional feature extraction - Google Patents

X-ray image defect detection method and device based on regional feature extraction Download PDF

Info

Publication number
CN114549997B
CN114549997B CN202210448555.7A CN202210448555A CN114549997B CN 114549997 B CN114549997 B CN 114549997B CN 202210448555 A CN202210448555 A CN 202210448555A CN 114549997 B CN114549997 B CN 114549997B
Authority
CN
China
Prior art keywords
defect
image
neural network
ray image
probability
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210448555.7A
Other languages
Chinese (zh)
Other versions
CN114549997A (en
Inventor
黄必清
王雅妮
徐荣阁
汪祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN202210448555.7A priority Critical patent/CN114549997B/en
Publication of CN114549997A publication Critical patent/CN114549997A/en
Application granted granted Critical
Publication of CN114549997B publication Critical patent/CN114549997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Analysing Materials By The Use Of Radiation (AREA)

Abstract

The application relates to the technical field of digital image processing, in particular to a method and a device for detecting X-ray image defects based on regional feature extraction, wherein the method comprises the following steps: acquiring an X-ray image of a target to be detected; inputting the X-ray image into a defect probability prediction model trained in advance, and predicting the actual defect probability of each detection area of the X-ray image, wherein the defect probability prediction model is obtained based on multi-layer neural network training; and determining at least one detection area with the actual defect probability larger than a preset probability threshold, generating a defect image according to the at least one detection area, and identifying the defect image to obtain the actual defect type of the target to be detected. Therefore, the embodiment of the application can improve the detection efficiency, ensure the high fineness and high efficiency of the internal defect detection of the turbine blade and effectively overcome the defects of slow detection and complex equipment in the related technology.

Description

X-ray image defect detection method and device based on regional feature extraction
Technical Field
The present application relates to the field of digital image processing technologies, and in particular, to a method and an apparatus for detecting defects in an X-ray image based on region feature extraction.
Background
With the development of times, the stages of human beings in the sky are larger and larger, and the requirement on an aircraft engine is higher and higher. The technology of detecting defects of aircraft engines is also developed along with the development of related disciplines. The aircraft engine is a typical product with high precision, high accuracy and high difficulty, and the requirements on the assembly efficiency and the assembly quality are extremely high. The aeronautical manufacturing industry has the quality requirements on the engine in all aspects, and the safe use of the engine is seriously influenced by the installation position of parts, the surface texture, the internal structure and the like. The detection of defects in turbine blades of aircraft engines is a critical issue. Turbine blades, manufacturers of engine power, and carriers of severe operating conditions, are required to set the most stringent detection standards and develop new detection technologies without breaking.
The turbine blade is a metal casting. The common automatic detection technology of the metal casting is to process and learn the product image by using a machine learning algorithm, and further position and classify the internal defects of the casting. However, the relevant inspection techniques for metal castings do not meet the stringent requirements of the aeronautical industry for turbine blades. Meanwhile, the special crystallization method and the design structure of the turbine blade cannot adopt the simple X-ray detection technology of the metal casting.
Disclosure of Invention
The application provides an X-ray image defect detection method, device, system, electronic equipment and storage medium based on regional feature extraction, which improve detection efficiency, ensure high fineness and high efficiency of internal defect detection of turbine blades and effectively overcome the defects of slow detection and complex equipment in the related technology.
The embodiment of the first aspect of the application provides an X-ray image defect detection method based on regional feature extraction, which includes the following steps: acquiring an X-ray image of a target to be detected; inputting the X-ray image into a defect probability prediction model trained in advance, and predicting the actual defect probability of each detection area of the X-ray image, wherein the defect probability prediction model is obtained based on multi-layer neural network training; and determining at least one detection area with the actual defect probability larger than a preset probability threshold, generating a defect image according to the at least one detection area, and identifying the defect image to obtain the actual defect type of the target to be detected.
Further, before inputting the X-ray image to a defect probability prediction model trained in advance, the method further includes: and carrying out image enhancement processing on the X-ray image, and extracting a defect characteristic diagram of the X-ray image to be detected.
Further, the inputting the X-ray image into a defect probability prediction model trained in advance to predict the actual defect probability of each detection region of the X-ray image includes: inputting the defect feature map into a first layer of neural network of the multilayer neural network, and extracting feature vectors of the defect feature map; and inputting the characteristic vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the characteristic vector to obtain the actual defect probability of each detection area.
Further, the defect probability prediction model is obtained based on multi-layer neural network training, and comprises: obtaining a sample defect probability value and a sample defect labeling characteristic image of a sample image; inputting the sample defect labeling characteristic image into a first layer neural network of the multilayer neural network, and extracting a characteristic vector of the sample defect labeling characteristic image; inputting the feature vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the feature vector to obtain the prediction defect probability of each detection area of the sample image; inputting the sample defect probability value and the predicted defect probability into a preset loss function to obtain a loss value, correcting network parameters of the first layer of neural network and the second layer of neural network according to the loss value, finishing training when the preset loss function converges or the training times reach the target times, and obtaining the defect probability prediction model.
The embodiment of the second aspect of the present application provides an X-ray image defect detection apparatus based on region feature extraction, including: the acquisition module is used for acquiring an X-ray image of a target to be detected; the prediction module is used for inputting the X-ray image into a defect probability prediction model trained in advance and predicting the actual defect probability of each detection area of the X-ray image, wherein the defect probability prediction model is obtained based on multi-layer neural network training; and the detection module is used for determining at least one detection area with the actual defect probability larger than a preset probability threshold, generating a defect image according to the at least one detection area, and identifying the defect image to obtain the actual defect type of the target to be detected.
Further, still include: and the processing module is used for performing image enhancement processing on the X-ray image and extracting a defect characteristic diagram of the X-ray image to be detected before inputting the X-ray image into a defect probability prediction model trained in advance.
Further, the prediction module is to: inputting the defect feature map into a first layer of neural network of the multilayer neural network, and extracting feature vectors of the defect feature map; and inputting the characteristic vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the characteristic vector to obtain the actual defect probability of each detection area.
Further, still include: the training module is used for acquiring a sample defect probability value of a sample image and a sample defect labeling characteristic image; inputting the sample defect labeling characteristic image into a first layer neural network of the multilayer neural network, and extracting a characteristic vector of the sample defect labeling characteristic image; inputting the feature vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the feature vector to obtain the prediction defect probability of each detection area of the sample image; inputting the sample defect probability value and the predicted defect probability into a preset loss function to obtain a loss value, correcting network parameters of the first layer of neural network and the second layer of neural network according to the loss value, finishing training when the preset loss function converges or the training times reach the target times, and obtaining the defect probability prediction model.
The embodiment of the third aspect of the present application provides an X-ray image defect detection system based on region feature extraction, including: the X-ray scanning equipment is used for scanning the target to be detected to obtain an X-ray image; the image processing and detecting device comprises the X-ray image defect detecting device based on the region feature extraction in the embodiment, and is used for detecting defects based on an X-ray image to obtain an actual defect type of the target to be detected.
An embodiment of a fourth aspect of the present application provides an electronic device, including: the system comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the X-ray image defect detection method based on region feature extraction as described in the embodiment.
Embodiments of the fifth aspect of the present application provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, so as to implement the method for detecting defects in an X-ray image based on region feature extraction as described in the foregoing embodiments.
Therefore, the application has at least the following beneficial effects:
through treating the detection target, for example turbine blade X-ray wait to detect the image and carry out the feature extraction, realize carrying out preliminary screening to the high resolution image, extracted effectual defect characteristic when improving detection efficiency, be supplementary to the testing process, thereby it can effectively overcome the shortcoming that detects slowly, equipment is complicated to have guaranteed turbine blade internal defect detection's high fineness and high efficiency, provides an application scene close to reality, the target detection accuracy is good, can improve the productivity effect's scheme.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of an X-ray image defect detection method based on region feature extraction according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a training process of a defect probability prediction model according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an X-ray image defect detection apparatus based on region feature extraction according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an X-ray image defect detection system based on region feature extraction according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative and intended to explain the present application and should not be construed as limiting the present application.
With the maturity of deep learning and artificial intelligence subjects, the traditional industry encounters a new opportunity for development, and the aerospace casting detection technology is used as a part of the leading science and technology of human beings, so that a solid foundation is laid for the development of aerospace science. Aviation-related manufacturing is more stringent than ordinary manufacturing, with higher and more detailed requirements on product quality. Not only defects, impurities, deformation, etc. are unacceptable, but even small scratches are also recognized in grades. The intelligent detection technology with higher precision can be developed by combining the intelligent technology with the traditional detection technology, and the large data drive detection technology which takes artificial intelligence as a key is realized, so that the dilemma of the current labor force lack can be relieved, the industrial production efficiency can be improved, and the high quality of products can be ensured.
For turbine blades, internal defects can affect blade stress distribution, which in severe cases can lead to engine and possibly flight accidents. The importance of turbine blades is well understood, and the critical detection of internal defects in turbine blades is responsible for the safety of pilots and national property. Meanwhile, typical internal defects such as inclusions, looseness, cracks, shrinkage cavities and the like are very common in the blade casting process under the effects of manufacturing level and process technology. The traditional blade detection is realized by manually judging a picture, so that the production efficiency is low. Thus, intelligent detection and automated detection are urgent needs of the factory.
Under the background of big data popularization, the artificial intelligence algorithm analyzes the X-ray image of the turbine blade, and then classifies and judges the internal defects to become a new processing measure. However, the image detection algorithm in the related art cannot achieve accurate, efficient and rapid detection of internal defects of the turbine blade.
To this end, embodiments of the present application provide a method, an apparatus, a system, an electronic device, and a storage medium for detecting defects in an X-ray image based on region feature extraction, which will be described below with reference to the accompanying drawings. Specifically, fig. 1 is a schematic flowchart of an X-ray image defect detection method based on region feature extraction according to an embodiment of the present application.
As shown in fig. 1, the method for detecting defects in an X-ray image based on region feature extraction includes the following steps:
in step S101, an X-ray image of an object to be detected is acquired.
The target to be detected can be specifically selected according to actual detection requirements, and can be a turbine blade or the like. Taking the turbine blade as an example, the embodiment of the application can scan the turbine blade through the X-ray scanning device to obtain a high-resolution X-ray image of the turbine blade.
The execution subject of the embodiment of the present application is an electronic device, and the electronic device may be, for example, an image processing and detecting device, and the like, which is not particularly limited.
In step S102, the X-ray image is input to a defect probability prediction model trained in advance, and the actual defect probability of each detection region of the X-ray image is predicted, wherein the defect probability prediction model is obtained based on multi-layer neural network training.
It can be understood that, in the embodiment of the present application, an image to be detected, that is, an X-ray image, may be input to a defect probability prediction model trained in advance, and the defect probabilities of a plurality of regions included in the image to be detected are predicted to obtain the defect probability of each region included in the image to be detected, and the image including the defect probability of each region may be used as a defect detection result image of the image to be detected.
It should be noted that, in the embodiment of the present application, not only the X-ray image can be directly input to the defect probability prediction model for probability prediction, but also the X-ray image can be processed before being input.
In the embodiment of the present application, before inputting the X-ray image into the defect probability prediction model trained in advance, the method further includes: and carrying out image enhancement processing on the X-ray image, and extracting a defect characteristic diagram of the X-ray image to be detected.
It can be understood that, in the embodiment of the present application, image enhancement may be performed on an image to be detected, and feature extraction may be performed on data of the image to be detected by using the trunk feature extraction network to obtain a defect feature map of the image to be detected, so that parameters of the image to be detected may be further adjusted (for example, reduced) through image enhancement processing, and the efficiency of image detection may be improved.
In this embodiment of the present application, the image enhancement processing includes one or more of image random rotation processing, image displacement processing, image scaling processing, image cropping processing, and image flipping processing, and each processing mode does not distinguish a sequential execution order, which is specifically as follows:
the process of the image random rotation processing comprises the following steps: and determining a target rotation angle in an angle set according to a random strategy, wherein the angle set comprises all angle values between 0 degree and 360 degrees, and the target rotation angle is any angle value between 0 degree and 360 degrees, so that the image can be rotated to the target rotation angle to obtain a processed image.
The image displacement processing process comprises the following steps: firstly, size information of an image is obtained, wherein the size information comprises a length value in the horizontal direction and a length value in the vertical direction, a displacement distance is calculated according to the size information, and then the image is subjected to displacement processing in the horizontal direction or the vertical direction according to the displacement distance. The displacement distance may be a ten percent horizontal length value or a ten percent vertical length value. For example, the horizontal displacement distance or the vertical displacement distance is in the range of 0% to 10% of the image size.
The process of image scaling processing includes: first, size information of the image is acquired, including a horizontal direction length value and a vertical direction length value, and the image may be subjected to an enlargement process or a reduction process. Wherein the image is subjected to an enlargement process or a reduction process within a preset range, the preset range being a range of 0% to 5% of size information of the image.
The image turning process comprises the following steps: and carrying out turnover processing in the horizontal direction or turnover processing in the vertical direction on the image according to a preset random strategy. In some examples, the image may be randomly translated horizontally or vertically within a range of coordinates; randomly rotating an input image within a certain angle range; carrying out random zooming within a certain magnification range on an input image; the input image is randomly flipped horizontally or vertically.
In the embodiment of the present application, inputting an X-ray image into a defect probability prediction model trained in advance, and predicting an actual defect probability of each detection region of the X-ray image includes: inputting the defect characteristic diagram into a first layer of neural network of a multilayer neural network, and extracting a characteristic vector of the defect characteristic diagram; and inputting the characteristic vectors into a second-layer neural network of the multilayer neural network, and performing convolution operation on the characteristic vectors to obtain the actual defect probability of each detection area.
The first layer of neural network comprises a Backbone network and a Neck network and is used for extracting the characteristic vectors; the second layer neural network includes a Prediction network for probabilistic Prediction.
It can be understood that, in the embodiment of the present application, feature vector extraction processing may be performed through the first layer of neural network, and convolution operation may be performed through the second layer of neural network, so as to obtain the defect probability of each region in the image for prediction.
In the embodiment of the present application, the defect probability prediction model is obtained based on multi-layer neural network training, and includes: obtaining a sample defect probability value and a sample defect labeling characteristic image of a sample image; inputting the sample defect labeling characteristic image into a first layer neural network of a multilayer neural network, and extracting a characteristic vector of the sample defect labeling characteristic image; inputting the characteristic vectors into a second layer of neural network of the multilayer neural network, and performing convolution operation on the characteristic vectors to obtain the predicted defect probability of each detection area of the sample image; inputting the sample defect probability value and the predicted defect probability into a preset loss function to obtain a loss value, correcting network parameters of the first layer of neural network and the second layer of neural network according to the loss value, finishing training when the preset loss function converges or the training times reach the target times, and obtaining a defect probability prediction model.
The preset loss function may be specifically selected according to actual requirements, and the target times may be specifically set according to actual conditions, which is not specifically limited.
It can be understood that training data can be obtained in the embodiment of the application, and the training data includes a sample image and a sample defect labeling feature image; inputting the sample defect labeling characteristic image into a regional defect probability prediction model to be trained to obtain a predicted defect detection result image; calculating a loss value according to sample defect probability values of a plurality of regions contained in the sample defect labeling characteristic image and predicted defect probability values of a plurality of regions contained in the predicted defect detection result image by a preset loss function; and updating the network parameters of the regional defect probability prediction model to be trained according to the loss value, and returning to the step of executing the training data acquisition until the loss value meets the preset training completion condition to obtain the trained regional defect probability prediction model.
Specifically, as shown in fig. 2, the training process of the defect probability prediction model is specifically as follows:
in step S21, training data is acquired.
The training data comprises a sample image and a sample defect detection result image. The training data includes a plurality of sample images, for example, a plurality of high-resolution turbine blade X-ray images and sample defect detection result images thereof.
After a sample image in training data is acquired, processing is carried out according to the sample image to obtain a sample defect feature map corresponding to the sample image, and after channel cascade processing is carried out on the sample defect feature map, a multi-channel image with defect features is obtained.
And step S22, inputting the sample defect feature map into the regional defect probability prediction model to be trained to obtain a predicted defect detection result image.
The region defect probability Prediction model to be trained can be a target model based on deep learning, and the model comprises a backhaul network, a Neck network and a Prediction network. The backhaul Network may include a Focus (Focus) structure, a CSPNet (Cross Stage Partial Network) structure, and each small structure includes an SDL (Step cancellation layer, a Step convolution layer), a Batch Normalization layer, and a ReLU (corrected linear Unit) layer; the neutral Network includes FPN (Feature Pyramid Networks) + PAN (Pixel Aggregation Networks) structures. The input size of each network is not the same as the input size.
It can be understood that feature vector extraction processing is performed on the sample defect feature map through the first layer of neural network, convolution operation is performed on the feature map of the sample image through the second layer of neural network to obtain the predicted defect probability value of each region in the sample image, and the predicted defect detection result image of the sample image is obtained through combination.
Specifically, a multi-channel image with defective features is input into a Backbone network, in which a feature map is calculated from the multi-channel image with defective features through a learnable convolution kernel, wherein each pixel position in the feature map is represented by a feature vector. And the Neck network inputs the characteristic diagram input by the backhaul network into the Prediction network, and outputs the predicted defect probability of each region position of the sample image.
Step S23, calculating a loss value according to the sample defect probability values of the plurality of regions included in the sample defect detection result image and the predicted defect probability values of the plurality of regions included in the predicted defect detection result image by using a preset loss function.
And step S24, updating the network parameters of the to-be-trained region defect probability prediction model according to the loss values, and returning to the step of acquiring training data until the loss values meet the preset training completion conditions to obtain the trained region defect probability prediction model.
The preset training completion condition may be that a loss function corresponding to the loss value has converged, or that the number of iterations of the training data has reached a target number, or the like. For example, the target frequency may be 1 × 105 to 2 × 105, and the target frequency is not particularly limited in the embodiment of the present invention.
Specifically, according to the loss value, calculating new network parameters of the to-be-trained region defect probability prediction model, and then updating the to-be-trained region defect probability prediction model to obtain an updated region defect probability prediction model. And then, the terminal inputs the training data into the updated regional defect probability prediction model again, and executes the steps of the method of the embodiment again until the calculated loss value meets the preset training completion condition, so as to obtain the trained regional defect probability prediction model.
Optionally, the input of the regional defect probability prediction model to be trained is a high-resolution turbine blade X-ray image, and the data type is a single-channel matrix of uint 8; and outputting an X-ray image of the turbine blade obtained through preliminary positioning and a corresponding defect characteristic image, namely a defect image of the image to be detected. Through the setting of the model and the training process of the model, the recognition performance of the model can be improved and the calculation amount of training and the calculation amount of recognition can be reduced on the premise of ensuring the accuracy of feature extraction.
In step S103, at least one detection region where the actual defect probability is greater than the preset probability threshold is determined, a defect image is generated according to the at least one detection region, and the defect image is identified to obtain the actual defect type of the target to be detected.
The preset probability threshold may be understood as a preset binary segmentation threshold, for example, the preset probability threshold may be 0.5, or other parameter values determined according to an actual application scenario, or may be a preset probability threshold obtained in response to an input operation of a user in the input operation.
It can be understood that, in the embodiment of the present application, the threshold value screening may be performed on the defect detection result image to obtain the defect detection confidence result image, and specifically, the binarization processing is performed on the plurality of defect regions in the image to be detected according to the preset binarization segmentation threshold value and the defect probability values of the plurality of regions in the image to be detected to obtain the defect image of the image to be detected.
Specifically, the pre-trained region defect probability prediction model is used for predicting the defect probabilities of a plurality of regions included in the image to be detected according to the defect feature map to obtain the defect probability of each region included in the image to be detected and obtain the defect detection result image of the image to be detected, so that binarization processing can be performed according to the defect probability of each region included in the defect detection result image of the image to be detected and a preset probability threshold value to obtain the defect image of the image to be detected.
The specific binarization processing process may include: and performing condition judgment on the defect probability of each region, taking the region with the defect probability greater than or equal to a preset probability threshold as a defect region, and taking the region with the defect probability less than the preset probability threshold as a normal region, so that an image formed by each defect region can be used as a defect detection result image of the image to be detected.
According to the method for detecting the X-ray image defects based on the region feature extraction, an image to be detected is obtained, the data are input to a pre-trained region defect probability prediction model together, and a defect detection result image of the image to be detected is obtained; the characteristic extraction is carried out on the image to be detected, the high-resolution image is preliminarily screened, the effective defect characteristic is extracted while the detection efficiency is improved, the detection process is assisted, and the high fineness and the high efficiency of the internal defect detection of the turbine blade are guaranteed. Therefore, the method and the device can classify the product image pixel by pixel while ensuring the efficiency of detection time, and accurately segment the defect area to meet the requirement of industrial automatic detection. The high-precision defect positioning can meet the quality detection requirement of high-quality products, and has great significance for subsequent links of product quality control, intelligent sorting, product repair and the like in the intelligent manufacturing process.
An X-ray image defect detection apparatus based on region feature extraction proposed according to an embodiment of the present application is described next with reference to the drawings.
Fig. 3 is a schematic block diagram of an X-ray image defect detection apparatus based on region feature extraction according to an embodiment of the present application.
As shown in fig. 3, the X-ray image defect detecting apparatus 10 based on the region feature extraction includes: an acquisition module 100, a prediction module 200, and a detection module 300.
The acquisition module 100 is configured to acquire an X-ray image of a target to be detected; the prediction module 200 is configured to input the X-ray image into a defect probability prediction model trained in advance, and predict an actual defect probability of each detection region of the X-ray image, where the defect probability prediction model is obtained based on multi-layer neural network training; the detection module 300 is configured to determine at least one detection area where the actual defect probability is greater than a preset probability threshold, generate a defect image according to the at least one detection area, and identify the defect image to obtain an actual defect type of the target to be detected.
In the embodiment of the present application, the apparatus 10 of the embodiment of the present application further includes: and a processing module. The processing module is used for performing image enhancement processing on the X-ray image and extracting a defect characteristic diagram of the X-ray image to be detected before the X-ray image is input into a defect probability prediction model which is trained in advance;
in an embodiment of the present application, the prediction module 200 is configured to: inputting the defect characteristic diagram into a first layer of neural network of a multilayer neural network, and extracting a characteristic vector of the defect characteristic diagram; and inputting the characteristic vectors into a second-layer neural network of the multilayer neural network, and performing convolution operation on the characteristic vectors to obtain the actual defect probability of each detection area.
In the embodiment of the present application, the apparatus 10 of the embodiment of the present application further includes: and a training module. The training module is used for acquiring a sample defect probability value of a sample image and a sample defect labeling characteristic image; inputting the sample defect labeling characteristic image into a first layer neural network of a multilayer neural network, and extracting a characteristic vector of the sample defect labeling characteristic image; inputting the characteristic vectors into a second layer of neural network of the multilayer neural network, and performing convolution operation on the characteristic vectors to obtain the predicted defect probability of each detection area of the sample image; inputting the sample defect probability value and the predicted defect probability into a preset loss function to obtain a loss value, correcting network parameters of the first layer of neural network and the second layer of neural network according to the loss value, finishing training when the preset loss function converges or the training times reach the target times, and obtaining a defect probability prediction model.
It should be noted that the foregoing explanation of the embodiment of the method for detecting defects in an X-ray image based on region feature extraction is also applicable to the apparatus for detecting defects in an X-ray image based on region feature extraction in this embodiment, and details are not repeated here.
According to the X-ray image defect detection device based on regional feature extraction provided by the embodiment of the application, an image to be detected is obtained, and the data are input to a pre-trained regional defect probability prediction model together to obtain a defect detection result image of the image to be detected; the characteristic extraction is carried out on the image to be detected, the high-resolution image is preliminarily screened, the effective defect characteristics are extracted while the detection efficiency is improved, the detection process is assisted, and the high fineness and the high efficiency of the internal defect detection of the turbine blade are guaranteed. Therefore, the method and the device can classify the product image pixel by pixel while ensuring the detection time efficiency, and accurately segment the defect area to meet the requirement of industrial automatic detection; the high-precision defect positioning can meet the quality detection requirement of high-quality products, and has great significance for subsequent links such as product quality control, intelligent sorting, product repair and the like in the intelligent manufacturing process.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include:
memory 401, processor 402, and computer programs stored on memory 401 and executable on processor 402.
The processor 402, when executing the program, implements the method for detecting defects in an X-ray image based on region feature extraction provided in the above-described embodiments.
Further, the electronic device further includes:
a communication interface 403 for communication between the memory 401 and the processor 402.
A memory 401 for storing computer programs executable on the processor 402.
The Memory 401 may include a high-speed RAM (Random Access Memory) Memory, and may also include a non-volatile Memory, such as at least one disk Memory.
If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 may be connected to each other through a bus and perform communication with each other. The bus may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Optionally, in a specific implementation, if the memory 401, the processor 402, and the communication interface 403 are integrated on a chip, the memory 401, the processor 402, and the communication interface 403 may complete mutual communication through an internal interface.
Processor 402 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
Fig. 5 is a schematic structural diagram of an X-ray image defect detection system based on region feature extraction according to an embodiment of the present application, and as shown in fig. 5, the X-ray image defect detection system based on region feature extraction includes: an X-ray scanning device 501 and an image processing and detection device 502.
The X-ray scanning device 501 is configured to scan a target to be detected to obtain an X-ray image; the image processing and detecting device 502 includes an X-ray image defect detecting apparatus based on region feature extraction as described in the above embodiment, and is configured to perform defect detection based on the X-ray image to obtain an actual defect type of the target to be detected.
Specifically, as shown in fig. 5, the turbine blade defect detection system 500 based on the X-ray image of the region feature extraction is composed of the following components: an X-ray scanning device 501, an image processing and detecting device 502, a defect alarmable device 503, a data storage management device 504 and a defect presentation device 505.
The X-ray scanning device 501 collects X-ray images of turbine blade products by using an industrial linear array camera, and the collecting device comprises a conveyor belt, a light source and the industrial linear array camera and outputs high-resolution turbine blade X-ray gray images; taking an image acquired by the X-ray scanning device 501 as an input, applying a GPU (Graphics Processing Unit) and a CPU (central Processing Unit) through a program instruction by the image Processing and detecting device 502, performing feature pre-extraction related calculation Processing on the image, then performing defect detection calculation, and finally outputting a defect detection result; the defect detection results will be fed to the defect exposure device 505 and the data storage management device 504. And the defect display equipment is used for visually displaying the defect detection result, including the position, type and shape of the defect. The display device 505 is controlled by the detection device 502, and uses a light-emitting diode (LED) liquid crystal display to complete the display. The data storage management device 504 stores and manages the detection output result, and can realize reading and query at any time. The device is controlled by a computer program, and a storage medium is a mechanical hard disk; the defect detection result is input into the defect alarm device 503 through a simple decision (alarm or no alarm) to obtain a decision result, and an alarm is given when defective substandard products appear on the glass industrial production line. The alarm device 503 is also controlled by the detection device 502, and the output is divided into two forms of audio and light, which are respectively completed by using a loudspeaker and an LED alarm lamp.
In addition, the embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, and the program is executed by a processor to implement the above method for detecting the defects of the X-ray image based on the region feature extraction.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, e.g., two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of implementing the embodiments of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a programmable gate array, a field programmable gate array, or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (7)

1. An X-ray image defect detection method based on regional feature extraction is characterized by comprising the following steps:
acquiring an X-ray image of a target to be detected;
inputting the X-ray image into a defect probability prediction model trained in advance, and predicting the actual defect probability of each detection area of the X-ray image, wherein the defect probability prediction model is obtained based on multi-layer neural network training; and
determining at least one detection area with the actual defect probability larger than a preset probability threshold, generating a defect image according to the at least one detection area, and identifying the defect image to obtain the actual defect type of the target to be detected;
before inputting the X-ray image to a defect probability prediction model trained in advance, the method further comprises the following steps: carrying out image enhancement processing on the X-ray image, and extracting a defect characteristic diagram of the X-ray image to be detected;
the inputting the X-ray image into a defect probability prediction model trained in advance to predict the actual defect probability of each detection area of the X-ray image comprises: inputting the defect feature map into a first layer of neural network of the multilayer neural network, and extracting feature vectors of the defect feature map; inputting the feature vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the feature vector to obtain the actual defect probability of each detection area; the first layer of neural network comprises a Backbone network and a Neck network, and the second layer of neural network comprises a Prediction network.
2. The method of claim 1, wherein the defect probability prediction model is derived based on multi-layer neural network training, comprising:
obtaining a sample defect probability value and a sample defect labeling characteristic image of a sample image;
inputting the sample defect labeling characteristic image into a first layer neural network of the multilayer neural network, and extracting a characteristic vector of the sample defect labeling characteristic image;
inputting the feature vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the feature vector to obtain the prediction defect probability of each detection area of the sample image;
inputting the sample defect probability value and the predicted defect probability into a preset loss function to obtain a loss value, correcting network parameters of the first layer of neural network and the second layer of neural network according to the loss value, finishing training when the preset loss function converges or the training times reach the target times, and obtaining the defect probability prediction model.
3. An X-ray image defect detection device based on regional feature extraction is characterized by comprising:
the acquisition module is used for acquiring an X-ray image of a target to be detected;
the prediction module is used for inputting the X-ray image into a defect probability prediction model trained in advance and predicting the actual defect probability of each detection area of the X-ray image, wherein the defect probability prediction model is obtained based on multi-layer neural network training; and
the detection module is used for determining at least one detection area with the actual defect probability larger than a preset probability threshold, generating a defect image according to the at least one detection area, and identifying the defect image to obtain the actual defect type of the target to be detected;
the processing module is used for performing image enhancement processing on the X-ray image and extracting a defect characteristic diagram of the X-ray image to be detected before inputting the X-ray image into a defect probability prediction model trained in advance;
the prediction module is to: inputting the defect feature map into a first layer of neural network of the multilayer neural network, and extracting feature vectors of the defect feature map; inputting the feature vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the feature vector to obtain the actual defect probability of each detection area; the first layer of neural network comprises a Backbone network and a Neck network, and the second layer of neural network comprises a Prediction network.
4. The apparatus of claim 3, further comprising:
the training module is used for acquiring a sample defect probability value of a sample image and a sample defect labeling characteristic image; inputting the sample defect labeling characteristic image into a first layer neural network of the multilayer neural network, and extracting a characteristic vector of the sample defect labeling characteristic image; inputting the feature vector into a second layer of neural network of the multilayer neural network, and performing convolution operation on the feature vector to obtain the prediction defect probability of each detection area of the sample image; inputting the sample defect probability value and the predicted defect probability into a preset loss function to obtain a loss value, correcting network parameters of the first layer of neural network and the second layer of neural network according to the loss value, finishing training when the preset loss function converges or the training times reach the target times, and obtaining the defect probability prediction model.
5. An X-ray image defect detection system based on regional feature extraction, comprising:
the X-ray scanning equipment is used for scanning the target to be detected to obtain an X-ray image;
image processing and detecting equipment, comprising the X-ray image defect detecting device based on regional feature extraction as claimed in any one of claims 3 to 4, for performing defect detection based on X-ray image to obtain the actual defect type of the target to be detected.
6. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method for detecting defects in X-ray images based on region feature extraction according to any one of claims 1-2.
7. A computer-readable storage medium, on which a computer program is stored, the program being executed by a processor for implementing the method for detecting defects in an X-ray image based on region feature extraction according to any one of claims 1-2.
CN202210448555.7A 2022-04-27 2022-04-27 X-ray image defect detection method and device based on regional feature extraction Active CN114549997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210448555.7A CN114549997B (en) 2022-04-27 2022-04-27 X-ray image defect detection method and device based on regional feature extraction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210448555.7A CN114549997B (en) 2022-04-27 2022-04-27 X-ray image defect detection method and device based on regional feature extraction

Publications (2)

Publication Number Publication Date
CN114549997A CN114549997A (en) 2022-05-27
CN114549997B true CN114549997B (en) 2022-07-29

Family

ID=81667034

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210448555.7A Active CN114549997B (en) 2022-04-27 2022-04-27 X-ray image defect detection method and device based on regional feature extraction

Country Status (1)

Country Link
CN (1) CN114549997B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114937023A (en) * 2022-06-02 2022-08-23 北京远舢智能科技有限公司 Defect identification method and device for pressure-bearing equipment
CN114820598B (en) * 2022-06-24 2023-05-16 苏州康代智能科技股份有限公司 PCB defect detection system and PCB defect detection method
CN117036226B (en) * 2022-08-24 2024-08-02 腾讯科技(深圳)有限公司 Article defect detection method and device based on artificial intelligence and readable storage medium
CN115546137B (en) * 2022-09-29 2024-07-23 浙江新宝汽车电器有限公司 X-ray automatic detection method for flexible wire harness
CN115496892A (en) * 2022-11-07 2022-12-20 合肥中科类脑智能技术有限公司 Industrial defect detection method and device, electronic equipment and storage medium
CN115546614B (en) * 2022-12-02 2023-04-18 天津城建大学 Safety helmet wearing detection method based on improved YOLOV5 model
CN117333449A (en) * 2023-09-28 2024-01-02 贵州安大航空锻造有限责任公司 Intelligent manufacturing method, device and equipment for aluminum alloy ring forging and storage medium
CN117710306B (en) * 2023-12-13 2024-07-26 江苏宜兴德融科技有限公司 Positioning method, processor and storage medium for semiconductor device defect
CN117451744B (en) * 2023-12-20 2024-03-19 东莞市钜欣电子有限公司 Method, device, equipment and storage medium for detecting defect of infrared lens

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021137745A1 (en) * 2019-12-30 2021-07-08 Unibap Ab A method for detection of imperfections in products

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110930347B (en) * 2018-09-04 2022-12-27 京东方科技集团股份有限公司 Convolutional neural network training method, and method and device for detecting welding spot defects
CN111127416A (en) * 2019-12-19 2020-05-08 武汉珈鹰智能科技有限公司 Computer vision-based automatic detection method for surface defects of concrete structure
CN113469951B (en) * 2021-06-08 2022-08-16 燕山大学 Hub defect detection method based on cascade region convolutional neural network
CN114372955A (en) * 2021-12-02 2022-04-19 上海工程技术大学 Casting defect X-ray diagram automatic identification method based on improved neural network
CN114299066B (en) * 2022-03-03 2022-05-31 清华大学 Defect detection method and device based on salient feature pre-extraction and image segmentation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021137745A1 (en) * 2019-12-30 2021-07-08 Unibap Ab A method for detection of imperfections in products

Also Published As

Publication number Publication date
CN114549997A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN114549997B (en) X-ray image defect detection method and device based on regional feature extraction
CN111507958B (en) Target detection method, training method of detection model and electronic equipment
CN111833306A (en) Defect detection method and model training method for defect detection
CN112766110A (en) Training method of object defect recognition model, object defect recognition method and device
CN115880298B (en) Glass surface defect detection system based on unsupervised pre-training
CN111242185A (en) Defect rapid preliminary screening method and system based on deep learning
CN111340796A (en) Defect detection method and device, electronic equipment and storage medium
CN116485779B (en) Adaptive wafer defect detection method and device, electronic equipment and storage medium
CN112907561A (en) Notebook appearance flaw detection method based on deep learning
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
CN115965816B (en) Glass defect classification and detection method and system based on deep learning
CN113256624A (en) Continuous casting round billet defect detection method and device, electronic equipment and readable storage medium
CN115797314B (en) Method, system, equipment and storage medium for detecting surface defects of parts
CN116030237A (en) Industrial defect detection method and device, electronic equipment and storage medium
CN111476759B (en) Screen surface detection method and device, terminal and storage medium
CN112070762A (en) Mura defect detection method and device for liquid crystal panel, storage medium and terminal
CN117495786A (en) Defect detection meta-model construction method, defect detection method, device and medium
CN116363136B (en) On-line screening method and system for automatic production of motor vehicle parts
CN115587989B (en) Workpiece CT image defect detection segmentation method and system
CN117197146A (en) Automatic identification method for internal defects of castings
CN112164025A (en) Method and device for detecting defects of threaded connecting piece, electronic equipment and storage medium
CN114596242A (en) Defect detection method, defect detection device, electronic equipment and computer readable storage medium
CN113592859B (en) Deep learning-based classification method for defects of display panel
CN116758400B (en) Method and device for detecting abnormality of conveyor belt and computer readable storage medium
CN117576416B (en) Workpiece edge area detection method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant