Image recognition system based on big data

By constructing a knowledge graph of light source parameters and a knowledge graph of regional scratch correlation, optimizing light source parameters and combining them with neural network recognition technology, the problem of insufficient accuracy in the detection of metal processing parts in traditional methods is solved, and efficient and stable scratch recognition results are achieved.

CN121366342AActive Publication Date: 2026-01-20KECHUANGTONG CHENGDU CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511938226.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-01-20
Estimated Expiration
2045-12-22

AI Technical Summary

Technical Problem

Traditional local threshold segmentation algorithms are difficult to adapt to the image differences of different parts in the detection of surface scratches on metal processing parts, resulting in insufficient detection accuracy and reliability.

Method used

We construct a knowledge graph of light source parameters and a knowledge graph of regional scratch correlation, obtain key surface characteristics of metal processing parts through big data analysis, optimize light source parameters, and use a lightweight convolutional neural network for scratch recognition. We also combine graph neural networks to mine the global correlation patterns of scratches.

Benefits of technology

It significantly improves the accuracy and reliability of scratch detection for metal processing parts, reduces missed and false detections, and achieves efficient and stable quality monitoring. It is suitable for defect detection in complex surface or small sample scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366342A_ABST
    Figure CN121366342A_ABST
Patent Text Reader

Abstract

The invention provides an image recognition system based on big data, and relates to the field of image processing, and the system comprises a graph construction module which is used for obtaining a plurality of sample images, and building a light source parameter knowledge graph; the characteristic acquisition module is used for acquiring the key surface characteristics of the current metal processing part; the parameter determination module is used for determining current light source parameters based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; the image acquisition module is used for acquiring an image of the current metal processing part based on the current light source parameter; the graph construction module is further used for constructing a regional scratch correlation knowledge graph corresponding to the current metal processing part; and the scratch identification module is used for carrying out scratch identification on the current metal processing part based on the regional scratch correlation knowledge graph corresponding to the current metal processing part and the image of the current metal processing part, and the method has the advantage of improving the accuracy and reliability of quality detection of the metal processing part.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular to an image recognition system based on big data. BACKGROUND

[0002] Metal processing is a manufacturing process that obtains metal parts with specific shape, size and performance requirements by physically deforming or removing metal raw materials (including plates, strips, pipes, profiles and blocks, etc.) through various process means (such as stamping, forging, casting, cutting, etc.). As the core basic part of industrial manufacturing, metal processing parts are widely used in key fields such as automobiles, aerospace, electronic equipment and mechanical equipment, and their quality directly determines the performance, safety and service life of the whole machine.

[0003] To ensure the quality and performance of metal processing parts, quality detection is an indispensable key link in the production process. As a surface defect, scratches can damage the continuity of metal materials and form stress concentration points. When subjected to load (such as tension, bending, vibration), stress concentration areas are prone to crack propagation, leading to part fracture or fatigue failure. Currently, the mainstream method for detecting surface scratches of metal processing parts is to obtain the surface image of the workpiece to be detected by image acquisition equipment (such as industrial cameras, line scan cameras, etc.), and then identify and extract the scratch area in the image by means of local threshold segmentation algorithm to determine whether there is a scratch defect. However, the traditional local threshold segmentation algorithm has obvious limitations: this algorithm usually sets a uniform local range size for all pixel points for threshold calculation, but when detecting metal processing parts, due to the significant differences in images of different parts (such as material reflectivity, surface texture complexity, light condition changes, etc.), and the distribution and characteristics of scratches (such as length, width, depth, direction, etc.) are different, the fixed local range size is difficult to adapt to the image characteristics of different regions, which seriously affects the accuracy and reliability of quality detection.

[0004] Therefore, it is necessary to provide an image recognition system based on big data to improve the accuracy and reliability of the quality detection of punched metal processing parts. SUMMARY

[0005] The application provides a big data-based image recognition system, comprising: a graph construction module, configured to acquire multiple sample images, and establish a light source parameter knowledge graph, wherein the light source parameter knowledge graph is used to record key surface characteristics of different types of metal processing parts and corresponding optimal light source parameters; a characteristic acquisition module, configured to acquire the key surface characteristics of a current metal processing part; a parameter determination module, configured to determine the current light source parameter based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; an image acquisition module, configured to acquire the image of the current metal processing part based on the current light source parameter; and the graph construction module is further configured to construct a regional scratch correlation knowledge graph corresponding to the current metal processing part, wherein the regional scratch correlation knowledge graph is used to record the correlation of scratches of multiple regions of the current metal processing part; and a scratch identification module, configured to perform scratch identification of the current metal processing part based on the regional scratch correlation knowledge graph corresponding to the current metal processing part and the image of the current metal processing part.

