CN113033422A - Face detection method, system, equipment and storage medium based on edge calculation - Google Patents

Face detection method, system, equipment and storage medium based on edge calculation Download PDF

Info

Publication number
CN113033422A
CN113033422A CN202110332964.6A CN202110332964A CN113033422A CN 113033422 A CN113033422 A CN 113033422A CN 202110332964 A CN202110332964 A CN 202110332964A CN 113033422 A CN113033422 A CN 113033422A
Authority
CN
China
Prior art keywords
face detection
detection model
face
initial
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110332964.6A
Other languages
Chinese (zh)
Inventor
罗位
郑彬
赵永廷
李鸿昆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongke Wanxun Intelligent Technology Suzhou Co ltd
Original Assignee
Zhongke Wanxun Intelligent Technology Suzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Wanxun Intelligent Technology Suzhou Co ltd filed Critical Zhongke Wanxun Intelligent Technology Suzhou Co ltd
Priority to CN202110332964.6A priority Critical patent/CN113033422A/en
Publication of CN113033422A publication Critical patent/CN113033422A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Abstract

The invention provides a face detection method, a face detection system, face detection equipment and a storage medium based on edge calculation, wherein the method comprises the following steps: constructing a face sample image data set, constructing a lightweight initial face model, adopting 3 × 3 convolution kernels, forming a plurality of convolution layers by the convolution kernels, arranging a residual error structure connected after the convolution layers between any two convolution layers, and taking a linear rectification function as an activation function; training an initial face detection model according to a face sample image data set and an Adam optimizer optimized by a cosine annealing algorithm to obtain a face detection model; transplanting the face detection model to an edge computing platform, carrying out performance test, inputting a video stream to the edge computing platform after the test proves that the transplanting is successful, identifying the face in the video stream according to the transplanted face detection model, and outputting an identification result. The invention can give full play to the optimal performance of the edge computing platform and reduce the computation and bandwidth in operation.

Description

