CN115115573A - Transform model-based rivet defect detection method and system - Google Patents

Transform model-based rivet defect detection method and system Download PDF

Info

Publication number
CN115115573A
CN115115573A CN202210103481.3A CN202210103481A CN115115573A CN 115115573 A CN115115573 A CN 115115573A CN 202210103481 A CN202210103481 A CN 202210103481A CN 115115573 A CN115115573 A CN 115115573A
Authority
CN
China
Prior art keywords
region
transform model
pixel values
resolution
feature map
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.)
Pending
Application number
CN202210103481.3A
Other languages
Chinese (zh)
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.)
Shanghai Yuezhan Precision Technology Co ltd
Original Assignee
Shanghai Yuezhan Precision Technology Co ltd
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 Shanghai Yuezhan Precision Technology Co ltd filed Critical Shanghai Yuezhan Precision Technology Co ltd
Priority to CN202210103481.3A priority Critical patent/CN115115573A/en
Publication of CN115115573A publication Critical patent/CN115115573A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and a system for detecting rivet defects based on a transform model, which comprises the following steps: acquiring an original image of the surface of a product to be detected, and inputting the original image into a transform model; generating a mask map containing pixel values of each region through the transform model; determining the defect probability of each region according to the pixel value of each region; corresponding the area with high defect probability to the original picture; determining defects in the original picture according to corresponding results; the beneficial effects of the invention are as follows: inputting an acquired original image of the surface of a product into a transformer model, then carrying out mechanical energy processing on the original image through the transformer model, generating a mask image containing pixel values of all regions according to a processing result, obtaining defect probability of each region according to the pixel values of each region, then corresponding the region with high defect probability with the original image, and then determining defects in the original image according to a corresponding result.

Description