[0006] Further, the multiple sample images comprise images of multiple sample metal processing parts acquired under different light source parameters; the graph construction module is configured to determine multiple surface characteristic factors, determine the initial surface characteristics of each sample metal processing part according to the multiple surface characteristic factors, wherein the initial surface characteristics comprise factor values corresponding to each surface characteristic factor, determine the optimal light source parameter corresponding to each sample metal processing part based on the multiple sample images, determine multiple key surface characteristic factors based on the optimal light source parameter corresponding to each sample metal processing part and the initial surface characteristics of each sample metal processing part, and establish the light source parameter knowledge graph based on the initial surface characteristics of each sample metal processing part, the multiple key surface characteristic factors and the optimal light source parameter corresponding to each sample metal processing part.

[0007] Further, the graph construction module is configured to establish and train a scratch identification model, construct a light source evaluation index set, and determine the optimal light source parameter corresponding to each sample metal processing part based on the scratch identification model, the multiple sample images and the light source evaluation index set.

[0008] Further, the graph construction module is configured to calculate the light source difference value of the optimal light source parameters corresponding to any two sample metal processing parts, calculate the factor difference value of any two sample metal processing parts based on the factor values of the surface characteristic factors of the two sample metal processing parts, calculate the light source influence coefficient of each surface characteristic factor based on the factor difference value and the light source difference value of any two sample metal processing parts, and determine the multiple key surface characteristics based on the light source influence coefficient of each surface characteristic factor.

[0009] Further, the atlas constructing module is configured to: for any two sample metal processing parts, calculate a key characteristic similarity of the two sample metal processing parts based on the initial surface characteristics and the plurality of key surface characteristic factors of each sample metal processing part; classify the plurality of sample metal processing parts based on the key characteristic similarity of any two sample metal processing parts, to determine a plurality of part classes; for each part class, calculate a light source difference value of the optimal light source parameters corresponding to any two sample metal processing parts included in the part class, group the sample metal processing parts included in the part class, to determine a part group included in each part class; and establish a light source parameter knowledge graph based on the plurality of part classes, the part group included in each part class, and the optimal light source parameters corresponding to each sample metal processing part.

[0010] Further, the parameter determining module is configured to: determine a part class corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; determine a part group corresponding to the current metal processing part from the part groups included in the part class corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; determine a similar sample metal processing part from the part group corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; and determine the current light source parameter based on the optimal light source parameters corresponding to the similar sample metal processing part.

[0011] Further, the atlas constructing module is configured to: obtain images of a plurality of historical metal processing parts corresponding to the current metal processing part, wherein the images of the historical metal processing parts are obtained based on the current light source parameter; and construct a region mark correlation knowledge graph corresponding to the current metal processing part based on the images of the plurality of historical metal processing parts corresponding to the current metal processing part.

[0012] Further, the atlas constructing module is configured to: calculate a mark similarity of any two image units based on the images of the plurality of historical metal processing parts corresponding to the current metal processing part; determine a plurality of image regions based on the mark similarity of any two image units; calculate a region mark correlation coefficient of any two image regions based on the images of the plurality of historical metal processing parts corresponding to the current metal processing part; and construct a region mark correlation knowledge graph corresponding to the current metal processing part based on the region mark correlation coefficient of any two image regions.

[0013] Further, the scratch identification module is configured to: determine initial scratch identification results of the plurality of image regions based on the current image of the metal processing part; and perform scratch identification of the current metal processing part based on the initial scratch identification results of the plurality of image regions and the region-scratch correlation knowledge graph corresponding to the current metal processing part.

[0014] Further, the scratch identification module is configured to: determine initial scratch identification results of the plurality of image regions based on the current image of the metal processing part; and perform scratch identification of the current metal processing part based on the initial scratch identification results of the plurality of image regions and the region-scratch correlation knowledge graph corresponding to the current metal processing part.

[0015] Compared with the prior art, the image recognition system based on big data provided by the present application has at least the following beneficial effects: 1. By constructing a light source parameter knowledge graph, the key surface characteristics (such as material, reflectivity, and surface roughness) of the metal processing part are associated and stored with the optimal light source parameters (such as light intensity, angle, and wavelength). For the current part, the system can quickly match the optimal light source parameters, avoid the problems of image overexposure, shadow, or reflection caused by improper light source configuration, and thus obtain high-contrast and low-noise part images, providing a clear and reliable data basis for subsequent scratch identification and significantly improving detection accuracy.

[0016] 2. The region-scratch correlation knowledge graph is constructed by analyzing the statistical correlation rules (such as the correlation between the scratch density of a certain region and the trend of the adjacent region) of different region scratches in historical data, providing global constraints for scratch identification of the current part. Even if the local image is blocked or has low contrast, the system can infer potential scratch features based on the associated knowledge, reducing missed detection and false detection, and being particularly suitable for defect detection in complex surface or small sample scenarios.

[0017] 3. The full-process automation module from light source parameter optimization to scratch identification can complete parameter adaptation, image acquisition, and defect analysis without human intervention. This design not only shortens the detection period, but also reduces the operation threshold through standardized processes, helping enterprises to achieve efficient and stable quality monitoring, providing data support for process optimization and defect tracing, and promoting the intelligent upgrading of production. BRIEF DESCRIPTION OF DRAWINGS

