Machine learning system based on artificial intelligence

By using an AI-based machine learning system, image features with and without changing illumination are separated. By combining static and dynamic models, an illumination influence model is constructed, which solves the problems of high misjudgment rate and low efficiency caused by changes in illumination conditions in traditional detection methods, and achieves efficient and accurate industrial detection.

CN120997531APending Publication Date: 2025-11-21GUANGXI POWER GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511115831.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional industrial inspection methods suffer from unstable image features due to changes in lighting conditions, making it difficult to distinguish between real defects and lighting interference, resulting in a high misjudgment rate. Furthermore, they rely on manual adjustment of the light source or a large amount of labeled data, which is inefficient and costly.

Method used

An AI-based machine learning system is employed to separate image features that are illumination-invariant and illumination-changeable through a feature extraction module. Convolutional neural networks are used for association learning, and a dynamic model is combined to construct an illumination influence model. A unified embedding vector is generated using cross-modal alignment units and a contrastive loss function, and a transfer learning mechanism is integrated to accelerate model adaptation.

Benefits of technology

It can accurately distinguish between real defects on the material surface and light interference, significantly reduce the misjudgment rate, quickly adapt to different material scenarios, shorten the deployment cycle of new scenarios, and improve the model's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997531A_ABST
    Figure CN120997531A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial detection, and discloses a machine learning system based on artificial intelligence, and the system comprises a feature extraction module which carries out the illumination-invariant and illumination-altered preprocessing of the same material, obtains the preprocessed image features, and divides the image features into illumination-invariant and illumination-altered image features; and the static model module is used for carrying out association learning on the illumination-invariant image features based on a convolutional neural network, and comprises the following specific steps: carrying out convolution on all illumination-invariant image features through a feature kernel C1 to obtain a feature map S1. According to the invention, through separating and processing illumination-invariant and illumination-altered image features, a static model module is combined to learn illumination-invariant essential features, and a dynamic model module is used to quantify the influence of illumination change. By constructing the illumination influence model, real defects and illumination interference on the surface of the material can be accurately distinguished, and the misjudgment rate in industrial detection is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial inspection technology, and in particular to a machine learning system based on artificial intelligence. Background Technology

[0002] In the fields of industrial inspection and material surface analysis, traditional methods often suffer from unstable image features due to changes in lighting conditions, making it difficult to distinguish between real defects and lighting interference, resulting in high false positive rates and insufficient detection accuracy. Furthermore, traditional methods rely on manual adjustment of the light source or extensive data annotation, which is inefficient and costly, hindering the widespread adoption and application of intelligent inspection.

[0003] An existing patent discloses an artificial intelligence data analysis method and system based on machine learning (publication number CN118428493B), which relates to the field of data analysis technology. The method includes collecting data from a data source and preprocessing it, and then extracting features from the preprocessed data. While this existing technology attempts to mitigate interference through fixed light sources or multi-angle shooting, it lacks a systematic modeling of the invariant characteristics of illumination and the influence of dynamic illumination, resulting in limited model generalization ability and difficulty in adapting to complex and ever-changing industrial scenarios. Summary of the Invention

[0004] This invention provides an artificial intelligence-based machine learning system to solve existing technical problems, addressing the issues of low efficiency and high cost caused by relying on manual adjustment of light sources or large amounts of labeled data.

[0005] To address the aforementioned technical problems, according to one aspect of the present invention, more specifically, an artificial intelligence-based machine learning system, comprising:

[0006] The feature extraction module performs preprocessing on the same material under both constant and changing illumination, acquires the preprocessed image features, and classifies the image features into those under constant and changing illumination.

[0007] The static model module uses a convolutional neural network to learn associations between illumination-invariant image features. Its specific steps include:

[0008] 1) Convolve all the image features with invariant illumination through the feature kernel C1 to obtain the feature map S1;

[0009] 2) Sample the region in feature map S1 that is similar to feature kernel C1 to obtain sample map A1;

[0010] 3) Pass all image features with unchanged illumination through feature kernel C2 again and obtain feature map S2;

[0011] 4) Sample the region in feature map S2 that is similar to feature kernel C2 to obtain sample map A2;

[0012] The attention introduction module outputs a unified embedding vector based on the cosine similarity between sampled images A1 and A2 in all illumination-invariant image features.

