Precision injection mold surface defect visual identification system and method
Through artificial intelligence and machine vision technology, the surface defects of precision injection molds are automatically identified, solving the problems of low efficiency and low accuracy of traditional detection methods, and achieving higher detection accuracy and adaptability.
Patent Information
- Application Number
- CN202411333261.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-06-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional mold surface defect detection methods rely on manual visual inspection or simple optical measurement equipment, resulting in low detection efficiency and low accuracy, and the results rely on the operator's experience, resulting in poor consistency and reliability of the detection results.
Using artificial intelligence and machine vision technology, mold surface state images are collected through industrial cameras, grayscale processing, shape and texture feature extraction, and combined with the bidirectional global attention joint perception module, surface shape-texture combined fine-grained perception feature map is generated to achieve automated surface defect recognition.
It improves the accuracy and adaptability of mold surface defect recognition, enhances the generalization ability of defect visual recognition system, and avoids the problems of inefficiency and low accuracy of traditional methods.
Smart Images

Figure CN120088182A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of precision injection molds, and more specifically, to a visual recognition system and method for surface defects of precision injection molds. Background Art
[0002] Precision injection molds play a crucial role in modern manufacturing, especially in fields such as automotive, electronics, and medical devices. The surface quality of these molds directly affects the accuracy and appearance of the final products. Any surface defects such as scratches, cracks, depressions, etc. may lead to a decline in the quality of injection-molded parts and even the scrapping of an entire production batch. Therefore, the detection of surface defects and surface quality control of precision injection molds are particularly important.
[0003] However, traditional methods for detecting surface defects of molds mainly rely on manual visual inspection or simple optical measurement devices. Manual inspection requires checking the mold surface one by one, which is time-consuming. Especially when dealing with a large number of molds, the detection speed cannot meet the high-efficiency requirements of modern production lines. At the same time, when using simple optical measurement devices to detect surface defects of precision injection molds, the detection results often depend on the experience and technical level of the operator. Different inspectors may have different judgment criteria, which will lead to poor consistency and reliability of the detection results. In addition, manual visual inspection is difficult to provide objective data support, and it may be difficult to detect defects in some subtle and hidden parts, resulting in a decline in the quality of precision injection molds and affecting the product accuracy and appearance quality of injection-molded parts.
[0004] Therefore, an optimized visual recognition system for surface defects of precision injection molds is desired. Summary of the Invention
[0005] The present application provides a visual recognition system and method for surface defects of precision injection molds, which can utilize artificial intelligence and machine vision technologies to achieve more intelligent visual recognition and detection of surface defects of precision injection molds, thereby avoiding the low efficiency and low accuracy problems of traditional manual visual inspection or simple optical measurement device detection, contributing to improving the accuracy and self-adaptability of surface defect recognition of precision injection molds, and enhancing the generalization ability of the defect visual recognition system.
[0006] In a first aspect, a visual recognition system for surface defects of precision injection molds is provided, including:
[0007] A surface state image acquisition module for precision injection molds, configured to acquire a surface state image of a precision injection mold collected by an industrial camera;
[0008] A surface state image grayscale processing module, configured to perform grayscale processing on the surface state image of the precision injection mold to obtain a grayscale image of the mold state;
[0009] The multi-dimensional feature extraction module for die state is used to extract shape features and texture features based on the die state from the grayscale image of the die state to obtain a die state surface shape feature map and a die state surface texture feature map;
[0010] The multi-dimensional feature fine-grained joint perception module for die state is used to input the die state surface shape feature map and the die state surface texture feature map into a bidirectional global attention joint perception module based on fine-grained deconstruction to obtain a surface shape-texture joint fine-grained perception feature map;
[0011] The surface defect detection module is used to identify surface defects based on the surface shape-texture joint fine-grained perception feature map to determine whether there are surface defects.
[0012] In a possible implementation manner, the multi-dimensional feature extraction module for die state includes:
[0013] The die state surface shape feature capture unit is used to input the grayscale image of the die state into a shape feature extractor based on a first deep neural network model to obtain the die state surface shape feature map;
[0014] The die state surface texture feature capture unit is used to input the grayscale image of the die state into a texture feature extractor based on a second deep neural network model to obtain the die state surface texture feature map.
[0015] In a possible implementation manner, the shape feature extractor based on the first deep neural network model is a shape feature extractor based on a first convolutional neural network model, and the texture feature extractor based on the second deep neural network model is a texture feature extractor based on a second convolutional neural network model.
[0016] In a possible implementation manner, the multi-dimensional feature fine-grained joint perception module for die state includes:
[0017] The die state feature fine-grained deconstruction unit is used to perform feature fine-grained deconstruction on the die state surface shape feature map and the die state surface texture feature map to obtain a set of die state surface shape channel dimension local feature matrices and a set of die state surface texture channel dimension local feature matrices;
[0018] The first die state attention interaction unit is configured to use each die state surface shape channel dimension local feature matrix in the set of die state surface shape channel dimension local feature matrices as a query feature matrix, use the set of die state surface texture channel dimension local feature matrices as a set of key feature matrices, and input the query feature matrix and the set of key feature matrices into a one-way global attention interaction module based on a first transformer structure to obtain a set of one-way global attention optimized die state surface shape channel dimension local feature matrices;
[0019] The second die state attention interaction unit is configured to use each die state surface texture channel dimension local feature matrix in the set of die state surface texture channel dimension local feature matrices as a query feature matrix, use the set of die state surface shape channel dimension local feature matrices as a set of key feature matrices, and input the query feature matrix and the set of key feature matrices into a one-way global attention interaction module based on a second transformer structure to obtain a set of one-way global attention optimized die state surface texture channel dimension local feature matrices;
[0020] The die state feature channel dimension coupling unit is configured to perform feature channel dimension coupling on the set of one-way global attention optimized die state surface shape channel dimension local feature matrices and the set of one-way global attention optimized die state surface texture channel dimension local feature matrices respectively to obtain a one-way global interaction optimized die state surface shape feature map and a one-way global interaction optimized die state surface texture feature map;
[0021] The die state multi-dimensional feature joint unit is configured to calculate the position-wise weighted sum between the one-way global interaction optimized die state surface shape feature map and the one-way global interaction optimized die state surface texture feature map to obtain the surface shape-texture joint fine-grained perception feature map.
[0022] In a possible implementation manner, the first die state attention interaction unit is configured to:
[0023] Select a predetermined die state surface shape channel dimension local feature matrix from the set of die state surface shape channel dimension local feature matrices as a query feature matrix;
[0024] Calculate the product between the predetermined die state surface shape channel dimension local feature matrix and the transpose matrix of each die state surface texture channel dimension local feature matrix in the set of die state surface texture channel dimension local feature matrices to obtain a set of die state surface shape-texture channel dimension local semantic interaction feature matrices;
[0025] After dividing each die state surface shape-texture channel dimension local semantic interaction feature matrix in the set of die state surface shape-texture channel dimension local semantic interaction feature matrices by the square root of the scale of the predetermined die state surface shape channel dimension local feature matrix at each position, the softmax function is then used to perform softmax normalization on each feature matrix in the resulting set of feature matrices to obtain a set of die state surface shape channel dimension local weight matrices;
[0026] Using the set of die state surface shape channel dimension local weight matrices as the weighting weights, calculate the position-wise weighted sum between each die state surface shape channel dimension local feature matrix in the set of die state surface shape channel dimension local feature matrices to obtain the one-way global attention optimized die state surface shape channel dimension local feature matrix.
[0027] In a possible implementation manner, the second die state attention interaction unit is used for:
[0028] Select a predetermined die state surface texture channel dimension local feature matrix from the set of die state surface texture channel dimension local feature matrices as the query feature matrix;
[0029] Calculate the product between the predetermined die state surface texture channel dimension local feature matrix and the transpose matrix of each die state surface shape channel dimension local feature matrix in the set of die state surface shape channel dimension local feature matrices to obtain a set of die state surface texture-shape channel dimension local semantic interaction feature matrices;
[0030] After dividing each die state surface texture-shape channel dimension local semantic interaction feature matrix in the set of die state surface texture-shape channel dimension local semantic interaction feature matrices by the square root of the scale of the predetermined die state surface texture channel dimension local feature matrix at each position, the softmax function is then used to perform softmax normalization on each feature matrix in the resulting set of feature matrices to obtain a set of die state surface texture channel dimension local weight matrices;
[0031] Using the set of die state surface texture channel dimension local weight matrices as the weighting weights, calculate the position-wise weighted sum between each die state surface texture channel dimension local feature matrix in the set of die state surface texture channel dimension local feature matrices to obtain the one-way global attention optimized die state surface texture channel dimension local feature matrix.
[0032] In a possible implementation, the surface defect detection module is configured to: input the surface shape-texture joint fine-grained perception feature map into a surface defect recognition module based on a classifier to obtain a recognition result, where the recognition result is used to indicate whether there is a surface defect.
[0033] In a possible implementation, the surface defect detection module includes:
[0034] A joint fine-grained perception feature flattening unit, configured to flatten the surface shape-texture joint fine-grained perception feature map into a surface shape-texture joint fine-grained perception feature vector according to a row vector or a column vector;
[0035] A joint fine-grained perception feature fully-connected encoding unit, configured to perform fully-connected encoding on the surface shape-texture joint fine-grained perception feature vector using the fully-connected layer of the classifier to obtain a fully-connected encoded surface shape-texture joint fine-grained perception feature vector;
[0036] A recognition label probability generation unit, configured to input the fully-connected encoded surface shape-texture joint fine-grained perception feature vector into the Softmax classification function of the classifier to obtain probability values of the surface shape-texture joint fine-grained perception feature map belonging to each recognition label;
[0037] A recognition result determination unit, configured to determine the recognition label corresponding to the maximum of the probability values as the recognition result.
[0038] In a second aspect, a method for visual recognition of surface defects of a precision injection mold is provided, including:
[0039] Obtain a surface state image of a precision injection mold collected by an industrial camera;
[0040] Perform grayscale processing on the surface state image of the precision injection mold to obtain a grayscale mold state image;
[0041] Extract shape features and texture features based on the mold state from the grayscale mold state image to obtain a mold state surface shape feature map and a mold state surface texture feature map;
[0042] Input the mold state surface shape feature map and the mold state surface texture feature map into a bidirectional global attention joint perception module based on fine-grained deconstruction to obtain a surface shape-texture joint fine-grained perception feature map;
[0043] Perform surface defect recognition based on the surface shape-texture joint fine-grained perception feature map to determine whether there is a surface defect.
[0044] In a possible implementation, shape feature extraction and texture feature extraction based on the mold state are performed on the grayscale image of the mold state to obtain a mold state surface shape feature map and a mold state surface texture feature map, including:
[0045] Input the grayscale image of the mold state into a shape feature extractor based on a first deep neural network model to obtain the mold state surface shape feature map;
[0046] Input the grayscale image of the mold state into a texture feature extractor based on a second deep neural network model to obtain the mold state surface texture feature map.
[0047] A visual recognition system and method for surface defects of a precision injection mold provided by this application collect surface state images of the precision injection mold through an industrial camera to ensure image clarity and rich details, and then introduce image processing and analysis algorithms based on artificial intelligence and machine vision at the backend to analyze the surface state images of the precision injection mold, so as to capture the shape and surface texture state features of the mold in the images, thereby automatically identifying and detecting surface defects of the precision injection mold. In this way, it is possible to use artificial intelligence and machine vision technologies to achieve more intelligent visual recognition and detection of surface defects of precision injection molds, thus avoiding the low efficiency and low accuracy problems of traditional manual visual inspection or simple optical measurement equipment detection, helping to improve the accuracy and adaptability of surface defect recognition of precision injection molds, and enhancing the generalization ability of the defect visual recognition system. Description of the Drawings
[0048] Figure 1 It is a schematic block diagram of a visual recognition system for surface defects of a precision injection mold according to an embodiment of this application.
[0049] Figure 2 It is a schematic diagram of data flow of a visual recognition system for surface defects of a precision injection mold according to an embodiment of this application.
[0050] Figure 3 It is a schematic block diagram of a mold state multi-dimensional feature extraction module in a visual recognition system for surface defects of a precision injection mold according to an embodiment of this application.
[0051] Figure 4 It is a schematic block diagram of a mold state multi-dimensional feature fine-grained joint perception module in a visual recognition system for surface defects of a precision injection mold according to an embodiment of this application.
[0052] Figure 5 It is a schematic block diagram of a surface defect detection module in a visual recognition system for surface defects of a precision injection mold according to an embodiment of this application.
[0053] Figure 6Schematic flowchart of the visual recognition method for surface defects of the precision injection mold according to the embodiment of the present application. Detailed implementation manners
[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall also fall within the protection scope of the present application.
[0055] Traditional means for detecting surface defects of molds rely on human visual inspection or basic optical tools. Such methods are not only inefficient, especially when dealing with a large number of molds, but also lead to increased instability and unreliability of the detection results due to high dependence on personal experience and subjective judgment. In addition, this method lacks objective data basis, and it is more difficult to detect those extremely small or internal defects in the mold that are difficult to observe, which will directly lead to a decline in the quality of the mold and further affect the accuracy and appearance of the finished product.
[0056] To address the above technical problems, the technical concept of the present application is to collect the surface state images of the precision injection mold through an industrial camera to ensure image clarity and rich details, and then introduce image processing and analysis algorithms based on artificial intelligence and machine vision at the backend to analyze the surface state images of the precision injection mold, so as to capture the shape and surface texture state characteristics of the mold in the images, thereby automatically identifying and detecting the surface defects of the precision injection mold. In this way, the intelligent visual recognition and detection of surface defects of the precision injection mold can be realized by using artificial intelligence and machine vision technologies, avoiding the low efficiency and low accuracy problems of traditional manual visual inspection or simple optical measurement equipment detection, helping to improve the accuracy and adaptability of the recognition of surface defects of the precision injection mold, and enhancing the generalization ability of the defect visual recognition system.
[0057] Figure 1 Schematic block diagram of the visual recognition system for surface defects of the precision injection mold according to the embodiment of the present application. Figure 2 Schematic diagram of the data flow of the visual recognition system for surface defects of the precision injection mold according to the embodiment of the present application. As Figure 1 and Figure 2As shown in the figure, the visual recognition system 100 for surface defects of precision injection molds includes: a surface state image acquisition module 110 for precision injection molds, which is used to obtain the surface state image of the precision injection mold collected by an industrial camera; a surface state image grayscale processing module 120, which is used to perform grayscale processing on the surface state image of the precision injection mold to obtain a grayscale image of the mold state; a multi-dimensional feature extraction module 130 for the mold state, which is used to perform shape feature extraction and texture feature extraction based on the mold state on the grayscale image of the mold state to obtain a surface shape feature map of the mold state and a surface texture feature map of the mold state; a multi-dimensional feature fine-grained joint perception module 140 for the mold state, which is used to input the surface shape feature map of the mold state and the surface texture feature map of the mold state into a bidirectional global attention joint perception module based on fine-grained deconstruction to obtain a surface shape-texture joint fine-grained perception feature map; a surface defect detection module 150, which is used to perform surface defect recognition based on the surface shape-texture joint fine-grained perception feature map to determine whether there are surface defects.
[0058] In the above visual recognition system for surface defects of precision injection molds, the surface state image acquisition module 110 for precision injection molds is used to obtain the surface state image of the precision injection mold collected by an industrial camera. That is, to obtain the surface state image of the precision injection mold collected by an industrial camera, an industrial camera is used to take a high-precision photo of the surface of the precision injection mold to ensure image clarity and richness of details. Optionally, in an embodiment of the present application, obtaining the surface state image of the precision injection mold collected by an industrial camera includes: First, select a suitable industrial camera according to the requirements of the mold size, surface characteristics, and detection accuracy to be detected. The selection of the industrial camera should consider factors such as resolution, frame rate, and sensitivity. Then, set the camera parameters, including exposure time, gain, white balance, etc. These parameters directly affect the imaging quality. To ensure clear images and retain as many details as possible, these parameters need to be adjusted according to the actual environment. Next, arrange the lighting conditions. Good lighting is the key to obtaining high-quality images. The lighting scheme should be designed to eliminate problems such as shadows, reflections, or overexposure, and ensure that the mold surface is presented evenly and without interference. At the same time, position and fix the mold. To ensure the consistency of each shot, a stable positioning system is required to place the mold so that the mold is in the same shooting position and angle. After the above preparations are completed, the industrial camera can be used to take a photo of the mold surface. When shooting, it is necessary to ensure that the mold surface is clean, without oil stains or other contaminants, so as not to affect the image quality.
[0059] In the above-mentioned visual recognition system for surface defects of precision injection molds, the surface state image grayscale processing module 120 is used to perform grayscale processing on the surface state image of the precision injection mold to obtain a grayscale image of the mold state. It should be understood that in the actual process of identifying surface defects of precision injection molds, since defects are usually reflected in the implicit feature distributions of shapes and textures, rather than color feature information, color features will introduce a large amount of irrelevant information and noise interference. Therefore, in the technical solution of this application, the surface state image of the precision injection mold is grayscale processed to obtain a grayscale image of the mold state. That is to say, since color information is not the most important feature when detecting surface defects of molds, grayscale processing can avoid the interference caused by color, making the shapes, edges, textures, and details in the image more easily highlighted, which helps the feature extraction algorithm better capture and identify the location and form of defects. In addition, grayscale processing can reduce the amount of data and lower the computational complexity of subsequent processing.
[0060] Optionally, in an embodiment of this application, performing grayscale processing on the surface state image of the precision injection mold to obtain a grayscale image of the mold state includes: First, read the surface state image of the precision injection mold collected by an industrial camera. Then, separate the pixel values of the red, green, and blue channels from the original image. Next, perform weighted averaging on the RGB values of each pixel point to obtain the grayscale value of the pixel. Then, replace the original RGB value with the calculated grayscale value to create a new grayscale image of the mold state. Finally, save the processed grayscale image of the mold state for subsequent feature extraction and defect identification.
[0061] In the above-mentioned visual recognition system for surface defects of precision injection molds, the mold state multi-dimensional feature extraction module 130 is used to extract shape features and texture features based on the mold state from the grayscale image of the mold state to obtain a mold state surface shape feature map and a mold state surface texture feature map. It should be understood that the grayscale image of the mold state is input into a shape feature extractor based on a first convolutional neural network model for feature mining to extract surface shape feature information of the mold in the grayscale image of the mold state, thereby obtaining a mold state surface shape feature map. And, the grayscale image of the mold state is input into a texture feature extractor based on a second convolutional neural network model for feature mining to extract surface texture feature information of the mold in the grayscale image of the mold state, thereby obtaining a mold state surface texture feature map. It should be understood that the surface shape features of the mold usually involve the contour, edges, and overall geometric structure of the mold. Through the processing of the shape feature extractor based on the first convolutional neural network model, the shape information on the mold surface can be effectively captured, which is crucial for detecting shape-related defects such as cracks and notches. The surface texture features of the mold involve the fine structure of the mold surface, such as roughness and texture patterns. Through the processing of the texture feature extractor based on the second convolutional neural network model, the subtle changes in the texture of the mold surface can be captured, which is very important for identifying defects that do not change the shape of the object but change the surface properties, such as scratches and spots, which usually exhibit specific texture patterns rather than obvious shape changes.
[0062] Figure 3 is a schematic block diagram of the mold state multi-dimensional feature extraction module in the visual recognition system for surface defects of precision injection molds according to an embodiment of the present application. As Figure 3 shown, optionally, in an embodiment of the present application, the mold state multi-dimensional feature extraction module 130 includes: a mold state surface shape feature capture unit 131, configured to input the grayscale image of the mold state into a shape feature extractor based on a first deep neural network model to obtain the mold state surface shape feature map; a mold state surface texture feature capture unit 132, configured to input the grayscale image of the mold state into a texture feature extractor based on a second deep neural network model to obtain the mold state surface texture feature map.
[0063] Optionally, in an embodiment of the present application, the shape feature extractor based on the first deep neural network model is a shape feature extractor based on the first convolutional neural network model, and the texture feature extractor based on the second deep neural network model is a texture feature extractor based on the second convolutional neural network model. Specifically, the grayscale image is input into the shape feature extractor based on the first convolutional neural network model. This model learns the shape features of the mold surface through multiple convolutional layers, pooling layers, and non-linear activation functions. Through convolutional operations, the model can identify shape features such as mold contours and edges, thereby generating a shape feature map of the mold state surface. Similarly, the grayscale image is input into the texture feature extractor based on the second convolutional neural network model. This model also performs convolutional operations, but its goal is to capture the texture features of the mold surface, such as surface roughness and patterns. Through training, the model can identify the texture patterns on the mold surface and then generate a texture feature map of the mold state surface.
[0064] Optionally, in another embodiment of the present application, an algorithm based on handcrafted features can be used to extract the shape and texture features of the mold state, which can reduce the demand for big data to a certain extent and can customize the feature extraction process for specific problems. For shape feature extraction, edge detection algorithms such as Canny edge detection or Sobel operators can be used to find the edges of the mold surface, thereby extracting the contour information of the mold. Additionally, the Hough transform can be used to detect geometric shapes such as lines or circles on the mold, thereby obtaining shape features. For texture feature extraction, methods such as the gray-level co-occurrence matrix (GLCM) can be used to quantify the texture attributes of the mold surface. The GLCM can calculate a series of statistics describing texture characteristics, such as contrast, energy, and homogeneity, by modeling the gray-level value relationships between adjacent pixels in the image. In addition, local binary patterns (LBP) can also be applied to extract texture features. The LBP method constructs a feature descriptor by comparing the intensity values of the central pixel with its surrounding pixels, which is very effective for identifying small changes on the mold surface. In this embodiment, the extracted shape features and texture features will be integrated into two feature maps - the shape feature map of the mold state surface and the texture feature map of the mold state surface.
[0065] It should be noted that compared with deep learning methods, the handcrafted feature method may be more sensitive to specific types of changes in some cases, but may not be as flexible and powerful as deep learning methods when dealing with complex backgrounds or large-scale shape and texture changes.
[0066] In the above-mentioned visual recognition system for surface defects of precision injection molds, the mold state multi-dimensional feature fine-grained joint perception module 140 is used to input the mold state surface shape feature map and the mold state surface texture feature map into the bidirectional global attention joint perception module based on fine-grained deconstruction to obtain the surface shape-texture joint fine-grained perception feature map. It should be understood that since the mold state surface shape feature map and the mold state surface texture feature map respectively contain the shape feature and texture feature information of the surface of the precision injection mold, and different features have different important roles in detecting different defects on the mold surface. Therefore, in order to more precisely fuse and analyze the mold surface state features contained in these two feature maps, so as to obtain a more detailed representation of the mold surface state features, in the technical solution of this application, the mold state surface shape feature map and the mold state surface texture feature map are further input into the bidirectional global attention joint perception module based on fine-grained deconstruction to obtain the surface shape-texture joint fine-grained perception feature map. The bidirectional global attention joint perception module aims to improve the semantic joint perception ability of the model through feature fine-grained deconstruction, global fine-grained interaction based on the attention mechanism, feature coupling and feature fusion, so as to better perceive the mold surface state and identify surface defects.
[0067] Figure 4 It is a schematic block diagram of the mold state multi-dimensional feature fine-grained joint perception module in the visual recognition system for surface defects of precision injection molds according to the embodiment of this application. As Figure 4As shown, optionally, in an embodiment of the present application, the mold state multi-dimensional feature fine-grained joint perception module 140 includes: a mold state feature fine-grained deconstruction unit 141, configured to perform feature fine-grained deconstruction on the mold state surface shape feature map and the mold state surface texture feature map to obtain a set of mold state surface shape channel dimension local feature matrices and a set of mold state surface texture channel dimension local feature matrices; a first mold state attention interaction unit 142, configured to respectively use each mold state surface shape channel dimension local feature matrix in the set of mold state surface shape channel dimension local feature matrices as a query feature matrix, and use the set of mold state surface texture channel dimension local feature matrices as a set of key feature matrices, and input the query feature matrix and the set of key feature matrices into a one-way global attention interaction module based on a first transformer structure to obtain a set of one-way global attention optimized mold state surface shape channel dimension local feature matrices; a second mold state attention interaction unit 143, configured to respectively use each mold state surface texture channel dimension local feature matrix in the set of mold state surface texture channel dimension local feature matrices as a query feature matrix, and use the set of mold state surface shape channel dimension local feature matrices as a set of key feature matrices, and input the query feature matrix and the set of key feature matrices into a one-way global attention interaction module based on a second transformer structure to obtain a set of one-way global attention optimized mold state surface texture channel dimension local feature matrices; a mold state feature channel dimension coupling unit 144, configured to respectively perform feature channel dimension coupling on the set of one-way global attention optimized mold state surface shape channel dimension local feature matrices and the set of one-way global attention optimized mold state surface texture channel dimension local feature matrices to obtain a one-way global interaction optimized mold state surface shape feature map and a one-way global interaction optimized mold state surface texture feature map; a mold state multi-dimensional feature joint unit 145, configured to calculate the position-wise weighted sum between the one-way global interaction optimized mold state surface shape feature map and the one-way global interaction optimized mold state surface texture feature map to obtain the surface shape-texture joint fine-grained perception feature map.
[0068] Optionally, in an embodiment of the present application, the first die state attention interaction unit 141 is configured to: select a predetermined die state surface shape channel dimension local feature matrix from the set of die state surface shape channel dimension local feature matrices as a query feature matrix; calculate the product of the predetermined die state surface shape channel dimension local feature matrix and the transposed matrix of each die state surface texture channel dimension local feature matrix in the set of die state surface texture channel dimension local feature matrices to obtain a set of die state surface shape-texture channel dimension local semantic interaction feature matrices; divide each die state surface shape-texture channel dimension local semantic interaction feature matrix in the set of die state surface shape-texture channel dimension local semantic interaction feature matrices by the square root of the scale of the predetermined die state surface shape channel dimension local feature matrix at each position, and then perform softmax normalization on each feature matrix in the obtained set of feature matrices to obtain a set of die state surface shape channel dimension local weight matrices; use the set of die state surface shape channel dimension local weight matrices as weighted weights, and calculate the position-wise weighted sum of the die state surface shape channel dimension local feature matrices in the set of die state surface shape channel dimension local feature matrices to obtain the one-way global attention optimized die state surface shape channel dimension local feature matrix.
[0069] Optionally, in an embodiment of the present application, the second die state attention interaction unit 142 is configured to: select a predetermined die state surface texture channel dimension local feature matrix from the set of die state surface texture channel dimension local feature matrices as a query feature matrix; calculate the product of the predetermined die state surface texture channel dimension local feature matrix and the transpose matrix of each die state surface shape channel dimension local feature matrix in the set of die state surface shape channel dimension local feature matrices to obtain a set of die state surface texture - shape channel dimension local semantic interaction feature matrices; divide each die state surface texture - shape channel dimension local semantic interaction feature matrix in the set of die state surface texture - shape channel dimension local semantic interaction feature matrices by the square root of the scale of the predetermined die state surface texture channel dimension local feature matrix at each position, and then use the softmax function to perform soft maximum normalization processing on each feature matrix in the obtained set of feature matrices to obtain a set of die state surface texture channel dimension local weight matrices; use the set of die state surface texture channel dimension local weight matrices as weighted weights, and calculate the position - wise weighted sum of each die state surface texture channel dimension local feature matrix in the set of die state surface texture channel dimension local feature matrices to obtain the unidirectional global attention optimized die state surface texture channel dimension local feature matrix.
[0070] Specifically, in an embodiment of the present application, the die state surface shape feature map and the die state surface texture feature map are input into the bidirectional global attention joint perception module based on fine - grained deconstruction and processed according to the following bidirectional global attention joint perception formula to obtain the surface shape - texture joint fine - grained perception feature map;
[0071] Among them, the bidirectional global fine - grained attention joint perception formula is:
[0072] Decouple(F 1 )={M 11 ,M 12 ,...,M 1i ,...,M 1n}
[0073] Decouple(F 2 )={M 21 ,M 22 ,...,M 2j ,...,M 2n}
[0074]
[0075] F 1' = Aggregate{M 11 ', M 12 ',..., M 1i '..., M 1n '}
[0076] F 2 ' = Aggregate{M 21 ', M 22 ',..., m 2j ',..., M 2n '}
[0077] F c = αF 1 '+ βF 2 '
[0078] Wherein, F 1 and F 2 respectively represent the surface shape feature map of the mold state and the surface texture feature map of the mold state. Decouple is the feature fine-grained deconstruction operation. M 11 , M 12 , M 1i , M 1n are respectively the first, second, ith, and nth local feature matrices of the mold state surface shape channel dimension along the channel dimension in the surface shape feature map of the mold state. M 21 , M 22 , M 2j , M 2n are respectively the first, second, jth, and nth local feature matrices of the mold state surface texture channel dimension along the channel dimension in the surface texture feature map of the mold state. S is the scale of the ith local feature matrix of the mold state surface shape channel dimension. is matrix multiplication, softmax(·) is the softmax function, T represents the transpose of a vector, n is the number of local feature matrices of the mold state surface shape channel dimension in the surface shape feature map of the mold state. M 1i ' is the one-way global attention optimized local feature matrix of the mold state surface shape channel dimension corresponding to the ith local feature matrix of the mold state surface shape channel dimension. M 2j ' is the one-way global attention optimized local feature matrix of the mold state surface texture channel dimension corresponding to the jth local feature matrix of the mold state surface texture channel dimension. Aggregate represents the feature coupling process along the channel dimension. F 1 ' and F 2are the surface shape feature map and the surface texture feature map of the unidirectional global interaction optimized die state respectively, and α and β are the weighted hyperparameters of the surface shape feature map and the surface texture feature map of the unidirectional global interaction optimized die state respectively, F c is the surface shape-texture joint fine-grained perception feature map.
[0079] Specifically, in the bidirectional global attention joint perception module, the process of fine-grained deconstruction along the channel dimension allows the model to perform more detailed segmentation and semantic understanding of the die state surface shape feature map and the die state surface texture feature map. This can capture more local micro-detail features of the die surface state, which helps the subsequent attention mechanism to more accurately identify important surface shape and texture information. This is very important for identifying small defects on the die surface (such as tiny cracks, scratches, etc.). The fine-grained features help improve the sensitivity and accuracy of defect detection.
[0080] Then, after the fine-grained deconstruction of the feature map, the unidirectional global attention interaction module based on the Transformer structure can strengthen the mutual relationship between the surface shape and texture features of the die state in the grayscale image of the die state by using the multi-head attention mechanism in the Transformer structure. This enables the model to pay more attention to the feature regions with rich information and ignore the irrelevant background information, so that the model can more accurately identify key information in complex environments and die defect recognition tasks. This helps the system to better handle different types of defects and improve the recognition ability of various surface changes.
[0081] In particular, in the technical solution of this application, each local feature matrix of the mold state surface shape channel dimension in the mold state surface shape feature map can respectively perform one-way semantic interaction with all local feature matrices of the mold state surface texture channel dimension in the mold state surface texture feature map to more comprehensively capture the global semantic association information between each local feature matrix of the mold state surface shape channel dimension in the mold state surface shape feature map and the mold state surface texture feature map. Similarly, each local feature matrix of the mold state surface texture channel dimension in the mold state surface texture feature map can respectively perform one-way semantic interaction with all local feature matrices of the mold state surface shape channel dimension in the mold state surface shape feature map to more comprehensively capture the global semantic association information between each local feature matrix of the mold state surface texture channel dimension in the mold state surface texture feature map and the mold state surface shape feature map. It should be understood that the effect of the one-way global attention interaction is to enhance the fine-grained inter-channel relationship within the feature map, enabling the model to pay more attention to the key information related to the mold state and surface defect recognition task in the feature map, improving the quality and distinctiveness of the feature representation, and thus helping to improve the performance of the model in the subsequent visual recognition task of surface defects of precision injection molds.
[0082] Then, through the coupling process along the channel dimension, the local feature matrices of the mold state surface shape and texture optimized by attention can be respectively recombined along the channel dimension to form a complete feature map, providing a complete feature representation for the final fusion. Finally, calculate the position-weighted sum between the one-way global interaction optimized mold state surface shape feature map and the one-way global interaction optimized mold state surface texture feature map to obtain the surface shape-texture joint fine-grained perception feature map. That is, the weighted sum operation synthesizes the key information in the two feature maps, generating a joint perception feature representation of the mold state containing rich interaction information. In particular, the finally generated "surface shape-texture joint fine-grained perception feature map" is a result of fusing the fine-grained feature information of the shape and texture of the precision injection mold surface. This joint perception method allows the system to fully explore and utilize various fine-grained feature information on the mold surface during the mold defect detection process, thereby achieving more accurate and reliable surface defect recognition. In this way, not only can the accuracy of mold surface defect recognition and detection be improved, but also the robustness and adaptability of the system can be enhanced.
[0083] In the above-mentioned visual recognition system for surface defects of precision injection molds, the surface defect detection module 150 is used to identify surface defects based on the surface shape-texture joint fine-grained perception feature map to determine whether there are surface defects. Optionally, in an embodiment of the present application, the surface defect detection module 150 is used to: input the surface shape-texture joint fine-grained perception feature map into a surface defect recognition module based on a classifier to obtain a recognition result, and the recognition result is used to indicate whether there are surface defects. That is to say, classification processing is performed using the fine-grained joint perception features between the shape features and texture features of the mold surface state, so as to automatically identify and detect the surface defects of precision injection molds. In this way, artificial intelligence and machine vision technologies can be used to achieve more intelligent visual recognition and detection of surface defects of precision injection molds, thereby avoiding the low efficiency and low accuracy problems of traditional manual visual inspection or simple optical measurement equipment detection, helping to improve the accuracy and adaptability of surface defect recognition of precision injection molds, and enhancing the generalization ability of the defect visual recognition system.
[0084] Figure 5 It is a schematic block diagram of the surface defect detection module in the visual recognition system for surface defects of precision injection molds according to the embodiment of the present application. As Figure 5 shown, optionally, in an embodiment of the present application, the surface defect detection module 150 includes: a joint fine-grained perception feature flattening unit 151, which is used to expand the surface shape-texture joint fine-grained perception feature map into a surface shape-texture joint fine-grained perception feature vector according to a row vector or a column vector; a joint fine-grained perception feature fully connected encoding unit 152, which is used to perform fully connected encoding on the surface shape-texture joint fine-grained perception feature vector using the fully connected layer of the classifier to obtain a fully connected encoded surface shape-texture joint fine-grained perception feature vector; a recognition label probability generation unit 153, which is used to input the fully connected encoded surface shape-texture joint fine-grained perception feature vector into the Softmax classification function of the classifier to obtain the probability values of the surface shape-texture joint fine-grained perception feature map belonging to each recognition label; a recognition result determination unit 154, which is used to determine the recognition label corresponding to the largest of the probability values as the recognition result.
[0085] In a preferred example, inputting the surface shape-texture joint fine-grained perception feature map into a surface defect recognition module based on a classifier to obtain a recognition result includes:
[0086] Determining the surface shape-texture joint fine-grained perception maximum eigenvalue and the surface shape-texture joint fine-grained perception minimum eigenvalue of the surface shape-texture joint fine-grained perception feature map;
[0087] Calculate the surface shape-texture joint fine-grained perception mean and the surface shape-texture joint fine-grained perception standard deviation of the feature set of the surface shape-texture joint fine-grained perception feature map, and calculate the quotient of the surface shape-texture joint fine-grained perception mean and the surface shape-texture joint fine-grained perception standard deviation to obtain the surface shape-texture joint fine-grained perception statistical normalization value;
[0088] Calculate the reciprocal of each eigenvalue of the surface shape-texture joint fine-grained perception feature map, dot-multiply it with the difference between the surface shape-texture joint fine-grained perception maximum eigenvalue and the surface shape-texture joint fine-grained perception minimum eigenvalue, and then subtract it from the surface shape-texture joint fine-grained perception statistical normalization value to obtain the surface shape-texture joint fine-grained perception distribution approximation feature map;
[0089] Calculate the exponential function with the natural constant as the base and each eigenvalue of the surface shape-texture joint fine-grained perception distribution approximation feature map as the exponent to obtain the surface shape-texture joint fine-grained perception distribution class approximation feature map;
[0090] Add the surface shape-texture joint fine-grained perception distribution class approximation feature map and the surface shape-texture joint fine-grained perception statistical normalization value pointwise, and calculate the base-2 logarithm of the absolute value of each eigenvalue of the pointwise addition feature map to obtain the optimized surface shape-texture joint fine-grained perception feature map;
[0091] Input the optimized surface shape-texture joint fine-grained perception feature map into the surface defect recognition module based on the classifier to obtain the recognition result.
[0092] Among them, the surface shape-texture joint fine-grained perception feature map F c The optimization is expressed as:
[0093]
[0094] δ = f max -f min
[0095] Among them, f max represents the surface shape-texture joint fine-grained perception maximum eigenvalue, f min represents the surface shape-texture joint fine-grained perception minimum eigenvalue, μ represents the surface shape-texture joint fine-grained perception mean, σ represents the surface shape-texture joint fine-grained perception standard deviation, η is the surface shape-texture joint fine-grained perception statistical normalization value, and δ is the difference between the surface shape-texture joint fine-grained perception maximum eigenvalue and the surface shape-texture joint fine-grained perception minimum eigenvalue, F cDenote the surface shape-texture joint fine-grained perception feature map, (·) ⊙-1 Denote the reciprocal of each eigenvalue of the calculated feature map, and ⊙ denotes element-wise multiplication, Add element-wise, Subtract element-wise, F e Denote the surface shape-texture joint fine-grained perception distribution class approximation feature map, F c ' denotes the optimized surface shape-texture joint fine-grained perception feature map.
[0096] Here, in the preferred example, since the die state surface shape feature map and the die state surface texture feature map respectively represent the semantic features and texture semantic features belonging to different convolutional neural network model depths and scales of the die state grayscale image, when they are input into the bidirectional global attention joint perception module based on fine-grained deconstruction, the cross-scale-depth image semantic feature differences will have different attention weights based on the fine-grained decoupling of the image semantic feature spatial distribution. Thus, the surface shape-texture joint fine-grained perception feature map will also have a diverse set expression distribution of cross-scale-depth global aggregation features. Therefore, it is desired to improve the balance between the regression mapping accuracy and integrity when the surface shape-texture joint fine-grained perception feature map is input into the surface defect recognition module based on the classifier, thereby improving the accuracy of the obtained recognition result.
[0097] Based on this, by performing random statistical normalization on the diverse feature sets of the surface shape-texture joint fine-grained perception feature map, an approximation of the standardized continuous probability density distribution of the response hypothesis test of the confidence space constructed based on the overall eigenvalues of the surface shape-texture joint fine-grained perception feature map with respect to each eigenvalue of the surface shape-texture joint fine-grained perception feature map is carried out, thereby establishing the target reachability from the diverse feature distribution of the surface shape-texture joint fine-grained perception feature map to the unified regression target, so as to achieve the balance executability between the mapping accuracy and mapping integrity during the class regression process based on the diverse feature distribution of the surface shape-texture joint fine-grained perception feature map, and improving the accuracy of the recognition result obtained by inputting the surface shape-texture joint fine-grained perception feature map into the surface defect recognition module based on the classifier. In this way, the surface defects of the precision injection mold can be identified and detected more accurately, which helps to improve the accuracy and adaptability of the surface defect recognition of the precision injection mold in a more intelligent defect recognition manner.
[0098] In summary, the visual recognition system for surface defects of precision injection molds according to the embodiments of the present application is elucidated. It collects the surface state images of precision injection molds through industrial cameras to ensure image clarity and richness of details. Then, image processing and analysis algorithms based on artificial intelligence and machine vision are introduced at the backend to analyze the surface state images of the precision injection molds, so as to capture the shape and surface texture state characteristics of the molds in the images, thereby automatically identifying and detecting the surface defects of the precision injection molds. In this way, the intelligent visual recognition and detection of surface defects of precision injection molds can be realized by using artificial intelligence and machine vision technologies, thus avoiding the low efficiency and low accuracy problems of traditional manual visual inspection or simple optical measurement equipment detection, helping to improve the accuracy and self-adaptability of the recognition of surface defects of precision injection molds, and enhancing the generalization ability of the defect visual recognition system.
[0099] Figure 6 FIG. is a schematic flowchart of a method for visual recognition of surface defects of a precision injection mold according to an embodiment of the present application. As Figure 6 shown, the method for visual recognition of surface defects of a precision injection mold includes: S1, obtaining a surface state image of a precision injection mold collected by an industrial camera; S2, performing grayscale processing on the surface state image of the precision injection mold to obtain a grayscale image of the mold state; S3, performing shape feature extraction and texture feature extraction based on the mold state on the grayscale image of the mold state to obtain a surface shape feature map of the mold state and a surface texture feature map of the mold state; S4, inputting the surface shape feature map of the mold state and the surface texture feature map of the mold state into a bidirectional global attention joint perception module based on fine-grained deconstruction to obtain a surface shape-texture joint fine-grained perception feature map; S5, performing surface defect recognition based on the surface shape-texture joint fine-grained perception feature map to determine whether there are surface defects.
[0100] Optionally, in an embodiment of the present application, performing shape feature extraction and texture feature extraction based on the mold state on the grayscale image of the mold state to obtain a surface shape feature map of the mold state and a surface texture feature map of the mold state includes: inputting the grayscale image of the mold state into a shape feature extractor based on a first deep neural network model to obtain the surface shape feature map of the mold state; inputting the grayscale image of the mold state into a texture feature extractor based on a second deep neural network model to obtain the surface texture feature map of the mold state.
[0101] Here, those skilled in the art can understand that the specific operations of each step in the above method for visual recognition of surface defects of a precision injection mold have been described in detail in the description of the visual recognition system for surface defects of a precision injection mold above with reference to Figures 1 to 4 and therefore, the repeated description thereof will be omitted.
[0102] The basic principles of the present invention have been described above in connection with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present invention are merely examples and not limitations. It cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present invention. Additionally, the specific details of the above embodiments are for illustrative purposes and for ease of understanding only, and are not limitations. The above details do not limit the present invention to necessarily adopting the above specific details for implementation.
[0103] In the above embodiments, the descriptions of each embodiment have their own emphases. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is only a logical function division, and there may be other division methods in actual implementation. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] In addition, in each embodiment of the present invention, the functional modules can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.
[0105] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, it is intended to cover all changes falling within the meaning and scope of the equivalent elements of the claims in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claimed rights.
[0106] Furthermore, it is obvious that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units stated in the device claims can also be implemented by one unit through software or hardware.
[0107] Finally, it should be noted that the above description has been given for purposes of illustration and description. In addition, the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A precision injection mold surface defect visual recognition system, characterized in that: include: A precision injection mold surface state image acquisition module, used to acquire a surface state image of the precision injection mold acquired by an industrial camera; A surface state image grayscale processing module, used for grayscale processing the surface state image of the precision injection mold to obtain a mold state grayscale image; A mold state multi-dimensional feature extraction module, used for performing shape feature extraction and texture feature extraction based on the mold state on the mold state grayscale image to obtain a mold state surface shape feature map and a mold state surface texture feature map; A mold state multi-dimensional feature fine-grained joint perception module, used for inputting the mold state surface shape feature map and the mold state surface texture feature map into a bidirectional global attention joint perception module based on fine-grained deconstruction to obtain a surface shape-texture joint fine-grained perception feature map; The surface defect detection module is used to identify surface defects based on the surface shape-texture combined with fine-grained perception feature map to determine whether there are surface defects.
2. The precision injection mold surface defect visual recognition system according to claim 1 is characterized in that: The mold state multi-dimensional feature extraction module includes: A mold state surface shape feature capturing unit, used for inputting the mold state grayscale image into a shape feature extractor based on a first deep neural network model to obtain the mold state surface shape feature map; The mold state surface texture feature capturing unit is used to input the mold state grayscale image into a texture feature extractor based on a second deep neural network model to obtain the mold state surface texture feature map.
3. The precision injection mold surface defect visual recognition system according to claim 2 is characterized in that: The shape feature extractor based on the first deep neural network model is a shape feature extractor based on the first convolutional neural network model, and the texture feature extractor based on the second deep neural network model is a texture feature extractor based on the second convolutional neural network model.
4. The precision injection mold surface defect visual recognition system according to claim 3 is characterized in that: The mold state multi-dimensional feature fine-grained joint perception module includes: A mold state feature fine-grained deconstruction unit, used for performing feature fine-grained deconstruction on the mold state surface shape feature map and the mold state surface texture feature map to obtain a set of mold state surface shape channel dimension local feature matrices and a set of mold state surface texture channel dimension local feature matrices; A first mold state attention interaction unit is used to use each mold state surface shape channel dimension local feature matrix in the set of the mold state surface shape channel dimension local feature matrix as a query feature matrix, use the set of the mold state surface texture channel dimension local feature matrix as a set of key feature matrices, and input the query feature matrix and the set of the key feature matrix into a unidirectional global attention interaction module based on a first converter structure to obtain a set of unidirectional global attention optimized mold state surface shape channel dimension local feature matrices; A second mold state attention interaction unit is used to use each mold state surface texture channel dimension local feature matrix in the set of the mold state surface texture channel dimension local feature matrix as a query feature matrix, and use the set of the mold state surface shape channel dimension local feature matrix as a set of key feature matrices, and input the query feature matrix and the set of the key feature matrix into a unidirectional global attention interaction module based on a second converter structure to obtain a set of unidirectional global attention optimized mold state surface texture channel dimension local feature matrices; A mold state feature coupling unit along the channel dimension is used to couple the set of local feature matrices of the one-way global attention optimization mold state surface shape channel dimension and the set of local feature matrices of the one-way global attention optimization mold state surface texture channel dimension respectively to obtain a one-way global interaction optimization mold state surface shape feature map and a one-way global interaction optimization mold state surface texture feature map; The mold state multi-dimensional feature combination unit is used to calculate the position-weighted sum between the one-way global interactive optimization mold state surface shape feature map and the one-way global interactive optimization mold state surface texture feature map to obtain the surface shape-texture joint fine-grained perception feature map.
5. The precision injection mold surface defect visual recognition system according to claim 4 is characterized in that: The first mold state attention interaction unit is used to: Selecting a predetermined mold state surface shape channel dimension local feature matrix from the set of mold state surface shape channel dimension local feature matrices as a query feature matrix; Calculate the product of the predetermined mold state surface shape channel dimension local feature matrix and the transposed matrix of each of the mold state surface texture channel dimension local feature matrices in the set of the mold state surface texture channel dimension local feature matrices to obtain a set of mold state surface shape-texture channel dimension local semantic interaction feature matrices; After dividing the scale square root of the predetermined mold state surface shape channel dimension local feature matrix by position point, each mold state surface shape-texture channel dimension local semantic interaction feature matrix in the set of the mold state surface shape-texture channel dimension local semantic interaction feature matrix is subjected to soft maximum value normalization processing on each feature matrix in the obtained set of feature matrices using a softmax function to obtain a set of mold state surface shape channel dimension local weight matrices; Taking the set of local weight matrices of the mold state surface shape channel dimension as weighted weights, the position-weighted sum between each local feature matrix of the mold state surface shape channel dimension in the set of local feature matrices of the mold state surface shape channel dimension is calculated to obtain the unidirectional global attention optimized local feature matrix of the mold state surface shape channel dimension.
6. The precision injection mold surface defect visual recognition system according to claim 5, characterized in that: The second mold state attention interaction unit is used to: Selecting a predetermined mold state surface texture channel dimension local feature matrix from the set of mold state surface texture channel dimension local feature matrices as a query feature matrix; Calculate the product of the predetermined mold state surface texture channel dimension local feature matrix and the transposed matrix of each of the mold state surface shape channel dimension local feature matrices in the set of the mold state surface shape channel dimension local feature matrices to obtain a set of mold state surface texture-shape channel dimension local semantic interaction feature matrices; After dividing the scale square root of the predetermined mold state surface texture channel dimension local feature matrix by each mold state surface texture-shape channel dimension local semantic interaction feature matrix in the set of the mold state surface texture-shape channel dimension local semantic interaction feature matrix at each position point, each feature matrix in the obtained set of feature matrices is subjected to soft maximum normalization processing using a softmax function to obtain a set of mold state surface texture channel dimension local weight matrices; Taking the set of local weight matrices of the mold state surface texture channel dimension as weighted weights, the position-weighted sum between each local feature matrix of the mold state surface texture channel dimension in the set of local feature matrices of the mold state surface texture channel dimension is calculated to obtain the unidirectional global attention optimized local feature matrix of the mold state surface texture channel dimension.
7. The precision injection mold surface defect visual recognition system according to claim 6, characterized in that: The surface defect detection module is used to: input the surface shape-texture joint fine-grained perception feature map into a classifier-based surface defect recognition module to obtain a recognition result, and the recognition result is used to indicate whether there is a surface defect.
8. The precision injection mold surface defect visual recognition system according to claim 7, characterized in that: The surface defect detection module comprises: A joint fine-grained perceptual feature flattening unit, used for flattening the surface shape-texture joint fine-grained perceptual feature map into a surface shape-texture joint fine-grained perceptual feature vector according to a row vector or a column vector; A joint fine-grained perceptual feature fully connected encoding unit, used for performing fully connected encoding on the surface shape-texture joint fine-grained perceptual feature vector using the fully connected layer of the classifier to obtain a fully connected encoded surface shape-texture joint fine-grained perceptual feature vector; An identification label probability generating unit, used for inputting the fully connected encoded surface shape-texture joint fine-grained perceptual feature vector into the Softmax classification function of the classifier to obtain a probability value of the surface shape-texture joint fine-grained perceptual feature map belonging to each identification label; The recognition result determination unit is used to determine the recognition label corresponding to the largest probability value as the recognition result.
9. A method for visually identifying surface defects of precision injection molds, characterized in that: include: Acquire the surface state image of the precision injection mold captured by the industrial camera; graying the surface state image of the precision injection mold to obtain a mold state graying image; Performing shape feature extraction and texture feature extraction based on the mold state on the mold state grayscale image to obtain a mold state surface shape feature map and a mold state surface texture feature map; Inputting the mold state surface shape feature map and the mold state surface texture feature map into a bidirectional global attention joint perception module based on fine-grained deconstruction to obtain a surface shape-texture joint fine-grained perception feature map; Surface defect recognition is performed based on the surface shape-texture combined with the fine-grained perception feature map to determine whether there are surface defects.
10. The method for visually identifying surface defects of precision injection molds according to claim 9, characterized in that: Performing shape feature extraction and texture feature extraction based on the mold state on the mold state grayscale image to obtain a mold state surface shape feature map and a mold state surface texture feature map, including: Inputting the mold state grayscale image into a shape feature extractor based on a first deep neural network model to obtain a mold state surface shape feature map; The mold state grayscale image is input into a texture feature extractor based on a second deep neural network model to obtain a surface texture feature map of the mold state.
Citation Information
Patent Citations
Hydraulic engineering management method and system based on digital twinning
CN118839868A
Crohn disease patient diet management system and method
CN118969197A
Relational database SQL (Structured Query Language) generation method based on large model fine tuning
CN119166668A
Internet of Things control method and system
CN119322539A
Power grid optimization scheduling method and system based on intelligent optimization algorithm
CN119476649A
Cited By
Hydraulic power plant state monitoring system and method based on intelligent identification
CN120032354A