CN110533106A - Image classification processing method, device and storage medium - Google Patents

Image classification processing method, device and storage medium Download PDF

Info

Publication number
CN110533106A
CN110533106A CN201910816818.3A CN201910816818A CN110533106A CN 110533106 A CN110533106 A CN 110533106A CN 201910816818 A CN201910816818 A CN 201910816818A CN 110533106 A CN110533106 A CN 110533106A
Authority
CN
China
Prior art keywords
training
image
task
sample
image classification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910816818.3A
Other languages
Chinese (zh)
Inventor
刘俊
叶燕罡
文伟
沈小勇
戴宇荣
贾佳亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910816818.3A priority Critical patent/CN110533106A/en
Publication of CN110533106A publication Critical patent/CN110533106A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • 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/172Classification, e.g. identification
    • 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/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition

Abstract

This application provides a kind of image classification processing methods, device and storage medium, the application has trained the shared image classification model of multiple tasks in advance, in the case where needing to realize the image classification of multiple tasks, the image to be classified of multiple tasks can all be inputted to the image classification model to handle, obtain the classification results of each required by task, the scheme for handling the image classification model that the image to be classified of multiple tasks inputs corresponding task respectively relative to traditional scheme, only need to run an image classification model, greatly reduce runing time, reduce the waiting time, improve user experience, and since an image classification model is shared in multitask, reduce image classification model development, deployment and maintenance cost, for training image needed for model training, it does not need to configure all tasks for each training image Mark label, greatly reduce artificial mark workload, improve model training efficiency.

Description