Face detection method, system, equipment and storage medium based on edge calculation
Technical Field
The present invention relates to the field of face detection technologies, and in particular, to a face detection method, system, device, and storage medium based on edge calculation.
Background
With the continuous development of the deep learning technology, the effect of the traditional image processing algorithm is gradually surpassed by that of the deep learning image processing algorithm, and the deep neural network greatly improves the effect of a plurality of computer vision tasks, thereby becoming a widely used research method in the field of computer vision. The human face recognition is an important field of crossing of artificial intelligence and computer vision, and the development of the deep neural network obtains prominent achievements on the human face recognition technology. With the expansion of the demands of people and the increase of clients, the data volume is continuously increased, the workload of the cloud computing center is increased, and meanwhile, the server is under huge network transmission pressure and quiet computing power, so that the delay of information transmission is caused, and the real-time cooperative work is difficult to ensure, so that the wave of edge computing is promoted.
However, because the edge computing device usually has low computing capability, it is difficult to efficiently run a large-scale neural network, so that the network structures of the face detection algorithms commonly used by people, such as deep learning networks like VGG and google lenet, are not well supported on the edge computing platform, and the optimal performance of the edge computing platform cannot be exerted.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a face detection method, system, device and storage medium based on edge calculation.
A face detection method based on edge calculation comprises the following steps: collecting human face image sample data, and constructing a human face sample image data set according to the human face image sample data; constructing a lightweight initial face detection model, wherein the initial face detection model adopts 3 × 3 convolution kernels, the convolution kernels form a plurality of convolution layers, a residual error structure is arranged between any two convolution layers, the residual error structure is connected behind the convolution layers, and a linear rectification function is used as an activation function; training the initial face detection model according to the face sample image data set, and training the initial face detection model by using an Adam optimizer which is optimized by a cosine annealing algorithm in advance to obtain a face detection model; transplanting the face detection model to an edge computing platform, performing performance test on the transplanted face detection model, and if the performance test is passed, determining that the face detection model is successfully transplanted; and acquiring the collected video stream, recognizing the face in the video stream according to the transplanted face detection model, and outputting a recognition result.
In one embodiment, the constructing the lightweight initial face detection model further includes: the convolution layer is provided with output channels, and the number of the output channels is a multiple of the number of convolution kernels in the convolution layer.
In one embodiment, the training the initial face detection model according to the face sample image dataset specifically includes: the face sample image data set is provided with a training set, a testing set and a verification set; training the initial face detection model through the training set; testing the trained initial face detection model through the test set to obtain a test result; and verifying the test result through the verification set, and finishing the training of the initial face model when the training, the testing and the verification are repeated until the intersection ratio between the training set and the verification set is 0.5.
In one embodiment, the cosine annealing algorithm is:
Figure BDA0002996974270000021
wherein i is the number of restarts,
Figure BDA0002996974270000022
and
Figure BDA0002996974270000023
respectively representing the maximum and minimum values of the learning rate, TcurIndicating the number of currently executed epochs, TiIndicating the number of epochs in the ith restart.
In one embodiment, the transplanting the face detection model to an edge computing platform, and performing a performance test on the transplanted face detection model, and if the performance test passes, determining that the face detection model is successfully transplanted, specifically including: and evaluating the calculation efficiency of each convolution layer in the transplanted face detection model and the memory utilization rate of the embedded neural network according to the performance evaluation method of the edge calculation platform, calculating data sets before and after transplantation on the verification set, comparing the data sets to obtain loss precision, and if the loss precision is within the range of 0.05, determining that the face detection model is transplanted successfully.
In one embodiment, the acquiring the collected video stream, recognizing a face in the video stream according to the transplanted face detection model, and outputting a recognition result specifically includes: extracting multiple frames of initial images according to the video stream, carrying out face detection on each frame of initial image, and if a face exists in the initial image, preprocessing the initial image to obtain an image to be identified; inputting the image to be recognized into the transplanted human face detection model, and performing feature extraction on the image to be recognized to obtain a feature vector of the image to be recognized; and judging the similarity between the image to be recognized and the feature vectors of the face images in the database, and outputting a face recognition result according to the similarity.
In one embodiment, the edge computing platform is a RK3399PRO computing platform.
A face detection system based on edge calculation, comprising: the data set construction module is used for collecting human face image sample data and constructing a human face sample image data set according to the human face image sample data; the face detection model building module is used for building a lightweight initial face detection model, the initial face detection model adopts 3 x 3 convolution kernels, the convolution kernels form a plurality of convolution layers, a residual error structure is arranged between any two convolution layers, the residual error structure is connected behind the convolution layers, and a linear rectification function is used as an activation function; the face detection model training module is used for training the initial face detection model according to the face sample image data set, and training the initial face detection model by using an Adam optimizer which is optimized by an annealing algorithm in advance to obtain a face detection model; the human face detection model transplanting module is used for transplanting the human face detection model to an edge computing platform, carrying out performance test on the transplanted human face detection model, and if the performance test is passed, determining that the human face detection model is successfully transplanted; and the face recognition module is used for acquiring the collected video stream, recognizing the face in the video stream according to the transplanted face detection model and outputting a recognition result.
An apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the edge calculation-based face detection method described in the above embodiments when executing the program.
A storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the edge calculation-based face detection method described in the various embodiments above.
Compared with the prior art, the invention has the advantages and beneficial effects that: the invention can provide the face detection model adapting to the edge computing platform, ensure the utilization rate of the face detection model on the edge computing platform, give full play to the best performance of the edge computing platform and reduce the computation and bandwidth in operation.
Drawings
FIG. 1 is a schematic flow chart illustrating a face detection method based on edge calculation according to an embodiment;
FIG. 2 is a schematic structural diagram of a face detection system based on edge calculation according to an embodiment;
fig. 3 is a schematic diagram of the internal structure of the apparatus in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings by way of specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In one embodiment, as shown in fig. 1, a face detection method based on edge calculation is provided, which includes the following steps:
step S101, collecting human face image sample data, and constructing a human face sample image data set according to the human face image sample data.
Specifically, because the deep learning model requires a large amount of data to be obtained through a long-time training test, before the face detection model is constructed, face image sample data can be collected and screened, meanwhile, hyper-parameters of face detection, such as the length and width of a detection frame of a face frame and the length-width ratio of the detection frame, are preliminarily given according to an application scene and data distribution, and then a face sample image data set is constructed according to the processed face image sample data.
And S102, constructing a lightweight initial face detection model, wherein the initial face detection model adopts 3 × 3 convolution kernels, the convolution kernels form a plurality of convolution layers, a residual structure is arranged between any two convolution layers, the residual structure is connected behind the convolution layers, and a linear rectification function is used as an activation function.
Specifically, in order to ensure the accuracy and efficiency of face detection, a lightweight model can be adopted to construct a lightweight initial face detection model, the initial face detection model uses a large number of 3 × 3 small convolution kernels, and the use of other convolution kernels is reduced as much as possible, so that the complexity of the algorithm can be reduced while the feature extraction capability is improved, the edge calculation platform can be better adapted, the utilization rate of the edge calculation platform can be fully exerted by the 3 × 3 convolution kernels, and the detection efficiency of the algorithm is improved.
The lightweight initial face detection model can be four existing lightweight models: any one of the squaezenet, MobileNet, ShuffleNet, and Xception may be a lightweight model modified from these four lightweight models.
Specifically, in order to prevent gradient disappearance caused by a large number of layers of the initial face detection model, a residual structure is added to every two convolution layers and is connected after convolution; the residual structure comprises a residual structure which comprises a residual main circuit and a residual branch circuit, wherein the residual main circuit and the residual branch circuit are provided with weight distribution, and the sum of the weights is 1.
Specifically, in order to increase network nonlinearity and improve model training speed and gradient, a linear rectification function can be used as an activation function, and the linear rectification function can realize fusion optimization operation with a convolutional layer on an edge computing platform, so that computation and bandwidth reduction in operation are ensured.
Step S103, training an initial face detection model according to the face sample image data set, and training the initial face detection model by using an Adam optimizer optimized by a cosine annealing algorithm in advance to obtain the face detection model.
Specifically, after an initial face detection model is built, the initial face detection model is trained according to a face sample image data set and tested, after the test is passed, the initial face detection model is trained by using an Adam (Adaptive motion Estimation) optimizer which is optimized by a cosine annealing algorithm in advance until the initial face detection model converges, the training of the initial face detection model is completed, and the face detection model is obtained.
Wherein, the condition of model convergence may be: the error is less than a certain preset smaller value; or the weight change between two iterations is very small, a threshold value can be set, and when the weight change is smaller than the threshold value, the training is stopped; or setting the maximum iteration number, and stopping training when the iteration number exceeds the maximum iteration number.
Specifically, the initial face detection model may adopt a tensrflow deep learning framework in the training process, and the tensrflow is a relatively high-order machine learning library, which is convenient for designing a neural network framework of the initial face detection model.
And step S104, transplanting the face detection model to an edge computing platform, carrying out performance test on the transplanted face detection model, and if the performance test is passed, determining that the face detection model is successfully transplanted.
In order to improve the computational efficiency and reduce the bandwidth, a mixed quantization mode can be adopted when the face detection model is transplanted, namely, useless convolution layers are quantized in a fixed point mode, and the parameters are converted from float32 to int 8; while the important convolutional layers remain unchanged. By constantly adjusting the quantization of the convolutional layer, the accuracy of the model can be reduced as little as possible while improving the model performance.
Specifically, after the transplantation is completed, a performance test needs to be performed on the face detection model on the edge computing platform, and if the performance test passes, the face detection model is determined to be successfully transplanted. For example, when the edge computing platform is an RK3399PRO computing platform, a performance evaluation method on the RK3399PRO computing platform can be adopted for testing, the computing efficiency of each convolution layer of the transplanted face detection model and the memory usage rate of the embedded neural network processing are evaluated, meanwhile, the data sets of the face sample data sets before and after transplantation are compared, whether the precision loss range exceeds a threshold value is determined, and if the precision loss range does not exceed the threshold value, the face detection model is considered to be transplanted successfully; otherwise, the face detection model is determined to be transplanted unsuccessfully.
And step S105, acquiring the collected video stream, recognizing the face in the video stream according to the transplanted face detection model, and outputting a recognition result.
Specifically, the edge computing platform acquires an input video stream or an image to be detected, identifies a face in the video stream or the image to be detected according to the transplanted face detection model, and outputs an identification result.
In the embodiment, a face image sample data set is constructed through face image sample data, then a lightweight initial face detection model is constructed, a plurality of convolution layers are formed by adopting 3 × 3 convolution kernels, a residual error structure connected to the convolution layers is arranged between any two convolution layers, so that the utilization rate of an edge computing platform is fully exerted, the algorithm detection efficiency is improved, gradient disappearance caused by more model layers can be prevented, a linear rectification function is used as an activation function, the initial face detection model is trained according to the face sample image data set, and an Adam optimizer optimized through a cosine annealing algorithm in advance is used for training the initial face detection model to obtain the face detection model; transplanting the face detection model to an edge computing platform, and carrying out performance test on the transplanted face detection model, and if the test is passed, determining that the transplantation is successful; the edge computing platform acquires the collected video stream, the transplanted face detection model identifies the face in the video stream, and the identification result is output, so that the utilization rate of the face detection model on the edge computing platform can be ensured, the optimal performance of the edge computing platform can be fully exerted, and meanwhile, the calculation and bandwidth in operation can be reduced.
Wherein, the constructing of the lightweight initial face detection model in step S102 further includes: the convolution layer is provided with output channels, and the number of the output channels is a multiple of the number of convolution kernels in the convolution layer.
Specifically, in order to achieve the best performance of the platform embedded neural network processor, the output channels arranged in each convolution layer may be set to be multiples of the number of convolution kernels in the convolution layer, for example, the convolution kernel size is 3 × 3, and the number is 64, then the output channels may be set to be 64 or 128.
Wherein, step S103 specifically includes: the face sample image data set is provided with a training set, a testing set and a verification set; training an initial face detection model through a training set; testing the trained initial face detection model through a test set to obtain a test result; and verifying the test result through the verification set, and finishing the training of the initial face detection model when the training, the testing and the verification are repeated until the intersection ratio between the training set and the verification set is 0.5.
Specifically, a face sample image data set can be randomly divided into a training set, a testing set and a verification set, and an initial face detection model is trained through the training set; testing the trained initial face detection model through a test set to obtain a test result; and verifying the test result through the verification set, repeating training, testing and verifying until the intersection ratio between the training set and the verification set is 0.5, finishing the training of the initial face detection model, and continuing training the initial face detection model after the training through an Adam optimizer until the initial face detection model converges to obtain the face detection model.
The cosine annealing algorithm in step S103 specifically includes:
Figure BDA0002996974270000071
wherein i is the number of restarts,
Figure BDA0002996974270000072
and
Figure BDA0002996974270000073
respectively representing the maximum and minimum values of the learning rate, TcurIndicating the number of currently executed epochs, TiIndicating the number of epochs in the ith restart.
Wherein, step S104 specifically includes: and evaluating the calculation efficiency of each convolution layer in the transplanted face detection model and the memory utilization rate of the embedded neural network according to a performance evaluation method of the edge calculation platform, calculating data sets before and after transplantation on the verification set, comparing to obtain loss precision, and if the loss precision is within the range of 0.05, determining that the face detection model is transplanted successfully.
Wherein, the edge computing platform is an RK3399PRO computing platform.
Specifically, after the face detection model is transplanted to the edge computing platform, the performance test on the transplanted face detection model can be realized according to the performance evaluation method of the edge computing platform, for example, interfaces such as "eval _ pref" and "eval _ memory" in the RK3399PRO computing platform. The method mainly comprises the steps of evaluating the calculation efficiency of each convolution layer of a face detection model after transplantation and the memory utilization rate of an embedded neural network, calculating data sets before and after transplantation on a verification set, comparing the data sets to obtain loss precision, and if the loss precision before and after transplantation is within the range of 0.05, determining that the face detection model is successfully transplanted; otherwise, the face detection model is determined to be transplanted unsuccessfully.
Wherein, step S105 specifically includes: extracting multiple frames of initial images according to the video stream, carrying out face detection on each frame of initial image, and if a face exists in the initial image, preprocessing the initial image to obtain an image to be identified; inputting the image to be recognized into the transplanted human face detection model, and performing feature extraction on the image to be recognized to obtain a feature vector of the image to be recognized; and judging the similarity between the image to be recognized and the feature vectors of the face images in the database, and outputting a face recognition result according to the similarity.
Specifically, the collected video stream is input to the edge computing platform, and a plurality of frames of initial images are extracted according to the video stream. The method comprises the steps of carrying out face detection on an obtained multi-frame initial image, preprocessing the initial image if a face exists in the initial image, for example, setting a face frame, framing the face in the initial image according to the face frame, removing images outside the face frame, or improving the definition of the initial image, and the like, so as to obtain an image to be recognized. Inputting an image to be recognized into a face detection model transplanted into an edge computing platform, extracting features of the image to be recognized to obtain a feature vector of the image to be recognized, setting a database in which a plurality of face images are stored in advance in the edge computing platform, judging the similarity between the image to be recognized and the feature vector of the face image in the database, and outputting a face recognition result according to the similarity.
As shown in fig. 2, there is provided a face detection system 20 based on edge calculation, including: a data set construction module 21, a face detection model construction module 22, a face detection model training module 23, a face detection model transplanting module 24 and a face recognition module 25, wherein:
the data set construction module 21 is configured to collect face image sample data and construct a face sample image data set according to the face image sample data;
the face detection model building module 22 is used for building a lightweight initial face detection model, the initial face detection model adopts 3 × 3 convolution kernels, the convolution kernels form a plurality of convolution layers, a residual error structure is arranged between any two convolution layers, the residual error structure is connected after the convolution layers, and a linear rectification function is used as an activation function;
the face detection model training module 23 is used for training an initial face detection model according to the face sample image data set, and training the initial face detection model by using an Adam optimizer which is optimized by an annealing algorithm in advance to obtain a face detection model;
the face detection model transplanting module 24 is used for transplanting the face detection model to the edge computing platform, performing performance test on the transplanted face detection model, and if the performance test is passed, determining that the face detection model is successfully transplanted;
and the face recognition module 25 is configured to acquire the acquired video stream, recognize a face in the video stream according to the transplanted face detection model, and output a recognition result.
In one embodiment, the face detection model training module 23 is specifically configured to: setting a training set, a testing set and a verification set according to a face sample image data set; training an initial face detection model through a training set; testing the trained initial face detection model through a test set to obtain a test result; and verifying the test result through the verification set, and finishing the training of the initial face model when the training, the testing and the verification are repeated until the intersection ratio between the training set and the verification set is 0.5.
In one embodiment, the face detection model transplantation module 24 is specifically configured to: and evaluating the calculation efficiency of each convolution layer in the transplanted face detection model and the utilization rate of the embedded neural network memory according to a performance evaluation method of the edge calculation platform, calculating data sets before and after transplantation on the verification set, comparing to obtain loss precision, and if the loss precision is within the range of 0.05, determining that the face detection model is successfully transplanted.
In one embodiment, the face recognition module 25 is specifically configured to: extracting multiple frames of initial images according to the video stream, carrying out face detection on each frame of initial image, and if a face exists in the initial image, preprocessing the initial image to obtain an image to be identified; inputting the image to be recognized into the transplanted human face detection model, and performing feature extraction on the image to be recognized to obtain a feature vector of the image to be recognized; and judging the similarity between the image to be recognized and the feature vectors of the face images in the database, and outputting a face recognition result according to the similarity.
In one embodiment, a device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 3. The device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the device is configured to provide computing and control capabilities. The memory of the device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the device is used for storing configuration templates and also can be used for storing target webpage data. The network interface of the device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a face detection method based on edge calculation.
Those skilled in the art will appreciate that the configuration shown in fig. 3 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the devices to which the present application may be applied, and that a particular device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a storage medium may also be provided, the storage medium storing a computer program comprising program instructions which, when executed by a computer, which may be part of the above-mentioned edge calculation based face detection system, cause the computer to perform the method according to the preceding embodiment.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
It will be apparent to those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented in program code executable by a computing device, such that they may be stored on a computer storage medium (ROM/RAM, magnetic disks, optical disks) and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A face detection method based on edge calculation is characterized by comprising the following steps:
collecting human face image sample data, and constructing a human face sample image data set according to the human face image sample data;
constructing a lightweight initial face detection model, wherein the initial face detection model adopts 3 × 3 convolution kernels, the convolution kernels form a plurality of convolution layers, a residual error structure is arranged between any two convolution layers, the residual error structure is connected behind the convolution layers, and a linear rectification function is used as an activation function;
training the initial face detection model according to the face sample image data set, and training the initial face detection model by using an Adam optimizer which is optimized by a cosine annealing algorithm in advance to obtain a face detection model;
transplanting the face detection model to an edge computing platform, performing performance test on the transplanted face detection model, and if the performance test is passed, determining that the face detection model is successfully transplanted;
and acquiring the collected video stream, recognizing the face in the video stream according to the transplanted face detection model, and outputting a recognition result.
2. The edge-computation-based face detection method of claim 1, wherein the constructing of the lightweight initial face detection model further comprises:
the convolution layer is provided with output channels, and the number of the output channels is a multiple of the number of convolution kernels in the convolution layer.
3. The edge-computation-based face detection method of claim 1, wherein the training of the initial face detection model according to the face sample image dataset specifically comprises:
the face sample image data set is provided with a training set, a testing set and a verification set; training the initial face detection model through the training set; testing the trained initial face detection model through the test set to obtain a test result; and verifying the test result through the verification set, and finishing the training of the initial face model when the training, the testing and the verification are repeated until the intersection ratio between the training set and the verification set is 0.5.
4. The edge-computation-based face detection method according to claim 1, wherein the cosine annealing algorithm is:
Figure FDA0002996974260000011
wherein i is the number of restarts,
Figure FDA0002996974260000012
and
Figure FDA0002996974260000013
respectively representing the maximum and minimum values of the learning rate, TcurIndicating the number of currently executed epochs, TiIndicating the number of epochs in the ith restart.
5. The edge-computing-based face detection method according to claim 3, wherein the transplanting the face detection model to an edge computing platform, and performing a performance test on the transplanted face detection model, and if the performance test passes, then the face detection model is considered to be successfully transplanted, specifically comprising:
and evaluating the calculation efficiency of each convolution layer in the transplanted face detection model and the memory utilization rate of the embedded neural network according to the performance evaluation method of the edge calculation platform, calculating data sets before and after transplantation on the verification set, comparing the data sets to obtain loss precision, and if the loss precision is within the range of 0.05, determining that the face detection model is transplanted successfully.
6. The edge-computation-based face detection method according to claim 1, wherein the acquiring of the collected video stream, recognizing the face in the video stream according to the transplanted face detection model, and outputting a recognition result specifically comprises:
extracting multiple frames of initial images according to the video stream, carrying out face detection on each frame of initial image, and if a face exists in the initial image, preprocessing the initial image to obtain an image to be identified;
inputting the image to be recognized into the transplanted human face detection model, and performing feature extraction on the image to be recognized to obtain a feature vector of the image to be recognized;
and judging the similarity between the image to be recognized and the feature vectors of the face images in the database, and outputting a face recognition result according to the similarity.
7. The edge-computation-based face detection method according to claim 1, wherein the edge computation platform is an RK3399PRO computation platform.
8. A face detection system based on edge calculation, comprising:
the data set construction module is used for collecting human face image sample data and constructing a human face sample image data set according to the human face image sample data;
the face detection model building module is used for building a lightweight initial face detection model, the initial face detection model adopts 3 x 3 convolution kernels, the convolution kernels form a plurality of convolution layers, a residual error structure is arranged between any two convolution layers, the residual error structure is connected behind the convolution layers, and a linear rectification function is used as an activation function;
the face detection model training module is used for training the initial face detection model according to the face sample image data set, and training the initial face detection model by using an Adam optimizer which is optimized by an annealing algorithm in advance to obtain a face detection model;
the human face detection model transplanting module is used for transplanting the human face detection model to an edge computing platform, carrying out performance test on the transplanted human face detection model, and if the performance test is passed, determining that the human face detection model is successfully transplanted;
and the face recognition module is used for acquiring the collected video stream, recognizing the face in the video stream according to the transplanted face detection model and outputting a recognition result.
9. An apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, realizing the steps of the method of any one of claims 1 to 7.
CN202110332964.6A 2021-03-29 2021-03-29 Face detection method, system, equipment and storage medium based on edge calculation Pending CN113033422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110332964.6A CN113033422A (en) 2021-03-29 2021-03-29 Face detection method, system, equipment and storage medium based on edge calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110332964.6A CN113033422A (en) 2021-03-29 2021-03-29 Face detection method, system, equipment and storage medium based on edge calculation