Transform model-based rivet defect detection method and system
Technical Field
The invention relates to the technical field of rivet defect detection, in particular to a transform model-based rivet defect detection method and system.
Background
With the increasing requirements on the quality of industrial products, the detection of the surface defects of the products becomes an important link of production and processing, the surface defects of the products are difficult to quantify due to the interference of uncontrollable factors in the production environment, the rivet is a fastener with extremely high social demand, about two million rivets are needed for one airplane, the demand is high, and the defects are usually small, so the detection is difficult.
The existing rivet defect detection of part of production enterprises adopts a manual visual detection method, which has high requirements on workers, needs to have rich defect identification experience, needs to be continuously operated for a long time and has the defects of low efficiency and high cost; and an optical electromagnetic technology detection method comprises the following steps: the detection of defects is achieved on the basis of optical techniques or electromagnetic signal processing, such techniques being generally greatly affected by the roughness of their surface; there are also traditional machine vision detection algorithms: the traditional machine learning algorithm is widely used as a detection scheme capable of providing stability and reliability, but as the defect types increase, the algorithm is difficult to design and even unwise when the defect types are faced with some defects which are difficult to quantify; and defect detection based on deep learning CNN algorithm: the CNN-based algorithm has the disadvantages that the capability of long-distance feature capture is lacked, the image resolution is often too large in the industrial field, and the CNN-based defect detection cannot fully utilize some global information of the image.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a method and a system for detecting a defect of a rivet based on a transform model, which are used to solve the problem of low defect detection capability of a product in the prior art.
The embodiment of the invention provides a transform model-based rivet defect detection method, which comprises the following steps of: acquiring an original image of the surface of a product to be detected, and inputting the original image into a transform model; generating a mask map containing pixel values of each region through the transform model; determining the defect probability of each region according to the pixel value of each region; corresponding the area with high defect probability to the original picture; and determining the defects in the original picture according to the corresponding result.
The embodiment of the invention also provides a transform model-based rivet defect detection system, which comprises: the acquisition module is used for acquiring an original image of the surface of a product to be detected and inputting the original image into the transform model; the processing module is used for generating a mask map containing pixel values of each region through the transform model and determining the defect probability of each region according to the pixel values of each region; and the corresponding module is used for corresponding the area with the high defect probability with the original picture and determining the defects in the original picture according to the corresponding result.
An embodiment of the present invention further provides a server, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a transform model based rivet defect detection method as described above.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a processor, implements the transform model-based rivet defect detecting method as described above.
Compared with the prior art, the implementation mode of the invention has the main differences and the effects that: the method comprises the steps of inputting an acquired original image of the surface of a product into a transform model, processing the original image through the transform model, generating a mask image containing pixel values of all regions according to processing results, obtaining defect probability of each region according to the pixel values of each region, corresponding the region with high defect probability to the original image, and determining defects in the original image according to corresponding results, so that the defect detection can be performed on the surface of the product at high precision, a manual detection scheme or a traditional visual detection scheme and a classic deep learning CNN algorithm are replaced, and the labor intensity of workers is reduced.
As a further improvement, before the obtaining of the surface original picture of the product to be detected and inputting the surface original picture into the transform model, the method includes: acquiring a product surface picture containing various defects, and extracting a region containing various defects in the product surface picture; calculating pixel values of the areas containing various defects, and labeling the pixel values; and training the transformer model by using the labeled pixel values.
According to the scheme, the Transformer model is trained by using the product surface pictures containing various defects, so that the original pictures of the surface of the product to be detected can be detected by using the Transformer model, the classical Transformer model is applied to the field of industrial defect detection in natural language processing, and the network structure of the model is modified in a targeted manner, so that the model is more suitable for detecting industrial defects.
As a further improvement, the generating, by the transform model, a mask map corresponding to the original image includes: encoding the original picture of the surface of the product to be detected; generating a low-resolution feature map according to the encoding processing result; decoding the low-resolution feature map; a mask map containing pixel values of the respective regions is generated by decoding processing.
As a further improvement, the encoding processing is performed on the original picture obtained on the surface of the product to be detected, and the low-resolution feature map is generated according to the encoding processing result, including: dividing the original picture into a plurality of regions; extracting common features and significant features in a plurality of regions for a plurality of times; generating a feature map according to the extracted common features and the extracted significant features; and compressing the resolution of the feature map, and generating a low-resolution feature map according to a compression result.
As a further improvement, in the decoding processing of the feature map with low resolution, a mask map containing pixel values of each region is generated according to the decoding processing, and the method includes: the resolution of the feature map with low resolution is improved, and a feature map with high resolution is generated according to the improvement result; and generating a mask map containing pixel values of each region according to the high-resolution feature map.
According to the scheme, the common features and the salient features in the multiple regions are extracted for multiple times, the extracted common features and the extracted salient features are used for generating the feature map, the resolution ratio of the feature map is compressed, and the resolution ratio of the feature map is improved, so that the scheme has high global feature extraction capability, good defect segmentation effect and strong defect detection capability.
As a further improvement, the determining the defect probability of each region according to the pixel values of each region includes: and determining the defect probability of each region according to the difference between the pixel value of each region and a preset threshold, wherein the smaller the difference between the pixel value of the region and the preset threshold, the higher the defect probability of the region.
As a further improvement, before the determining the defect probability of each region according to the pixel values of each region, the method includes: and screening the mask image according to the parameters of the mask image, and obtaining the mask image meeting the conditions according to the screening result.
According to the scheme, the mask map is screened according to the parameters of the mask map, and the mask map meeting the conditions is obtained according to the screening result, so that the abnormal detection conditions can be avoided, the normal areas of the product are prevented from being mistakenly judged as the defect areas, and the over-detection can be reduced to the maximum extent.
Drawings
FIG. 1 is a flowchart illustrating a method for detecting defects of rivets based on a transform model according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for detecting defects of a transform-based rivet according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for detecting defects of rivets based on a transform model according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of a transform model-based rivet defect detection system according to a third embodiment of the present invention;
FIG. 5 is a diagram of an electronic device according to a fourth embodiment of the invention;
FIG. 6 is a flowchart illustrating the calculation of the whole of the feature extraction unit according to the present invention;
FIG. 7 is a view showing a mask pattern according to the present invention and a corresponding original picture of the surface of a product to be inspected;
FIG. 8 is a flow chart showing the overall processing and inspection of the product of the present invention;
fig. 9 shows an overall network configuration diagram of the encoding process and the decoding process.
Detailed Description
The following embodiments of the present invention are provided by way of specific examples, and other advantages and effects of the present invention will be readily apparent to those skilled in the art from the disclosure herein. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The first embodiment of the invention relates to a transform model-based rivet defect detection method. The process is shown in fig. 1, and specifically comprises the following steps:
step 101, acquiring an original image of the surface of a product to be detected, and inputting the original image into a transform model;
specifically, the original picture of the surface of the product to be detected is a picture of the surface of the rivet to be detected, and is obtained by shooting with a line scanning camera.
Step 102, a mask map containing pixel values of each region is generated through a transformer model.
Specifically, an original picture of the surface of a product to be detected is obtained and is subjected to encoding processing, then a low-resolution feature map is generated according to the encoding processing result, then the low-resolution feature map is subjected to decoding processing, and finally a mask map containing pixel values of all regions is generated according to the decoding processing, wherein the mask map is a picture with the pixel range of 0-255.
And 103, determining the defect probability of each area according to the pixel value of each area.
Specifically, the defect probability of each region is determined according to the difference between the pixel value of each region and a preset threshold, wherein the smaller the difference between the pixel value of the region and the preset threshold, the higher the defect probability of the region.
And 104, corresponding the area with high defect probability with the original picture.
Specifically, the region with high defect probability is corresponding to the original picture, and the pixel values corresponding to the region with high defect probability are in one-to-one correspondence with the pixel values of the original picture, so that the region with high defect probability is mapped onto the original picture.
And 105, determining the defects in the original picture according to the corresponding result.
In practical application, an original picture of the surface of a product to be detected is processed according to a transform model, a mask image with a pixel range of 0-255 is obtained after the processing, wherein the closer the pixel value is to 255, the higher the probability that the pixel at the position of the original image is defective represents, and then the pixel values of each area of the mask image are in one-to-one correspondence with the pixel values of the original image, so that a defective area in the original image is obtained, specifically as shown in fig. 7.
According to the method, the obtained original image of the surface of the product is input into the transform model, the original image is processed through the transform model, the mask image containing the pixel value of each region is generated according to the processing result, the defect probability of each region is obtained according to the pixel value of each region, the region with high defect probability corresponds to the original image, and the defect in the original image is determined according to the corresponding result, so that the defect detection can be performed on the surface of the product with high precision, the manual detection scheme or the traditional visual detection and the classic deep learning CNN algorithm are replaced, and the labor intensity of workers is reduced.
A second embodiment of the present invention relates to a method for detecting a rivet defect based on a transform model, and the second embodiment is a detailed discussion of the first embodiment as a whole, and mainly includes: in a second embodiment of the present invention, an embodiment is defined, and this embodiment discusses a specific process of training a transform model and generating a mask map containing pixel values of each region through the transform model.
Referring to fig. 2, the present embodiment includes the following steps:
step 201, obtaining a surface picture of a product containing various defects, and extracting a region containing various defects in the surface picture of the product.
Specifically, pictures of the surfaces of products containing various defects are obtained by shooting with a line-scan camera.
In step 202, pixel values of regions containing various defects are calculated and labeled.
Specifically, the difference between the pixel value of the region containing various defects and the preset threshold value is generally small, the preset threshold value is generally 255, and the difference between the pixel value of the region containing various defects and 255 is small.
And step 203, training the transformer model by using the labeled pixel values.
Step 204 is similar to step 101 in the first embodiment, and is not described herein again.
And step 205, encoding the obtained original picture of the surface of the product to be detected.
And step 206, generating a low-resolution feature map according to the encoding processing result.
Specifically, an original picture is divided into a plurality of regions, common features and salient features in the regions are extracted for multiple times, a feature map is generated according to the extracted common features and salient features, the resolution of the feature map is compressed, and a low-resolution feature map is generated according to a compression result.
And step 207, decoding the feature map with the low resolution.
Step 208 generates a mask map containing pixel values of each region according to the decoding process.
Specifically, the resolution of the feature map with low resolution is increased, the feature map with high resolution is generated according to the increasing result, and then the mask map containing the pixel values of each region is generated according to the feature map with high resolution.
Steps 209 to 211 are similar to steps 103 to 105 in the first embodiment, and are not repeated herein.
In the embodiment, the Transformer model can be trained by using the product surface pictures containing various defects, so that the original pictures of the surface of the product to be detected can be detected by using the Transformer model, the classical Transformer model is applied to the field of industrial defect detection in natural language processing, and the network structure of the model is modified in a targeted manner, so that the model is more suitable for detecting the industrial defects; the original picture of the surface of the product to be detected is obtained and is subjected to coding processing and decoding processing, and then the mask map containing the pixel values of all the regions is generated according to the coding processing and the decoding processing, so that the scheme has high global feature extraction capability and high defect detection capability.
A third embodiment of the present invention relates to a method for detecting a rivet defect based on a transform model, and the second embodiment is a detailed explanation of the entire first embodiment, and mainly includes: in a second embodiment of the present invention, an embodiment is specified, and this embodiment discusses specific procedures of the encoding process and the decoding process.
Referring to fig. 3, the present embodiment includes the following steps:
step 301 is similar to step 101 in the first embodiment and step 204 in the second embodiment, and is not described again here.
Step 302, divide the original picture into a plurality of regions.
In practical application, firstly, image slicing is performed on a picture, and corresponding proportion increase is performed on channel dimensions while the image slicing is performed, so that original information of the image is guaranteed to be unchanged to the maximum extent, for example, four times of down-sampling is performed on the original H × W × 3 picture, and then the dimension of each slice is changed into H/4 × W/4 48 correspondingly.
Step 303, extracting common features and salient features in a plurality of regions for a plurality of times.
And step 304, generating a feature map according to the extracted common features and the extracted significant features.
In practical applications, the unit for extracting features is based on a sliding window, and based on the allocation mechanism of such a window, the data transfer manner between the successive layers can be expressed as: suppose X L Representing the current input variable, X, at level L L-1 Denoted is the input variable, X, of level L-1 L+1 Shown is the output variable of layer L +1, X 1 If the temporary parameters of the current layer 1 are represented, the overall calculation method of the unit for extracting the features is as follows:
X L =W(L(X L-1 ))+X L-1 ,X=M(L(X 1 ))+X 1 ,X L+1 =S(L(X L ))+X L ,X L+1 =M(L(X L+1 ))+X L+1 wherein the symbol for operation of the linear layer is L (X) L ) The symbol for operation of the multilayer perceptron is M ((X) L ) Window-based W ((X) for multi-headed attention) L ) Sliding window based multi-headed self-attentiveness of S ((X) L ) As shown in fig. 6 in particular).
And 305, compressing the resolution of the feature map, and generating a low-resolution feature map according to the compression result.
In practical application, the data of each pixel of the original block image is subjected to linear transformation, the H/4W/4C dimensional data is subjected to linear coding and then is converted into H/4W/4C dimensions, wherein C can be a super parameter set manually, the block merging module can compare with the down-sampling operation of the CNN model, the block merging mainly has the function of dividing the image 2x2 into 4 blocks, then splicing is performed in the depth dimension, a linear change is performed in the depth direction, the width and the height of the feature map subjected to the block merging module are halved, and the depth is doubled.
And step 306, improving the resolution of the feature map with low resolution, and generating the feature map with high resolution according to the improvement result.
Step 307, a mask map containing pixel values of each region is generated from the high-resolution feature map.
In practical application, the inverse transform of the down-sampling operation is mainly used for up-sampling an image and recovering the resolution of the image, the final linear projection is used for mapping the final calculated features to a value range corresponding to a label for loss calculation, meanwhile, the result after the linear projection is used as a final output image of a network, the value range of each pixel is projected to a range of 0-1, shallow features of the image are connected through a jump before a mask image is output and spliced to a decoding module of the image, and the operation can retain extraction of some shallow features to a greater extent, and the whole detailed flow is shown in fig. 9.
And 308, screening the mask map according to the parameters of the mask map, and obtaining the mask map meeting the conditions according to the screening result.
Specifically, the parameters include a gray value, a contour area and a rectangle connecting width and height of the mask image, specific numerical value ranges of the gray value, the contour area and the rectangle connecting width and height of the mask image are manually set, and then the mask image is screened through the set specific numerical value ranges, so that some abnormal detection conditions can be avoided.
Steps 309 to 311 are similar to steps 103 to 105 in the first embodiment and steps 209 to 211 in the second embodiment, and are not repeated herein.
According to the embodiment, the common features and the significant features in the multiple regions can be extracted for multiple times, the extracted common features and the extracted significant features are used for generating the feature map, the resolution of the feature map is compressed, and the resolution of the feature map is improved, so that the scheme has high global feature extraction capability, good defect segmentation effect and strong defect detection capability; the mask images are screened according to the parameters of the mask images, and the mask images meeting the conditions are obtained according to the screening results, so that the abnormal detection conditions can be avoided, the normal areas of the product are prevented from being mistakenly judged as the defect areas, and the over-detection can be reduced to the maximum extent.
A fourth embodiment of the present invention relates to a transform model-based rivet defect detecting system, referring to fig. 4, including:
the acquisition module is used for acquiring an original image of the surface of a product to be detected and inputting the original image into the transform model;
the processing module is used for generating a mask map containing pixel values of each region through a transformer model and determining the defect probability of each region according to the pixel values of each region;
and the corresponding module is used for corresponding the area with high defect probability with the original picture and determining the defects in the original picture according to the corresponding result.
It should be understood that this embodiment is a system example corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A fourth embodiment of the present invention relates to a server, please refer to fig. 5, which includes:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the transform model based rivet defect detection method as described above.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting together one or more of the various circuits of the processor and the memory. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A fifth embodiment of the invention relates to a computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the above-mentioned method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method according to the above embodiments may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
In summary, the invention inputs the acquired original image of the product surface into the transform model, processes the original image through the transform model, generates a mask image containing pixel values of each region according to the processing result, obtains the defect probability of each region according to the pixel values of each region, corresponds the region with high defect probability to the original image, and determines the defect in the original image according to the corresponding result, thereby detecting the defect on the product surface with high precision, replacing the manual detection scheme or the traditional visual detection and the classic deep learning CNN algorithm, and reducing the labor intensity of workers. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A transform model-based rivet defect detection method is characterized by comprising the following steps:
acquiring an original image of the surface of a product to be detected, and inputting the original image into a transform model;
generating a mask map containing pixel values of each region through the transform model;
determining the defect probability of each region according to the pixel value of each region;
corresponding the area with high defect probability to the original picture;
and determining the defects in the original picture according to the corresponding result.
2. The transform model-based rivet defect detection method of claim 1, characterized in that: before the obtaining of the surface original picture of the product to be detected and inputting the surface original picture into the transform model, the method comprises the following steps:
acquiring a product surface picture containing various defects, and extracting a region containing various defects in the product surface picture;
calculating pixel values of the areas containing various defects, and labeling the pixel values;
and training the transformer model by using the labeled pixel values.
3. The transform model-based rivet defect detection method according to claim 1, characterized in that: the generating, by the transform model, a mask map corresponding to the original image comprises:
encoding the obtained original picture of the surface of the product to be detected;
generating a low-resolution feature map according to the encoding processing result;
decoding the low-resolution feature map;
a mask map containing pixel values of the respective regions is generated by decoding processing.
4. The transform model-based rivet defect detection method of claim 3, characterized in that: the encoding processing is carried out on the original picture obtained on the surface of the product to be detected, and the low-resolution characteristic diagram is generated according to the encoding processing result, and the method comprises the following steps:
dividing the original picture into a plurality of regions;
extracting common features and significant features in a plurality of regions for a plurality of times;
generating a feature map according to the extracted common features and the extracted significant features;
and compressing the resolution of the feature map, and generating a low-resolution feature map according to a compression result.
5. The transform model-based rivet defect detection method according to claim 3, characterized in that: the decoding processing of the low-resolution feature map and the generation of the mask map containing the pixel values of each region according to the decoding processing include:
the resolution of the feature map with low resolution is improved, and a feature map with high resolution is generated according to the improvement result;
and generating a mask map containing pixel values of each region according to the high-resolution feature map.
6. The transform model-based rivet defect detection method according to claim 1, characterized in that: the determining the defect probability of each region according to the pixel value of each region includes:
and determining the defect probability of each region according to the difference between the pixel value of each region and a preset threshold, wherein the smaller the difference between the pixel value of the region and the preset threshold, the higher the defect probability of the region.
7. The transform model-based rivet defect detection method according to claim 1, characterized in that: before determining the defect probability of each region according to the pixel value of each region, the method comprises the following steps:
and screening the mask image according to the parameters of the mask image, and obtaining the mask image meeting the conditions according to the screening result.
8. The utility model provides a rivet defect detecting system based on transform model which characterized in that: the method comprises the following steps:
the acquisition module is used for acquiring an original image of the surface of a product to be detected and inputting the original image into the transform model;
the processing module is used for generating a mask map containing pixel values of each region through the transformer model and determining the defect probability of each region according to the pixel values of each region;
and the corresponding module is used for corresponding the area with the high defect probability with the original picture and determining the defects in the original picture according to the corresponding result.
9. A server, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a transform model based rivet defect detection method of any of claims 1-7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements a transform model-based rivet defect detection method according to any one of claims 1 to 7.
CN202210103481.3A 2022-01-27 2022-01-27 Transform model-based rivet defect detection method and system Pending CN115115573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210103481.3A CN115115573A (en) 2022-01-27 2022-01-27 Transform model-based rivet defect detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210103481.3A CN115115573A (en) 2022-01-27 2022-01-27 Transform model-based rivet defect detection method and system

