Search

CN-121982404-A - Intelligent recognition method and system for fusion of deep learning and machine vision

CN121982404ACN 121982404 ACN121982404 ACN 121982404ACN-121982404-A

Abstract

The invention discloses an intelligent recognition method and system for fusion of deep learning and machine vision, which relate to the technical field of industrial vision defect detection and comprise the steps of obtaining an original unfolded gray level image of a detected workpiece, carrying out normalization processing to obtain image data with uniform brightness scale, determining highlight center distribution based on the position with highest brightness of each column, intercepting a local gray level sequence around the highlight center to calculate a brightness change boundary, comparing a plurality of columns of brightness change conditions to obtain reference data for reflecting normal brightness change level, forming a two-dimensional distribution map of brightness deviation amount according to the reference data, fusing the two-dimensional distribution map with a defect probability map generated by a deep learning model to obtain a comprehensive defect scoring map, and extracting a defect area based on scoring results. The invention can realize stable identification of the fine damage to the surface of the workpiece under the conditions of complex illumination and high reflection, and improves the detection precision.

Inventors

  • LI SHUAI
  • WU CHENGZHONG
  • HU LIQUN
  • XU YINGSHUAI
  • ZHANG ZHONGSHENG
  • SONG XINGJIA
  • Wang Fagan
  • ZHANG SHIJIE

Assignees

  • 东华理工大学
  • 江西省通讯终端产业技术研究院有限公司

Dates

Publication Date
20260505
Application Date
20260126

Claims (10)

  1. 1. The intelligent recognition method for fusing deep learning and machine vision is characterized by comprising the following steps of: s1, acquiring an original unfolded gray image of the surface of a detected workpiece, and carrying out normalization processing on the original unfolded gray image to obtain a normalized unfolded gray image; s2, determining a highlight center position based on the maximum pixel gray value of each column in the normalized expanded gray image; s3, intercepting a local section gray scale sequence taking a highlight center position as a center in the normalized unfolded gray scale image and calculating half-width; s4, calculating a local brightness gradient and an expected brightness gradient based on the local section gray scale sequence and the half-width; S5, generating a comprehensive defect scoring graph based on the normalized expanded gray level image, the local brightness gradient and the expected brightness gradient, and extracting a defect region from the comprehensive defect scoring graph.
  2. 2. The intelligent recognition method of the fusion of the deep learning and the machine vision according to claim 1, wherein the normalizing processing is performed on the original unfolded gray image to obtain the normalized unfolded gray image, and the method comprises the following steps: carrying out average operation on all pixel gray values in the original unfolded gray image to obtain a full-image gray average value; Calculating the full-image gray standard deviation based on the original gray values of all pixels in the original unfolded gray image and the full-image gray average value; and carrying out linear normalization processing on the original unfolded gray level image according to the full-image gray level mean value and the full-image gray level standard deviation to obtain a normalized unfolded gray level image.
  3. 3. The intelligent recognition method of the deep learning and machine vision fusion of claim 2, wherein determining the set of highlight center positions based on the maximum pixel gray value of each column in the normalized expanded gray image comprises: Acquiring a row index range and a column index range of a normalized developed gray level image; In the normalized expanded gray-scale image, pixel columns corresponding to all column indexes are processed, and in each pixel column, a row index and a column index corresponding to the maximum pixel gray-scale value are used as highlight center positions to form a highlight center position set.
  4. 4. A method of intelligent recognition of deep learning and machine vision fusion according to claim 3, wherein capturing a local cross-section gray scale sequence centered on a highlight center position in a normalized expanded gray scale image and calculating a half-width comprises: taking a row index corresponding to each column index in the highlight central position set as the highlight central row position of the corresponding column; Extracting a local section gray sequence in a corresponding column according to a preset row offset range by taking the highlight center row position as a center; In the local section gray level sequence, determining the maximum gray level value and the minimum gray level value in the sequence, and taking the intermediate value of the minimum gray level value and the maximum gray level value as the half-height gray level value; Acquiring a first line offset index smaller than or equal to a half-height gray value in a line offset range at the upper side of the highlight central line position to obtain an upper side line offset index; Acquiring a first line offset index smaller than or equal to a half-height gray value in a line offset range at the lower side of the highlight central line position to obtain a lower side line offset index; And determining the half-width corresponding to the highlight center position according to the index difference value between the upper row offset index and the lower row offset index.
  5. 5. The intelligent recognition method of the deep learning and machine vision fusion of claim 4, wherein calculating the local luminance gradient and the desired luminance gradient based on the local cross-section gray scale sequence and the half-width comprises: in each local section gray level sequence, taking the absolute value of the difference value of the gray level value corresponding to the left side line offset index and the gray level value corresponding to the outer adjacent line offset position as the left side local brightness gradient; in each local section gray level sequence, taking the absolute value of the difference value of the gray level value corresponding to the right side line offset index and the gray level value corresponding to the outer adjacent line offset position as the right side local brightness gradient; obtaining a local brightness gradient according to the average value of the left local brightness gradient and the right local brightness gradient; in all column indexes, determining a similar half-width sample set according to whether the half-width corresponding to each column is in a preset half-width similar range or not; And obtaining the expected brightness gradient according to the average value of the local brightness gradients corresponding to each column in the similar half-width sample set.
  6. 6. The intelligent recognition method of the fusion of deep learning and machine vision according to claim 5, wherein generating the comprehensive defect scoring graph based on the normalized expanded gray-scale image, the local luminance gradient and the desired luminance gradient comprises: calculating the difference value between the local brightness gradient and the expected brightness gradient, and taking the ratio of the difference value to the expected brightness gradient as an abnormal ratio; Mapping the abnormal ratio to a highlight center neighborhood of the normalized expanded gray level image to obtain a two-dimensional abnormal ratio image; Normalizing the two-dimensional abnormal ratio image to obtain a normalized abnormal ratio image; inputting the normalized developed gray level image into a pre-trained deep learning model to generate a defect probability map; And adding the normalized abnormal ratio image and the defect probability image at the pixel position to obtain a comprehensive defect scoring image.
  7. 7. The intelligent recognition method of the deep learning and machine vision fusion of claim 1, wherein extracting the defect region from the comprehensive defect scoring graph comprises: setting a comprehensive defect scoring threshold in the comprehensive defect scoring graph; in the comprehensive defect scoring graph, marking pixels with comprehensive defect scores greater than or equal to a comprehensive defect scoring threshold as defective pixels, and marking pixels with comprehensive defect scores smaller than the comprehensive defect scoring threshold as non-defective pixels to obtain a defect binary image; And carrying out connected region division on the defect binary image to obtain a defect region.
  8. 8. An intelligent recognition system integrating deep learning and machine vision, which is applied to the intelligent recognition method integrating deep learning and machine vision as claimed in any one of claims 1-7, wherein the system comprises: The image normalization module is used for acquiring an original unfolded gray level image of the surface of the detected workpiece, and carrying out normalization processing on the original unfolded gray level image to obtain a normalized unfolded gray level image; the highlight center module is used for determining a highlight center position set based on the maximum pixel gray value of each column in the normalized expansion gray image; the half-width module is used for intercepting a local section gray level sequence taking the highlight center position as the center in the normalized unfolding gray level image and calculating half-width; the brightness gradient module is used for calculating local brightness gradient and expected brightness gradient based on the local section gray scale sequence and the half-width; and the defect extraction module is used for generating a comprehensive defect scoring graph based on the normalized expanded gray level image, the local brightness gradient and the expected brightness gradient and extracting a defect region from the comprehensive defect scoring graph.
  9. 9. An electronic terminal is characterized by comprising at least: One or more processors; And a memory storing one or more computer programs; wherein the processor invokes the computer program to implement: The method of any one of claims 1-7.
  10. 10. A computer-readable storage medium storing a computer program, the computer program being invoked by a processor to implement: The method of any one of claims 1-7.

Description

Intelligent recognition method and system for fusion of deep learning and machine vision Technical Field The invention relates to the technical field of industrial visual defect detection, in particular to an intelligent recognition method and system integrating deep learning and machine vision. Background With the continuous improvement of industrial manufacturing quality requirements, high-reflection workpieces such as polished metal cylindrical parts, bearing rollers, power battery cylindrical shells and the like need to be subjected to large-area surface inspection before leaving a factory so as to judge whether micro anomalies such as scratches, indentations, pits, pitting corrosion and the like exist. Because the surface of the workpiece has obvious specular reflection characteristics, a bright band structure which varies along the circumferential direction of the workpiece can be formed in an imaging system, and the shape and brightness distribution of the bright band are extremely easy to be influenced by the local state of the surface. In the detection, the surface image of the workpiece is usually required to be unfolded, so that the circumferential information is presented in a two-dimensional form, and the continuity, the brightness change and the local abnormal area of the bright band are automatically analyzed. Meanwhile, the high-reflection material is extremely sensitive to factors such as light source intensity, camera exposure, surface microbending and the like, and the brightness distribution is unstable due to slight change, so that the difficulty of defect identification is increased, and in order to ensure the detection stability, the fine deviation caused by the whole brightness difference, the local brightness change mode and the surface abnormality of an image is required to be considered. In the prior art, a deep learning model is usually trained directly based on a gray level image or a texture feature map, and a discrimination rule is automatically learned from an overall texture, a local contrast and a bright-dark mode by depending on the model to distinguish a defective area from a normal area. However, since the surface of the high-reflection workpiece has obvious specular reflection characteristics, specular high-light bands distributed along the circumferential direction of the workpiece are formed during imaging, local micro-geometric defects change the reflection characteristics of the high-light bands, so that the morphology of the high-light bands is changed slightly, the change is always only slightly changed in brightness and darkness, the physical forming rule of specular high-light is not fully considered in the prior art, the micro-gradual change is difficult to effectively distinguish from normal reflection textures, and finally, part of micro-defects are in a model low-confidence judging state for a long time, so that structural omission is formed, and the severe requirement of high-end manufacturing industry on defect detection precision cannot be met. Disclosure of Invention The invention aims to solve the defect that the existing deep learning and machine vision detection method is difficult to distinguish the fine and micro brightness gradual change from normal reflection textures so as to generate structural omission, and provides an intelligent recognition method and system for the deep learning and machine vision fusion. In order to solve the problems existing in the prior art, the invention adopts the following technical scheme: an intelligent recognition method integrating deep learning and machine vision comprises the following steps: s1, acquiring an original unfolded gray image of the surface of a detected workpiece, and carrying out normalization processing on the original unfolded gray image to obtain a normalized unfolded gray image; s2, determining a highlight center position based on the maximum pixel gray value of each column in the normalized expanded gray image; s3, intercepting a local section gray scale sequence taking a highlight center position as a center in the normalized unfolded gray scale image and calculating half-width; s4, calculating a local brightness gradient and an expected brightness gradient based on the local section gray scale sequence and the half-width; S5, generating a comprehensive defect scoring graph based on the normalized expanded gray level image, the local brightness gradient and the expected brightness gradient, and extracting a defect region from the comprehensive defect scoring graph. Preferably, the normalizing process is performed on the original unfolded gray scale image to obtain a normalized unfolded gray scale image, including: carrying out average operation on all pixel gray values in the original unfolded gray image to obtain a full-image gray average value; Calculating the full-image gray standard deviation based on the original gray values of all pixels in the original unfolded gray image and the full-