Publications (1)

Publication Number Publication Date
CN113033422A true CN113033422A (en) 2021-06-25

Family

ID=76452557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110332964.6A Pending CN113033422A (en) 2021-03-29 2021-03-29 Face detection method, system, equipment and storage medium based on edge calculation

Country Status (1)

Country Link
CN (1) CN113033422A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703977A (en) * 2021-08-30 2021-11-26 广东宏乾科技股份有限公司 Intelligent human face and human body detection and filtration device and picture output device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110633785A (en) * 2018-06-21 2019-12-31 清华大学 Method and system for calculating convolutional neural network
CN111428606A (en) * 2020-03-19 2020-07-17 华南师范大学 Lightweight face comparison verification method facing edge calculation
WO2020215485A1 (en) * 2019-04-20 2020-10-29 无锡祥生医疗科技股份有限公司 Fetal growth parameter measurement method, system, and ultrasound device
WO2021018163A1 (en) * 2019-07-30 2021-02-04 华为技术有限公司 Neural network search method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110633785A (en) * 2018-06-21 2019-12-31 清华大学 Method and system for calculating convolutional neural network
WO2020215485A1 (en) * 2019-04-20 2020-10-29 无锡祥生医疗科技股份有限公司 Fetal growth parameter measurement method, system, and ultrasound device
WO2021018163A1 (en) * 2019-07-30 2021-02-04 华为技术有限公司 Neural network search method and apparatus
CN111428606A (en) * 2020-03-19 2020-07-17 华南师范大学 Lightweight face comparison verification method facing edge calculation

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
吴昊: "面向目标跟踪的物联网时空数据处理技术研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 2, pages 27 - 28 *
机器之心PRO: "从修正Adam到理解泛化:概览2017年深度学习优化算法的最新研究进展" *
莫砚汉: "基于协同边缘计算的人脸识别平台的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 2, pages 16 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703977A (en) * 2021-08-30 2021-11-26 广东宏乾科技股份有限公司 Intelligent human face and human body detection and filtration device and picture output device
CN113703977B (en) * 2021-08-30 2024-04-05 广东宏乾科技股份有限公司 Intelligent face and human body detection and filtration device and picture output device