Image classification processing method, device and storage medium
Technical field
This application involves technical field of image processing, and in particular to a kind of image classification method, device and storage medium.
Background technique
Image classification is to be distinguished different classes of target according to the different characteristic reflected in each comfortable image information The image processing method to come, in practical applications, such as recognition of face, gender identify, the age identifies in a variety of tasks, all It can be related to image classification processing.In the prior art, for different task, it will usually respective deep learning network is utilized, it is right Specific training data is trained, and obtains the multiple images disaggregated model for meeting corresponding task demand.
As it can be seen that this image classification processing method, is often unable to fully need multiple tasks using image data Safeguard corresponding multiple images disaggregated model, occupancy calculation resources are big, cause development cost high, user experience is insufficient.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of image classification processing method, device and storage medium, realize more One image classification model of a task sharing, reduces model development, deployment and maintenance cost, and the image classification of multiple tasks It only needs to run an image classification model, substantially reduces runing time, reduce waiting feedback time, improve user's body It tests.
To achieve the above object, the embodiment of the present application provides the following technical solutions:
On the one hand, this application provides a kind of image classification processing methods, which comprises
The image classification request of multiple tasks is obtained, described image classification request carries the to be sorted of the multiple task Image, and the image to be classified carries the task flag position of corresponding task;
Described image classification request is parsed, the image to be classified of the multiple task is obtained;
By the image to be classified input picture disaggregated model of the multiple task, the respective classification of the multiple task is obtained As a result, described image disaggregated model is to be carried out using deep learning network to the training sample for carrying same task flag position What supervised training obtained, the training sample derives from the training image of the multiple task, and the training image of different task is taken With different task flag positions;
The client that the classification results feed back to transmission respective image classification request is shown.
Optionally, the training image also carries sample weight, the training process of described image disaggregated model, comprising:
Using the respective sample weight of training sample trained each time, the training of the multiple tasks of corresponding training is updated Sample;
The training sample of the multiple task is inputted into deep learning network, the training to same task flag position is carried Sample exercises supervision training will up to the penalty values satisfaction training constraint condition of the training sample for the multiple tasks that training obtains The deep learning model that finally training obtains is determined as the image classification model of the multiple task.
Another aspect, this application provides a kind of image classification processing unit, described device includes:
Request module, the image classification for obtaining multiple tasks are requested, and described image classification request carries The image to be classified of multiple tasks is stated, and the image to be classified carries the task flag position of corresponding task;
Request analysis module obtains the image to be classified of the multiple task for parsing described image classification request;
Image classification module, it is described for obtaining the image to be classified input picture disaggregated model of the multiple task The respective classification results of multiple tasks, described image disaggregated model are using deep learning network, to carrying same task mark The training sample of will position exercises supervision what training obtained, and the training sample derives from the training image of the multiple task, no Training image with task carries different task flag positions;
Data feedback module, for the classification results to be fed back to the client progress for sending respective image classification request It shows.Another aspect, this application provides a kind of storage mediums, are stored thereon with computer program, the computer program quilt Processor executes, and realizes each step of above-mentioned image classification processing method.
Based on the above-mentioned technical proposal, in the case that the application needs to realize the image classifications of multiple tasks, since this is multiple One image classification model of task sharing can all input the image to be classified of multiple tasks at the image classification model Reason, obtains the classification results of each required by task, inputs the image to be classified of multiple tasks accordingly respectively relative to traditional scheme The scheme that the image classification model of task is handled, it is only necessary to an image classification model is run, when greatly reducing operation Between, improve user experience;And during the image classification model training, difference is configured for the training image of different task Task flag position, after the shared deep learning network of the training image of multiple tasks input is handled, it will according to The training image of different task is distinguished in task flag position, to realize to the training image for carrying same task flag position, in phase The supervised training in task branch is answered, the shared image classification model of multiple tasks is obtained, is not needed for multiple tasks training Respective image classification model, greatly reduces model development, deployment and maintenance cost;In addition, because of the configuration of task flag position, So that the application only needs to configure the mark label of corresponding task for the training image of each task, do not need to configure all tasks Label is marked, the mark workload of training image is greatly reduced, has saved artificial mark cost, improves model training effect Rate.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of schematic diagram of the image classification processing method proposed in the application R&D process;
Fig. 2 is a kind of system structure diagram for the image classification processing method for realizing that the application proposes;
Fig. 3 is the training process schematic diagram of image classification model in a kind of image classification processing method that the application proposes;
Fig. 4 is an a kind of optional exemplary flow diagram of image classification processing method that the application proposes;
Fig. 5 is a kind of another optional exemplary schematic diagram for image classification processing method that the application proposes;
Fig. 6 is a kind of another optional exemplary flow diagram for image classification processing method that the application proposes;
Fig. 7 is a kind of flow diagram of an optional application scenarios of image classification processing method that the application proposes;
Fig. 8 is an a kind of optional exemplary structural schematic diagram of image classification processing unit that the application proposes;
Fig. 9 is a kind of another optional exemplary construction schematic diagram for image classification processing unit that the application proposes;
Figure 10 is a kind of another optional exemplary construction schematic diagram for image classification processing unit that the application proposes;
Figure 11 is a kind of hardware structural diagram of computer equipment provided by the embodiments of the present application.
Specific embodiment
In order to solve the technical issues of background technology part describes, as artificial intelligence is in machine learning/deep learning side The development in face, the application are desirable with this artificial intelligence technology of machine learning/deep learning, carry out to existing system architecture It improves, to improve model training performance.Therefore, the application, which proposes for the training data of different task to be combined, carries out model instruction Practice, i.e. the design of the shared deep learning network of multitask, to reduce the development cost of algorithm, still, in this case, if adopting With Training mode, it is necessary to the mark label of all tasks of the data configuration of each task, cause to mark workload It is huge, it is with high costs;According to unsupervised or semi-supervised training method, although not needing mark label, this processing mode Because without reliable mark, it will the output accuracy for the deep learning model for causing training to obtain is lower.
Specifically, can be based on DT (Domain transform, domain conversion) and unsupervised training method, by searching for number According to come the performance that improves deep learning algorithm (i.e. above-mentioned deep learning network).Wherein, the image classification processing method based on DT, The image classification processing flow schematic diagram shown referring to Fig.1 is by learning a little source domain (source domain) and target A relationship or common character representation between domain (aiming field), reach boosting algorithm on target domain Performance utilizes source domain contextual data abundant, Lai Tigao algorithm is in a small amount of target domain data Performance.
It can be seen that being to carry out deep learning model using different data in the image classification processing method based on DT Training, it is desirable that source domain data are contacted with target domain data in vision or semantically with certain, It can will be on source domain information transfer to target domain abundant, that is to say, that this image classification processing Method there are certain requirements training data tool, affects it and is applicable in scene domain;And this method has only properly increased Performance on target domain, the performance on source domain are unsatisfactory.
And unsupervised training method is used for above-mentioned, the design of above-mentioned deep learning model is obtained, is to utilize no mark The data of label are lifted at the algorithm performance on label data, specifically in model training or test phase, pass through deep learning mould Obtained prediction result is optimized deep learning algorithm as Weakly supervised signal to predict unlabeled data by type, to mention Rise performance.
But this unsupervised training method, there are constraint requirements to training data, i.e., the picture not marked need to contain target Classification, moreover, predict to obtain is Weakly supervised signal, it may be inaccurate, cause performance to be difficult to keep in each task.
In order to further improve the above problem, the application proposes together, to share by the data fusion of different task On the basis of one deep learning network, propose that the training data for different task configures different task flag positions, so as to In training process, the training data of different task is distinguished accordingly, realizes multitask supervised training, and in such situation, the application can Think that training data configures the mark label of affiliated task, does not need the mark label for configuring all tasks, greatly reduce instruction The mark workload for practicing data has saved artificial mark cost, improves model training efficiency.
Further, it in order to reinforce the study to difficult sample, reduces because data volume is huge after multitask fusion, to calculation It being adversely affected caused by method performance, the application also introduces " sample weight " concept, i.e., sample weight is configured to training data, with Make during model training can the training sample trained every time of dynamic select, guarantee that image classification model is equal in each task There is preferable performance, improves user experience.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
Referring to Fig. 2, for a kind of system structure diagram for realizing image classification processing method provided by the present application, the system It may include server 10 and client 11, in which:
Server 10, which can be, provides the service equipment of service for user, can be the service to match with client Device, in the present embodiment, server can execute the application image classification processing method provided below, meet the multiple of user The image classification demand of task.
In practical applications, server 10 can be an independent service equipment, be also possible to by multiple server structures At service cluster, the present embodiment is not construed as limiting the structure of the server.
Client 11 can be mounted in such as mobile phone, laptop, iPad, the application journey on industrial personal computer electronic equipment Sequence specifically can be independent application program, such as software from application shop downloading installation, be also possible to web application journey Sequence directly initiates client by application programs such as browsers, establishes the communication link between respective server that is, without downloading It connects.
In the present embodiment practical application, user enters the application platform of server by client, and it is flat to browse the application The various applications that platform provides, when the one or more tasks if desired completed are related to image classification, user can pass through Image to be classified is sent to server by client, by the image classification model that training obtains in advance in server, is directly realized by Processing to the image to be classified of multiple tasks, obtain the image classification of each task as a result, and feed back to client and be shown, Be sent to server in batches relative to by the image to be classified of multiple tasks, by image classification model corresponding in server into The design of row processing substantially reduces the time that user waits image classification results, improves user experience.
It is to be appreciated that in system provided in this embodiment, it is not limited to server and client side listed above, also It may include other computer equipments such as multimedia server, and above-mentioned server 10 usually may include database etc., it can be with System composition is constituted determine according to actual needs, and the present embodiment is no longer described in detail one by one herein.
The system structure diagram in conjunction with shown in figure 2 above provides a kind of image classification referring to Fig. 3 for the embodiment of the present application In processing method, the flow diagram of image classification model training process, method provided by the embodiment can be adapted for computer Equipment, the computer equipment can be server, be also possible to other equipment, execution of the application to image classification model is realized Without limitation, the image classification model that training obtains can be adapted for the image classification of corresponding multiple tasks to main body, specific to instruct Practicing process may include but is not limited to following steps:
Step S11, obtains the training image of multiple tasks, and the training image of different task carries different task flags Position;
In conjunction with the description conceived above to the present application, the application will be shared a deep learning net by multiple tasks Network realizes multitask supervised training, obtains an image classification model, and the application is to the task type of this multiple tasks and its interior Hold without limitation.
For example, multiple tasks may include recognition of face task, age identification times if training image is facial image Business, gender identification mission etc.;For other kinds of training image, phase can also be determined according to different business scene demand At least one task answered, such as vehicle classification task, image network classification task, the application will not enumerate.
In the present embodiment, in order to distinguish the training image of different task, the application is that multiple tasks are configured with different appoint Business flag bit, and be added in the task flag position of corresponding task, it can be accurately identified accordingly with will pass through the task flag position Which task training image belongs to.It is to be appreciated that the application does not limit the content of the respective task flag position of multiple tasks It is fixed, it can be number or alpha code etc..
And since the application realizes by task flag position the differentiation of the training image of different task, in this way, in model It in training process, exercises supervision training to the training image of task 1, the training image of other tasks can't be used, so, it is Mark workload is reduced, the application only needs the corresponding mark label of training image configuration task 1 to task 1, i.e., to instruction The mark label for practicing its affiliated task of image configurations does not need to configure the corresponding mark of all tasks simultaneously for a training image Label greatly reduces artificial mark workload, improves model training efficiency.It is to be appreciated that instruction of the application to each task The content of mark label for practicing image without limitation, can determine according to the task definition of corresponding task, such as recognition of face task, Mark label can be address name or other identity informations;Gender identification mission, mark label can be the genders such as male, female letter Breath etc..
Furthermore, it is necessary to illustrate, the application without limitation, can be passed through the source of the training image of multiple tasks by user Client is uploaded to server, be also possible to server from third-party application platform obtain etc., can be according to actual scene demand It determines, the application is not detailed.
The training images of multiple tasks is inputted deep learning network by step S12, to carrying same task flag position Training image exercises supervision training, obtains image classification model;
In the present embodiment, the training image for the multiple tasks that can be will acquire all is input to deep learning network and carries out more Business supervised training, obtains for realizing the image classification model of the image classification to any task in this multiple tasks.
Wherein, during model training, the task belonging to each training image that the application is trained to carries Task flag position, deep learning network can identify that each training image received particularly belongs to by the task flag position Which task, to ignore corresponding training image at other using the task flag position during multitask supervised training Cost in task loses (penalty values that loss function obtains), to improve the accuracy and efficiency of training pattern.That is, During the supervised training of multitask, the training image for carrying same task flag position will supervise in corresponding task branch Supervise and instruct white silk, i.e., exercises supervision training to the corresponding training image of task 1, exercise supervision to the corresponding training image of task 2 respectively Training;It exercises supervision training to the corresponding training image of task 3, and so on, realize the supervised training of multitask.The application couple The concrete methods of realizing of the supervised training of the training image of each task is not detailed, and be may include but is not limited to following The training method of optional example description.It is to be appreciated that there may be at least two tasks to correspond to same training for above-mentioned multiple tasks The case where image, the present embodiment can in the training image of the training set of different task the only task flag position of the task, That is the same training image, the task flag position in the training set of different task is different, similarly, in different task Mark label in training set may also difference.
It can be seen that the training image of multiple tasks shares a depth during above-mentioned image classification model training Learning network carries out model training, greatly reduces exploitation, the lower deployment cost of deep learning network algorithm, and this multiple tasks is only It needs to safeguard an image classification model, reduces model maintenance cost and workload.
Wherein, for the training image of different task, due to that can be distinguished by task flag position, the present embodiment will The mark label for directly configuring corresponding task, does not need the mark label that all tasks are configured for each training image, significantly Artificial mark workload is reduced, model training efficiency and accuracy is improved.
In practical applications, the shared image classification model of multiple tasks is obtained according to method as described above training in advance Afterwards, the application can use the image classification model, while realize the image classification of multiple tasks.It below will be to image classification mould The concrete application process of type is illustrated, and referring to Fig. 4, show the image classification processing method of the application proposition one optional shows The flow chart of example, this method can be adapted for computer equipment, which can be server, as shown in figure 4, the party Method may include but be not limited to following steps:
Step S21 obtains the image classification request of multiple tasks;
Wherein, image classification request can carry the image to be classified of this multiple tasks, and image to be classified carries There is the task flag position of corresponding task.
It should be noted that the multiple tasks of step S21 are included in the multiple tasks for sharing above-mentioned image classification model, The application to the particular content of this multiple tasks without limitation, the configuration method of the task flag position about each task, Ke Yican According to the description of the task flag position of above-mentioned training image.
In practical applications, image classification request can be user using initiating in client process, multiple tasks What image to be classified was also possible to be selected by user, or the server of service is provided by client or for client, it selectes The image to be classified of multiple tasks, the generating process that the application requests image classification is without limitation.
Step S22, parsing image classification request, obtains the image to be classified of multiple tasks;
The image to be classified input picture disaggregated model of multiple tasks is obtained the respective classification of multiple tasks by step S23 As a result;
After the description of foregoing embodiments, which is the deep learning network shared using multiple tasks, right The training sample for carrying same task flag position exercises supervision what training obtained, and the training sample derives from this multiple tasks Training image, the training image of different task carries different task flag positions, the training about the image classification model Process is referred to the description of above-described embodiment corresponding portion, does not repeat.
The client that classification results feed back to transmission respective image classification request is shown by step S24.
The application to the contents of the classification results of each task without limitation, can according to specific tasks content and to point The content of class image determines that the application does not do and is described in detail one by one.As the optional example of the application one, computer equipment obtains each task Classification results after, the business information to match with each classification results can also be obtained, then the business information is fed back into transmission The client of respective image classification request is shown, and meets the business demand of user, the application is to the specific of the business information Content without limitation, can be determined according to the demand of various application scenarios.
It can be seen that in the present embodiment, it is right in the case where training the image classification model that multiple tasks are shared in advance In the image to be classified of multiple tasks, no need to send extremely different image classification models to carry out classification processing, but this is more The image to be classified of a task all inputs an image classification model, runs an image classification model, each task can be obtained Required classification results, substantially reduce runing time, reduce the waiting time, improve user experience.
In order to further increase the accuracy of image classification model output, reinforces the study to difficult sample, reduce because more Data volume is huge after task fusion, adversely affects caused by algorithm performance, guarantees that image classification model has in each task Preferable performance, raising user experience, flow diagram referring to Figure 5, during image classification model training, this Shen It please may be incorporated into the concept of " sample weight ", the training image of as each task configures corresponding sample weight, and continuous In training process, the sample weight of each training image is constantly adjusted, and utilize sample weight adjusted, again from original instruction Practice in image, obtain this and required training sample is trained to continue to train, until meeting the constraint condition of model training, obtains To the required image classification model suitable for multitask.
Specifically, the another optional exemplary process of the image classification processing method provided by the present application referring to shown in Fig. 6 Figure, this method still can be adapted for computer equipment, which can be the server in above system framework, can also To be the other equipment for being different from the server, the application to the executing subject of training image disaggregated model without limitation, such as Fig. 6 Shown, the training process of image classification model may include but be not limited to following steps:
Step S31, obtains the training image of multiple tasks, the training image of different task carry initial samples weight and Different task flag positions;
In the present embodiment, which can characterize the sampled probability of corresponding training image, to reach special training Difficult sample keeps algorithm performance, can usually take the numerical value between 0~1, however, it is not limited to this.In practical applications, it is stranded Whether the sample weight of difficult training image is difficult instruction for training image commonly greater than the sample weight for easily dividing training image Practicing sample can be determined by penalty values obtained in model training process, it is generally the case that gained penalty values are bigger, illustrate phase It answers training image to be more difficult to learn, can suitably increase its sample weight, specific implementation process is referred to the description of following steps.
The determination of task flag position about training image is referred to the description of above-described embodiment corresponding portion, no longer superfluous It states.
It should be understood that in order to improve image classification model training accuracy and efficiency, above-mentioned multiple tasks be can be The distributional difference of the training image of semantic associated task or multiple tasks will not be very big, in this way in learning process, energy General character is arrived in enough preferably study;It avoids the training image to completely unrelated multiple tasks from exercising supervision training, increases model Training difficulty, but the application to determine multiple tasks mode and multiple tasks and its training image particular content not It limits.
Step S32 obtains this instruction from the training image of acquisition using the initial samples weight that training image carries The training sample of experienced multiple tasks;
Optionally, the application can set 1 for the initial samples weight of each training image, but be not limited to this match Mode is set, in this case, in supervised training for the first time, can will start the original training image of the multiple tasks obtained, As the training sample of corresponding task, to realize this supervised training.
The training sample input deep learning network of multiple tasks is handled, obtains corresponding feature sequence by step S33 Column;
The present embodiment can use a deep learning network and carry out feature extraction to the training sample of multiple tasks, obtain The characteristic sequence of each training sample, specific implementation process are not detailed.
Step S34 obtains the corresponding classification sub-network in task flag position and loss function of multiple tasks;
In the present embodiment, corresponding classification sub-network can be configured in deep learning network for different tasks, it should Classification sub-network may include but be not limited to one of the convolutional layer of deep learning network, full articulamentum and default network or Multiple combinations, the default network can carry out flexible configuration according to actual needs, and the application is without limitation.
Can be different for the loss function of different task, there may also be the loss function of one or more tasks is identical The case where, the application does not limit this, the loss function can be softmax, crossEntropy (cross entropy) or other Loss function can determine that the application is not described further according to business demand.
Step S35, by multiple classification sub-networks and its corresponding loss function, to the instruction for carrying corresponding task flag bit The characteristic sequence for practicing sample exercises supervision training, obtains the penalty values of the training sample of corresponding task;
It will be that each training image is configured with one according to task to reinforce the study to difficult sample after above-mentioned analysis The sample weight of all training images when initialization, can be disposed as 1, for the instruction of each task by a sample weight Practice image, after completing a supervised training, it will the penalty values for each training image that this supervised training goes out are obtained, by the loss The size of value characterizes the degree of difficulty of corresponding training image study.The application to how using classification sub-network and loss function, The supervised training process of the training image of multiple tasks is not described further.
It is to be appreciated that can consider the use weight of each training image, constantly during the supervised training to training image Training sample is updated, so as to which in each repetitive exercise difficult training sample can be chosen, the application is to the different instructions of setting Practice the method for the sample weight of sample without limitation, such as piecewise function.
Step S36, using the penalty values of the training sample of same task, to the sample weight of the training sample of corresponding task It is adjusted;
Since penalty values are bigger, illustrate that corresponding training image is more difficult to learn, can suitably increase its sample weight;Conversely, Penalty values are smaller, illustrate the corresponding easier study of training image, can suitably reduce its sample weight, and the application loses utilization It is worth size, adjusts the implementation method of the sample weight of multiple training images of same task without limitation.
Step S37 samples the training image of corresponding task using the sample weight of training sample adjusted, The training sample for the multiple tasks trained next time;
It is straight to be continued supervised training by step S38 for the training sample input deep learning network of obtained multiple tasks The penalty values of the training sample of the multiple tasks obtained to training meet training constraint condition, the depth that last training is obtained Practise the image classification model that model is determined as this multiple tasks.
As it can be seen that the application is during carrying out multitask supervised training to the training image for carrying same task flag position, The use weight of each training sample can be dynamically adjusted, and using the respective sample weight of training sample trained each time, is updated The training sample of the multiple tasks of corresponding training, by the training sample input deep learning network of updated multiple tasks after The continuous training that exercises supervision, in this way, the sample weight for being easy the training sample of study will reduce with trained progress, so that This kind of training sample is determined as the reduction of sampled probability when training obtains training sample next time again, conversely, difficult instruction The sample weight for practicing sample will increase, that is, the study to difficult training sample be strengthened, so that gained image classification model is more There is preferable performance in a task, it is higher to avoid the image classification accuracy in a certain task application, but in other tasks The low situation of image classification accuracy in occurs.
And the training image of the present embodiment multiple tasks, the image classification that a shared deep learning network training obtains Model reduces the exploitation, deployment and maintenance cost of algorithm, in practical applications, for needing to carry out the multiple of image classification The image to be classified of task, it is only necessary to run an image classification model, substantially reduce runing time, improve user Experience.
In addition, such as analysis above, by the training image of task flag digit separator different task, by the training of multiple tasks After the shared deep learning network of image input, training realizes multitask supervised training to multiple tasks jointly, does not need one One training, improves model training efficiency.
The inventive concept of image classification processing method based on the various embodiments described above description, below will be to facial image point Class for realizing recognition of face task, age identification mission and gender identification mission, is handled the image classification that the application proposes Method is illustrated, and referring to scene flow chart shown in Fig. 7, user is by the collected each user of the electronic equipments such as computer or mobile phone Facial image be uploaded to server, server can also obtain the facial image of each user from other application platform, later, clothes Business device can be determined from the facial image got for realizing the knowledge of recognition of face task, age identification mission and gender The other respective facial image of task as the training sample of corresponding task, and is the task of each training sample configuration corresponding task The initial samples weight of flag bit and sample weight, each training sample can choose 1, and however, it is not limited to this.
Later, server can by obtained recognition of face task, age identification mission and gender identification mission these three The training sample of task is all input to deep learning network, is exercised supervision instruction by respective classification sub-network and loss function Practice, and using the penalty values for the training sample for training obtained each task, dynamically adjusts the sample weight of corresponding training sample, press Continue according to aforesaid way to sample weight adjusted, again from the training sample for starting to obtain, acquisition is instructed next time Practice required training sample, then the training sample input deep learning network of reacquisition is continued into supervised training, with not The depth training pattern that disconnected optimization training obtains, until the loss function of the training sample for these three tasks that training obtains is full Foot training constraint condition stops model training, and the deep learning model that last training is obtained is as the figure of these three tasks As disaggregated model.
In subsequent practical application, user sends to server realize recognition of face task, age identification mission and property again After the facial image to be sorted of one or more tasks in other identification mission, the image classification mould that can be obtained by above-mentioned training Type handles the facial image to be sorted, directly obtains and meets the needs of the one or more task, such as using to be sorted Facial image runs an image classification model, that is, may recognize that user identity, age of user in the facial image to be sorted (it can be a preset age bracket) and user's gender, relative to multiple images disaggregated model is used, respectively to be sorted Facial image is handled, and the scheme for meeting the needs of different task result is obtained, and substantially reduces the model running time, is shortened User waits the time of task result, improves user experience.
Moreover, such as the description of each technical effect of above-described embodiment, the shared image of this multiple tasks that the application proposes The training method of disaggregated model greatly reduces data mark workload, improves model training efficiency, and training gained figure As the output accuracy of disaggregated model.And relative to the scheme for each task one model of training, it is only necessary to safeguard one Shared image classification model, greatly reduces algorithm development, deployment and maintenance cost.
It is a kind of structural schematic diagram of image classification processing unit provided by the present application referring to Fig. 8, which can apply In computer equipment, which can be server, can specifically include but is not limited to:
Request module 21, the image classification for obtaining multiple tasks are requested, and described image classification request carries The image to be classified of the multiple task, and the image to be classified carries the task flag position of corresponding task;
Request analysis module 22 obtains the image to be classified of the multiple task for parsing described image classification request;
Image classification module 23, for obtaining institute for the image to be classified input picture disaggregated model of the multiple task State the respective classification results of multiple tasks, described image disaggregated model is using deep learning network, to carrying same task The training sample of flag bit exercises supervision what training obtained, and the training sample derives from the training image of the multiple task, The training image of different task carries different task flag positions;
Data feedback module 24, for by the classification results feed back to send respective image classification request client into Row is shown.
Optionally, in order to realize the training of above-mentioned image classification model, as shown in figure 9, above-mentioned apparatus can also include: instruction Practice image collection module 25, for obtaining the training image of multiple tasks, the training image of different task carries different appoint Business flag bit;
Image training module 26, for the training image of the multiple task to be inputted deep learning network, to carrying The training image of same task flag position exercises supervision training, obtains image classification model, described image disaggregated model is for real Now to the image classification of any task in the multiple task.
Optionally, in order to further increase the precision of training pattern, reinforce the study to difficult sample, the application can be with Sample weight is configured for the training image of each task, in the training process, according to the sample weight, to realize to initial acquisition Multiple tasks training image sampling, trained required training sample next time, and with the increase of frequency of training, The sample weight for constantly increasing difficult training sample reduces the sample weight of easily study training sample.
Based on this, as shown in figure 9, above-mentioned image training module 26 may include:
Training sample updating unit 261, for utilizing the respective sample weight of training sample trained each time, more cenotype Answer time training sample of the multiple tasks of training;
Model training unit 262, for the training sample of the multiple task to be inputted deep learning network, to carrying The training sample of same task flag position exercises supervision training, until the penalty values of the training image for the multiple tasks that training obtains Meet training constraint condition, the deep learning model that last training obtains is determined as to the image classification mould of the multiple task Type.
The application to training constraint condition content without limitation, as multiple tasks training image penalty values be less than threshold Value or variable quantity are less than threshold value etc., can determine according to the demand of concrete application scene.
Optionally, as shown in Figure 10, above-mentioned training sample updating unit 261 may include:
Sample weight adjustment unit 2611, for being obtained using last training during supervised training each time The penalty values of the training sample of same task are adjusted the sample weight of the training sample of corresponding task;
Training sample updating unit 2612, for the sample weight using training sample adjusted, to corresponding task Training image is sampled, and the training sample of the multiple tasks of this training is obtained.
In the present embodiment, above-mentioned sample weight can characterize the sampled probability of corresponding training image (training sample), and same The penalty values of the training image of one task are bigger, and the sample weight of corresponding training image is bigger.
As the another optional example of the application, above-mentioned image training module 26 can also include:
Loss function acquiring unit, for training exercising supervision to the training image for carrying any task flag position Cheng Zhong obtains the corresponding loss function in the task flag position;
Supervised training unit carries out the training image for carrying corresponding task flag bit for utilizing the loss function Supervised training.
Optionally, which can also include:
Classify sub-network acquiring unit, for obtaining the corresponding classification sub-network of multiple tasks flag bit, described point Class sub-network includes one or more combinations of the convolutional layer, full articulamentum and default network of the deep learning network;
Correspondingly, above-mentioned supervised training unit specifically can be used for utilizing the corresponding classification sub-network in same task flag position And loss function, it exercises supervision training to the training image for carrying task flag position.
On the basis of the various embodiments described above, above-mentioned image classification processing unit can also include:
Business information obtaining module, for obtaining the business information to match with the classification results;
Business information feedback module, for by the business information feed back to send respective image classification request client into Row is shown.
It should be understood that each device, the unit of above-mentioned apparatus description may each be the functional module of application program composition, in fact The detailed process of existing corresponding function, is referred to the description of above method embodiment corresponding portion, does not repeat them here.
The embodiment of the present application also provides a kind of storage mediums, are stored thereon with computer program, the computer program quilt Processor executes, and realizes each step of above-mentioned image classification processing method, and the realization process of the image classification processing method can be with Referring to the description of above method embodiment.
As shown in figure 11, the embodiment of the present application also provides a kind of hardware structural diagram of computer equipment, the calculating Machine equipment can be the server for realizing above-mentioned image classification processing method, may include: communication interface 31, memory 32 and place Manage device 33;
In the embodiment of the present application, communication interface 31, memory 32, processor 33 can be realized mutual by communication bus Between communication, and the communication interface 31, memory 32, processor 33 and communication bus quantity can be at least one.
Optionally, communication interface 31 can be the interface of communication module, such as the interface of gsm module, the interface of WIFI module Deng;
Processor 33 may be a central processor CPU or specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement the application reality Apply one or more integrated circuits of example.
Memory 32 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non-volatile Memory), a for example, at least magnetic disk storage.
Wherein, memory 32 is stored with program, the program that processor 33 calls memory 32 to be stored, to realize above-mentioned answer Each step of image classification processing method for computer equipment, specific implementation process are referred to above method embodiment phase Answer the description of part.
Each embodiment in this specification is described by the way of progressive or arranged side by side, the highlights of each of the examples are With the difference of other embodiments, the same or similar parts in each embodiment may refer to each other.Embodiment is disclosed Device, for computer equipment, it is related so be described relatively simple since it is corresponded to the methods disclosed in the examples Place is referring to method part illustration.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments in the case where not departing from the core concept or range of the application.Therefore, originally Application is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein Consistent widest scope.

