Ceramic tile color classification method and device based on transfer learning

Based on the method of migration learning, the pre-trained Resonet-50 network extracts the characteristics of tile samples and constructs the SVM classifier, solving the problem of low color and applicability of tile color classification in existing technology, and realizes high-efficiency tile color Classification.

CN113947126BActive Publication Date: 2025-01-28GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111045581.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-07
Publication Date
2025-01-28
Estimated Expiration
2041-09-07

AI Technical Summary

Technical Problem

The prior art relies on manual experience or convolutional neural networks in tiles color classification, requires a large number of samples and can only be used for specific types of tiles detection, and the efficiency and applicability are insufficient.

Method used

The method based on migration learning is used to obtain tile samples and divide them into the source domain and target domain, and use the RESNET-50 network extraction characteristics trained by ImageNet data sets to build SVM classifiers for color classification.

Benefits of technology

It can obtain tile classification capabilities only requires a small amount of samples, improves detection efficiency, reduces labor costs, and saves time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947126B_ABST
    Figure CN113947126B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for classifying tile colors based on transfer learning, comprising the following steps: obtaining tile samples, taking a determined type of tile sample image and its defect label as a source domain, and taking an undetermined type of tile sample image as a target domain; screening the source domain data, wherein the screening principle is to make the probability distribution formed by the screened source domain data similar to the probability distribution formed by the target domain data; using the ResNET‑50 network pre-trained with the ImageNET data set to obtain a pre-trained network model based on pre-training; extracting the features of the screened source domain and the target domain using the pre-trained network model; performing subsequent feature transformation based on the features of the source domain and the target domain to complete the construction of an SVM classifier; and classifying the tiles by color using the constructed SVM classifier. The present invention uses a transfer learning algorithm to perform transfer learning on tiles of different types with similar color or texture features, thereby achieving the classification capability of this type with only a small number of samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision technology, and in particular to a method and device for classifying tile colors based on transfer learning. Background Art

[0002] When producing tiles, color classification of tiles is an essential step. Color classification of tiles is used to grade and color-separate different types of tiles from the same batch.

[0003] In today's market, most people sort tiles by color based on experience. This method often requires more experienced workers, and the sorting results are relatively unstable. Another intelligent sorting method uses a convolutional neural network to train a certain type of tile sample, which requires a large number of samples and can only be used for this type of tile detection, which is relatively inconvenient. Summary of the invention

[0004] The purpose of the present invention is to solve at least one of the deficiencies of the prior art and to provide a method and device for tile color classification based on transfer learning.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] Specifically, a tile color classification method based on transfer learning is proposed, including the following:

[0007] Obtain tile samples, use the determined type of tile sample images and their defect labels as the source domain, and use the undetermined type of tile sample images as the target domain;

[0008] The source domain data is screened, and the screening principle is to make the probability distribution formed by the screened source domain data similar to the probability distribution formed by the target domain data;

[0009] The ResNET-50 network pre-trained with the ImageNET dataset is used to obtain a pre-trained network model.

[0010] Use the pre-trained network model to extract the features of the filtered source domain and target domain;

[0011] Perform subsequent feature transformation based on the features of the source domain and the target domain to complete the construction of the SVM classifier;

[0012] The constructed SVM classifier is used to classify the color of tiles.

[0013] Further, specifically, the methods for filtering source domain data include the following:

[0014] The sample data is screened using the sample selector and the evaluation performance analyzer, and the source domain data is made similar to the target domain data according to the probability distribution of the data.

[0015] Further, specifically, the pre-trained network model is obtained by the following method:

[0016] The migration method of transfer learning is adopted, and the ResNET-50 network pre-trained based on the ImageNET dataset is used for pre-training to obtain the network weights.

[0017] The pre-training process is specifically to fix the parameters of the first several layers of the network, fine-tune the latter several layers for the task of tile classification, speed up the network training speed, and obtain the network weights.

[0018] Further, specifically, the features of the source domain and the target domain after extraction using the pre-trained network model include the following:

