Textile defect spot classification method based on evolutionary neural architecture search

Through the method based on evolutionary neural architecture search and combined with multi-scale pyramid convolutional layer, the neural network architecture is adaptively designed, which solves the problems of poor classification effect of textile defects and large resource consumption in the existing technology, and achieves efficient and accurate textiles Defect detection.

CN119048806APending Publication Date: 2024-11-29SHANGHAI ULUCU ELECTRON TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411056603.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing deep neural network model is difficult to achieve good classification results in textile defect classification, and manual design of neural network architecture requires a lot of deep learning knowledge and computing resources, and the detection quality fluctuates with the operator, which is costly.

Method used

Using an evolutionary neural architecture search method, design neural network architecture through evolutionary algorithms, combine multi-scale pyramid convolutional layer, and use evolutionary algorithms and backpropagation algorithms to adaptively design neural network architectures to avoid manual tuning and professional knowledge. rely.

Benefits of technology

It improves the accuracy and efficiency of textile defect classification, reduces the demand for computing resources, is suitable for textile defect classification in various scenarios, and reduces the complexity of hand-made design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048806A_ABST
    Figure CN119048806A_ABST
Patent Text Reader

Abstract

The invention discloses a textile defect spot classification method based on evolutionary neural architecture search, and relates to the technical field of neural network architectures. According to the technical key points, a neural network architecture is customized based on a given textile defect data set, and the textile defect classification problem is solved. And meanwhile, the search efficiency of the neural network architecture search algorithm is improved by utilizing a weight sharing technology. The designed neural network architecture can solve classification challenges for macroscopic flaws and microscopic flaws at the same time, and has good classification performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of neural network architecture, and specifically to a textile defect classification method based on evolutionary neural network architecture search. Background Art

[0002] Textile defects refer to defects on the surface of produced textiles, which lead to unqualified products. Textile defects will affect the price and quality of textiles. Traditional textile defect detection generally relies on the naked eye detection of experienced workers. On the one hand, the detection quality will fluctuate greatly with the experience of the operator, and on the other hand, the high labor cost will bring burden to the enterprise.

[0003] The textile defect classification model based on deep neural network can help textile production lines to identify and classify defects, with the advantages of high recognition accuracy and fast speed, thereby improving production efficiency and final product quality. However, the architecture of the deep neural network model has a decisive influence on its performance. A well-designed architecture can usually achieve a synergistic improvement in model performance and computational efficiency. Since textile defects usually have a variety of and unpredictable appearances in terms of size, type, and shape. This makes it difficult for general classification model architectures, such as ResNet, MobileNet, and ShuffleNet, to achieve good classification results. Manually designing a neural network architecture and tuning it requires a lot of knowledge in the field of deep learning and consumes a lot of computing resources. Summary of the invention

