Evolutionary support vector machine based mask image recognition method

By improving the differential evolution algorithm and optimizing the support vector machine training parameters of the polynomial kernel function, the problem of insufficient recognition accuracy of the traditional differential evolution algorithm in mask image recognition is solved, and more efficient and accurate mask image recognition is achieved.

CN116311459BActive Publication Date: 2026-04-28JIANGXI UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGXI UNIV OF SCI & TECH
Filing Date
2023-03-24
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional differential evolution algorithms lack sufficient accuracy in mask image recognition, and the training parameter settings affect the recognition accuracy.

Method used

An improved differential evolution algorithm is adopted, an adaptive mutation strategy selection mechanism and directional information for guiding and rejecting individuals are designed, and the training parameters of the support vector machine with polynomial kernel function are optimized to improve the accuracy of mask image recognition.

Benefits of technology

The accuracy of mask image recognition has been improved. The improved differential evolution algorithm has accelerated the recognition speed and improved the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116311459B_ABST
    Figure CN116311459B_ABST
Patent Text Reader

Abstract

The application discloses a mask image recognition method based on an evolutionary support vector machine. The application utilizes an improved differential evolution algorithm to evolve training parameters of a support vector machine based on a polynomial kernel function, and then utilizes the evolved support vector machine based on the polynomial kernel function to recognize whether a face image is a mask image. In the improved differential evolution algorithm, selection probabilities of mutation strategies are calculated first, then a population is divided into a guide subpopulation and a repulsion subpopulation, and meanwhile, directional information of guide individuals and repulsion individuals is utilized to improve search performance of the algorithm, so as to improve recognition precision of the mask image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image processing, and in particular to a mask image recognition method based on evolutionary support vector machine. Background Technology

[0002] Wearing masks is an effective way to prevent disease. To effectively prevent the spread of disease, people are sometimes required to wear masks to enter specific places such as hospitals and laboratories. In places with high traffic, many staff members are often stationed at the entrance to check whether everyone entering is wearing a mask, thus preventing unmasked individuals from entering. To reduce the workload of staff, many places use access control systems to speed up the flow of people. Access control systems automatically capture facial images of everyone entering a designated area and then identify whether the image shows someone wearing a mask. If not, the access control system does not open the entrance. Therefore, accurately recognizing masked images is a key technology in such access control systems.

[0003] To accurately identify mask images, many technicians have attempted to use Support Vector Machines (SVMs) based on polynomial kernel functions. However, traditional SVMs based on polynomial kernel functions require setting many training parameters, such as the degree, gamma, and coef0 parameters within the polynomial kernel function. The settings of these training parameters significantly affect the accuracy of mask image recognition. To address this issue, technicians utilize evolutionary algorithms to evolve the training parameters of SVMs based on polynomial kernel functions. Differential evolutionary algorithms are currently a hot topic in evolutionary algorithm research, and many engineers use them to solve various engineering optimization problems. However, traditional differential evolutionary algorithms tend to suffer from insufficient recognition accuracy in mask image recognition. Summary of the Invention

[0004] This invention provides a mask image recognition method based on evolutionary support vector machines. It overcomes, to a certain extent, the shortcomings of traditional differential evolution algorithms in mask image recognition, which often suffer from insufficient recognition accuracy. This invention can improve the recognition accuracy of mask images.

[0005] The technical solution of this invention: a mask image recognition method based on evolutionary support vector machine, comprising the following steps:

[0006] Step 1: Use an image sensor to collect facial images of people wearing masks and people not wearing masks to form an image sample set;

[0007] Step 2: Use the Histogram of Oriented Gradients (HGP) algorithm to extract features from the image sample set to obtain the mask image dataset;

[0008] Step 3: Divide the mask image dataset into a training dataset and a validation dataset;

[0009] Step 4, Enter the population size Maximum number of iterations Hybridization probability Subgroup size ;

[0010] Step 5, Set the current iteration number ;