[0019] Fine-tune the pre-trained network model, use the source domain and target domain for pre-training, extract high-order features of the source domain and target domain, and obtain the target domain tile classification ability through intra-domain comparison and intra-domain programming. Specifically, intra-domain comparison is feature learning from the subspace of the source domain to the target domain, and intra-domain programming is to construct a probability annotation matrix through the data probability distribution of the source domain and the target domain to determine the probability that the sample belongs to a certain type of tile.

[0020] Further, specifically, an industrial line array camera is used to capture images of tiles on a conveyor belt as tile samples.

[0021] The present invention also proposes a tile color classification device based on transfer learning, which is characterized by comprising the following:

[0022] A sample acquisition module is used to acquire tile samples, using the determined type of tile sample images and their defect labels as the source domain, and using the undetermined type of tile sample images as the target domain;

[0023] A data screening module is used to screen the source domain data. The screening principle is to make the probability distribution formed by the screened source domain data similar to the probability distribution formed by the target domain data.

[0024] The network model building module is used to obtain a pre-trained network model based on the ResNET-50 network pre-trained with the ImageNET dataset;

[0025] A feature extraction module is used to extract features of the filtered source domain and target domain using a pre-trained network model;

[0026] The classifier construction module is used to perform subsequent feature transformation based on the features of the source domain and the target domain to complete the construction of the SVM classifier;

[0027] The color classification module is used to classify the colors of tiles using the constructed SVM classifier.

[0028] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0029] The beneficial effects of the present invention are:

[0030] The present invention uses a transfer learning algorithm to transfer learning of tiles with similar color or texture features but different types, so that only a small number of samples are needed to obtain the classification ability of this type, improving the detection efficiency. In addition, the target samples do not need to be labeled, reducing labor costs, and there is no need to train the network from scratch for new tasks, saving time costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The above and other features of the present disclosure will become more apparent by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present disclosure represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:

[0032] Figure 1 Shown is a flow chart of a tile color classification method based on transfer learning of the present invention;

[0033] Figure 2 It is a schematic diagram showing the principle of screening source domain of the tile color classification method based on transfer learning of the present invention;

[0034] Figure 3 Shown is a flow chart of a transfer learning algorithm of a tile color classification method based on transfer learning of the present invention;

[0035] Figure 4 It is a schematic diagram of the principle of the easy transfer learning process of the tile color classification method based on transfer learning of the present invention;

[0036] Figure 5 The present invention is a flowchart of the pre-training fine-tuning process of the tile color classification method based on transfer learning. DETAILED DESCRIPTION

[0037] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other without conflict. The same reference numerals used throughout the drawings indicate the same or similar parts.

[0038] Reference Figure 1 , Figure 2 , Figure 3 , Figure 4 as well as Figure 5 , Embodiment 1, the present invention proposes a tile color classification method based on transfer learning, comprising the following:

[0039] Step 110, obtaining tile samples, using the determined type of tile sample images and their defect labels as the source domain, and using the undetermined type of tile sample images as the target domain;

[0040] Step 120: Filter the source domain data. The filtering principle is to make the probability distribution formed by the filtered source domain data similar to the probability distribution formed by the target domain data.

[0041] Step 130, using the ResNET-50 network pre-trained with the ImageNET dataset to obtain a pre-trained network model;

[0042] Step 140: extracting features of the filtered source domain and target domain using a pre-trained network model;

[0043] Step 150: Perform subsequent feature transformation based on the features of the source domain and the target domain to complete the construction of the SVM classifier;

[0044] Step 160: Classify the colors of the tiles using the constructed SVM classifier.

[0045] In a preferred embodiment of the present invention, specifically, the method of screening the source domain data includes the following:

[0046] The sample data is screened using the sample selector and the evaluation performance analyzer, and the source domain data is made similar to the target domain data according to the probability distribution of the data.

[0047] In this preferred embodiment, the screening method adopts the REINFORCE method, and the process is to divide the source domain data into several batches and learn the weight of each sample in these batches. First, some labeled samples are selected from the target domain as the guidance set. Then, in the training of each batch, a certain weight is given to the source domain data of the batch, and after the feature extraction is performed on the guidance set, a certain method is used to measure the distribution difference between the two, and the prediction task on the source domain is completed.