[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a textile defect classification method based on evolutionary neural architecture search to solve the problems mentioned in the background technology.

[0005] The above object of the present invention is achieved through the following technical solutions:

[0006] A textile defect classification method based on evolutionary neural architecture search comprises the following steps:

[0007] (1) Collect textile defect points, create a data set, and divide the data set into a training data set D train Validation dataset D val And the test dataset D test ;

[0008] (2) Design the search space and encoding scheme, use the evolutionary algorithm as the search algorithm, design a neural network architecture search algorithm based on the evolutionary algorithm, sort the individuals in the population, and retain the individual with the highest fitness value as the optimal neural network architecture searched;

[0009] (3) Decode the individual with the highest fitness obtained in step (2) into the corresponding neural network architecture, reset the structural weights, train the neural network architecture using the training data set until convergence, and test its performance.

[0010] In a preferred example, the present invention can be further configured as follows: the encoding scheme in step (2) is a neural network architecture encoding scheme based on a convolutional neural network, and the search space generated based on a preset set of computing modules includes: 3×3 convolutional layer, 5×5 convolutional layer, 3×3 average pooling layer, 5×5 maximum pooling layer, pyramid convolution layer and skip connection layer.

[0011] In a preferred example, the present invention can be further configured as follows: the encoding scheme is an integer-based neural network architecture encoding scheme, and the neural network architecture is divided into: a network, a sub-network block, and a neuron according to different scales;

[0012] Neurons are the smallest computing units in the neural network architecture, and sub-network blocks are stacked and connected in sequence to form a complete neural network architecture.

[0013] In a preferred example, the present invention can be further configured as follows: each computing unit includes two computing nodes, each computing node includes an input and a computing module, and the computing module is obtained from the search space.

[0014] In a preferred example, the present invention can be further configured as follows: the search algorithm in step (2) uses an evolutionary algorithm and a back propagation algorithm to collaboratively optimize the neural network architecture and weights. In summary, the present invention includes at least one of the following beneficial technical effects:

[0015] Based on the neural network architecture search algorithm of evolutionary computation, the neural network architecture is adaptively designed for a given textile defect point dataset:

[0016] By using the weight sharing technology based on sampling training, the training of the offspring population is avoided, and the fitness value of the offspring individuals can be directly evaluated. This improves the search efficiency of the algorithm;

[0017] A multi-scale pyramid convolution layer is adopted. Using the idea of ​​multi-scale learning, convolution kernels of different sizes are used to simultaneously extract macro and micro features in the image in one convolution calculation, so that the proposed algorithm can be better applied to the classification and detection of textile defects in different scenarios.

[0018] Compared with the traditional manual model tuning method, this technical solution can customize the neural network architecture for a given data set without relying on the professional knowledge of the model designer, avoiding the tedious process of manually designing the neural network architecture. This method has achieved better experimental results in the task of textile defect classification than the existing general model. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a textile defect point data set collected by this technical solution;

[0020] Figure 2 It is the algorithm framework diagram of this technical solution;

[0021] Figure 3 It is a schematic diagram of a neuron structure in this technical solution;

[0022] Figure 4 It is a schematic diagram of a convolutional network block in this technical solution;

[0023] Figure 5 It is a complete neural network architecture in this technical solution;

[0024] Figure 6 It is a schematic diagram of the structure of a pyramid convolution layer in this technical solution. DETAILED DESCRIPTION

[0025] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0026] like Figure 1-6 As shown, a textile defect classification method based on evolutionary neural architecture search disclosed in the present technical solution includes the following steps:

[0027] (1) Collect textile defect points, create a data set, and divide the data set into a training data set D train Validation dataset D val And the test dataset D test ; Data set examples such as Figure 1 As shown, the left side is a broken weft and the right side is a triple jump.

[0028] (2) Design the search space and encoding scheme, use the evolutionary algorithm as the search algorithm, and design a neural network architecture search algorithm based on the evolutionary algorithm.

[0029] Specifically: Take the validation set D val The image classification accuracy is the optimization goal, and a neural network architecture search algorithm is designed based on the evolutionary mechanism. After the evolutionary algorithm search task is completed, the individuals in the population are sorted, and the individuals with the highest fitness value are retained as the optimal neural network architecture searched; the algorithm flow chart is as follows Figure 2 shown.

[0030] The coding scheme designed here is a neural network architecture coding scheme based on convolutional neural networks. Specifically:

[0031] The search space is generated based on a preset set of computing modules, including: 3×3 convolution layer, 5×5 convolution layer, 3×3 average pooling layer, 5×5 maximum pooling layer, pyramid convolution layer and skip connection layer.

[0032] The following table shows the encoding information of the neural network computing unit:

[0033] Computational unit type coding Computational unit type coding 3×3 convolutional layer (DW3) 0 5×5 convolutional layer (DW5) 1 Max Pooling Layer (MAX) 2 7×7 convolutional layer (DW7) 3 Max Pooling Layer (AVG) 4 Pyramid Convolution (PyConv) 5

[0034] At the same time, the encoding scheme is an integer-based neural network architecture encoding scheme, specifically:

[0035] The neural network architecture is divided into different scales: network, sub-network block, neuron. Neuron is the smallest computing unit of the neural network architecture.

[0036] Each computational neuron contains two computational nodes, each of which contains an input and a computational module, such as Figure 3 As shown. The calculation module is obtained from the search space designed in step (2). After the input of the neuron is calculated by the calculation module, an addition operation is performed to obtain the output of the neuron.

[0037] The sub-network block contains two structures, namely the convolutional network block and the reduction network block, which have the same construction method but different internal neuron connections. The calculation step size of each neuron in the convolution module is 1, and the calculation step size of each neuron in the reduction module is 1. Figure 4 The sub-network blocks are stacked and connected in sequence to form a complete neural network architecture, as shown in Figure 5 shown.