[0013] The dynamic model module processes the image features of the illumination change through feature kernel C1 and feature kernel C2 respectively to obtain the vectors of the image feature sampling map A1 and sampling map A2 of the illumination change;

[0014] The model building module is used to construct an illumination effect model based on the relationship between the embedding vectors of illumination-invariant image features and the vectors of sampling maps A1 and A2 of illumination-changed image features.

[0015] The illumination judgment module uses the illumination influence model to determine the changes in illumination based on other image features of the same material.

[0016] Furthermore, the cross-modal alignment unit uses a contrastive loss function to output a unified embedding vector. Therefore, the contrastive loss function is:

[0017] ;

[0018] In the formula, L represents the characteristic features obtained after the same material is photographed under constant illumination; sim represents the cosine similarity between sampled images A1 and A2 in the image features under constant illumination; N is the number of all image feature samples under constant illumination; N represents the total number of samples of all image features under constant illumination.

[0019] Furthermore, the preprocessing for changes in illumination involves the following steps:

[0020] 1) A camera is placed on the vertical plane of the material to acquire image features of the material;

[0021] 2) A fixed light source is placed at a 45° angle to the plane of the material. At this time, the image features acquired by the camera are image features with constant illumination.

[0022] 3) Arrange a circular light source at a 45° angle to the plane of the material. At this time, the image features acquired by the camera are the image features of the change in illumination.

[0023] Furthermore, the material mentioned is one of the following: sheet metal, equipment, or device.

[0024] Furthermore, the convolution kernels in the static model module that are convolved using feature kernels C1 and C2 have the same features as the convolution kernels in the dynamic model module that are convolved using feature kernels C1 and C2.

[0025] Furthermore, the specific steps taken by the model building module to construct the illumination effect model are as follows:

[0026] 1) Change the position of the light source at different angles from 0 to 180° to obtain image features from different angles;

[0027] 2) And sort them according to the degree of influence of light sources at different angles on the illumination of image features;

[0028] 3) Determine the relational feature x based on the degree of influence of the light source and its relationship with the sampling map A1 vector and the unified embedding vector in the image features from different angles;

[0029] 4) Determine the relational feature y based on the degree of influence of the light source and its relationship with the sampled image A2 vector and the unified embedding vector in the image features from different angles;

[0030] 5) Construct a lighting effect model based on the correlation between relational features x and y.

[0031] Furthermore, the illumination influence model is constructed based on variables controlling for both constant and changing illumination. It determines whether illumination influences or interventions exist in the image based on the deviation between the vectors of subsequently acquired sampled images A1 and A2 and the unified embedding vector. Specifically, the illumination influence model includes:

[0032] ;

[0033] In the formula, c represents the condition coefficient used to determine whether the image feature is affected by illumination; This represents the deviation between the vector of the sampled image A1 and the uniform embedding vector; This represents the deviation between the sampled image A2 and the unified embedding vector; , These represent the values ​​that affect the weights of sampling map A1 and sampling map A2, respectively. , These represent the constants that affect the magnitude of the condition coefficient.

[0034] Furthermore, the output of the illumination judgment module is displayed in real time through a visual interface, which simultaneously displays the original image, the analysis curve of the illumination influence model, and the illumination intervention probability score.

[0035] Furthermore, the system integrates a transfer learning mechanism, which allows the weights of feature kernels C1 and C2 of the pre-trained static model module to be transferred to the corresponding convolutional layers of the dynamic model module, thereby accelerating model convergence and improving cross-material generalization ability.

[0036] The artificial intelligence-based machine learning system provided by this invention achieves the following advantages compared to existing technologies:

[0037] 1. This invention separates and processes image features with and without illumination changes, combines a static model module to learn the essential features of illumination invariance, and utilizes a dynamic model module to quantify the impact of illumination changes. By constructing an illumination influence model, it can accurately distinguish between real defects on material surfaces and illumination interference, significantly reducing the misjudgment rate in industrial inspection.

[0038] 2. This invention establishes a correlation model between the light source angle and the conditional coefficient by analyzing the deviation between the sampled image vector and the unified embedding vector under different light source angles through a model building module. When an anomaly is detected, the light interference angle range can be inferred in reverse, guiding the rapid adjustment of the light source position or compensation of the light on site.

[0039] 3. This invention allows the pre-trained feature kernels C1 / C2 weights in the static model module to be directly transferred to the dynamic model module, avoiding redundant training. By combining the unified embedding vector generated by the contrastive loss function as the baseline feature, the system can quickly adapt to different materials, significantly shortening the deployment cycle in new scenarios and enhancing model generalization. Attached Figure Description