[0018] The present specification will be further illustrated in the form of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting, and in these embodiments, the same reference numbers represent the same structures, wherein: Figure 1is a schematic diagram of a module of a big data-based image recognition system according to some embodiments of the present specification; Figure 2 is a schematic diagram of a process of establishing a light source parameter knowledge graph according to some embodiments of the present specification; Figure 3 is a schematic diagram of a light source parameter knowledge graph according to some embodiments of the present specification; Figure 4 is a schematic diagram of a region scratch correlation knowledge graph according to some embodiments of the present specification. DETAILED DESCRIPTION

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present specification, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some examples or embodiments of the present specification, and for those skilled in the art, the present specification can also be applied to other similar scenarios without creative labor. Unless it is obvious from the language environment or otherwise stated, the same reference numbers in the figures represent the same structure or operation.

[0020] Figure 1 is a schematic diagram of a module of a big data-based image recognition system according to some embodiments of the present specification, as shown in Figure 1 , a big data-based image recognition system can include a graph construction module, a characteristic acquisition module, a parameter determination module, an image acquisition module, and a scratch recognition module.

[0021] The graph construction module is configured to acquire a plurality of sample images and establish a light source parameter knowledge graph.

[0022] The light source parameter knowledge graph is configured to record the key surface characteristics of different types of metal processing parts and the corresponding optimal light source parameters.

[0023] The plurality of sample images include images of a plurality of sample metal processing parts acquired under different light source parameters. Among any two light source parameters, at least one of the light angle, the light point height, or the spectral distribution is different.

[0024] Figure 2 is a schematic diagram of a process of establishing a light source parameter knowledge graph according to some embodiments of the present specification, as shown in Figure 2 , specifically, the graph construction module is configured to: Determine a plurality of surface characteristic factors, wherein the plurality of surface characteristic factors can at least include material, oxide layer, surface roughness, metal color, etc. The surface of high-reflective metal (such as stainless steel, aluminum alloy) is smooth and has high reflectivity, which is easy to form mirror reflection, resulting in image overexposure or local reflection interference, and low-angle ring light or diffuse light (such as dome light) needs to be used to reduce direct reflection, or a polarizer needs to be used to filter reflection. The surface of low-reflective metal (such as cast iron, copper alloy) is rough and has low reflectivity, which may cause low contrast between scratches and background due to insufficient light, and high-brightness light source (such as high-power LED) or backlight source needs to be used to enhance overall brightness, or coaxial light needs to be used to highlight surface details. The surface of oxidized metal (such as aluminum oxide, copper oxide) forms an oxide film, which may change the absorption characteristics of light (such as aluminum oxide is white, and the reflectivity is reduced), and the spectral distribution needs to be adjusted (such as using ultraviolet light to excite fluorescence effect) or the light intensity needs to be increased to compensate for absorption loss. The surface of high-roughness sample metal processing parts (such as sandblasting, forging parts) is uneven, and scratches may be covered by texture or edges may be blurred due to heavy shadows, and high-angle light source (such as ring light) needs to be used to highlight surface undulations, or structured light (such as laser stripe projection) needs to be used to detect scratches through deformation analysis. The surface of low-roughness sample metal processing parts (such as polished, mirror parts) is smooth, scratches are easier to detect but are easily disturbed by light (such as reflection, glare), low-angle light source (such as dark field illumination) needs to be used to enhance the contrast between scratches and background, or polarized light needs to be used to eliminate reflection. Single-color light source (such as blue, green LED) is used to highlight scratches by using the absorption difference of metal to specific wavelengths. Avoid using light source similar to metal color (such as yellow light irradiating gold surface), to prevent low contrast; According to the plurality of surface characteristic factors, determine the initial surface characteristics of each sample metal processing part, wherein the initial surface characteristics include the factor values corresponding to each surface characteristic factor. For numerical surface characteristic factors, the numerical values of the sample metal processing parts corresponding to the surface characteristic factors can be measured as the factor values corresponding to the surface characteristic factors. For non-numerical surface characteristic factors, the factor values corresponding to the surface characteristic factors can be determined by numerical encoding. Based on a plurality of sample images, determine the optimal light source parameters corresponding to each sample metal processing part; Based on the optimal light source parameters corresponding to each sample metal processing part and the initial surface characteristics of each sample metal processing part, determine a plurality of key surface characteristic factors; Based on the initial surface characteristics of each sample metal processing part, the plurality of key surface characteristic factors, and the optimal light source parameters corresponding to each sample metal processing part, establish a light source parameter knowledge graph.

[0025] In some embodiments, the graph construction module is configured to: Establish and train a scratch recognition model; Construct a light source evaluation index set; For each sample metal processing part, based on the scratch identification model, multiple sample images and the light source evaluation index set, the optimal light source parameters corresponding to the sample metal processing part are determined.

[0026] Specifically, the scratch identification model can adopt a lightweight convolutional neural network (CNN) or an improved target detection architecture (such as YOLO (You Only Look Once)) to balance accuracy and real-time performance. The core structure includes an input layer (receiving an RGB image with a resolution of 256x256 or 640x640), a multi-level convolution module (such as 3x3 convolution + ReLU (Rectified Linear Unit) activation function, gradually extracting local features such as edges and textures of scratches, and reducing dimensions through a pooling layer), a feature fusion layer (such as FPN (Feature Pyramid Network) or PANet (Path Aggregation Network), fusing shallow details and deep semantic information to enhance the perception ability of small scratches), and an output layer (classification task using Sigmoid activation to output scratch probability, positioning task using anchor box mechanism to output bounding box coordinates and confidence). The scratch identification model is based on supervised learning, and learns the mapping relationship of “image features → scratch attributes” through a large amount of labeled data (containing scratch position and type label): when the convolution kernel slides across the image, the scratch area will be activated in a specific channel due to features such as contrast mutation and edge continuity. The model optimizes the weights through back propagation, so that the high activation area aligns with the real scratch position. In the training stage, data augmentation (such as rotation, scaling, and adding noise) is used to expand the sample diversity and prevent overfitting; the loss function combines Focal Loss (to solve the imbalance between positive and negative samples) and CIoU Loss (Complete IoU Loss) (to optimize the regression accuracy of the bounding box), and iteratively updates the parameters through gradient descent until the detection rate (such as >98%) and false detection rate (such as <2%) of the model on the validation set meet the requirements.

[0027] The light source evaluation index set is a set of parameters for quantifying the effect of light source characteristics on scratch detection. By evaluating the accuracy, efficiency and robustness of scratch recognition under different light source parameters, the optimal combination is selected. The light source evaluation index set can include scratch contrast (the ratio of the average gray difference between the scratch area and the background area to the standard deviation of the background gray), image signal-to-noise ratio (the ratio of the scratch signal power to the background noise power), edge sharpness (the maximum gray gradient of the scratch edge), texture complexity (the texture similarity between the scratch area and the background area), model confidence mean (the average confidence of the scratch recognition model for detected scratches), inference time (the time (in milliseconds) taken by the scratch recognition model to process a single image), etc.

[0028] For each sample metal processing part, multiple sample images of the sample metal processing part are collected under different combinations of light source parameters, ensuring that the possible variation range of the light source parameters is covered. Subsequently, each sample image is input into the scratch identification model to obtain scratch detection results (such as scratch position, confidence, etc.), and a set of light source evaluation indicators (such as scratch contrast, image signal-to-noise ratio, edge sharpness, average model confidence, and inference time, etc.) are calculated synchronously. By analyzing the numerical changes of each indicator under different light source parameters, the combination of light source parameters that makes the scratch contrast higher (such as > 3), the image signal-to-noise ratio up to standard (such as > 20 dB), the edge sharpness clear (such as > 50), the average model confidence high (such as > 0.9), and the inference time meeting the real-time requirement (such as < 50 ms) is selected. Finally, by comprehensively considering the performances of each indicator, the best light source parameters that make the scratch identification accuracy and efficiency optimal are determined by using weighted scoring.

[0029] It can be understood that by establishing and training a high-precision and real-time scratch identification model, and combining a multi-dimensional light source evaluation indicator set, the best light source parameters are accurately selected for each sample metal processing part. The scratch identification model uses a lightweight CNN or an improved YOLO architecture, fuses multi-level convolution and feature enhancement technology, effectively extracts the edge and texture features of the scratch, and improves the generalization ability through data enhancement and optimization of the loss function, achieving a detection effect with high detection rate and low false detection rate. The light source evaluation indicator set covers key parameters such as scratch contrast, image signal-to-noise ratio, and edge sharpness, and comprehensively quantifies the influence of the light source on the detection quality. For each sample, the module collects images under different light source parameters, inputs the model to obtain detection results and synchronously calculates the evaluation indicators, selects the light source combination that meets the requirements of high contrast, high signal-to-noise ratio, clear edge, high confidence, and low inference time by analyzing the numerical changes of the indicators, and finally determines the best parameters by using weighted scoring. This scheme significantly improves the accuracy and efficiency of scratch detection, and reduces the subjectivity and trial-and-error cost of light source parameter selection.

[0030] In some embodiments, the atlas construction module is configured to: For any two sample metal processing parts, calculate a light source difference value of the best light source parameters corresponding to the two sample metal processing parts; For each surface feature factor, based on the factor values of the surface feature factors corresponding to any two sample metal processing parts, calculate a factor difference value of any two sample metal processing parts, and based on the factor difference value and the light source difference value of any two sample metal processing parts, calculate a light source influence coefficient of the surface feature factor; Based on the light source influence coefficient of each surface feature factor, determine a plurality of key surface features.

[0031] Specifically, for each sample metal processing part, the optimal light source parameter corresponding to the sample metal processing part is encoded into a numerical vector. For any two sample metal processing parts, the Euclidean distance of the numerical vectors of the optimal light source parameters corresponding to the two sample metal processing parts is calculated as the light source difference value of the optimal light source parameters corresponding to the two sample metal processing parts.