[0048] In a preferred embodiment of the present invention, specifically, the pre-trained network model is obtained by the following method:

[0049] The migration method of transfer learning is adopted, and the ResNET-50 network pre-trained based on the ImageNET dataset is used for pre-training to obtain the network weights.

[0050] The pre-training process is specifically to fix the parameters of the first several layers of the network, fine-tune the latter several layers for the task of tile classification, speed up the network training speed, and obtain the network weights.

[0051] Since the classification task of ImageNET (source domain) is different from the color classification task of tiles (target domain), we need to use tile data with color number labels for fine-tuning. The tile colors are listed into the number of tile color number types, and the number of classifications is modified in the last FC fully connected layer in the ResNet network to achieve fine-tuning.

[0052] In a preferred embodiment of the present invention, specifically, the features of the source domain and the target domain after being screened are extracted using the pre-trained network model, including the following:

[0053] Fine-tune the pre-trained network model, use the source domain and target domain for pre-training, extract high-order features of the source domain and target domain, and obtain the target domain tile classification ability through intra-domain comparison and intra-domain programming. Specifically, intra-domain comparison is feature learning from the subspace of the source domain to the target domain, and intra-domain programming is to construct a probability annotation matrix through the data probability distribution of the source domain and the target domain to determine the probability that the sample belongs to a certain type of tile.

[0054] The intra-domain comparison uses the KNN classifier for cross-domain classification. The data distribution of the source domain and the target domain are compared, and the source domain with the same data distribution as the target domain is preliminarily selected. The classification process uses the sample data distribution of the source domain as a reference, calculates the sample distance between the target domain and the source domain, and selects the k known samples closest to the target domain. According to the voting rule of minority obeys majority, the target domain and the k nearest neighboring samples are classified into one category.

[0055] A sample data in the domain contains input x and output y, and its probability distribution is recorded as P(x, y). In-domain programming uses edge distribution adaptation. For the case where the edge probability distributions of the source domain and the target domain are different, that is, Ps(x) is not equal to Pt(x), it is assumed that the conditional probabilities of the two are the same, that is, Ps(y|x) is approximately equal to Pt(y|x). Under this assumption, the edge distribution adaptation method is to reduce the distance between the edge probability distributions of the source domain and the target domain, thereby completing transfer learning.

[0056] In one embodiment, the probability annotation matrix is ​​as follows Table 1,

[0057] Sample 1 Sample 2 Sample 3 … Sample n Tile Color No. 1 0.3 0.6 0.8 … Tile Color No. 2 0.2 0.1 0.1 … Tile Color No. 3 0.5 0.3 0.1 …

[0058] Table 1

[0059] In a preferred embodiment of the present invention, specifically, an industrial line array camera is used to capture images of tiles on a conveyor belt as tile samples.

[0060] The present invention also proposes a tile color classification device based on transfer learning, which is characterized by comprising the following:

[0061] A sample acquisition module is used to acquire tile samples, using the determined type of tile sample images and their defect labels as the source domain, and using the undetermined type of tile sample images as the target domain;

[0062] A data screening module is used to screen the source domain data. The screening principle is to make the probability distribution formed by the screened source domain data similar to the probability distribution formed by the target domain data.

[0063] The network model building module is used to obtain a pre-trained network model based on the ResNET-50 network pre-trained with the ImageNET dataset;

[0064] A feature extraction module is used to extract features of the filtered source domain and target domain using a pre-trained network model;

[0065] The classifier construction module is used to perform subsequent feature transformation based on the features of the source domain and the target domain to complete the construction of the SVM classifier;

[0066] The color classification module is used to classify the colors of tiles using the constructed SVM classifier.

[0067] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0068] 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 modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

[0069] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0070] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0071] Although the description of the present invention has been quite detailed and specifically describes several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but should be regarded as providing a broad possible interpretation of these claims in view of the prior art by reference to the appended claims, thereby effectively covering the intended scope of the present invention. In addition, the above description of the present invention is based on the embodiments foreseeable by the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that have not yet been foreseen may still represent equivalent changes to the present invention.