[0011] Step 6, randomly generate a list containing Population of individuals Among them, population The first in individual population Each individual in the dataset stores a support vector machine based on a multinomial kernel function for mask image recognition. One training parameter; This represents the number of training parameters for the support vector machine based on a multinomial kernel function used for mask image recognition; Indicates population The first in The first stored in each individual One training parameter; individual subscript Dimension subscript ;

[0012] Step 7, Calculate the population The fitness value of each individual in the group;

[0013] Step 8, Obtain the population The individual with the lowest fitness value is denoted as the optimal individual. ;

[0014] Step 9, if the current iteration number Less than If yes, proceed to step 10; otherwise, proceed to step 22.

[0015] Step 10: Calculate the amplitude value according to formula (1). ;

[0016] (1)

[0017] Step 11: Calculate the selection probability of the mutation strategy according to formula (2). ;

[0018] (2)

[0019] Where log represents the logarithm to the base e. It is pi. It is a sine function;

[0020] Step 12: Rank the population according to their fitness values ​​from smallest to largest. Sort all individuals in the sequence to obtain the sorted population. ;

[0021] Step 13, Set up the pilot population Empty, and set to exclude population. Empty;

[0022] Step 14, sequence population The middle row at the front One individual was added to the pilot population. middle;

[0023] Step 15, sequence population The middle row at the back Individuals are added to the exclusionary population. middle;

[0024] Step 16: Generate mutant individuals according to formula (3) ;

[0025] (3)

[0026] in, and All in Random real numbers between; It is a mutated individual The first stored in One training parameter; Is A random integer between [a certain value] and [a certain value]. It is a population The first in The first stored in each individual One training parameter; Is A random integer between [a certain value] and [a certain value]. It guides the population The first in The first stored in each individual One training parameter; Is A random integer between [a certain value] and [a certain value]. It is the exclusion of the population. The first in The first stored in each individual One training parameter;

[0027] Step 17: Generate a new individual according to formula (4) ;

[0028] (4)

[0029] in, It is a new individual The first stored in One training parameter; and All in Random real numbers between It is the first The lower bound of the training parameters. It is the first An upper bound for each training parameter;

[0030] Step 18, calculate the new individual fitness value;

[0031] Step 19, Obtain the population The individual with the highest fitness value is designated as the worst individual. ;

[0032] Step 20, if the new individual The fitness value is less than that of the worst individual. If the fitness value is not met, then the new individual will be used. Replace the worst individual Otherwise, discard the new individual. ;

[0033] Step 21, Set the current iteration number Proceed to step 8;

[0034] Step 22, from the optimal individual Extract 1 training parameter, using the obtained The training parameters are used to train a support vector machine based on a multinomial kernel function for mask image recognition on the training dataset, thus realizing the recognition of mask images.

[0035] Furthermore, the calculation process for the fitness value is as follows:

[0036] For individuals First, from the individual Extract 1 training parameter, using the obtained A multinomial kernel-based support vector machine for mask image recognition is trained on the training dataset using 10 training parameters. ; Calculate support vector machines based on polynomial kernel functions Cross-entropy on the validation dataset Then set up individuals fitness value .

[0037] This invention utilizes an improved differential evolution algorithm to evolve the training parameters of a support vector machine based on a multinomial kernel function, and then uses the evolved multinomial kernel-based support vector machine to identify whether a face image shows a person wearing a mask. In the improved differential evolution algorithm, on the one hand, an adaptive mutation strategy selection mechanism is designed to adaptively adjust the selection probability of the mutation strategy according to the current evolutionary state, striving to accelerate the convergence speed while maintaining global search capability; on the other hand, directional information from guiding and rejecting individuals is simultaneously utilized to improve the algorithm's search performance, thereby enhancing the recognition accuracy of masked images. Attached Figure Description

[0038] Figure 1 This is a flowchart of the present invention.

[0039] Figure 2 This represents the probability of selecting the mutation strategy in the example. Detailed Implementation

[0040] The technical solution of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.

[0041] Example:

[0042] With reference to the accompanying drawings, the specific implementation steps of the present invention are as follows:

[0043] Step 1: Use an image sensor to collect facial images of people wearing masks and people not wearing masks to form an image sample set;

[0044] Step 2: Use the Histogram of Oriented Gradients (HGP) algorithm to extract features from the image sample set to obtain the mask image dataset;

[0045] Step 3: Divide the mask image dataset into a training dataset and a validation dataset;

[0046] Step 4, Enter the population size Maximum number of iterations Hybridization probability Subgroup size ;

[0047] Step 5, Set the current iteration number ;

[0048] Step 6, randomly generate a list containing Population of individuals Among them, population The first in individual population Each individual in the dataset stores a support vector machine based on a multinomial kernel function for mask image recognition. One training parameter; This represents the number of training parameters for the support vector machine based on a multinomial kernel function used for mask image recognition; Indicates population The first in The first stored in each individual One training parameter; individual subscript Dimension subscript The support vector machine based on polynomial kernel functions... The training parameters include, but are not limited to: the degree parameter, gamma parameter, and coef0 parameter in the polynomial kernel function;

[0049] Step 7, Calculate the population The fitness value of each individual in the group;

[0050] Step 8, Obtain the population The individual with the lowest fitness value is denoted as the optimal individual. ;

[0051] Step 9, if the current iteration number Less than If yes, proceed to step 10; otherwise, proceed to step 22.

[0052] Step 10: Calculate the amplitude value according to formula (1). ;

[0053] (1)

[0054] Step 11: Calculate the selection probability of the mutation strategy according to formula (2). ;

[0055] (2)

[0056] Where log represents the logarithm to the base e. It is pi. It is a sine function; in the embodiment, the selection probability is... The result of one calculation is as follows Figure 2 As shown;

[0057] Step 12: Rank the population according to their fitness values ​​from smallest to largest. Sort all individuals in the sequence to obtain the sorted population. ;

[0058] Step 13, Set up the pilot population Empty, and set to exclude population. Empty;

[0059] Step 14, sequence population The middle row at the front One individual was added to the pilot population. middle;

[0060] Step 15, sequence population The middle row at the back Individuals are added to the exclusionary population. middle;

[0061] Step 16: Generate mutant individuals according to formula (3) ;

[0062] (3)

[0063] in, and All in Random real numbers between; It is a mutated individual The first stored in One training parameter; Is A random integer between [a certain value] and [a certain value]. It is a population The first in The first stored in each individual One training parameter; Is A random integer between [a certain value] and [a certain value]. It guides the population The first in The first stored in each individual One training parameter; Is A random integer between [a certain value] and [a certain value]. It is the exclusion of the population. The first in The first stored in each individual One training parameter;

[0064] Step 17: Generate a new individual according to formula (4) ;

[0065] (4)

[0066] in, It is a new individual The first stored in One training parameter; and All in Random real numbers between It is the first The lower bound of the training parameters. It is the first An upper bound for each training parameter;

[0067] Step 18, calculate the new individual fitness value;

[0068] Step 19, Obtain the population The individual with the highest fitness value is designated as the worst individual. ;

[0069] Step 20, if the new individual The fitness value is less than that of the worst individual. If the fitness value is not met, then the new individual will be used. Replace the worst individual Otherwise, discard the new individual. ;

[0070] Step 21, Set the current iteration number Proceed to step 8;

[0071] Step 22, from the optimal individual Extract 1 training parameter, using the obtained The training parameters are used to train a support vector machine based on a multinomial kernel function for mask image recognition on the training dataset, thus realizing the recognition of mask images.

[0072] In this embodiment, the calculation process for the fitness value is as follows:

[0073] For individuals First, from the individual Extract 1 training parameter, using the obtained A multinomial kernel-based support vector machine for mask image recognition is trained on the training dataset using 10 training parameters. ; Calculate support vector machines based on polynomial kernel functions Cross-entropy on the validation dataset Then set up individuals fitness value The support vector machine based on polynomial kernel functions is described. The input variable is the histogram of oriented gradients of the face image; the support vector machine based on the multinomial kernel function... The output variable is the state value of wearing a mask in the face image; where the state value of wearing a mask in the face image is 0 or 1, the state value of wearing a mask in the face image is 0, the state value of wearing a mask in the face image is 1, and the state value of wearing a mask in the face image is 1, indicating that a mask is being worn in the face image.

Claims

1. A mask image recognition method based on evolutionary support vector machine, characterized in that, Includes the following steps: Step 1: Use an image sensor to collect facial images of people wearing masks and people not wearing masks to form an image sample set; Step 2: Use the Histogram of Oriented Gradients (HGP) algorithm to extract features from the image sample set to obtain the mask image dataset; Step 3: Divide the mask image dataset into a training dataset and a validation dataset; Step 4, Enter the population size Maximum number of iterations Hybridization probability Subgroup size ; Step 5, Set the current iteration number ; Step 6, randomly generate a list containing Population of individuals Among them, population The first in individual population Each individual in the dataset stores a support vector machine based on a multinomial kernel function for mask image recognition. One training parameter; This represents the number of training parameters for the support vector machine based on a multinomial kernel function used for mask image recognition; Indicates population The first in The first stored in each individual One training parameter; individual subscript Dimension subscript ; Step 7, Calculate the population The fitness value of each individual in the group; Step 8, Obtain the population The individual with the lowest fitness value is denoted as the optimal individual. ; Step 9, if the current iteration number Less than If yes, proceed to step 10; otherwise, proceed to step 22. Step 10: Calculate the amplitude value according to formula (1). ; (1) Step 11: Calculate the selection probability of the mutation strategy according to formula (2). ; (2) Where log represents the logarithm to the base e. It is pi. It is a sine function; Step 12: Rank the population according to their fitness values ​​from smallest to largest. Sort all individuals in the sequence to obtain the sorted population. ; Step 13, Set up the pilot population Empty, and set to exclude population. Empty; Step 14, sequence population The middle row at the front One individual was added to the pilot population. middle; Step 15, sequence population Middle row at the back Individuals are added to the exclusionary population. middle; Step 16: Generate mutant individuals according to formula (3) ; (3) in, and All in Random real numbers between; It is a mutated individual The first stored in One training parameter; Is A random integer between [a certain value] and [a certain value]. It is a population The first in The first stored in each individual One training parameter; Is A random integer between [a certain value] and [a certain value]. It guides the population The first in The first stored in each individual One training parameter; Is A random integer between [a certain value] and [a certain value]. It is the exclusion of the population. The first in The first stored in each individual One training parameter; Step 17: Generate a new individual according to formula (4) ; (4) in, It is a new individual The first stored in One training parameter; and All in Random real numbers between It is the first The lower bound of the training parameters. It is the first An upper bound for each training parameter; Step 18, calculate the new individual fitness value; Step 19, Obtain the population The individual with the highest fitness value is designated as the worst individual. ; Step 20, if the new individual The fitness value is less than that of the worst individual. If the fitness value is not met, then the new individual will be used. Replace the worst individual Otherwise, discard the new individual. ; Step 21, Set the current iteration number Proceed to step 8; Step 22, from the optimal individual Extract 1 training parameter, using the obtained The training parameters are used to train a support vector machine based on a multinomial kernel function for mask image recognition on the training dataset, thus realizing the recognition of mask images.

2. The mask image recognition method based on evolutionary support vector machine according to claim 1, characterized in that, The calculation process for the fitness value is as follows: For individuals First, from the individual Extract 1 training parameter, using the obtained A multinomial kernel-based support vector machine for mask image recognition is trained on the training dataset using 10 training parameters. ; Compute support vector machines based on polynomial kernel functions Cross-entropy on the validation dataset Then set up individuals fitness value .

Citation Information

Patent Citations

  • Battery SOC prediction method based on evolutionary random forest

    CN113610325A

  • Mask face living body detection method based on support vector machine

    CN114187644A