[0032] A light source difference value sequence is generated, wherein the value of an element of the light source difference value sequence is the light source difference value of the optimal light source parameters corresponding to two sample metal processing parts, and the number of elements included in the light source difference value sequence is n(n-1) / 2, where n is the total number of sample metal processing parts.

[0033] A factor difference value sequence is generated, wherein the value of an element of the factor difference value sequence is the factor difference value of two sample metal processing parts, and the number of elements included in the factor difference value sequence is n(n-1) / 2, where n is the total number of sample metal processing parts, and the two sample metal processing parts corresponding to the elements at the same position in the light source difference value sequence and the factor difference value sequence are consistent.

[0034] The factor difference value and the light source difference value of any two sample metal processing parts are taken as two variables, the light source difference value sequence and the factor difference value sequence are substituted into the correlation coefficient (for example, Pearson correlation coefficient, Spearman rank correlation coefficient, etc.) calculation formula, the correlation coefficient of the factor difference value and the light source difference value is obtained, the absolute value is taken, the light source influence coefficient of the surface feature factor is obtained, and the surface feature factor with a light source influence coefficient greater than a light source influence coefficient threshold (for example, 0.5) is taken as a key surface feature.

[0035] It can be understood that by quantitatively analyzing the correlation between the light source parameter and the surface feature factor, the key surface feature can be accurately identified. First, the optimal light source parameter of the sample part is encoded into a numerical vector, the Euclidean distance between each two samples is calculated as the light source difference value, and the factor difference value sequence at the corresponding position is generated simultaneously; then, the absolute value correlation of the light source difference and the factor difference is calculated by using the Pearson or Spearman correlation coefficient, and the light source influence coefficient is obtained; finally, the surface feature factor with an influence coefficient exceeding a threshold value (such as 0.5) is selected as a key feature. This method objectively quantifies the influence degree of the light source on the surface feature detection in a data-driven manner, avoiding the deviation of subjective experience judgment; at the same time, through the full combination analysis of each two samples, the data information is fully utilized, and the stability and reliability of the key feature identification are improved.

[0036] In some embodiments, the atlas construction module is configured to: For any two sample metal processing parts, based on the initial surface characteristics and the plurality of key surface feature factors of each sample metal processing part, the key characteristic similarity of the two sample metal processing parts is calculated; based on the similarity of the key characteristics of any two sample metal processing parts, classifying the plurality of sample metal processing parts to determine a plurality of part classes; For each part class, calculating the light source difference value of the optimal light source parameters corresponding to any two sample metal processing parts included in the part class, grouping the sample metal processing parts included in the part class to determine a part group included in each part class; Based on the plurality of part classes, the part group included in each part class, and the optimal light source parameters corresponding to each sample metal processing part, a light source parameter knowledge graph is established.

[0037] Specifically, for each sample metal processing part, based on the initial surface characteristics of the sample metal processing part and a plurality of key surface characteristic factors, the key surface characteristics of the sample metal processing part are determined, wherein the key surface characteristics include the factor values of each key surface characteristic factor corresponding to the sample metal processing part.

[0038] For any two sample metal processing parts, based on the cosine similarity algorithm, the cosine similarity of the key surface characteristics of the two sample metal processing parts is calculated as the similarity of the key characteristics of the two sample metal processing parts.

[0039] According to the similarity of the key characteristics between any two samples, a clustering algorithm (such as K-means or hierarchical clustering) is used to automatically classify all samples. By setting a similarity threshold or dynamically determining the number of clusters, samples with high similarity are classified into the same part class, ensuring that parts of the same class have high consistency in surface characteristics.

[0040] For each part class, the mean value of the key surface characteristics of the sample metal processing parts included in the part class is calculated as the average key surface characteristics corresponding to the part class.

[0041] Using a clustering algorithm (such as K-means or hierarchical clustering) based on the light source difference value of the optimal light source parameters corresponding to any two sample metal processing parts included in the part class, the sample metal processing parts included in the part class are grouped to determine the part group included in each part class, so that the sample metal processing parts in the same group have high similarity in the optimal light source parameters.

[0042] For each part group, the mean value of the key surface characteristics of the sample metal processing parts included in the part group is calculated as the average key surface characteristics corresponding to the part group.

[0043] Figure 3 is a schematic diagram of the light source parameter knowledge graph according to some embodiments of the present specification, such as Figure 3As shown, the light source parameter knowledge graph can include four kinds of nodes, one node representing a part class, one node representing a part group, one node representing a sample metal processing part, and one node representing an optimal light source parameter.

[0044] The characteristic acquisition module is configured to acquire the key surface characteristics of the current metal processing part.

[0045] Specifically, the key surface characteristics of the current metal processing part can include a factor value of each key surface characteristic factor corresponding to the current metal processing part.

[0046] The parameter determination module is configured to determine the current light source parameter based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph.

[0047] In some embodiments, the parameter determination module is configured to: determine the part class corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; determine the part group corresponding to the current metal processing part from the part groups included in the part class corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; determine a similar sample metal processing part from the part group corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; determine the current light source parameter based on the optimal light source parameter corresponding to the similar sample metal processing part.

