CN112633146B - Multi-pose face gender detection training optimization method, device and related equipment - Google Patents

Multi-pose face gender detection training optimization method, device and related equipment Download PDF

Info

Publication number
CN112633146B
CN112633146B CN202011521184.8A CN202011521184A CN112633146B CN 112633146 B CN112633146 B CN 112633146B CN 202011521184 A CN202011521184 A CN 202011521184A CN 112633146 B CN112633146 B CN 112633146B
Authority
CN
China
Prior art keywords
gradient information
information
federal
parameter information
client
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.)
Active
Application number
CN202011521184.8A
Other languages
Chinese (zh)
Other versions
CN112633146A (en
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.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian Technology 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 Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN202011521184.8A priority Critical patent/CN112633146B/en
Publication of CN112633146A publication Critical patent/CN112633146A/en
Application granted granted Critical
Publication of CN112633146B publication Critical patent/CN112633146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • 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/172Classification, e.g. identification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Biophysics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a multi-pose human face gender detection training optimization method based on federal learning, which is applied to the field of human face living body detection and is used for solving the technical problems of high requirements on hardware equipment, data quantity and quality and low model generalization capability of the existing human face gender detection method. The method provided by the invention comprises the following steps: receiving gradient information and parameter information, and acquiring federal model parameters according to the gradient information; the gradient information and the parameter information comprise gradient information and parameter information obtained by training face pictures marked with gender and head gesture classification labels, and local gradient information and local parameter information after a client updates a local training model; updating parameters of the server federation model after federation learning gradient information is obtained through federation model parameters and gradient information; judging whether the loss value of the federal model reaches a preset value, and ending the flow of the method if the loss value reaches the preset value; if the loss value does not reach the preset value, returning to continue to execute the steps.

Description

Multi-pose face gender detection training optimization method, device and related equipment
Technical Field
The invention relates to the field of face detection, in particular to a multi-pose face gender detection training optimization method, device, computer equipment and storage medium based on federal learning.
Background
Federal learning is an emerging artificial intelligence technology, and aims to ensure information security during data exchange, protect terminal data and personal privacy data security, and perform efficient machine learning before a plurality of computing nodes.
The existing face gender detection model is mainly trained by training data with large data volume, and the performance of the model is enhanced and the detection rate is improved by increasing training times and adjusting training parameters with the large data volume. However, the training data with large data volume is not individually re-marked for faces with different poses, so that in order to improve the fitting capability of the neural network to multi-pose face detection, a large amount of training data needs to be prepared, and the requirements on the quantity and quality of the data are relatively high. Meanwhile, because training is required to be performed on training data with large data quantity, the requirement on training hardware equipment is higher. Because faces with different postures are not marked independently, the faces with different postures are difficult to learn in the training process, and training can be performed only by means of marked labels, so that the generalization capability of the model is difficult to improve. Therefore, the existing face gender detection method has the problems of higher requirements on hardware equipment, data quantity and quality and low model generalization capability.
Disclosure of Invention
The embodiment of the invention provides a multi-pose face gender detection training optimization method, a multi-pose face gender detection training device, a multi-pose face gender detection training computer device and a multi-pose face gender detection storage medium based on federal learning, and aims to solve the technical problems that an existing face gender detection method is high in data quantity and quality requirements of hardware equipment and low in model generalization capability.
A multi-pose human face gender detection training optimization method based on federal learning comprises the following steps:
A. the gradient information and the parameter information sent by the client side to the server side are received, and federal model parameters are obtained according to the parameter information; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: based on the parameter information obtained by training the face picture marked with the gender and head gesture classification labels and the local parameter information required by the local training model updating of the client;
B. calculating federal model parameters and gradient information based on an asynchronous random gradient descent optimization algorithm to obtain federal learning gradient information;
C. updating parameters of the federal model of the server according to federal model parameters and federal learning gradient information;
D. judging whether the loss value in the federal model reaches a preset value or not, and ending the flow of the method if the loss value reaches the preset value; and if the loss value does not reach the preset value, returning to continue to execute the steps A to D.
Multi-pose face gender detection training optimizing device based on federal learning, comprising:
the parameter acquisition module is used for receiving gradient information and parameter information sent by the client to the server and acquiring federal model parameters according to the parameter information; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: based on the parameter information obtained by training the face picture marked with the gender and head gesture classification labels and the local parameter information required by the local training model update of the client;
the information acquisition module is used for calculating the federal model parameters and the gradient information based on an asynchronous random gradient descent optimization algorithm to acquire federal learning gradient information;
the parameter updating module is used for updating parameters of the federal model of the server according to the federal model parameters and the federal learning gradient information;
the judging module is used for judging whether the loss value in the federal model reaches a preset value or not, and ending the flow of the method if the loss value reaches the preset value; and if the loss value does not reach the preset value, returning to the continuous execution of the parameter acquisition module to the judgment module.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the federal learning-based multi-pose face gender detection training optimization method described above when the computer program is executed.
A computer readable storage medium storing a computer program which when executed by a processor implements the steps of the federally learned multi-pose face gender detection training optimization method described above.
The multi-pose face gender detection training optimization method, device, computer equipment and storage medium based on federal learning provided by the embodiment of the invention firstly receives gradient information and parameter information sent by a client to a server and acquires federal model parameters according to the parameter information; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: based on the parameter information obtained by training the face picture marked with the gender and head gesture classification labels and the local parameter information required by the local training model updating of the client; calculating federal model parameters and gradient information based on an asynchronous random gradient descent optimization algorithm to obtain federal learning gradient information; updating parameters of the federal model of the server according to federal model parameters and federal learning gradient information; finally, judging whether the loss value in the federal model reaches a preset value, and ending the flow of the method if the loss value reaches the preset value; if the loss value does not reach the preset value, returning to continue to execute the steps. By using the federal learning technology, the model for detecting the face images with different genres and postures is obtained through training and optimizing the model, and the technical problems that the existing face gender detection method has high requirements on the data quantity and quality of hardware equipment and low generalization capability of the model are solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of a multi-pose face gender detection training optimization method based on federal learning in an embodiment of the present invention;
FIG. 2 is a flow chart of a multi-pose face gender detection training optimization method based on federal learning in an embodiment of the present invention;
FIG. 3 is an interactive flow chart of a multi-pose face gender detection training optimization method based on federal learning in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a conventional federal learning approach involved in an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a multi-pose face gender detection training optimization device based on federal learning in an embodiment of the present invention;
FIG. 6 is a schematic diagram of a server according to an embodiment of the invention;
fig. 7 is a schematic diagram of a terminal device according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The multi-pose face gender detection training optimization method based on federal learning can be applied to an application environment as shown in fig. 1, wherein computer equipment/terminal equipment communicates with a server through a network. The computer device/terminal device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, among others. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a multi-pose face gender detection training optimization method based on federal learning is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps S101 to S104:
s101, receiving gradient information and parameter information sent by a client to a server, and acquiring federal model parameters according to the parameter information; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: based on the parameter information obtained by training the face picture marked with the gender and head gesture classification labels and the local parameter information required by the local training model updating of the client.
What needs to be explained here is: the gradient information refers to the direction change of a certain coordinate point on the local training model of the corresponding client, and is used for reflecting the fitting condition of the local training model of the client. The parameter information refers to an index that needs to be adjusted in the training process of the local training model of the client, and the index includes, but is not limited to, a learning rate and an input sample number batch size. The training process of the client local training model comprises training face pictures marked with gender and head posture classification labels based on a neural network and updating the client local training model.
Head pose includes, but is not limited to, face-side, head-up, head-down. The face pictures marked with the gender and head pose classification labels can be selected in different proportions, for example, the proportion of the number of the face pictures of the male to the number of the face pictures of the female is 1:1, the proportion of the number of the face pictures of the front face to the number of the face pictures of the side face is 1:1, and at the moment, the classification labels of the face pictures are the face picture of the male, the face picture of the female of the front face, the face picture of the male of the side face and the face picture of the female of the side face.
In step S101, the step of obtaining federal model parameters according to the parameter information specifically includes: and carrying out weighted summation on the parameter information to obtain federal model parameters. For example, assuming that the preset weight is 0.2, the parameter information is a learning rate, the received parameter information specifically includes 0.01 and 0.001, and the weighted sum of the parameter information is 0.2×0.01+0.2×0.001=0.0022, 0.0022 is the federal model parameter.
S102, calculating federal model parameters and gradient information based on an asynchronous random gradient descent optimization algorithm to obtain federal learning gradient information.
The step S102 specifically includes:
if no minimum gradient information exists at present, two gradient information are randomly acquired from all gradient information, the sizes of the two gradient information are compared, and smaller gradient information is used as the minimum gradient information.
If the minimum gradient information exists at present, randomly acquiring new gradient information which is not acquired before from all gradient information, comparing the minimum gradient information with the new gradient information, if the new gradient information is smaller than the minimum gradient information, taking the new gradient information as the minimum gradient information, carrying out iterative acquisition according to the minimum gradient information until all gradient information is acquired, and taking the finally obtained minimum gradient information as federal learning gradient information.
And S103, updating parameters of the federal model of the server according to federal model parameters and federal learning gradient information.
S104, judging whether the loss value in the federal model reaches a preset value, and ending the flow of the method if the loss value reaches the preset value; if the loss value does not reach the preset value, the process returns to continue steps S101 to S104.
For the above step S104, it should be noted here that: the loss value refers to the absolute value of the difference between the actual classification label and the prediction classification label of all face pictures obtained through a loss function. The loss functions include, but are not limited to, cross entropy loss functions, error loss functions, logistic regression loss functions.
In another embodiment of the present invention, as shown in fig. 3, the following steps S001 to S004 are further included before step S101:
s001, establishing network connection between the client and the server.
As for the above-described manner of establishing the network connection, it may be, but not limited to, a full duplex communication protocol based on TCP, a hypertext transfer protocol, or the like.
S002, the public key of the server is sent to the client through network connection.
S003, encrypting gradient information and parameter information to be sent by using a public key at the client and sending the encrypted gradient information and parameter information to the server.
S004, after the server receives the encrypted gradient information and the parameter information, the encrypted gradient information and the encrypted parameter information are decrypted by using a private key of the server.
In yet another embodiment of the present invention, based on the federal learning mode as shown in fig. 4, the following step a is further included after step S103:
a. and sending the federal model parameters and federal learning gradient information to the client.
For the above step a, it is specifically: and sending the federal model parameters and federal learning gradient information to the client through network connection.
In this embodiment, step a is followed by steps b to d as follows:
b. and updating the local gradient information and the local parameter information of the client according to the federal model parameters and federal learning gradient information.
c. And updating the local training model of the client according to the updated local gradient information and the local parameter information.
d. And sending the updated local gradient information and the local parameter information to the server.
In the step d, it is specifically: the client encrypts the updated local gradient information and the local parameter information by using the public key, and sends the encrypted local gradient information and the local parameter information to the server through network connection.
According to the multi-pose human face gender detection training optimization method based on federal learning, firstly, gradient information and parameter information sent by a client side to a server side are received, weighted summation is carried out on the parameter information, and federal model parameters are obtained; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: based on the parameter information obtained by training the face picture marked with the gender and head gesture classification labels and the local parameter information required by the local training model updating of the client; calculating federal model parameters and gradient information based on an asynchronous random gradient descent optimization algorithm to obtain federal learning gradient information; updating parameters of the federal model of the server according to federal model parameters and federal learning gradient information; finally, judging whether the loss value in the federal model reaches a preset value, and ending the flow of the method if the loss value reaches the preset value; if the loss value does not reach the preset value, returning to continue to execute the steps. By using the federal learning technology, the model is trained and optimized to obtain the model for detecting the face images with different sexes and postures, the expression capacity of the model is enhanced, the generalization capacity of the model is enhanced, the requirement on hardware is reduced, and the model can be used on edge computing equipment, so that the technical problems that the existing face gender detection method has high requirement on the data quantity and quality of hardware equipment and low generalization capacity of the model can be solved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In an embodiment, a multi-pose face gender detection training optimization device based on federal learning is provided, and the multi-pose face gender detection training optimization device based on federal learning corresponds to the multi-pose face gender detection training optimization method based on federal learning in the above embodiment one by one. As shown in fig. 5, the multi-pose face gender detection training optimization device based on federal learning includes a parameter acquisition module 11, an information acquisition module 12, a parameter update module 13 and a judgment module 14. The functional modules are described in detail as follows:
the acquiring parameter module 11 is configured to receive gradient information and parameter information sent by a client to a server, and acquire federal model parameters according to the parameter information; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: and training the face picture marked with the gender and head posture classification labels based on the neural network to obtain parameter information and carrying out local training model updating on the client to obtain local parameter information.
The acquiring information module 12 is configured to calculate federal model parameters and gradient information based on an asynchronous random gradient descent optimization algorithm, and acquire federal learning gradient information.
And the parameter updating module 13 is used for updating parameters of the federal model of the server according to federal model parameters and federal learning gradient information.
The judging module 14 is configured to judge whether a loss value in the federal model reaches a preset value, and if the loss value reaches the preset value, end the method flow; and if the loss value does not reach the preset value, returning to the continuous execution of the parameter acquisition module to the judgment module.
In this embodiment, the acquisition parameter module 11 includes, before:
and the network connection establishment module is used for establishing network connection between the client and the server.
And the public key sending module is used for sending the public key of the server to the client through network connection.
And the encryption module is used for encrypting the gradient information and the parameter information to be transmitted by using the public key at the client and transmitting the encrypted gradient information and the parameter information to the server.
And the decryption module is used for decrypting the encrypted gradient information and the parameter information by using a private key of the server after the server receives the encrypted gradient information and the parameter information.
In this embodiment, the parameter updating module 13 then comprises:
and the sending module is used for sending the federal model parameters and federal learning gradient information to the client.
In one embodiment, the transmitting module further includes:
and the client parameter updating unit is used for updating the local gradient information and the local parameter information of the client according to the federal model parameters and federal learning gradient information.
And the client model updating unit is used for updating the local training model of the client according to the updated local gradient information and the local parameter information.
And the updating information sending unit is used for sending the updated local gradient information and the local parameter information to the server.
The meaning of "first" and "second" in the above modules/units is merely to distinguish different modules/units, and is not used to limit which module/unit has higher priority or other limiting meaning. Furthermore, the terms "comprises," "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules that are expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or modules that may not be expressly listed or inherent to such process, method, article, or apparatus, and the partitioning of such modules by means of such elements is only a logical partitioning and may be implemented in a practical application.
Specific limitations regarding the multi-pose face gender detection training optimization device based on federal learning can be found in the above description of the multi-pose face gender detection training optimization method based on federal learning, and will not be described herein. All or part of each module in the multi-pose human face gender detection training optimizing device based on federal learning can be realized by software, hardware and combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer equipment is used for storing data related to the multi-pose face gender detection training optimization method based on federal learning. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by the processor is used for realizing a multi-pose face gender detection training optimization method based on federal learning.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is for communicating with an external server via a network connection. The computer program when executed by the processor is used for realizing a multi-pose face gender detection training optimization method based on federal learning.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the steps of the federally learned multi-pose face gender detection training optimization method of the above embodiments, such as steps S101-S104 and other extensions of the method and extensions of related steps shown in fig. 2. Alternatively, the processor may implement the functions of each module/unit of the multi-pose facial gender detection training optimization device based on federal learning in the above embodiment, such as the functions of the modules 11 to 14 shown in fig. 5, when executing the computer program. In order to avoid repetition, a description thereof is omitted.
The processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is a control center of the computer device, connecting various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer program and/or modules, and the processor may implement various functions of the computer device by running or executing the computer program and/or modules stored in the memory, and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc.
The memory may be integrated in the processor or may be provided separately from the processor.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the steps of the federally learned multi-pose face gender detection training optimization method of the above embodiments, such as steps S101-S104 shown in fig. 2, and other extensions of the method and extensions of related steps. Alternatively, the computer program when executed by the processor implements the functions of the modules/units of the federally learned multi-pose face gender detection training optimization device of the above embodiments, such as the functions of modules 11-14 shown in fig. 5. In order to avoid repetition, a description thereof is omitted.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. The multi-pose face gender detection training optimization method based on federal learning is characterized by comprising the following steps of:
A. the method comprises the steps of receiving gradient information and parameter information sent by a client to a server, and acquiring federal model parameters according to the parameter information; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: based on the parameter information obtained by training the face picture marked with the gender and head gesture classification labels and the local parameter information required by the local training model update of the client;
B. calculating the federal model parameters and the gradient information based on an asynchronous random gradient descent optimization algorithm to obtain federal learning gradient information;
C. according to the federal model parameters and the federal learning gradient information, updating parameters of a federal model of a server;
D. judging whether the loss value in the federal model reaches a preset value or not, and ending the flow of the method if the loss value reaches the preset value; and if the loss value does not reach the preset value, returning to continue to execute the steps A to D.
2. The method of claim 1, further comprising, prior to step a:
establishing network connection between the client and the server;
sending the public key of the server to the client through the network connection;
encrypting the gradient information and the parameter information to be sent by using the public key at the client and sending the encrypted gradient information and the parameter information to the server;
and after the server receives the encrypted gradient information and the parameter information, decrypting the encrypted gradient information and the parameter information by using a private key of the server.
3. The method according to claim 1, wherein the step of obtaining federal model parameters according to the parameter information in the step a is specifically:
and carrying out weighted summation on the parameter information to obtain the federal model parameters.
4. The method of claim 1, further comprising, after step C:
and sending the federal model parameters and the federal learning gradient information to the client.
5. The method of claim 4, wherein the step of sending the federal model parameters and federal learning gradient information to the client further comprises:
updating the local gradient information and the local parameter information of the client according to the federal model parameters and the federal learning gradient information;
updating the local training model of the client according to the updated local gradient information and the local parameter information;
and sending the updated local gradient information and the updated local parameter information to the server.
6. Multi-pose face gender detection training optimizing device based on federal learning is characterized by comprising:
the parameter acquisition module is used for receiving gradient information and parameter information sent by the client to the server and acquiring federal model parameters according to the parameter information; wherein the gradient information includes: the method comprises the steps that gradient information obtained by training face pictures marked with gender and head gesture classification labels and local gradient information required by local training model updating of a client are based on a neural network; the parameter information includes: based on the parameter information obtained by training the face picture marked with the gender and head gesture classification labels and the local parameter information required by the local training model update of the client;
the information acquisition module is used for calculating the federal model parameters and the gradient information based on an asynchronous random gradient descent optimization algorithm to acquire federal learning gradient information;
the parameter updating module is used for updating parameters of the federal model of the server according to the federal model parameters and the federal learning gradient information;
the judging module is used for judging whether the loss value in the federal model reaches a preset value or not, and ending the flow of the method if the loss value reaches the preset value; and if the loss value does not reach the preset value, returning to the continuous execution of the parameter acquisition module to the judgment module.
7. The apparatus of claim 6, wherein the means for obtaining parameters is preceded by:
the network connection establishment module is used for establishing network connection between the client and the server;
the public key sending module is used for sending the public key of the server to the client through the network connection;
the encryption module is used for encrypting the gradient information and the parameter information to be sent by using the public key at the client and sending the encrypted gradient information and the parameter information to the server;
and the decryption module is used for decrypting the encrypted gradient information and the parameter information by using a private key of the server after the server receives the encrypted gradient information and the parameter information.
8. The apparatus of claim 6, wherein the parameter updating module is further followed by:
and the sending module is used for sending the federal model parameters and the federal learning gradient information to the client.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the federally learned multi-pose face gender detection training optimization method according to any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the federally learning-based multi-pose face gender detection training optimization method according to any one of claims 1 to 5.
CN202011521184.8A 2020-12-21 2020-12-21 Multi-pose face gender detection training optimization method, device and related equipment Active CN112633146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011521184.8A CN112633146B (en) 2020-12-21 2020-12-21 Multi-pose face gender detection training optimization method, device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011521184.8A CN112633146B (en) 2020-12-21 2020-12-21 Multi-pose face gender detection training optimization method, device and related equipment

Publications (2)

Publication Number Publication Date
CN112633146A CN112633146A (en) 2021-04-09
CN112633146B true CN112633146B (en) 2024-03-26

Family

ID=75320415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011521184.8A Active CN112633146B (en) 2020-12-21 2020-12-21 Multi-pose face gender detection training optimization method, device and related equipment

Country Status (1)

Country Link
CN (1) CN112633146B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113516249B (en) * 2021-06-18 2023-04-07 重庆大学 Federal learning method, system, server and medium based on semi-asynchronization
CN113673476B (en) * 2021-09-02 2023-11-07 京东科技控股股份有限公司 Face recognition model training method and device, storage medium and electronic equipment
CN114048780A (en) * 2021-11-15 2022-02-15 中国科学院深圳先进技术研究院 Electroencephalogram classification model training method and device based on federal learning

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020029585A1 (en) * 2018-08-10 2020-02-13 深圳前海微众银行股份有限公司 Neural network federation modeling method and device employing transfer learning, and storage medium
CN111178524A (en) * 2019-12-24 2020-05-19 中国平安人寿保险股份有限公司 Data processing method, device, equipment and medium based on federal learning
CN111967910A (en) * 2020-08-18 2020-11-20 中国银行股份有限公司 User passenger group classification method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020029585A1 (en) * 2018-08-10 2020-02-13 深圳前海微众银行股份有限公司 Neural network federation modeling method and device employing transfer learning, and storage medium
CN111178524A (en) * 2019-12-24 2020-05-19 中国平安人寿保险股份有限公司 Data processing method, device, equipment and medium based on federal learning
CN111967910A (en) * 2020-08-18 2020-11-20 中国银行股份有限公司 User passenger group classification method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
联邦学习及其在电信行业的应用;李鉴;邵云峰;卢燚;吴骏;;信息通信技术与政策;20200915(第09期);全文 *

Also Published As

Publication number Publication date
CN112633146A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112633146B (en) Multi-pose face gender detection training optimization method, device and related equipment
EP3701700B1 (en) Blockchain-based smart contract invocation method and apparatus, and electronic device
WO2021232832A1 (en) Data processing method, training method for federated learning and related apparatus, and device
WO2021068444A1 (en) Data processing method and device, computer apparatus, and storage medium
US20200034740A1 (en) Method and apparatus for encrypting data, method and apparatus for training machine learning model, and electronic device
WO2021068445A1 (en) Data processing method and apparatus, computer device, and storage medium
CN110958218B (en) Data transmission method based on multi-network communication and related equipment
CN111178524A (en) Data processing method, device, equipment and medium based on federal learning
CN111814985A (en) Model training method under federated learning network and related equipment thereof
US10650135B2 (en) Authorization method and device for joint account, and authentication method and device for joint account
US20200366735A1 (en) Method and device for data version comparison between trans-time zone sites
CN110287836B (en) Image classification method and device, computer equipment and storage medium
US20230045306A1 (en) Face liveness detection method, system, apparatus, computer device, and storage medium
US20220092185A1 (en) Trusted execution environment-based model training methods and apparatuses
WO2022001092A1 (en) Data processing method and apparatus, and device
CN112527835B (en) Authentication request processing method and device based on cache and related equipment
CN112733901A (en) Structured action classification method and device based on federal learning and block chain
CN112417985A (en) Face feature point tracking method, system, electronic equipment and storage medium
WO2021068613A1 (en) Face recognition method and apparatus, device and computer-readable storage medium
CN112801134A (en) Gesture recognition model training and distributing method and device based on block chain and image
CN112784877A (en) Large-scale image template matching method and device based on block chain
CN111931484B (en) Data transmission method based on big data
CN117993515A (en) Federal learning method and apparatus
CN116844243A (en) Fake detection method of face image and related product
Pathak et al. Efficient Compression Sensing Mechanism Based WBAN System Using Blockchain

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
GR01 Patent grant
GR01 Patent grant