Similar Documents

Publication Publication Date Title
CN112052948B (en) Network model compression method and device, storage medium and electronic equipment
Guo et al. JointPruning: Pruning networks along multiple dimensions for efficient point cloud processing
CN111523640A (en) Training method and device of neural network model
CN113241064B (en) Speech recognition, model training method and device, electronic equipment and storage medium
TW202143164A (en) Image processing method, electronic device and computer readable storage medium
CN112036564B (en) Picture identification method, device, equipment and storage medium
CN114332500A (en) Image processing model training method and device, computer equipment and storage medium
CN114490065A (en) Load prediction method, device and equipment
CN114694255B (en) Sentence-level lip language recognition method based on channel attention and time convolution network
CN114140831B (en) Human body posture estimation method and device, electronic equipment and storage medium
WO2022246986A1 (en) Data processing method, apparatus and device, and computer-readable storage medium
CN108496174B (en) Method and system for face recognition
CN114429208A (en) Model compression method, device, equipment and medium based on residual structure pruning
CN113033422A (en) Face detection method, system, equipment and storage medium based on edge calculation
CN110855474B (en) Network feature extraction method, device, equipment and storage medium of KQI data
WO2024011859A1 (en) Neural network-based face detection method and device
CN110781724A (en) Face recognition neural network, method, device, equipment and storage medium
CN112633516B (en) Performance prediction and machine learning compiling optimization method and device
Wirayasa et al. Comparison of Convolutional Neural Networks Model Using Different Optimizers for Image Classification
Ke et al. Research on Pet Recognition Algorithm With Dual Attention GhostNet-SSD and Edge Devices
CN110647864A (en) Single multi-graph feature recognition method, equipment and medium based on generation countermeasure network
CN115658307B (en) Intelligent load processing method and system based on compressed data direct calculation
CN113160795B (en) Language feature extraction model training method, device, equipment and storage medium
WO2022198606A1 (en) Deep learning model acquisition method, system and apparatus, and storage medium
CN116826734A (en) Photovoltaic power generation power prediction method and device based on multi-input model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination