Plate texture consistency recognition method and system based on deep learning

Through a deep learning-based method, the grayscale run matrix and the grayscale symbiosis matrix are used and the convolutional neural network is trained in combination with the loss function, which solves the problem of inaccurate results in the recognition of plate texture consistency, and achieves efficient and high-precision texture recognition.

CN119379660BActive Publication Date: 2025-05-06NANXING MACHINERY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411644603.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-05-06
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The prior art has the problem of inaccurate results in the recognition of sheet texture consistency, especially in the identification and classification of complex texture features, which are difficult to achieve high efficiency and high accuracy.

Method used

Using a deep learning-based method, by obtaining the grayscale image of the plate surface, computing the grayscale run matrix and the grayscale symbiosis matrix, a loss function is constructed to train the convolutional neural network to realize the recognition of the consistency of the plate texture.

Benefits of technology

It improves the accuracy of sheet texture recognition and the robustness of the system, can operate stably under various environmental conditions, enhances the ability to identify subtle texture changes, and quickly and accurately identify inconsistencies in sheet textures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379660B_ABST
    Figure CN119379660B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of plate detection, and more specifically, the present invention relates to a plate texture consistency recognition method and system based on deep learning. The method comprises: obtaining a grayscale image of the plate surface and randomly selecting two grayscale images to construct a grayscale image pair, calculating the grayscale run matrix of the grayscale image, and calculating the run distance set of the grayscale image pair in different directions according to the grayscale run matrix; for any direction, obtaining the grayscale co-occurrence matrix of the grayscale image according to the run distance set, and calculating the texture similarity according to the grayscale co-occurrence matrix; constructing a loss function according to the texture similarity of the grayscale image pair in different directions, and training the convolutional neural network based on the loss function to complete the recognition of the plate texture consistency. Through the technical solution of the present invention, the accuracy of the consistency recognition result can be improved, and the efficiency of consistency recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of plate detection, and more specifically, to a plate texture consistency recognition method and system based on deep learning. Background Art

[0002] As a basic material for the construction, furniture, decoration and other industries, the appearance quality of the board directly affects the aesthetic and commercial value of the final product. The grain of the board is an important part of its appearance quality, which is unique and cannot be replicated. Consumers and manufacturers have extremely high requirements for the consistency of the board grain to ensure the overall beauty and coordination of the product. Traditional board grain recognition mainly relies on manual visual inspection, which has the disadvantages of low efficiency, easy fatigue, and strong subjectivity. With the expansion of the scale of board production, manual inspection can no longer meet the needs of high efficiency and high precision. In addition, traditional methods are difficult to accurately identify and classify complex grain features.

[0003] The existing Chinese patent application document with publication number CN116758077A discloses a surfboard surface flatness online detection method and system. The method includes: obtaining a surfboard surface texture image, obtaining the probability that an edge block can form a final edge based on the texture consistency of pixel points in the surfboard surface texture image, calculating the edge point probability and determining the edge point in combination with the threshold of the Canny algorithm, obtaining the uneven area of ​​the surfboard surface, and obtaining the surfboard surface flatness measurement based on the area and texture roughness of the uneven area.

[0004] However, the evaluation of texture consistency may require consideration of multiple factors. The above method directly uses edge detection to obtain edge points to judge the consistency recognition results obtained in the uneven surface area, and the research object is relatively single, so the consistency recognition results may be inaccurate. Summary of the invention

[0005] In order to solve the problem of inaccurate consistency recognition results, the present invention proposes a plate texture consistency recognition method and system based on deep learning.

[0006] In the first aspect, the present invention discloses a method for identifying plate texture consistency based on deep learning, comprising: obtaining a grayscale image of the plate surface and selecting any two grayscale images to construct a grayscale image pair, calculating a grayscale run matrix of the grayscale image, and calculating a run distance set of the grayscale image pair in different directions according to the grayscale run matrix, wherein one direction corresponds to a run distance set; for any direction, obtaining a grayscale co-occurrence matrix of the grayscale image according to the run distance set, and calculating texture similarity according to the grayscale co-occurrence matrix; constructing a loss function according to the texture similarity of the grayscale image pair in different directions, and the loss function satisfies the relationship:

[0007] ,in, represents the value of the loss function, Indicates The predicted labels for grayscale image pairs, Indicates The true label of the grayscale image pair, Indicates The maximum value of texture similarity of grayscale images in different directions, Represents a logarithmic function.

[0008] The convolutional neural network is trained based on the loss function to complete the recognition of the texture consistency of the plate.

[0009] By constructing the grayscale run matrix and grayscale co-occurrence matrix, the texture features of the grayscale image of the plate surface are effectively captured, and the texture similarity of these features in different directions is used to evaluate the texture consistency of the plate. By designing the loss function, the convolutional neural network can be effectively trained to improve the model's sensitivity to texture differences and recognition accuracy, which not only improves the automation level of plate surface quality detection, but also enhances the ability to recognize subtle texture changes, which helps to quickly and accurately identify the inconsistency of plate texture.

[0010] Preferably, the different directions include 0 degrees, 45 degrees, 90 degrees and 135 degrees.

[0011] Preferably, the run distance set of the grayscale image pair in different directions includes: for any direction, adding the grayscale run matrices of the two grayscale images in the grayscale image pair to obtain a comprehensive run matrix; sorting the different run distances in the comprehensive run matrix from large to small, and calculating the proportion of the first run distance from large to small, and in response to the proportion being less than or equal to a preset proportion threshold, calculating the common proportion of the first run distance and the second run distance, and so on, until the calculated proportion is greater than the preset proportion threshold, stopping the calculation, and obtaining the run distance set in any direction.

[0012] It can identify the dominant texture patterns in the image and exclude those insignificant noise or small area texture changes. This texture analysis method based on run distance set not only improves the accuracy of texture recognition, but also enhances the ability to evaluate the consistency of image texture.

[0013] Preferably, the run distance set of the grayscale image pair in different directions also includes: for any direction, the grayscale images in the grayscale image pair are respectively used as the first image and the second image in the order of acquisition time; the different run distances in the grayscale run matrix of the first image are sorted from large to small, and the proportion of the first run distance is calculated from large to small, and in response to the proportion being less than or equal to a preset proportion threshold, the common proportion of the first run distance and the second run distance is calculated, and so on, until the calculated proportion is greater than the preset proportion threshold, the calculation is stopped, and the first run distance set of the first image in any direction is obtained, and similarly, the second run distance set of the second image in any direction is obtained, and the intersection of the first run distance set and the second run distance set is used as the run distance set of the grayscale image pair in any direction.

[0014] By comparing the run distance sets of grayscale images in two time series, the texture features of images that change over time can be effectively identified and compared. By finding the intersection of the run distance sets of two images in the same direction, the common texture features of the two time points can be identified, which helps to discover and compare the consistency of image textures.

[0015] Preferably, the texture similarity includes: taking the grayscale images in the grayscale image pair as the first image and the second image respectively in the order of acquisition time; calculating the texture similarity to satisfy the relationship:

[0016] ,in, represents texture similarity, represents the length of the gray-level co-occurrence matrix, represents the width of the gray-level co-occurrence matrix, represents the gray-level co-occurrence matrix of the first image, represents the transpose of the gray-level co-occurrence matrix of the second image, represents the modulus of the gray-level co-occurrence matrix of the first image, Represents the modulus of the gray-level co-occurrence matrix of the second image.

[0017] By utilizing the characteristics of the gray-level co-occurrence matrix, we can capture the texture information of the image in different directions, and through normalization processing, we can obtain an index reflecting the texture similarity of two images. The spatial relationship and distribution characteristics between gray levels are taken into account. By comparing the ratio of the product of two gray-level co-occurrence matrices to their respective moduli, we can accurately measure the texture changes between image pairs collected over time.

[0018] Preferably, the texture similarity further comprises: taking the grayscale images in the grayscale image pair as the first image and the second image respectively in the order of acquisition time; calculating the texture features of the first image and the texture features of the second image according to the grayscale co-occurrence matrix; and calculating the texture similarity to satisfy the relationship:

[0019] ,in, represents texture similarity, represents the texture feature vector of the first image, represents the transpose of the texture feature vector of the second image, represents the modulus of the texture feature vector of the first image, Represents the magnitude of the texture feature vector of the second image.

[0020] The complex information of image texture is effectively converted into comparable numerical feature vectors, and the similarity of textures is evaluated by calculating the ratio of the dot product of two feature vectors and their respective moduli, thereby improving the efficiency of calculation.

[0021] Preferably, the loss function also satisfies the relationship:

[0022] ,in, represents the value of the loss function, Indicates The predicted labels for grayscale image pairs, Indicates The true label of the grayscale image pair, Indicates The mean value of texture similarity of grayscale images in different directions, Represents a logarithmic function.

[0023] In a second aspect, the present invention discloses a plate texture consistency recognition system based on deep learning, comprising: a processor; and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the system executes the above-mentioned plate texture consistency recognition method based on deep learning.

[0024] Beneficial effects of the present invention:

[0025] 1. The present invention uses a combination of deep learning technology and image texture analysis to comprehensively capture the subtle texture features of the plate surface through multi-angle run distance set calculation. This multi-dimensional analysis method not only improves the accuracy of texture recognition, but also significantly enhances the robustness of the system, enabling it to operate stably under various environmental conditions.

[0026] 2. Through intelligent sorting and proportion calculation, the present invention effectively screens out the most representative run distances, reduces the interference of random noise, and highlights the significance of texture features, providing high-quality input data for subsequent texture similarity calculations.

[0027] 3. The loss function of the present invention further optimizes the training process of the convolutional neural network. The loss function not only considers the maximum value of texture similarity, but also the mean value, so that the model pays more attention to samples that are difficult to distinguish during training, thereby improving the model's ability to recognize texture consistency while also improving the overall recognition accuracy.

[0028] 4. It improves the recognition accuracy of plate texture consistency and provides an efficient and reliable technical means for plate quality control and automated detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0030] Figure 1 It is a flow chart of a method for identifying plate texture consistency based on deep learning in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0032] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0033] The present invention provides a method for identifying the consistency of plate texture based on deep learning. Figure 1 As shown, the plate texture consistency recognition method based on deep learning includes steps S1 to S3, which are described in detail below.

[0034] S1, obtain the grayscale image of the plate surface and select any two grayscale images to construct a grayscale image pair, calculate the grayscale run matrix of the grayscale image, and calculate the run distance set of the grayscale image pair in different directions according to the grayscale run matrix.

[0035] In one embodiment, an industrial camera is used to capture a surface RGB (Red Green Blue) image of a plate, two surface RGB images are randomly selected to form an image pair, and the surface RGB images are grayscaled to obtain a grayscale image pair.

[0036] The grayscale values ​​in the grayscale image are divided, and after the division, the grayscale run matrix of the grayscale image in four directions of 0 degree, 45 degree, 90 degree and 135 degree is calculated. Calculating the grayscale run matrix is ​​a well-known technology and will not be described in detail here.

[0037] A set of run distances of a grayscale image pair in different directions is calculated according to a grayscale run matrix, including: for any direction, the grayscale run matrices of two grayscale images in the grayscale image pair are added to obtain a comprehensive run matrix; different run distances in the comprehensive run matrix are sorted from large to small, and the proportion of the first run distance is calculated from large to small, and in response to the proportion being less than or equal to a preset proportion threshold, the common proportion of the first run distance and the second run distance is calculated, and so on, until the calculated proportion is greater than the preset proportion threshold, the calculation is stopped, and a set of run distances in any direction is obtained.

[0038] Traverse the four directions and obtain the set of travel distances in different directions.

[0039] Exemplarily, different run distances in the comprehensive run matrix are sorted from large to small as follows: , first calculate the proportion of the run distance of 8. When the proportion is less than or equal to the preset proportion threshold, calculate the proportion of the run distance of 8 and the run distance of 5, and so on, until the proportion is greater than the preset proportion threshold, and obtain the set of run distances in any direction.

[0040] In one embodiment, the set of run length distances of the grayscale image pair in different directions also includes:

[0041] For any direction, the grayscale images in the grayscale image pair are respectively used as the first image and the second image in the order of acquisition time; the different run distances in the grayscale run matrix of the first image are sorted from large to small, and the proportion of the first run distance is calculated from large to small. In response to the proportion being less than or equal to a preset proportion threshold, the common proportion of the first run distance and the second run distance is calculated, and so on, until the calculated proportion is greater than the preset proportion threshold, the calculation is stopped, and the first run distance set of the first image in any direction is obtained. Similarly, the second run distance set of the second image in any direction is obtained, and the intersection of the first run distance set and the second run distance set is used as the run distance set of the grayscale image pair in any direction.

[0042] Traverse the four directions and obtain the set of travel distances in different directions.

[0043] S2, obtain the gray level co-occurrence matrix of the gray level image according to the run distance set, and calculate the texture similarity according to the gray level co-occurrence matrix.

[0044] In one embodiment, according to the run distance set calculated in step S2, illustratively, the run distance set is , then use 8, 5, and 4 as the step size respectively, count the gray values ​​in the grayscale image, and get the gray-level co-occurrence matrix.

[0045] The gray-level co-occurrence matrix is ​​obtained as follows: with a step size of 8, in the 0-degree direction, the gray value of any pixel in the gray-level image is calculated as , along the 0 degree direction the distance is The gray value of the pixel is The probability of and The value of is between the minimum and maximum grayscale values ​​in the grayscale image, and is not equal to the minimum and maximum grayscale values. The frequency of occurrence is calculated to obtain the gray-level co-occurrence matrix.

[0046] The grayscale images in the grayscale image pair are taken as the first image and the second image in the order of acquisition time, and the texture similarity is calculated to satisfy the relationship: ,in, represents texture similarity, represents the length of the gray-level co-occurrence matrix, represents the width of the gray-level co-occurrence matrix, represents the gray-level co-occurrence matrix of the first image, represents the transpose of the gray-level co-occurrence matrix of the second image, represents the modulus of the gray-level co-occurrence matrix of the first image, Represents the modulus of the gray-level co-occurrence matrix of the second image.

[0047] The value range of texture similarity is between -1 and 1. The larger the texture similarity, the greater the texture consistency between the first image and the second image, and the better the texture connection.

[0048] In one embodiment, the calculation of texture similarity also includes: taking the grayscale images in the grayscale image pair as the first image and the second image respectively in the order of acquisition time; calculating the texture features of the first image and the texture features of the second image according to the grayscale co-occurrence matrix, and the texture features include but are not limited to the entropy, contrast, energy, and correlation of the grayscale co-occurrence matrix.

[0049] Calculate the texture similarity and satisfy the relationship: ,in, represents texture similarity, represents the texture feature vector of the first image, represents the transpose of the texture feature vector of the second image, represents the modulus of the texture feature vector of the first image, Represents the magnitude of the texture feature vector of the second image.

[0050] S3, a loss function is constructed according to the texture similarity of the grayscale image in different directions, and the convolutional neural network is trained based on the loss function to complete the recognition of the texture consistency of the plate.

[0051] In one embodiment, according to the method of constructing an image pair in step S1, a person skilled in the art gives the image pair a label according to the actual observation of the textures of the two plates in the image pair, the label being texture consistency or texture inconsistency, and constructs the image pairs constructed multiple times in history and the labels corresponding to the image pairs into an evaluation data set.

[0052] The evaluation dataset is used to train a convolutional neural network, namely CNN (Convolutional Neural Networks). An image pair is used as input, the predicted label is output, and the loss function is used to calculate the loss value of the predicted label and the true label. The loss function satisfies the relationship:

[0053] ,in, represents the value of the loss function, Indicates The predicted labels for grayscale image pairs, Indicates The true label of the grayscale image pair, Indicates The maximum value of texture similarity of grayscale images in different directions, Represents a logarithmic function.

[0054] Multiple image pairs are input multiple times for iterative training. When the convolutional neural network reaches the maximum number of training times or the loss value of the convolutional neural network is less than the set threshold, the iterative training is stopped. For example, the iterative training is stopped when the network loss value is less than 0.0001 or the number of training times reaches 200. The hyperparameters of the convolutional neural network are changed, and the standard model is selected based on the accuracy of the evaluation indicators of the convolutional neural network.

[0055] At this point, a trained convolutional neural network can be obtained. The surface images of the two plates that need to be identified for consistency are output to the trained convolutional neural network, and the probability of texture consistency and the probability of texture inconsistency are output. When the probability of texture consistency is greater than or equal to 0.6, it means that the consistency of the surface images of the two input plates is high, and consistency identification is completed.

[0056] In one embodiment, the loss function also satisfies the relationship:

[0057] ,in, represents the value of the loss function, Indicates The predicted labels for grayscale image pairs, Indicates The true label of the grayscale image pair, Indicates The mean value of texture similarity of grayscale images in different directions, Represents a logarithmic function.

[0058] An embodiment of the present invention also discloses a plate texture consistency recognition system based on deep learning, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a plate texture consistency recognition method based on deep learning according to the present invention is implemented.