[0040] Figure 1 This is a flowchart illustrating the principle of the present invention;

[0041] Figure 2 This is a schematic diagram of sampling diagram A1 in this invention;

[0042] Figure 3 This is a schematic diagram of sampling diagram A2 in this invention;

[0043] Figure 4 This is a schematic diagram of the sampling process in this invention;

[0044] Figure 5 Equivalent condition coefficients and deviations in this invention Relationship diagram;

[0045] Figure 6 Equivalent condition coefficients and deviations in this invention Relationship diagram. Detailed Implementation

[0046] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0047] Example 1

[0048] like Figure 4As shown, the same material (material being one of sheet metal, equipment, or device) undergoes preprocessing with both constant and altered illumination. The preprocessed image features are then acquired and categorized into constant and altered illumination features. The specific steps for the altered illumination preprocessing are as follows:

[0049] 1) A camera is placed on the vertical plane of the material to acquire image features of the material;

[0050] 2) A fixed light source is placed at a 45° angle to the plane of the material. At this time, the image features acquired by the camera are image features with constant illumination.

[0051] 3) Arrange a circular light source at a 45° angle to the plane of the material. At this time, the image features acquired by the camera are the image features of the change in illumination.

[0052] Example 2

[0053] The specific steps for learning associations between illumination-invariant image features based on convolutional neural networks are as follows:

[0054] 1) All image features with invariant illumination are processed through feature kernel C1 (e.g., Figure 2 As shown), convolution is performed on image features to obtain feature map S1 (as shown). Figure 2 As shown, the product of region 1 in the image and feature kernel C1 is region 1 in feature map S1.

[0055] 2) Sample regions in feature map S1 that are similar to feature kernel C1 to obtain sample map A1 (e.g., Figure 2 As shown, region 1 in feature map S1 is similar to feature kernel C1, while region 2 in feature map S1 is not similar to feature kernel C1.

[0056] 3) Again, pass all image features with unchanged illumination through feature kernel C2 and obtain feature map S2 (e.g., ...). Figure 3 As shown, the product of region 1 in the image and feature kernel C2 is region 1 in feature map S2.

[0057] 4) Sample regions in feature map S2 that are similar to feature kernel C2 to obtain sample map A2 (e.g., Figure 2 As shown, regions 1, 2, 3, and 4 in feature map S1 are not similar to feature kernel C2.

[0058] A unified embedding vector is output based on the cosine similarity between sampled images A1 and A2 in all illumination-invariant image features; the cross-modal alignment unit uses a contrastive loss function to output the unified embedding vector, and the contrastive loss function is:

[0059] ;

[0060] In the formula, represents the characteristic features obtained after the same material is photographed under constant illumination; sim represents the cosine similarity between sampled images A1 and A2 in the image features under constant illumination; N is the number of all image feature samples under constant illumination; N represents the total number of samples of all image features under constant illumination.

[0061] The image features of the illumination change are processed by feature kernels C1 and C2 respectively to obtain the vectors of the feature sampling images A1 and A2. The specific process of vectorizing sampling images A1 and A2 is as follows:

[0062] The matrix of the sampling map A1 with changing illumination can be represented as:

[0063] ;

[0064] Therefore, the vector of the sampled image A1 with the changed illumination can be represented as:

[0065] ;

[0066] The norm of the above vector is ;

[0067] Therefore, the deviation between the vector of the sampled image A1 and the unified embedding vector can be expressed as:

[0068] ;

[0069] In the above formula, This refers to the characteristic features obtained after photographing the same material under constant lighting conditions. The norm of the vector representing the change in illumination. This represents the deviation between the vector of the sampled image A1 and the uniform embedding vector.

[0070] Example 3

[0071] like Figure 1 As shown, an illumination effect model is constructed based on the relationship between the embedding vectors of illumination-invariant image features and the vectors of sampling maps A1 and A2 of illumination-changed image features. The specific steps of the model construction module to construct the illumination effect model are as follows:

[0072] 1) Change the position of the light source at different angles from 0 to 180° to obtain image features from different angles;

[0073] 2) And sort them according to the degree of influence of light sources at different angles on the illumination of image features;