[0038] Here, neuron R is taken as an example and the neuron is encoded as an integer quadruple Represents the index of the neuron connected to neuron i, that is, neuron The output of is used as the two inputs of neuron R. Represents two computing node types contained in neuron R, which respectively process the two inputs of neuron R. The output calculation formula of neuron R is:

[0039]

[0040] Among them, H R represents the output of neuron R. The input of neuron R, Neuron R contains two computational nodes. Respectively by After processing, the output data O of the two computing nodes a (I a ), Ob (I b ) are added as the output H of neuron R R .

[0041] The encoding structure of a subnetwork block is:

[0042]

[0043] K sub-network blocks of different types are stacked to form a neural network architecture. K is an integer greater than one. The encoding structure of a neural network architecture is:

[0044]

[0045] The sub-network blocks are stacked and connected in sequence to form a complete neural network architecture. The encoding structure of a neural network architecture is called an individual in the population.

[0046] Construct an initial population. Based on the search space designed in step (2), N integer sequences are randomly generated by uniform distribution. Each integer sequence can be decoded into a neural network model. Each individual contains an input layer and encapsulates several sub-network blocks. Each sub-network block contains several computing nodes and has a fully connected layer as the output layer. N individuals constitute the initial population. The encoding structure of a neural network architecture is called an individual in the population.

[0047] The pyramid convolution layer is adaptively integrated into the neural network architecture during the evolutionary search process to improve the expressive power of the neural network. The pyramid convolution layer convolution kernel can capture different levels of local image information according to the size of the convolution kernel used. Relatively small convolution kernels (such as 3×3 convolution kernels) can capture detail information, small objects or parts of large objects. Larger convolution kernels can capture more reliable global information or contextual information. The pyramid convolution layer is a bidirectional pyramid convolution kernel, such as Figure 6 As shown in the figure, there are three branches in total, and the input feature map is distributed to the three branches at the same time. Each branch uses a different convolution kernel for calculation processing. Among them, as the size of the convolution kernel increases, the depth of the convolution kernel gradually decreases to reduce the number of parameters of the pyramid convolution structure. Branch 1 divides the input feature map into 4 parts and uses a 7×7 convolution kernel for calculation processing. Branch 2 divides the input feature map into 2 parts and uses a 5×5 convolution kernel for calculation processing. Branch 3 does not group the input feature map and directly uses a 3×3 convolution kernel for calculation processing.

[0048] This neural network architecture search algorithm based on evolutionary algorithm utilizes evolutionary algorithm and back propagation algorithm to collaboratively optimize the neural network architecture and weights.

[0049] In this algorithm, individuals in the parent population are trained through a sampling training strategy, weights are generated for neurons in each individual, and based on the parent population, a child population is generated through a node inheritance strategy, i.e., a new set of neural network structure topology graphs, and the weights of the corresponding neurons in the parent population are inherited as initial weights, and evaluation is performed directly without any training. The goal of this algorithm framework is to adjust the computational nodes inside the neurons and optimize the connections between neurons in each child network block, thereby achieving overall optimization of the neural network architecture.

[0050] The specific steps are:

[0051] ① Initialize the algorithm strategy parameters. Including: the number of neurons L contained in each sub-network block, the number of initial channels C of the sub-network block, the population size N of the initial population, the crossover rate P c , mutation rate P m , batch processing data volume size , the maximum evolutionary number G. Initialize the SGD optimizer parameters. Including: weight decay coefficient w, initial learning rate r, momentum coefficient m, learning rate adjustment strategy.

[0052] ② Take the dataset labeled in step (1) as input. train The CCP includes train number pictures.

[0053] ③Let G=0.

[0054] ④ Take the G generation population as the parent population of the G generation, and use the sampling training strategy to train all individuals in the parent population, specifically:

[0055] According to batch size , D train Divide into several batches of data (mini-batches). Then the D train A total of j batches of data are included, and the calculation formula is:

[0056]

[0057] 1) Let f = 1;

[0058] 2) Based on the fth batch of data Randomly sampling an individual from the parent population;