[0059] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0060] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0061] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0062] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A plate texture consistency recognition method based on deep learning, characterized in that: include: Obtain a grayscale image of the plate surface and select any two grayscale images to construct a grayscale image pair, calculate the grayscale run matrix of the grayscale image, and calculate the run distance set of the grayscale image pair in different directions according to the grayscale run matrix, wherein one direction corresponds to one run distance set; For any direction, the gray-level co-occurrence matrix of the gray-level image is obtained according to the run distance set, and the texture similarity is calculated according to the gray-level co-occurrence matrix; The loss function is constructed based on the texture similarity of the grayscale image in different directions. The loss function satisfies the relationship: ,in, represents the value of the loss function, Indicates The predicted labels for grayscale image pairs, Indicates The true label of the grayscale image pair, Indicates The maximum value of texture similarity of grayscale images in different directions, represents the logarithmic function; The convolutional neural network is trained based on the loss function to complete the recognition of the texture consistency of the plate.

2. The plate texture consistency recognition method based on deep learning according to claim 1 is characterized in that: The different directions include 0 degrees, 45 degrees, 90 degrees and 135 degrees.

3. The plate texture consistency recognition method based on deep learning according to claim 1 is characterized in that: The run distance sets of the grayscale image pair in different directions include: For any direction, the grayscale run-length matrices of the two grayscale images in the grayscale image pair are added together to obtain a comprehensive run-length matrix; Sort the different run distances in the comprehensive run matrix from large to small, and calculate the proportion of the first run distance from large to small. In response to the proportion being less than or equal to the preset proportion threshold, calculate the common proportion of the first run distance and the second run distance, and so on, until the calculated proportion is greater than the preset proportion threshold, stop the calculation, and obtain a set of run distances in any direction.

4. The plate texture consistency recognition method based on deep learning according to claim 1 is characterized in that: The set of run distances of the grayscale image pair in different directions also includes: For any direction, the grayscale images in the grayscale image pair are respectively used as the first image and the second image in the order of acquisition time; Sort the different run distances in the grayscale run matrix of the first image from large to small, and calculate the proportion of the first run distance from large to small. In response to the proportion being less than or equal to the preset proportion threshold, calculate the common proportion of the first run distance and the second run distance, and so on, until the calculated proportion is greater than the preset proportion threshold, stop calculating, and obtain the first run distance set in any direction of the first image. Similarly, obtain the second run distance set in any direction of the second image, and use the intersection of the first run distance set and the second run distance set as the run distance set of the grayscale image pair in any direction.

5. The plate texture consistency recognition method based on deep learning according to claim 1 is characterized in that: The texture similarity includes: The grayscale images in the grayscale image pair are respectively used as the first image and the second image in the order of acquisition time; Calculate the texture similarity and satisfy the relationship: ,in, represents texture similarity, represents the length of the gray-level co-occurrence matrix, represents the width of the gray-level co-occurrence matrix, represents the gray-level co-occurrence matrix of the first image, represents the transpose of the gray-level co-occurrence matrix of the second image, represents the modulus of the gray-level co-occurrence matrix of the first image, Represents the modulus of the gray-level co-occurrence matrix of the second image.

6. The plate texture consistency recognition method based on deep learning according to claim 1 is characterized in that: The texture similarity also includes: The grayscale images in the grayscale image pair are respectively used as the first image and the second image in the order of acquisition time; Calculate the texture features of the first image and the texture features of the second image according to the gray level co-occurrence matrix; Calculate the texture similarity and satisfy the relationship: ,in, represents texture similarity, represents the texture feature vector of the first image, represents the transpose of the texture feature vector of the second image, represents the modulus of the texture feature vector of the first image, Represents the magnitude of the texture feature vector of the second image.

7. The method for identifying plate texture consistency based on deep learning according to claim 1, characterized in that: The loss function also satisfies the relationship: ,in, represents the value of the loss function, Indicates The predicted labels for grayscale image pairs, Indicates The true label of the grayscale image pair, Indicates The mean value of texture similarity of grayscale images in different directions, Represents a logarithmic function.

8. The plate texture consistency recognition system based on deep learning is characterized by: include: Processor; and A memory storing computer instructions, wherein when the computer instructions are executed by a processor, the system executes the plate texture consistency recognition method based on deep learning according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Surfboard surface flatness online detection method and system

    CN116758077A

  • Vehicle re-identification method based on improved depth relative distance learning model

    CN111914911A

  • Cross-modal hash retrieval algorithm based on fine-grained similarity matrix

    CN112199520A