[0072] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation. As long as the technical effect of the present invention is achieved by the same means, it should belong to the protection scope of the present invention. Within the protection scope of the present invention, its technical scheme and / or implementation method can have various modifications and changes.

Claims

1. A tile color classification method based on transfer learning, characterized in that: Includes the following: Get tile samples, use the ImageNet dataset as the source domain, and use the determined type of tile sample images and their color labels as the target domain; The source domain data is screened, and the screening principle is to make the probability distribution formed by the screened source domain data similar to the probability distribution formed by the target domain data; The pre-trained network model is obtained by pre-training the ResNET-50 network pre-trained based on the ImageNET dataset; Use the pre-trained network model to extract the features of the filtered source domain and target domain; Perform subsequent feature transformation based on the features of the source domain and the target domain to complete the construction of the SVM classifier; The color of tiles is classified by the constructed SVM classifier; Specifically, the features of the source domain and the target domain after extraction using the pre-trained network model include the following: Fine-tune the pre-trained network model, use the source domain and the target domain for pre-training, extract high-order features from the source domain and the target domain, and obtain the target domain tile classification capability through intra-domain comparison and intra-domain programming. Specifically, intra-domain comparison is feature learning from the subspace of the source domain to the target domain, and intra-domain programming is to construct a probability annotation matrix through the data probability distribution of the source domain and the target domain to determine the probability that the sample belongs to a certain type of tile; The intra-domain comparison uses the KNN classifier for cross-domain classification. The data distribution of the source domain and the target domain are compared, and the source domain with the same data distribution as the target domain is preliminarily selected. The classification process is to use the sample data distribution of the source domain as a reference, calculate the sample distance between the target domain and the source domain, and select the k known samples closest to the target domain. According to the voting rule of minority obeys majority, the target domain and the k nearest neighboring samples are classified into one category. A sample data in the domain contains input x and output y, and its probability distribution is recorded as P(x, y). In-domain programming adopts edge distribution adaptation. For the case where the edge probability distributions of the source domain and the target domain are different, that is, Ps(x) is not equal to Pt(x), it is assumed that the conditional probabilities of the two are the same, that is, Ps(y|x) is approximately equal to Pt(y|x). Under this assumption, the edge distribution adaptation method is to reduce the distance between the edge probability distributions of the source domain and the target domain, thereby completing transfer learning.

2. The tile color classification method based on transfer learning according to claim 1 is characterized in that: Specifically, the methods for filtering source domain data include the following: The sample data is screened using the sample selector and the evaluation performance analyzer, and the source domain data is made similar to the target domain data according to the probability distribution of the data.

3. The tile color classification method based on transfer learning according to claim 1 is characterized in that: Specifically, the pre-trained network model is obtained in the following way: The migration method of transfer learning is adopted, and the ResNET-50 network pre-trained based on the ImageNET dataset is used for pre-training to obtain the network weights. The pre-training process is specifically to fix the parameters of the first several layers of the network, fine-tune the latter several layers for the task of tile classification, speed up the network training speed, and obtain the network weights.

4. The tile color classification method based on transfer learning according to claim 1 is characterized in that: Specifically, an industrial line array camera is used to capture images of tiles on a conveyor belt as tile samples.

5. A tile color classification device based on transfer learning, characterized in that: The method for classifying tile colors based on transfer learning described in claim 1 is applied, comprising the following: A sample acquisition module is used to acquire tile samples, using the determined type of tile sample images and their defect labels as source domains, and using the undetermined type of tile sample images as target domains; A data screening module is used to screen the source domain data. The screening principle is to make the probability distribution formed by the screened source domain data similar to the probability distribution formed by the target domain data. The network model building module is used to obtain a pre-trained network model by pre-training the ResNET-50 network pre-trained based on the ImageNET dataset; A feature extraction module is used to extract features of the filtered source domain and target domain using a pre-trained network model; The classifier construction module is used to perform subsequent feature transformation based on the features of the source domain and the target domain to complete the construction of the SVM classifier; The color classification module is used to classify the colors of tiles using the constructed SVM classifier.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.