Claims (10)

1. a kind of image classification processing method, which is characterized in that the described method includes:
The image classification request of multiple tasks is obtained, described image classification request carries the figure to be sorted of the multiple task Picture, and the image to be classified carries the task flag position of corresponding task;
Described image classification request is parsed, the image to be classified of the multiple task is obtained;
By the image to be classified input picture disaggregated model of the multiple task, the respective classification knot of the multiple task is obtained Fruit, described image disaggregated model are to be supervised using deep learning network to the training sample for carrying same task flag position Supervise and instruct and get, the training sample derives from the training image of the multiple task, and the training image of different task carries There is different task flag positions;
The client that the classification results feed back to transmission respective image classification request is shown.
2. the method according to claim 1, wherein the training image also carries sample weight, the figure As the training process of disaggregated model, comprising:
Using the respective sample weight of training sample trained each time, the training sample of the multiple tasks of corresponding training is updated This;
The training sample of the multiple task is inputted into deep learning network, to the training sample for carrying same task flag position Exercise supervision training, until the penalty values of the training sample for the multiple tasks that training obtains meet training constraint condition, it will be last The deep learning model that training obtains is determined as the image classification model of the multiple task.
3. according to the method described in claim 2, it is characterized in that, described adopt using training sample trained each time is respective Sample weight updates the training sample of the multiple tasks of corresponding training, comprising:
It is right using the penalty values of the training sample of the last same task trained and obtained during supervised training each time The sample weight of the training sample of corresponding task is adjusted;
Using the sample weight of training sample adjusted, the training image of corresponding task is sampled, obtains this training Multiple tasks training sample.
4. according to the method described in claim 3, it is characterized in that, the sample weight sampling that characterizes corresponding training image is general Rate, and the penalty values of the training image of same task are bigger, the sample weight of corresponding training image is bigger.
5. method according to any one of claims 1 to 4, which is characterized in that the training process of described image disaggregated model, Include:
In the training process that exercises supervision to the training image for carrying any task flag position, it is right to obtain the task flag position The loss function answered;
Using the loss function, exercise supervision training to the training image for carrying corresponding task flag bit.
6. according to the method described in claim 5, it is characterized in that, the described pair of training image for carrying same task flag position Exercise supervision training, obtains image classification model, further includes:
The corresponding classification sub-network of multiple tasks flag bit is obtained, the classification sub-network includes the deep learning network Convolutional layer, full articulamentum and default network one or more combinations;
It is described to utilize the loss function, it exercises supervision training to the training image for carrying corresponding task flag bit, comprising:
Using the corresponding classification sub-network in same task flag position and loss function, to carry the training image of task flag position into Row supervised training.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
Obtain the business information to match with the classification results;
The client that the business information feeds back to transmission respective image classification request is shown.
8. a kind of image classification processing unit, which is characterized in that described device includes:
Request module, the image classification for obtaining multiple tasks are requested, and described image classification request carries described more The image to be classified of a task, and the image to be classified carries the task flag position of corresponding task;
Request analysis module obtains the image to be classified of the multiple task for parsing described image classification request;
Image classification module, for obtaining the image to be classified input picture disaggregated model of the multiple task the multiple The respective classification results of task, described image disaggregated model are using deep learning network, to carrying same task flag position The training sample training that exercises supervision obtain, the training sample derives from the training image of the multiple task, and difference is appointed The training image of business carries different task flag positions;
Data feedback module, the client for the classification results to be fed back to transmission respective image classification request are opened up Show.
9. device according to claim 8, which is characterized in that the training image also carries sample weight, the dress Setting further includes image training module, and described image training module includes:
Training sample updating unit, for updating corresponding instruction using the respective sample weight of training sample trained each time The training sample of experienced multiple tasks;
Model training unit, for the training sample of the multiple task to be inputted deep learning network, to carrying same The training sample of business flag bit exercises supervision training, until the penalty values of the training image for the multiple tasks that training obtains meet instruction Practice constraint condition, the deep learning model that last training obtains is determined as to the image classification model of the multiple task.
10. a kind of storage medium, is stored thereon with computer program, which is characterized in that the computer program is held by processor Row realizes each step of the image classification processing method as described in claim 1-7 any one.
CN201910816818.3A 2019-08-30 2019-08-30 Image classification processing method, device and storage medium Pending CN110533106A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910816818.3A CN110533106A (en) 2019-08-30 2019-08-30 Image classification processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910816818.3A CN110533106A (en) 2019-08-30 2019-08-30 Image classification processing method, device and storage medium