[0048] Specifically, by calculating the similarity (such as cosine similarity or Euclidean distance) between the key surface characteristics of the current metal processing part and the average key surface characteristics corresponding to each part class, the part class with the highest similarity is selected as the part class corresponding to the current metal processing part.

[0049] After determining the part class, further focus on all part groups under the part class. By calculating the similarity (such as cosine similarity or Euclidean distance) between the key surface characteristics of the current metal processing part and the average key surface characteristics corresponding to each part group included in the part class corresponding to the current metal processing part, the part group with the highest similarity is selected as the part group corresponding to the current metal processing part.

[0050] By calculating the similarity (such as cosine similarity or Euclidean distance) between the key surface characteristics of the current metal processing part and the key surface characteristics corresponding to each sample metal processing part included in the part group corresponding to the current metal processing part, the sample metal processing part with a similarity greater than a similarity threshold (for example, 70%) is selected as the similar sample metal processing part.

[0051] From the light source parameter knowledge graph, find the best light source parameter node associated with similar sample metal processing parts, and extract the best light source parameter. If there are multiple similar sample metal processing parts, the best parameters thereof can be integrated (such as taking the average value or weighted voting) as the light source parameter recommendation for the current part. For example, if three similar samples all use "high-angle ring light + 5000 lux illumination", the parameter combination is directly recommended to ensure that the detection effect of the current part is consistent with the historical optimal case, thereby improving the detection accuracy and efficiency.

[0052] The image acquisition module is configured to acquire an image of the current metal processing part based on the current light source parameter.

[0053] The graph construction module is further configured to construct a region scratch correlation knowledge graph corresponding to the current metal processing part.

[0054] The region scratch correlation knowledge graph is configured to record the correlation of scratches of multiple regions of the current metal processing part.

[0055] In some embodiments, the graph construction module is configured to: acquire images of multiple historical metal processing parts corresponding to the current metal processing part, wherein the images of the historical metal processing parts are acquired based on the current light source parameter, the historical metal processing parts corresponding to the current metal processing part have consistent factor values of the multiple surface feature factors and consistent processing flow and structure as the current metal processing part; construct the region scratch correlation knowledge graph corresponding to the current metal processing part based on the images of the multiple historical metal processing parts corresponding to the current metal processing part.

[0056] In some embodiments, the graph construction module is configured to: calculate the scratch similarity of any two image units based on the images of the multiple historical metal processing parts corresponding to the current metal processing part; determine multiple image regions based on the scratch similarity of any two image units; calculate the region scratch correlation coefficient of any two image regions based on the images of the multiple historical metal processing parts corresponding to the current metal processing part; construct the region scratch correlation knowledge graph corresponding to the current metal processing part based on the region scratch correlation coefficient of any two image regions.

[0057] Specifically, the image can be equally divided into multiple image units.

[0058] For each image unit and each historical metal processing part, the scratch features (e.g., length and width, direction angle, density, direction consistency, etc.) of the image of the historical metal processing part are extracted. The scratch boundary is identified by an edge detection algorithm (such as Canny operator), the length of the longest axis and the average width are calculated as the length and width, a straight line is fitted based on the scratch center line, the angle between the straight line and the image coordinate axis is calculated to quantify the direction angle (such as horizontal, vertical or oblique) of the scratch, the number of scratches in a unit area is counted to calculate the density, and the variance of the direction angle of all scratches in the image unit is calculated to obtain the direction consistency.

[0059] For any two image units, the cosine similarity of the scratch features of the images of each historical metal processing part corresponding to the two image units is calculated, and the average value is obtained to obtain the scratch similarity of the image units.

[0060] A clustering algorithm (such as K-means or hierarchical clustering) is used to divide the multiple image units into multiple image regions based on the scratch similarity of any two image units.

[0061] For any two image regions and each scratch feature factor (e.g., length and width, direction angle, density, direction consistency, etc.), the characteristic values of the scratch feature factors of the images of each historical metal processing part corresponding to the two image regions are substituted into the calculation formula of the correlation coefficient (e.g., Pearson correlation coefficient, Spearman rank correlation coefficient, etc.) to obtain the correlation coefficient of each scratch feature factor corresponding to the two image regions. The correlation coefficients of each scratch feature factor corresponding to the two image regions are averaged to obtain the regional scratch correlation coefficient of the two image regions.

[0062] Figure 4 is a schematic diagram of a regional scratch correlation knowledge graph according to some embodiments of the present specification, as shown in Figure 4 As shown, the nodes in the regional scratch correlation knowledge graph represent image regions, and the weight of the edge between two nodes can be the regional scratch correlation coefficient of the two image regions.

[0063] It can be understood that dividing the image into units and calculating the scratch similarity can accurately capture the microscopic features of local scratches such as morphology and direction, and avoid feature confusion caused by excessively large region division. Secondly, the image units are aggregated based on the similarity to form regions. Further calculation of the scratch correlation coefficient between regions can quantify the statistical dependence relationship of scratches in different regions (e.g., whether the increase of the scratch density in a region will cause the scratch in the adjacent region to become deeper), providing data support for revealing the scratch propagation rule. Finally, the constructed knowledge graph stores the regional association information in a structured form, which can directly display the spatial distribution pattern and potential causal relationship of the scratches.