[0059] 3) training the individual based on the f-th batch of training data, calculating the loss value using a cross entropy loss function, and optimizing the weights of the neurons in the individual by back-propagating the gradient value;

[0060] 4) Determine whether the f+1th batch of data meets the conditions: if f+1 is greater than j, proceed to step 5); otherwise, set f=f+1 and return to step 3);

[0061] 5) Stop training and save the weights of all neurons in the parent population.

[0062] ⑤After step ④ is completed, evaluate the fitness values ​​of all individuals in the parent population and record them. The fitness value of the parent individual is the classification accuracy of the individual based on the validation data set. The calculation formula for classification accuracy is:

[0063]

[0064] Among them, T t is the number of images that the model recognizes correctly, H h Refers to the total number of images in the validation set.

[0065] ⑥ Based on P in the parent population n Individuals and their fitness values ​​are generated using the node inheritance strategy. n The new individuals are used as the offspring population Q of the Gth generation. The node inheritance strategy is based on the neural network topology of the parent individuals. A new neural network topology is generated through selection, crossover, and mutation in the evolutionary mechanism, and the neuron weights in the parent individuals are assigned to the corresponding offspring individual neurons.

[0066] ⑦ Evaluate the fitness value of the offspring population Q. The fitness value of an offspring individual is the classification accuracy of the individual on the validation data set.

[0067] The calculation formula for classification accuracy is:

[0068]

[0069] Among them, T t is the number of images that the model recognizes correctly, H h Refers to the total number of images in the validation set.

[0070] ⑧Merge the parent population G and the offspring population Q, and use the environmental selection strategy to generate the G+1 generation population.

[0071] ⑨ Determine whether G+1 meets the conditions: If G+1 is greater than or equal to the preset maximum evolutionary generation G, if so, go to step S510; otherwise, set G=G+1 and return to step S54.

[0072] ⑩End the search and output the individual with the highest fitness value in the G-th generation population.

[0073] (3) Decode the individual with the highest fitness obtained in step (2) into the corresponding neural network architecture, reset the structural weights, train the neural network architecture using the training data set until convergence, and test its performance.

[0074] The embodiments of this specific implementation method 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 textile defect classification method based on evolutionary neural architecture search, characterized in that: The steps include: (1) Collect textile defect points, create a data set, and divide the data set into a training data set D train Validation dataset D val And the test dataset D test ; (2) Design the search space and encoding scheme, use the evolutionary algorithm as the search algorithm, design a neural network architecture search algorithm based on the evolutionary algorithm, sort the individuals in the population, and retain the individual with the highest fitness value as the optimal neural network architecture searched; (3) Decode the individual with the highest fitness obtained in step (2) into the corresponding neural network architecture, reset the structural weights, train the neural network architecture using the training data set until convergence, and test its performance.

2. The textile defect classification method based on evolutionary neural architecture search according to claim 1 is characterized in that: The encoding scheme in step (2) is a neural network architecture encoding scheme based on a convolutional neural network. The search space generated based on a preset set of computing modules includes: 3×3 convolutional layer, 5×5 convolutional layer, 3×3 average pooling layer, 5×5 maximum pooling layer, pyramid convolution layer and skip connection layer.

3. The textile defect classification method based on evolutionary neural architecture search according to claim 2 is characterized in that: The encoding scheme is an integer-based neural network architecture encoding scheme, which divides the neural network architecture into different scales: network, sub-network blocks, and neurons; Neurons are the smallest computing units in the neural network architecture, and sub-network blocks are stacked and connected in sequence to form a complete neural network architecture.

4. The textile defect classification method based on evolutionary neural architecture search according to claim 3 is characterized in that: Each computing unit contains two computing nodes, each computing node contains an input and a computing module, and the computing module is obtained from the search space.

5. The textile defect classification method based on evolutionary neural architecture search according to claim 3 is characterized in that: The search algorithm in step (2) uses evolutionary algorithm and back propagation algorithm to collaboratively optimize the neural network architecture and weights.

Citation Information

Patent Citations

  • Deep neural network optimizing method based on coevolution and back propagation

    CN106650933A

  • Image classification method based on evolutionary neural network structure search

    CN114943866A

  • Intestinal tract dense depth estimation method based on evolutionary neural network architecture search

    CN118279368A