Publications (1)

Publication Number Publication Date
CN110533106A true CN110533106A (en) 2019-12-03

Family

ID=68665767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910816818.3A Pending CN110533106A (en) 2019-08-30 2019-08-30 Image classification processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110533106A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429414A (en) * 2020-03-18 2020-07-17 腾讯科技(深圳)有限公司 Artificial intelligence-based focus image sample determination method and related device
CN111814835A (en) * 2020-06-12 2020-10-23 理光软件研究所(北京)有限公司 Training method and device of computer vision model, electronic equipment and storage medium
CN111858999A (en) * 2020-06-24 2020-10-30 北京邮电大学 Retrieval method and device based on difficult-to-segment sample generation
CN112085051A (en) * 2020-07-24 2020-12-15 西安电子科技大学 Image classification method and system based on weighted voting and electronic equipment
CN112966744A (en) * 2021-03-08 2021-06-15 北京百度网讯科技有限公司 Model training method, image processing method, device and electronic equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429414A (en) * 2020-03-18 2020-07-17 腾讯科技(深圳)有限公司 Artificial intelligence-based focus image sample determination method and related device
CN111429414B (en) * 2020-03-18 2023-04-07 腾讯科技(深圳)有限公司 Artificial intelligence-based focus image sample determination method and related device
CN111814835A (en) * 2020-06-12 2020-10-23 理光软件研究所(北京)有限公司 Training method and device of computer vision model, electronic equipment and storage medium
CN111858999A (en) * 2020-06-24 2020-10-30 北京邮电大学 Retrieval method and device based on difficult-to-segment sample generation
CN111858999B (en) * 2020-06-24 2022-10-25 北京邮电大学 Retrieval method and device based on segmentation difficult sample generation
CN112085051A (en) * 2020-07-24 2020-12-15 西安电子科技大学 Image classification method and system based on weighted voting and electronic equipment
CN112085051B (en) * 2020-07-24 2024-02-09 西安电子科技大学 Image classification method and system based on weighted voting and electronic equipment
CN112966744A (en) * 2021-03-08 2021-06-15 北京百度网讯科技有限公司 Model training method, image processing method, device and electronic equipment

