[go: up one dir, main page]

CN110009059A - Method and apparatus for generating model - Google Patents

Method and apparatus for generating model Download PDF

Info

Publication number
CN110009059A
CN110009059A CN201910304768.0A CN201910304768A CN110009059A CN 110009059 A CN110009059 A CN 110009059A CN 201910304768 A CN201910304768 A CN 201910304768A CN 110009059 A CN110009059 A CN 110009059A
Authority
CN
China
Prior art keywords
sample
information
training
face image
image
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.)
Granted
Application number
CN201910304768.0A
Other languages
Chinese (zh)
Other versions
CN110009059B (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910304768.0A priority Critical patent/CN110009059B/en
Publication of CN110009059A publication Critical patent/CN110009059A/en
Application granted granted Critical
Publication of CN110009059B publication Critical patent/CN110009059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

Embodiment of the disclosure discloses the method and apparatus for generating model.One specific embodiment of this method includes: acquisition training sample set, and training sample set includes sample face image;It is identified using the sample face image that preset number information identification model trained in advance concentrates training sample, obtains related information corresponding with the object that sample face image is presented;The sample face image that training sample is concentrated as input, will related information corresponding with sample face image as desired output, using the method for machine learning, train and obtain information prediction model.The embodiment can not need manually to be marked, and save cost of labor, improve working efficiency.

Description

Method and apparatus for generating model
Technical field
Embodiment of the disclosure is related to field of computer technology, and in particular to the method and apparatus for generating model.
Background technique
Universal with artificial intelligence technology with the development of science and technology, artificial intelligence technology can be applied to each neck Domain.For example, can be applied to the every field such as speech recognition, image recognition, smart home.The development of artificial intelligence technology is to use Family is each provided with great convenience in all respects.The method of machine learning develops artificial intelligence technology quickly.
In the method for correlation machine study, there is specific function (such as image identification function, speech recognition function in order to obtain Can) model, be normally based on and manually training sample be labeled, using training sample and artificial markup information to model into Row training, to obtain required model.
Summary of the invention
Embodiment of the disclosure proposes the method and apparatus for generating model.
In a first aspect, embodiment of the disclosure provides a kind of method for generating model, this method comprises: obtaining instruction Practice sample set, training sample set includes sample face image;Using preset number information identification model trained in advance to instruction The sample face image practiced in sample set is identified, association letter corresponding with the object that sample face image is presented is obtained Breath;Using training sample concentrate sample face image as input, will related information corresponding with sample face image as the phase Hope output, using the method for machine learning, training obtains information prediction model.
In some embodiments, information prediction model to be trained includes feature extraction layer and full articulamentum;And it will instruction Practice sample face image in sample set as input, will related information corresponding with sample face image as desired output, Using the method for machine learning, training obtains information prediction model, including following training step: training sample being concentrated every The sample face image is input to the feature extraction layer of information prediction model to be trained, obtained by one sample face image The characteristic pattern of the sample face image;Obtained characteristic pattern is input to full articulamentum, obtains the sample of the sample face image This output result;It is exported based on obtained sample as a result, determining whether default loss function restrains, wherein default loss letter Number is used to indicate the sample output result in obtained sample output results set and the error between corresponding related information; In response to determining that default loss function is restrained, determine that information prediction model training is completed.
In some embodiments, method further include: in response to determining that default loss function is not converged, calculated using backpropagation Method updates the parameter of information prediction model to be trained, and continues to execute training step.
Second aspect, embodiment of the disclosure provide a kind of information forecasting method, this method comprises: obtaining target user Face-image;Face-image is input to the information prediction model generated using the method such as first aspect, is obtained and face The corresponding related information of image, related information include at least one of the following: facial expression information, attribute information.
The third aspect, embodiment of the disclosure provide it is a kind of for generating the device of model, the device include: obtain it is single Member, is configured to obtain training sample set, and training sample set includes sample face image;Recognition unit is configured to using pre- The sample face image that first trained preset number information identification model concentrates training sample identifies, obtains and sample The corresponding related information of the object that face-image is presented;Training unit is configured to the sample face for concentrating training sample Image as input, will related information corresponding with sample face image be used as desired output, utilize the method for machine learning, instruct Get information prediction model.
In some embodiments, information prediction model to be trained includes feature extraction layer and full articulamentum;And training Unit is further configured to execute following training step: for each of training sample set sample face image, by this Sample face image is input to the feature extraction layer of information prediction model to be trained, and obtains the feature of the sample face image Figure;Obtained characteristic pattern is input to full articulamentum, obtains the sample output result of the sample face image;Based on acquired Sample output as a result, determining whether default loss function restrains, wherein default loss function is used to indicate obtained sample Export the sample output result in results set and the error between corresponding related information;In response to determining default loss function Convergence determines that information prediction model training is completed.
In some embodiments, device further include: adjustment unit is configured in response to determine that default loss function is not received It holds back, the parameter of information prediction model to be trained is adjusted using back-propagation algorithm, continues to execute training step.
Fourth aspect, embodiment of the disclosure provide a kind of information prediction device, which includes: that image obtains list Member is configured to obtain the face-image of target user;Generation unit is configured to for face-image being input to using such as first The information prediction model that the method for any embodiment generates in aspect obtains related information corresponding with face-image, association letter Breath includes at least one of the following: facial expression information, attribute information.
5th aspect, embodiment of the disclosure provide a kind of terminal device, which includes: one or more places Manage device;Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, So that one or more processors are realized in the method as described in first aspect and second aspect described in any implementation Method.
6th aspect, embodiment of the disclosure provide a kind of computer-readable medium, are stored thereon with computer program, Any implementation in the method as described in first aspect and second aspect is realized when the computer program is executed by processor The method of description.
The method and apparatus for generating model that embodiment of the disclosure provides, by obtaining training sample set, then It is identified, is obtained using the sample face image that preset number information identification model trained in advance concentrates training sample Related information corresponding with the object that sample face image is presented saves people so as to not need manually to be marked Work cost improves working efficiency.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the disclosure is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the disclosure can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for generating model of the disclosure;
Fig. 3 is the flow chart according to one embodiment of the information forecasting method of the disclosure;
Fig. 4 is the schematic diagram of an application scenarios of information forecasting method according to an embodiment of the present disclosure;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for generating model of the disclosure;
Fig. 6 is the structural schematic diagram according to one embodiment of the information prediction device of the disclosure;
Fig. 7 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of embodiment of the disclosure.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for generating model of the disclosure or the implementation of the device for generating model The exemplary architecture 100 of example.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
Various client applications can be installed on terminal device 101,102,103.Such as image processing class application, search Class application, the application of content share class, U.S. figure class application, the application of instant messaging class, the application of model training class etc..Terminal device 101, 102, it 103 can be interacted by network 104 with server 105, to receive or send message etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, it can be the various electronic equipments that can receive user's operation, including but not limited to smart phone, tablet computer, above-knee Type portable computer and desktop computer etc..When terminal device 101,102,103 is software, may be mounted at above-mentioned listed In the electronic equipment of act.Multiple softwares or software module may be implemented into (such as providing the multiple soft of Distributed Services in it Part or software module), single software or software module also may be implemented into.It is not specifically limited herein.
Server 105 can be to provide the server of various services, such as can be and utilize terminal device 101,102,103 The training sample set of upload carries out the model training server of model training.Model training server can be to the training sample of acquisition Sample image is identified in this, is obtained markup information corresponding with the training sample that training sample is concentrated and is then utilized training Sample and markup information corresponding with training sample carry out model training, generate information prediction model.In addition, training obtains information After prediction model, information prediction model can also be sent to terminal device 101,102,103 by server, also can use people's letter It ceases prediction model and information prediction is carried out to face-image, obtain prediction result from hair.
It should be noted that server 105 can be hardware, it is also possible to software.When server is hardware, Ke Yishi The distributed server cluster of ready-made multiple server compositions, also may be implemented into individual server.When server is software, Multiple softwares or software module (such as providing multiple softwares of Distributed Services or software module) may be implemented into, it can also To be implemented as single software or software module.It is not specifically limited herein.
It should be noted that can be by server 105 for generating the method for model provided by embodiment of the disclosure It executes, can also be executed by terminal device 101,102,103.Correspondingly, it can be set for generating the device of model in service In device 105, also it can be set in terminal device 101,102,103.In addition, information prediction provided by embodiment of the disclosure Method can be executed by server 105, can also be executed by terminal device 101,102,103, correspondingly, information prediction device can To be set in server 105, also can be set in terminal device 101,102,103.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.The training sample set required for training pattern does not need It is obtained and face-image to be identified does not need in the case where long-range obtain from long-range, above system framework can not include Network only includes terminal device or server.
With continued reference to Fig. 2, it illustrates the processes according to one embodiment of the method for generating model of the disclosure 200.This be used for generate model method the following steps are included:
Step 201, training sample set is obtained.
In the present embodiment, above-mentioned executing subject (such as the terminal device shown in FIG. 1 for generating the method for model 101,102,103 or server 105) training sample set can be obtained by way of wired connection or wireless connection.? Here, the training sample which concentrates includes sample face image.The sample face image can be above-mentioned execution master Capture apparatus that body is installed is got with the capture apparatus being connect, and is also possible to be pre-stored within local.On Sample face image can be obtained by being used to indicate the routing information for the position that sample face image is stored by stating executing subject. The object that the sample face image is presented can be the face of people.
Step 202, sample face training sample concentrated using preset number information identification model trained in advance Image is identified, related information corresponding with the object that sample face image is presented is obtained.
In the present embodiment, the specific number of above- mentioned information identification model is artificial setting, can be according to application scenarios It needs to be determined that.Above-mentioned preset number information identification model is different information identification model.Specifically, may include but unlimited In the information identification model of identification facial expression, the information identification model for identifying the age, the information identification model of identification race, know The information identification model etc. of other gender.In other words, each information identification model all has specific identification function, usually only It can identify one or two kinds of specific informations.Herein, the related information for needing to obtain as needed determine selection information know Other model.Above-mentioned related information includes but is not limited to: facial expression information, attribute information.In general, attribute information includes but unlimited In age, sex, race etc..Specifically, in a certain application scenarios, when the related information that needs obtain includes facial expression letter When breath and age information, selected information identification model out can be the information identification model for carrying out human facial expression recognition With the information identification model for carrying out age identification.
In the present embodiment, each of above-mentioned preset number information identification model information identification model is for characterizing Related information between sample face image and recognition result.To which for the same training sample set, each information be known Other model carries out sample face image to identify obtained recognition result as above-mentioned related information.
As an example, above-mentioned preset number information identification model includes facial for identification in a certain application scenarios The information identification model of the information identification model of expression, for identification age and gender, information ethnic for identification identify mould Type.Each of training sample set sample face image can be input to above-mentioned each information identification mould by above-mentioned executing subject In type, the facial table corresponding with each sample face image of the information identification model output of facial expression for identification is obtained The information identification model of feelings information, for identification age and gender output age corresponding with each sample face image and The ethnic information corresponding with each sample face image of the information identification model output of gender information, for identification race.
Herein, above-mentioned each information identification model may each be technical staff be in advance based on to a large amount of face-image and with The statistics of information corresponding to the face-image (facial expression information, age information, ethnic information) and pre-establish, store There is the mapping table of multiple face-images with corresponding information;Or it is based on preset training sample, utilize engineering The model that learning method obtains after being trained to initial model (such as neural network).
Step 203, using training sample concentrate sample face image as input, will pass corresponding with sample face image Join information as desired output, using the method for machine learning, training obtains information prediction model.
In the present embodiment, the training sample set according to accessed by step 201, step 202 are obtained and train sample The corresponding related information of each training sample of this concentration, above-mentioned executing subject can be by each of training sample set sample faces Portion's image is input to information prediction model to be trained, exported as a result, then will output result and above-mentioned related information into Row compares, and based on comparative result, whether the information prediction model to determine to be trained trains completion.Specifically, can determine defeated Whether the difference between result and related information reaches preset threshold out.When reaching preset threshold, determines that training is completed, do not having Have that when reaching trained threshold value, the parameter of adjustable information prediction model to be trained continues to train.It herein, should be wait train Information prediction model can be for convolutional neural networks, deep neural network etc..
In some optional implementations of the present embodiment, above- mentioned information prediction model can also instruct as follows It gets:
Step 2021, for each of training sample set sample face image, which is input to The feature extraction layer of information prediction model to be trained, obtains the characteristic pattern of the sample face image;By obtained characteristic pattern It is input to full articulamentum, obtains the sample output result of the sample face image.
Herein, information prediction model to be trained can be neural network (such as convolutional neural networks, depth nerve net Network) etc..The neural network may include feature extraction layer and full articulamentum.Wherein, feature extraction layer is for extracting face-image Feature, generate and the corresponding characteristic pattern of sample face image that inputs.This feature figure may include the texture of image, shape, Profile etc..Full articulamentum is connect with feature extraction layer, for carrying out after connecting entirely to the extracted feature of feature extraction layer, is determined Sample corresponding with sample face image exports result.
Herein, facial expression information, the Duo Genian of plurality of classes are previously provided in information prediction model to be trained Age section section, multiple ethnic classification informations, gender information.Above-mentioned full articulamentum can be based on spy indicated by above-mentioned each characteristic pattern Sign determines probability value corresponding with each information.Such as probability value corresponding with each facial expression information, with each age group information pair The corresponding probability value of the probability value and various race's classification informations answered and the corresponding probability value of women, probability corresponding with male Value.
Above-mentioned executing subject can be selected every from being used to indicate in multiple probability values corresponding to different classes of information Information indicated by the most probable value of one classification exports result as sample.
Step 2022, it is exported based on obtained sample as a result, determining whether default loss function restrains.
Herein, above-mentioned default loss function for example can be logarithm loss function.Whether determine the default loss function Convergence that is to say whether the penalty values of determining loss function reach preset threshold or whether the absolute value of penalty values variation is less than Preset threshold.It, can be with when the absolute value for reaching preset threshold or penalty values variation in response to penalty values is less than preset threshold Determine default loss function convergence.Herein it is worth noting that, the absolute value of above-mentioned penalty values variation is based on when previous instruction Practice the penalty values being calculated using loss function and the last absolute value for training the difference between obtained penalty values.At this In, the penalty values of above-mentioned default loss function be used to indicate sample output result in obtained sample output results set with Error between the related information of corresponding sample face image.
Step 2023, in response to determining that default loss function is restrained, determine that information prediction model training is completed.
In the present embodiment, whether restrained according to default loss function identified in step 2022, in default loss letter When number convergence, above-mentioned, information prediction model training completion can be determined.
Step 2024, in response to determining that default loss function is not converged, letter to be trained is updated using back-propagation algorithm The parameter for ceasing prediction model, continues to execute training step shown in step 2021- step 2023.
In the present embodiment, the above-mentioned parameter for updating neural network to be trained for example can be every in neural network to update The numerical value of the filter of one layer of neural network, the size of filter, step-length etc., can also update the number of plies of neural network.It is above-mentioned Executing subject is not converged in response to determining default loss function, can use back-propagation algorithm to update nerve net to be trained The parameter of network then proceedes to execute training step shown in step 2021- step 2023.
The method for generating model that embodiment of the disclosure provides, by obtaining training sample set, then using pre- The sample face image that first trained preset number information identification model concentrates training sample identifies, obtains and sample The corresponding related information of the object that face-image is presented saves cost of labor so as to not need manually to be marked, Improve working efficiency.
With further reference to Fig. 3, it illustrates the processes 300 of one embodiment of the information forecasting method of the disclosure.The letter Cease the process 300 of generation method, comprising the following steps:
Step 301, the face-image of target user is obtained.
In the present embodiment, above- mentioned information generation method executing subject (such as terminal device shown in FIG. 1 101,102, 103 or server 105) face-image of target user can be obtained by way of wired connection or wireless connection.? Here, the face-image of the target user can be capture apparatus that above-mentioned executing subject is installed or with the shooting that is connect What equipment was got, it is also possible to be pre-stored within local.Above-mentioned executing subject can be by being used to indicate target user's The routing information for the position that face-image is stored obtains face-image.
Step 302, face-image is input to information prediction model trained in advance, obtains pass corresponding with face-image Join information.
In the present embodiment, which is information prediction model described in the corresponding embodiment of more Fig. 2 Generation method generate.
Herein, related information includes at least one of the following: facial expression information, attribute information.Specifically, above-mentioned letter The feature extraction layer of breath prediction model can extract the feature of face-image, to obtain characteristic pattern corresponding with face-image. Then, after the full articulamentum of above- mentioned information prediction model can be to the full attended operation of features described above figure, above- mentioned information prediction is obtained The corresponding probability value of preset each information in model.The information of above-mentioned pre-set plurality of classes may include facial table Feelings information, age bracket section, ethnic classification information, gender information etc., tool is determined based on the training result of information prediction model The classification of the related information of body.Such as and the corresponding probability value of each facial expression information, probability corresponding with each age group information Value and the corresponding probability value of various race's classification informations and the corresponding probability value of women, probability value corresponding with male.
Above-mentioned executing subject can be selected every from being used to indicate in multiple probability values corresponding to different classes of information Information indicated by the most probable value of one classification, as related information.
The method that embodiment of the disclosure provides, by obtaining the face-image of target user, the face that then will acquire Portion's image is input to information prediction model trained in advance, so that related information corresponding with face-image is obtained, so that institute is pre- The related information measured is more accurate.
With further reference to Fig. 4, it illustrates an application scenario diagrams of the information forecasting method of the disclosure.
In application scenarios as shown in Figure 4, the user's face image 301 that capture apparatus will acquire is input to server 402.Accessed user's face head portrait 401 is input to information prediction model 403 by server 402, to obtain user face The corresponding related information of the user that portion's image 401 is presented.The related information includes: smile, male, yellow.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, present disclose provides for generating model One embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to In various electronic equipments.
As shown in figure 5, the device 500 provided in this embodiment for generating model includes acquiring unit 501, recognition unit 502 and training unit 503.Wherein, acquiring unit 501, are configured to obtain training sample set, and training sample set includes sample face Portion's image;Recognition unit 502 is configured to concentrate training sample using preset number information identification model trained in advance Sample face image identified, obtain related information corresponding with the object that sample face image is presented;Training unit 503, the sample face image for being configured to concentrate training sample is believed as input, by association corresponding with sample face image Breath is used as desired output, and using the method for machine learning, training obtains information prediction model.
In the present embodiment, in the device 500 for generating model: acquiring unit 501, recognition unit 502 and training are single The specific processing of member 503 and its brought technical effect can be respectively with reference to step 201, the steps 202 in Fig. 2 corresponding embodiment With the related description of step 203, details are not described herein.
In some optional implementations of the present embodiment, information prediction model to be trained include feature extraction layer and Full articulamentum;And training unit 503 is further configured to: based on training sample concentrate sample face image, execute with Lower training step: for each of training sample set sample face image, which is input to wait train Information prediction model feature extraction layer, obtain the characteristic pattern of the sample face image;Obtained characteristic pattern is input to Full articulamentum obtains the sample output result of sample face image;The training sample pair concentrated based on identified training sample The sample output answered is as a result, determine whether default loss function restrains, wherein default loss function is used to indicate obtained sample Sample output result in this output results set and the error between corresponding related information;In response to determining default loss letter Number convergence determines that information prediction model training is completed.
In some optional implementations of the present embodiment, for generating the device 500 of model further include: adjustment unit (not shown) is configured in response to determine that default loss function is not converged, letter to be trained is adjusted using back-propagation algorithm The parameter for ceasing prediction model, continues to execute training step.
What embodiment of the disclosure provided is used to generate model equipment, by obtaining training sample set, then using preparatory The sample face image that trained preset number information identification model concentrates training sample identifies, obtains and sample face The corresponding related information of the object that portion's image is presented saves cost of labor, mentions so as to not need manually to be marked High working efficiency.
With further reference to Fig. 6, as the realization to method shown in above-mentioned each figure, present disclose provides information prediction devices One embodiment, the Installation practice is corresponding with embodiment of the method shown in Fig. 3, which specifically can be applied to various electricity In sub- equipment.
As shown in fig. 6, information prediction device 600 provided in this embodiment includes image acquisition unit 601 and generation unit 602.Image acquisition unit 601 is configured to obtain the face-image of target user;Generation unit 602, being configured to will be facial Image is input to the information prediction model generated using the method such as any embodiment in first aspect, obtains and face-image pair The related information answered, related information include at least one of the following: facial expression information, attribute information.
Below with reference to Fig. 7, it illustrates the electronic equipment that is suitable for being used to realize embodiment of the disclosure, (example is as shown in figure 1 Terminal device) 700 structural schematic diagram.Terminal device in embodiment of the disclosure can include but is not limited to such as move electricity Words, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia Player), the mobile terminal and such as number TV, desktop computer etc. of car-mounted terminal (such as vehicle mounted guidance terminal) etc. Fixed terminal.Terminal device shown in Fig. 7 is only an example, function to embodiment of the disclosure and should not use model Shroud carrys out any restrictions.
As shown in fig. 7, electronic equipment 700 may include processing unit (such as central processing unit, graphics processor etc.) 701, random access can be loaded into according to the program being stored in read-only memory (ROM) 702 or from storage device 708 Program in memory (RAM) 703 and execute various movements appropriate and processing.In RAM 703, it is also stored with electronic equipment Various programs and data needed for 700 operations.Processing unit 701, ROM 702 and RAM703 are connected with each other by bus 704. Input/output (I/O) interface 705 is also connected to bus 704.
In general, following device can connect to I/O interface 705: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 706 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 707 of dynamic device etc.;Storage device 708 including such as tape, hard disk etc.;And communication device 709.Communication device 709, which can permit electronic equipment 700, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 7 shows tool There is the electronic equipment 700 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.Each box shown in Fig. 7 can represent a device, can also root According to needing to represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 709, or from storage device 708 It is mounted, or is mounted from ROM 702.When the computer program is executed by processing unit 701, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.
It is situated between it should be noted that the computer-readable medium of embodiment of the disclosure description can be computer-readable signal Matter or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable Read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic are deposited Memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer readable storage medium, which can be, appoints What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its It is used in combination.And in embodiment of the disclosure, computer-readable signal media may include in a base band or as carrier wave The data-signal that a part is propagated, wherein carrying computer-readable program code.The data-signal of this propagation can be adopted With diversified forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal is situated between Matter can also be any computer-readable medium other than computer readable storage medium, which can be with It sends, propagate or transmits for by the use of instruction execution system, device or device or program in connection.Meter The program code for including on calculation machine readable medium can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned terminal device;It is also possible to individualism, and not It is fitted into the terminal device.Above-mentioned computer-readable medium carries one or more program, when said one or more When a program is executed by the electronic equipment, so that the electronic equipment: obtaining training sample set, training sample set includes sample face Image;Known using the sample face image that preset number information identification model trained in advance concentrates training sample Not, related information corresponding with the object that sample face image is presented is obtained;The sample face image that training sample is concentrated As input, will related information corresponding with sample face image as desired output, it is trained using the method for machine learning To information prediction model.
In addition, when said one or multiple programs are executed by the electronic equipment, it is also possible that the electronic equipment: obtaining Take the face-image of target user;Face-image is input to the information prediction model generated using the method such as first aspect, Related information corresponding with face-image is obtained, related information includes at least one of the following: facial expression information, attribute information.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, programming language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet Include local area network (LAN) or wide area network (WAN) --- it is connected to subscriber computer, or, it may be connected to outer computer (such as It is connected using ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in embodiment of the disclosure can be realized by way of software, can also be passed through The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor Including a kind of processor, including acquiring unit, recognition unit and training unit.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself, for example, acquiring unit is also described as " obtaining training sample set Unit ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member it should be appreciated that embodiment of the disclosure involved in invention scope, however it is not limited to the specific combination of above-mentioned technical characteristic and At technical solution, while should also cover do not depart from foregoing invention design in the case where, by above-mentioned technical characteristic or its be equal Feature carries out any combination and other technical solutions for being formed.Such as disclosed in features described above and embodiment of the disclosure (but It is not limited to) technical characteristic with similar functions is replaced mutually and the technical solution that is formed.

Claims (10)

1. a kind of method for generating model, comprising:
Training sample set is obtained, the training sample set includes sample face image;
The sample face image that the training sample is concentrated is carried out using preset number information identification model trained in advance Identification, obtains related information corresponding with the object that sample face image is presented;
The sample face image that the training sample is concentrated is made as input, by related information corresponding with sample face image For desired output, using the method for machine learning, training obtains information prediction model.
2. according to the method described in claim 1, wherein, information prediction model to be trained includes feature extraction layer and full connection Layer;And
The sample face image that the training sample is concentrated is believed as input, by association corresponding with sample face image Breath is used as desired output, and using the method for machine learning, training obtains information prediction model, including following training step:
For each of training sample set sample face image, it is pre- which is input to information to be trained The feature extraction layer for surveying model, obtains the characteristic pattern of the sample face image;
Obtained characteristic pattern is input to full articulamentum, obtains the sample output result of the sample face image;
It is exported based on obtained sample as a result, determining whether default loss function restrains, wherein the default loss function is used The error between sample output result and corresponding related information in the obtained sample output results set of instruction;
In response to determining that default loss function is restrained, determine that information prediction model training is completed.
3. according to the method described in claim 2, wherein, the method also includes:
In response to determining that default loss function is not converged, the ginseng of information prediction model to be trained is updated using back-propagation algorithm Number, continues to execute the training step.
4. a kind of information forecasting method, comprising:
Obtain the face-image of target user;
The face-image is input to the information prediction model generated using the method as described in one of claim 1-3, is obtained To related information corresponding with the face-image, the related information includes at least one of the following: facial expression information, attribute Information.
5. a kind of for generating the device of model, comprising:
Acquiring unit, is configured to obtain training sample set, and the training sample set includes sample face image;
Recognition unit is configured to concentrate the training sample using preset number information identification model trained in advance Sample face image is identified, related information corresponding with the object that sample face image is presented is obtained;
Training unit, the sample face image for being configured to concentrate the training sample as input, will be with sample face figure As corresponding related information trains using the method for machine learning as desired output and obtains information prediction model.
6. device according to claim 5, wherein information prediction model to be trained includes feature extraction layer and full connection Layer;And
The training unit is further configured to execute following training step:
For each of training sample set sample face image, it is pre- which is input to information to be trained The feature extraction layer for surveying model, obtains the characteristic pattern of the sample face image;
Obtained characteristic pattern is input to full articulamentum, obtains the sample output result of the sample face image;
It is exported based on acquired sample as a result, determining whether default loss function restrains, wherein the default loss function is used for Indicate the sample output result in obtained sample output results set and the error between corresponding related information;
In response to determining that default loss function is restrained, determine that information prediction model training is completed.
7. device according to claim 6, wherein described device further include:
Adjustment unit is configured in response to determine that default loss function is not converged, be adjusted using back-propagation algorithm wait train Information prediction model parameter, continue to execute the training step.
8. a kind of information prediction device, comprising:
Image acquisition unit is configured to obtain the face-image of target user;
Generation unit is configured to for the face-image being input to using the method generation as described in one of claim 1-3 Information prediction model, obtain related information corresponding with the face-image, the related information includes at least one of the following: Facial expression information, attribute information.
9. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-4.
10. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Method as described in any in claim 1-4.
CN201910304768.0A 2019-04-16 2019-04-16 Method and apparatus for generating a model Active CN110009059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910304768.0A CN110009059B (en) 2019-04-16 2019-04-16 Method and apparatus for generating a model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910304768.0A CN110009059B (en) 2019-04-16 2019-04-16 Method and apparatus for generating a model

Publications (2)

Publication Number Publication Date
CN110009059A true CN110009059A (en) 2019-07-12
CN110009059B CN110009059B (en) 2022-03-29

Family

ID=67172252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910304768.0A Active CN110009059B (en) 2019-04-16 2019-04-16 Method and apparatus for generating a model

Country Status (1)

Country Link
CN (1) CN110009059B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111160406A (en) * 2019-12-10 2020-05-15 北京达佳互联信息技术有限公司 Training method of image classification model, and image classification method and device
CN111260774A (en) * 2020-01-20 2020-06-09 北京百度网讯科技有限公司 Method and device for generating 3D joint point regression model
CN111523560A (en) * 2020-03-18 2020-08-11 第四范式(北京)技术有限公司 Training method, prediction method, device and system for number prediction model of arriving trucks
CN111696181A (en) * 2020-05-06 2020-09-22 广东康云科技有限公司 Method, device and storage medium for generating super meta model and virtual dummy
CN111860347A (en) * 2020-07-21 2020-10-30 海尔优家智能科技(北京)有限公司 Article information adjusting method and device and electronic device
CN112528842A (en) * 2020-12-07 2021-03-19 北京嘀嘀无限科技发展有限公司 Method, apparatus, device and storage medium for gesture detection
CN112861592A (en) * 2019-11-28 2021-05-28 北京达佳互联信息技术有限公司 Training method of image generation model, image processing method and device
CN114372569A (en) * 2020-10-14 2022-04-19 新智数字科技有限公司 Data measurement method, data measurement device, electronic equipment and computer readable medium
CN114723576A (en) * 2022-03-31 2022-07-08 腾讯科技(深圳)有限公司 Data processing model generation method, data processing method and device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853400A (en) * 2010-05-20 2010-10-06 武汉大学 Multi-Class Image Classification Method Based on Active Learning and Semi-Supervised Learning
CN103824090A (en) * 2014-02-17 2014-05-28 北京旷视科技有限公司 Adaptive face low-level feature selection method and face attribute recognition method
CN105631398A (en) * 2014-11-24 2016-06-01 三星电子株式会社 Method and apparatus for recognizing object, and method and apparatus for training recognizer
CN106228120A (en) * 2016-07-14 2016-12-14 南京航空航天大学 The extensive human face data mask method of query driven
CN106295584A (en) * 2016-08-16 2017-01-04 深圳云天励飞技术有限公司 Depth migration study is in the recognition methods of crowd's attribute
US20170161551A1 (en) * 2015-05-29 2017-06-08 Tencent Technology (Shenzhen) Company Limited Face key point positioning method and terminal
CN107944363A (en) * 2017-11-15 2018-04-20 北京达佳互联信息技术有限公司 Face image processing process, system and server
CN108133201A (en) * 2018-01-17 2018-06-08 百度在线网络技术(北京)有限公司 Face character recognition methods and device
CN108596011A (en) * 2017-12-29 2018-09-28 中国电子科技集团公司信息科学研究院 A kind of face character recognition methods and device based on combined depth network
US20180293429A1 (en) * 2017-03-30 2018-10-11 George Mason University Age invariant face recognition using convolutional neural networks and set distances
CN109376625A (en) * 2018-10-10 2019-02-22 东北大学 A Facial Expression Recognition Method Based on Convolutional Neural Network
CN109447894A (en) * 2018-08-20 2019-03-08 广州市久邦数码科技有限公司 A kind of image processing method and its system based on data analysis

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853400A (en) * 2010-05-20 2010-10-06 武汉大学 Multi-Class Image Classification Method Based on Active Learning and Semi-Supervised Learning
CN103824090A (en) * 2014-02-17 2014-05-28 北京旷视科技有限公司 Adaptive face low-level feature selection method and face attribute recognition method
CN105631398A (en) * 2014-11-24 2016-06-01 三星电子株式会社 Method and apparatus for recognizing object, and method and apparatus for training recognizer
US20170161551A1 (en) * 2015-05-29 2017-06-08 Tencent Technology (Shenzhen) Company Limited Face key point positioning method and terminal
CN106228120A (en) * 2016-07-14 2016-12-14 南京航空航天大学 The extensive human face data mask method of query driven
CN106295584A (en) * 2016-08-16 2017-01-04 深圳云天励飞技术有限公司 Depth migration study is in the recognition methods of crowd's attribute
US20180293429A1 (en) * 2017-03-30 2018-10-11 George Mason University Age invariant face recognition using convolutional neural networks and set distances
CN107944363A (en) * 2017-11-15 2018-04-20 北京达佳互联信息技术有限公司 Face image processing process, system and server
CN108596011A (en) * 2017-12-29 2018-09-28 中国电子科技集团公司信息科学研究院 A kind of face character recognition methods and device based on combined depth network
CN108133201A (en) * 2018-01-17 2018-06-08 百度在线网络技术(北京)有限公司 Face character recognition methods and device
CN109447894A (en) * 2018-08-20 2019-03-08 广州市久邦数码科技有限公司 A kind of image processing method and its system based on data analysis
CN109376625A (en) * 2018-10-10 2019-02-22 东北大学 A Facial Expression Recognition Method Based on Convolutional Neural Network

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
徐培超 等: "多任务及Resnet网络在人脸多属性识别中的应用", 《小型微型计算机系统》 *
李倩钰: "基于属性扩展的零样本图像分类", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
谭莲芝: "基于深度学习的人脸属性识别方法研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
陆伟,查先进,姜婷婷主编: "《情报学研究进展》", 30 June 2017, 武汉大学出版社 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861592A (en) * 2019-11-28 2021-05-28 北京达佳互联信息技术有限公司 Training method of image generation model, image processing method and device
CN112861592B (en) * 2019-11-28 2023-12-29 北京达佳互联信息技术有限公司 Training method of image generation model, image processing method and device
CN111160406A (en) * 2019-12-10 2020-05-15 北京达佳互联信息技术有限公司 Training method of image classification model, and image classification method and device
CN111260774A (en) * 2020-01-20 2020-06-09 北京百度网讯科技有限公司 Method and device for generating 3D joint point regression model
CN111523560A (en) * 2020-03-18 2020-08-11 第四范式(北京)技术有限公司 Training method, prediction method, device and system for number prediction model of arriving trucks
CN111523560B (en) * 2020-03-18 2023-07-25 第四范式(北京)技术有限公司 Method, device and system for training number prediction model of arrival trucks
CN111696181A (en) * 2020-05-06 2020-09-22 广东康云科技有限公司 Method, device and storage medium for generating super meta model and virtual dummy
CN111860347A (en) * 2020-07-21 2020-10-30 海尔优家智能科技(北京)有限公司 Article information adjusting method and device and electronic device
CN114372569A (en) * 2020-10-14 2022-04-19 新智数字科技有限公司 Data measurement method, data measurement device, electronic equipment and computer readable medium
CN112528842A (en) * 2020-12-07 2021-03-19 北京嘀嘀无限科技发展有限公司 Method, apparatus, device and storage medium for gesture detection
CN114723576A (en) * 2022-03-31 2022-07-08 腾讯科技(深圳)有限公司 Data processing model generation method, data processing method and device
CN114723576B (en) * 2022-03-31 2024-10-18 腾讯科技(深圳)有限公司 Data processing model generation method, data processing method and device

Also Published As

Publication number Publication date
CN110009059B (en) 2022-03-29

Similar Documents

Publication Publication Date Title
CN110009059A (en) Method and apparatus for generating model
CN110288049A (en) Method and apparatus for generating image recognition model
CN109800732A (en) The method and apparatus for generating model for generating caricature head portrait
CN111476871B (en) Method and device for generating video
CN108898185A (en) Method and apparatus for generating image recognition model
CN108446387A (en) Method and apparatus for updating face registration library
CN109858445A (en) Method and apparatus for generating model
CN109993150B (en) Method and device for identifying age
CN110110811A (en) Method and apparatus for training pattern, the method and apparatus for predictive information
CN109902659A (en) Method and apparatus for handling human body image
CN108509915A (en) The generation method and device of human face recognition model
CN109829432A (en) Method and apparatus for generating information
CN109815365A (en) Method and apparatus for processing video
CN109410253B (en) For generating method, apparatus, electronic equipment and the computer-readable medium of information
CN109858444A (en) The training method and device of human body critical point detection model
CN109981787A (en) Method and apparatus for showing information
CN109919244A (en) Method and apparatus for generating scene Recognition model
CN109754464A (en) Method and apparatus for generating information
CN109800730A (en) The method and apparatus for generating model for generating head portrait
CN109918530A (en) Method and apparatus for pushing image
CN109117758A (en) Method and apparatus for generating information
CN109241934A (en) Method and apparatus for generating information
CN109145783A (en) Method and apparatus for generating information
CN108491812A (en) The generation method and device of human face recognition model
CN110046571A (en) The method and apparatus at age for identification

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.