[0064] The scratch identification module is configured to identify scratches of the current metal processing part based on the region-scratch correlation knowledge graph corresponding to the current metal processing part and the image of the current metal processing part.

[0065] In some embodiments, the scratch identification module is configured to: determine initial scratch identification results of the plurality of image regions based on the image of the current metal processing part, specifically, the initial scratch identification result of an image region can include a feature value of each scratch feature factor, and the initial scratch identification results of the plurality of image regions can be determined by using a scratch identification model; identify scratches of the current metal processing part based on the initial scratch identification results of the plurality of image regions and the region-scratch correlation knowledge graph corresponding to the current metal processing part.

[0066] In some embodiments, the scratch identification module is configured to: determine associated scratch features of the plurality of image regions based on the initial scratch identification results of the plurality of image regions and the region-scratch correlation knowledge graph corresponding to the current metal processing part; identify scratches of the current metal processing part based on the initial scratch identification results of the plurality of image regions, the associated scratch features, and the image of the current metal processing part.

[0067] Specifically, the associated scratch feature of an image region refers to a potential dependency relationship of a cross-region scratch pattern or distribution mined by analyzing the statistical correlation of scratches between regions. For example, if historical data shows that the scratch density of image region A and the scratch direction of image region B have a strong positive correlation (for example, when the density of A increases, B often appears horizontal scratches), then the "horizontal scratch tendency" of image region B is an associated feature affected by image region A. To determine these features, the scratch identification module uses a graph neural network model: first, the region-scratch correlation knowledge graph is constructed into a graph structure, where the nodes represent image regions and the edge weights are the correlation coefficients between the scratches of the regions; then, the initial scratch identification results of each region are input into the graph neural network model as the initial attributes of the nodes for training; the graph neural network model aggregates the feature information of adjacent nodes and learns their associated patterns through a multi-layer message passing mechanism, and finally outputs the associated scratch feature vector of each region. For example, if there is a negative correlation between image region C and image region D in the knowledge graph (when the scratch of image region C becomes deeper, the scratch of image region D becomes shallower), the graph neural network model will generate an associated feature of "shallow scratch tendency" for image region D. Through graph structure data mining, the features of isolated regions are expanded into cross-region dependency relationships, providing global constraints for subsequent identification.

[0068] Finally, the local features of the convolutional neural network branch and the global features of the Transformer are cross-modal aligned to generate a fusion feature map. Finally, the decoder outputs the precise segmentation mask and type classification of the scratch based on the fusion features. For example, if the associated feature suggests that image region C may have a shallow scratch, the model will preferentially search for low-contrast, short-length scratch candidates in the image and suppress false positives of deep scratches. This step significantly improves the robustness of complex surface scratch recognition by combining local visual details and cross-regional association knowledge.

[0069] It can be understood that by fusing the dual mechanisms of data-driven and knowledge-guided, the accuracy and robustness of metal processing part scratch detection are significantly improved. First, the scratch recognition model is used to extract initial features from the image region, which can accurately quantify the numerical representation of each scratch feature factor, providing a fine-grained data basis for subsequent analysis. Second, the region scratch correlation knowledge graph is introduced to mine the statistical correlation rules of different region scratches in historical data (such as whether the increase in the density of scratches in a region will cause scratches in a specific direction in adjacent regions), and to verify and correct the initial recognition results across regions, effectively overcoming the problem of single-region independent detection being easily affected by noise interference or local occlusion. Finally, the scratch recognition results generated by combining the initial features and associated knowledge not only retain the accuracy of local details, but also reflect the reasonableness of global association, improving the accuracy of scratch recognition.

[0070] Finally, it should be understood that the embodiments described in the specification are only used to illustrate the principles of the embodiments of the specification. Other variations can also belong to the scope of the specification. Therefore, as an example rather than a limitation, alternative configurations of the embodiments of the specification can be considered consistent with the teachings of the specification. Accordingly, the embodiments of the specification are not limited to the embodiments explicitly introduced and described in the specification.

Claims

1. A big data based image recognition system, characterized in that, The method comprises the following steps: a graph construction module is configured to acquire a plurality of sample images and establish a light source parameter knowledge graph, wherein the light source parameter knowledge graph is used to record key surface characteristics of different types of metal processing parts and corresponding optimal light source parameters; a characteristic acquisition module is configured to acquire the key surface characteristics of the current metal processing part; a parameter determination module is configured to determine the current light source parameter based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; an image acquisition module is configured to acquire the image of the current metal processing part based on the current light source parameter; the graph construction module is further configured to construct a regional scratch correlation knowledge graph corresponding to the current metal processing part, wherein the regional scratch correlation knowledge graph is used to record the correlation of scratches of a plurality of regions of the current metal processing part; a scratch identification module is configured to perform scratch identification of the current metal processing part based on the regional scratch correlation knowledge graph corresponding to the current metal processing part and the image of the current metal processing part.