Similar Documents

Publication Publication Date Title
CN110533106A (en) Image classification processing method, device and storage medium
Chen et al. DNNOff: offloading DNN-based intelligent IoT applications in mobile edge computing
US10922866B2 (en) Multi-dimensional puppet with photorealistic movement
CN111754985B (en) Training of voice recognition model and voice recognition method and device
EP3731161A1 (en) Model application method and system, and model management method and server
CN111523324B (en) Named entity recognition model training method and device
US20220191592A1 (en) Method and system for user-oriented streaming of content
CN109919078A (en) A kind of method, the method and device of model training of video sequence selection
CN107508866A (en) Reduce the method for the transmission consumption of mobile device end neural network model renewal
CN111027403A (en) Gesture estimation method, device, equipment and computer readable storage medium
CN108306804A (en) A kind of Ethercat main station controllers and its communication means and system
CN108304376B (en) Text vector determination method and device, storage medium and electronic device
CN111527501A (en) Chip adaptation determining method and related product
CN112084959A (en) Crowd image processing method and device
CN113377030B (en) Method for determining intersection signal control model and related device
CN111651989B (en) Named entity recognition method and device, storage medium and electronic device
CN112199154A (en) Distributed collaborative sampling central optimization-based reinforcement learning training system and method
CN113535930B (en) Model training method, device and storage medium
CN112749364B (en) Webpage generation method, device, equipment and storage medium based on artificial intelligence
KR20210096405A (en) Apparatus and method for generating learning model for machine
CN111753855A (en) Data processing method, device, equipment and medium
WO2023246343A1 (en) Data processing method and apparatus, and computer device, storage medium and product
CN116798052B (en) Training method and device of text recognition model, storage medium and electronic equipment
CN108763194A (en) Using mark stamp methods, device, storage medium and computer equipment
CN116578674B (en) Federal variation self-coding theme model training method, theme prediction method and device

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