[0074] For example, if we acquire 100 samples of image features from different lighting angles, and if, after manual evaluation of a certain image feature sample (which is a more cumbersome process and difficult to apply to large-scale industrial applications), the influence of the light source exceeds that of the other 50 samples, then we can equivalently say that the conditional coefficient of the lighting influence is 50%.

[0075] 3) Determine the relational feature x based on the degree of influence of the light source and its relationship with the sampling map A1 vector and the unified embedding vector in the image features from different angles;

[0076] The deviation between the equivalent condition coefficients and the vector of the sampling map A1 and the unified embedding vector Establish relationships between features x (such as...) Figure 5 As shown in the figure (where the red dots represent the distribution of the 100 collected samples), we have:

[0077] (Formula 1);

[0078] In Formula 1 above, k is used to control The equivalent condition coefficients tend to be constants. And by... Figure 5 The data in the middle can be determined When, in Formula 1 The condition coefficients are approximately equal to those of the equivalent condition coefficients.

[0079] 4) Determine the relational feature y based on the degree of influence of the light source and its relationship with the sampled image A2 vector and the unified embedding vector in the image features from different angles;

[0080] Equivalent condition coefficients and deviations between sampling map A2 and uniform embedding vector Establish mathematical models for the relationships between them (such as...) Figure 6 As shown in the figure (where the red dots represent the distribution of the 100 collected samples), we have:

[0081] (Formula 2);

[0082] In formula 2 above, k is used to control The equivalent condition coefficients tend to be constants. And by... Figure 6 The data in the middle can be determined At that time, the value of k in Formula 2 is approximately the same as the value of k in Formula 1, and the value of k in Formula 2 is... The condition coefficients are approximately equal to those of the equivalent condition coefficients.

[0083] 5) Deviation between the vector of the sampled image A1 and the unified embedding vector Deviation between sampled image A2 and unified embedding vector A mathematical model is established based on the relationship between them, and this is combined with the characteristic relationship derived from Formula 1 and Formula 2 above, and further... Figure 5 , Figure 6 The data in the middle can be determined , When, in Formula 1 With Formula 2 If they are equal, then we have:

[0084] c = (Formula 1) × (Formula 2);

[0085] In other words, the illumination influence model is constructed based on variables controlling for both constant and changed illumination. It determines whether illumination influences or interventions exist in the image based on the deviation between the vectors of subsequently acquired sampled images A1 and A2 and the unified embedding vector. Specifically, the illumination influence model includes:

[0086] ;

[0087] In the formula, c represents the condition coefficient used to determine whether the image feature is affected by illumination; This represents the deviation between the vector of the sampled image A1 and the uniform embedding vector; This represents the deviation between the sampled image A2 and the unified embedding vector; , These represent the values ​​that affect the weights of sampling map A1 and sampling map A2, respectively. , These represent the constants that affect the magnitude of the condition coefficient.

[0088] Then, by sampling the features of the feature image under any illumination, and obtaining the deviation between the sampled image A1 with altered illumination and the sampled image A2 without altered illumination, we have:

[0089] Table 1. Data obtained in Example 1

[0090]

[0091] Table 2 Data obtained in Example 2

[0092]

[0093] Within the same material, different angles of a uniform light source can affect the captured image. According to the statistical data in Tables 1-2, within the range of 10°-50°, the influence of the light source angle is correlated with the condition coefficient c. Therefore, in industrial applications, when the output condition coefficient is between 40%-70%, external light sources can affect camera capture, and the angle of these light sources may be within the 10°-50° range. In this case, precise illumination compensation or occlusion can be performed within this 10°-50° range.

[0094] Example 4

[0095] Metal part surface scratch inspection: Automotive parts manufacturers perform automated inspection of micro-scratches on gear surfaces.

[0096] The specific implementation steps are as follows:

[0097] 1. Feature Extraction

[0098] One hundred scratch-free gear images were acquired using a fixed light source (45° angle) as an illumination-invariant feature set;

[0099] A rotating light source (moving at a constant speed from 0 to 180°) was used to collect 500 images containing artificially simulated scratches as a feature set of illumination changes.

[0100] 2. Static model training

[0101] Feature kernel C1 uses a 5×5 edge detection kernel (Sobel operator) to extract tooth surface texture features;

[0102] Feature kernel C2 uses a 3×3 Gaussian kernel to extract surface finish features;

[0103] A unified embedding vector (256 dimensions) is generated by comparing loss functions.

[0104] 3. Dynamic Model Construction

[0105] Transfer the C1 / C2 weights from the static model to the dynamic module;

[0106] Establish parameters for the illumination effect model: , , , .

[0107] 4. Testing

[0108]

[0109] Example 5

[0110] Detection of microcracks in photovoltaic panels. The specific implementation steps are as follows:

[0111] 1. Dynamic light source simulation

[0112] A weather station linkage system is used to dynamically adjust the compensation light source according to the intensity of natural light.

[0113] The cloud motion simulation is a variant of the "circular motion light source";

[0114] 2. Multimodal feature fusion

[0115]

[0116] 3. Optimized lighting judgment

[0117] The anti-interference algorithm is activated when c > 30%.

[0118] 4. Measured data

[0119]

[0120] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A machine learning system based on artificial intelligence, characterized in that, include: The feature extraction module performs preprocessing on the same material under both constant and changing illumination, acquires the preprocessed image features, and classifies the image features into those under constant and changing illumination. The static model module uses a convolutional neural network to learn associations between illumination-invariant image features. Its specific steps include: 1) Convolve all the image features with invariant illumination through the feature kernel C1 to obtain the feature map S1; 2) Sample the region in feature map S1 that is similar to feature kernel C1 to obtain sample map A1; 3) Pass all image features with unchanged illumination through feature kernel C2 again and obtain feature map S2; 4) Sample the region in feature map S2 that is similar to feature kernel C2 to obtain sample map A2; The attention introduction module outputs a unified embedding vector based on the cosine similarity between sampled images A1 and A2 in all illumination-invariant image features. The dynamic model module processes the image features of the illumination change through feature kernel C1 and feature kernel C2 respectively to obtain the vectors of the image feature sampling map A1 and sampling map A2 of the illumination change; The model building module is used to construct an illumination effect model based on the relationship between the embedding vectors of illumination-invariant image features and the vectors of sampling maps A1 and A2 of illumination-changed image features. The illumination judgment module uses the illumination influence model to determine the changes in illumination based on other image features of the same material.

2. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The cross-modal alignment unit uses a contrastive loss function to output a unified embedding vector. Therefore, the contrastive loss function is: ; In the formula, L represents the characteristic features obtained after the same material is photographed under constant illumination; sim represents the cosine similarity between sampled images A1 and A2 in the image features under constant illumination; N is the number of all image feature samples under constant illumination; N represents the total number of samples of all image features under constant illumination.

3. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The preprocessing steps for changing the lighting are as follows: 1) A camera is placed on the vertical plane of the material to acquire image features of the material; 2) A fixed light source is placed at a 45° angle to the plane of the material. At this time, the image features acquired by the camera are image features with constant illumination. 3) Arrange a circular light source at a 45° angle to the plane of the material. At this time, the image features acquired by the camera are the image features of the change in illumination.

4. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The material mentioned is one of the following: sheet metal, equipment, or device.

5. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The convolution kernels in the static model module, which are convolved using feature kernels C1 and C2, have the same features as the convolution kernels in the dynamic model module, which are convolved using feature kernels C1 and C2.

6. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The specific steps for the model building module to construct the illumination effect model are as follows: 1) Change the position of the light source at different angles from 0 to 180° to obtain image features from different angles; 2) And sort them according to the degree of influence of light sources at different angles on the illumination of image features; 3) Determine the relational feature x based on the degree of influence of the light source and its relationship with the sampling map A1 vector and the unified embedding vector in the image features from different angles; 4) Determine the relational feature y based on the degree of influence of the light source and its relationship with the sampled image A2 vector and the unified embedding vector in the image features from different angles; 5) Construct a lighting effect model based on the correlation between relational features x and y.

7. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The illumination influence model is constructed based on variable control of constant and changing illumination. It determines whether there is illumination influence or intervention in the image based on the deviation between the vectors of the subsequently acquired sampling images A1 and A2 and the unified embedding vector.

8. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The output of the illumination judgment module is displayed in real time through a visual interface, which simultaneously displays the original image, the analysis curve of the illumination influence model, and the illumination intervention probability score.

9. The machine learning system based on artificial intelligence according to claim 1, characterized in that: The system integrates a transfer learning mechanism that allows the weights of feature kernels C1 and C2 from the pre-trained static model module to the corresponding convolutional layers of the dynamic model module, thereby accelerating model convergence and improving cross-material generalization ability.