2. The big data based image recognition system of claim 1, wherein, The plurality of sample images comprise images of a plurality of sample metal processing parts acquired under different light source parameters; The graph construction module is configured to: determine a plurality of surface characteristic factors; determine the initial surface characteristics of each sample metal processing part according to the plurality of surface characteristic factors, wherein the initial surface characteristics comprise factor values corresponding to each surface characteristic factor; determine the optimal light source parameter corresponding to each sample metal processing part based on the plurality of sample images; determine a plurality of key surface characteristic factors based on the optimal light source parameter corresponding to each sample metal processing part and the initial surface characteristics of each sample metal processing part; establish the light source parameter knowledge graph based on the initial surface characteristics of each sample metal processing part, the plurality of key surface characteristic factors, and the optimal light source parameter corresponding to each sample metal processing part.

3. The big data based image recognition system of claim 2, wherein, The graph construction module is configured to: establish and train a scratch identification model; construct a light source evaluation index set; for each sample metal processing part, determine the optimal light source parameter corresponding to the sample metal processing part based on the scratch identification model, the plurality of sample images, and the light source evaluation index set.

4. The big data based image recognition system of claim 2, wherein, The graph construction module is configured to: for any two sample metal processing parts, calculate a light source difference value of the optimal light source parameters corresponding to the two sample metal processing parts; for each surface characteristic factor, calculate a factor difference value of any two sample metal processing parts based on the factor values of the surface characteristic factors of the any two sample metal processing parts, and calculate a light source influence coefficient of the surface characteristic factor based on the factor difference value and the light source difference value of the any two sample metal processing parts; determine a plurality of key surface characteristics based on the light source influence coefficient of each surface characteristic factor.

5. The big data based image recognition system of claim 2, wherein, The graph construction module is configured to: for any two sample metal processing parts, calculate a key characteristic similarity of the two sample metal processing parts based on the initial surface characteristics of each sample metal processing part and the plurality of key surface characteristic factors; classify the plurality of sample metal processing parts based on the key characteristic similarity of any two sample metal processing parts to determine a plurality of part classes. For each part class, calculate a light source difference value of the optimal light source parameters corresponding to any two sample metal processing parts included in the part class, group the sample metal processing parts included in the part class, and determine a part group included in each part class; Based on the plurality of part classes, the part group included in each part class, and the optimal light source parameters corresponding to each sample metal processing part, a light source parameter knowledge graph is established.

6. The big data based image recognition system of claim 5, wherein, The parameter determination module is configured to: Determine a part class corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; Determine a part group corresponding to the current metal processing part from the part groups included in the part class corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; Determine a similar sample metal processing part from the part group corresponding to the current metal processing part based on the key surface characteristics of the current metal processing part and the light source parameter knowledge graph; Determine the current light source parameter based on the optimal light source parameter corresponding to the similar sample metal processing part.

7. The big data based image recognition system of any one of claims 1-6, wherein, The graph construction module is configured to: Obtain images of a plurality of historical metal processing parts corresponding to the current metal processing part, wherein the images of the historical metal processing parts are obtained based on the current light source parameter; Construct a region scratch correlation knowledge graph corresponding to the current metal processing part based on the images of the plurality of historical metal processing parts corresponding to the current metal processing part.

8. The big data based image recognition system of claim 7, wherein, The graph construction module is configured to: Calculate a scratch similarity of any two image units based on the images of the plurality of historical metal processing parts corresponding to the current metal processing part; Determine a plurality of image regions based on the scratch similarity of any two image units; Calculate a region scratch correlation coefficient of any two image regions based on the images of the plurality of historical metal processing parts corresponding to the current metal processing part; Construct a region scratch correlation knowledge graph corresponding to the current metal processing part based on the region scratch correlation coefficient of any two image regions.

9. The big data based image recognition system of claim 8, wherein, The scratch identification module is configured to: Determine initial scratch identification results of a plurality of image regions based on the image of the current metal processing part; Perform scratch identification of the current metal processing part based on the initial scratch identification results of the plurality of image regions and the region scratch correlation knowledge graph corresponding to the current metal processing part.

10. The big data based image recognition system of claim 9, wherein, The scratch identification module is configured to: Determine associated scratch features of the plurality of image regions based on the initial scratch identification results of the plurality of image regions and the region scratch correlation knowledge graph corresponding to the current metal processing part; Perform scratch identification of the current metal processing part based on the initial scratch identification results of the plurality of image regions, the associated scratch features, and the image of the current metal processing part.

Citation Information

Patent Citations

  • Intelligent detection method for apparent quality of synthetic leather

    CN117269193A

  • Intelligent cloth inspection detection method, system, equipment and medium

    CN118583802A

  • LED product surface defect detection method

    CN119417746A

  • Visual inspection system and method for tiny flaws of industrial products

    CN120612327A

  • Complex structure part-based knowledge graph construction method

    CN120911581A