Publications (1)

Publication Number Publication Date
CN115115573A true CN115115573A (en) 2022-09-27

Family

ID=83324958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210103481.3A Pending CN115115573A (en) 2022-01-27 2022-01-27 Transform model-based rivet defect detection method and system

Country Status (1)

Country Link
CN (1) CN115115573A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630306A (en) * 2023-07-19 2023-08-22 成都信息工程大学 Defect detection method and device for aircraft semi-circular head rivet

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630306A (en) * 2023-07-19 2023-08-22 成都信息工程大学 Defect detection method and device for aircraft semi-circular head rivet
CN116630306B (en) * 2023-07-19 2023-10-20 成都信息工程大学 Defect detection method and device for aircraft semi-circular head rivet

Similar Documents

Publication Publication Date Title
CN111681273B (en) Image segmentation method and device, electronic equipment and readable storage medium
US9330336B2 (en) Systems, methods, and media for on-line boosting of a classifier
CN111369550A (en) Image registration and defect detection method, model, training method, device and equipment
CN112381788A (en) Part surface defect increment detection method based on double-branch matching network
CN115147418B (en) Compression training method and device for defect detection model
CN110599455A (en) Display screen defect detection network model, method and device, electronic equipment and storage medium
CN115424017B (en) Building inner and outer contour segmentation method, device and storage medium
CN114742799A (en) Industrial scene unknown type defect segmentation method based on self-supervision heterogeneous network
CN115115573A (en) Transform model-based rivet defect detection method and system
CN109086327B (en) Method and device for rapidly generating webpage visual structure graph
CN117036266A (en) Industrial image anomaly detection method and system based on knowledge distillation
CN117197530A (en) Insulator defect identification method based on improved YOLOv8 model and cosine annealing learning rate decay method
CN115861922B (en) Sparse smoke detection method and device, computer equipment and storage medium
CN116843657A (en) Welding defect detection method and device based on attention fusion
CN114511862B (en) Form identification method and device and electronic equipment
CN113344110B (en) Fuzzy image classification method based on super-resolution reconstruction
CN113177566B (en) Feature extraction model training method and device and computer equipment
CN115587989A (en) Workpiece CT image defect detection and segmentation method and system
CN115170807A (en) Image segmentation and model training method, device, equipment and medium
US20230342986A1 (en) Autoencoder-based segmentation mask generation in an alpha channel
Das et al. Object Detection on Scene Images: A Novel Approach
CN111402223A (en) Transformer substation defect problem detection method using transformer substation video image
CN114155400B (en) Image processing method, device and equipment
CN117745786B (en) Road crack depth detection device and detection method based on three-dimensional point cloud data
CN112070137B (en) Training data set generation method, target object detection method and related equipment

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