Patent ID: 11935326
Assignee: SICHUAN UNIVERSITY
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 3:
4. A face recognition method based on an evolutionary convolutional neural network, comprising:
S1: generating N convolutional neural network structures by an indirect encoding approach according a variable-length encoding algorithm to obtain an initial population, and setting an iteration counter t=1 and a maximum number T of iterations;
S2: training each of first individuals in the initial population, performing a first fitness evaluation using face data, and selecting N parents according to a result of the first fitness evaluation;
S3: performing a crossover on the N parents by using a binary crossover algorithm to obtain N offspring, merging the N parents and the N offspring to form a mixed population, and performing a mutation operation on second individuals in the mixed population;
S4: performing a second fitness evaluation on the second individuals in the mixed population, and applying an environmental selection on the mixed population according to a result of the second fitness evaluation of the mixed population to select N third individuals from the mixed population;
S5: determining whether t is equal to T; when t is equal to T, turning to step S6; when t is not equal to T, using the N third individuals in step S4 as the N parents, incrementing the iteration counter t by one, and returning to step S3; and
S6: selecting an individual network with a first optimal fitness value from the N third individuals, and inputting a face image to be detected into the individual network with the first optimal fitness value to obtain a face recognition result;
wherein a method of training each of the first individuals in the initial population, and performing the first fitness evaluation using the face data comprises:
B1: collecting a plurality of face image data with an identical size, and dividing the plurality of face image data into face image subdata of a training set and face image subdata of a validation set according to a ratio of 7 to 3;
B2: performing face labeling on the face image subdata in the training set by manual labeling to obtain sample labels;
B3: setting a number of training steps to 30 and a learning rate to 0.0001, traversing the face image subdata in the training set during each training step of the training steps, successively sending the face image subdata in the training set into a first individual of the first individuals, calculating a loss function value between predicted outputs of the first individual and the sample labels, and optimizing parameters of the first individual by using an Adam algorithm to achieve minimizing the loss function value;
B4: training each first individual of the first individuals in the initial population to obtain each trained first individual according to step B2 to step B3; and
B5: inputting the validation set into the each trained first individual, calculating an accuracy rate and a complexity, and obtaining a fitness value based on the accuracy rate and the complexity;
wherein the fitness value is equal to the accuracy rate minus the complexity.