CN113537101A - Human body attribute identification method and device, computer equipment and storage medium - Google Patents

Human body attribute identification method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113537101A
CN113537101A CN202110829044.5A CN202110829044A CN113537101A CN 113537101 A CN113537101 A CN 113537101A CN 202110829044 A CN202110829044 A CN 202110829044A CN 113537101 A CN113537101 A CN 113537101A
Authority
CN
China
Prior art keywords
target
human body
sample
body attribute
retraining
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
CN202110829044.5A
Other languages
Chinese (zh)
Other versions
CN113537101B (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.)
Zhongke Shuguang International Information Industry Co ltd
Original Assignee
Zhongke Shuguang International Information Industry Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Shuguang International Information Industry Co ltd filed Critical Zhongke Shuguang International Information Industry Co ltd
Priority to CN202110829044.5A priority Critical patent/CN113537101B/en
Publication of CN113537101A publication Critical patent/CN113537101A/en
Application granted granted Critical
Publication of CN113537101B publication Critical patent/CN113537101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/048Activation functions
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for identifying human body attributes, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring a target base recognition model from a plurality of base recognition models generated by pre-training according to the quantity value of target retraining samples input by a target user, and training the target base recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to the target user; and then, the target human body attribute model is adopted to recognize the target human body attribute of the recognition image input by the user, and the recognition result output by the target human body attribute model is fed back to the target user, so that the accurate recognition of the human body attribute is realized, meanwhile, the matched basic recognition model is determined according to the retraining sample input by the user, and then the human body attribute model matched with the user is obtained through training, so that the acquisition of the human body attribute model matched with the user is realized, and the accuracy of the human body attribute recognition in the actual use scene is improved.

Description

Human body attribute identification method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image recognition, in particular to a human body attribute recognition method and device, computer equipment and a storage medium.
Background
With the rapid development of artificial intelligence technology, the human body attribute recognition model constructed based on machine learning is used for recognizing the human body attribute in the image, and the method is widely applied to various scenes in real life.
At present, a method for identifying human body attributes generally includes obtaining a video image shot by a camera, extracting an image of an area of interest including a human body from the video image, inputting the image of the area of interest into a human body attribute identification model trained in advance, and using an output of the human body attribute identification model as a human body attribute identification result to identify the human body attributes.
In the prior art, a general human body attribute recognition model trained in advance is provided for a user, and the user cannot participate in the training process of the human body attribute recognition model, so that the user requirements cannot be acquired in real time to acquire the human body attribute recognition model which is more matched with the user requirements.
Disclosure of Invention
The invention provides a human body attribute identification method and device, computer equipment and a storage medium, which are used for improving the identification accuracy of human body attributes by acquiring a human body attribute model which is more matched with a user.
In a first aspect, an embodiment of the present invention provides a method for identifying a human body attribute, including:
acquiring a plurality of target retraining samples which are input by a target user and used for identifying target human body attributes;
acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample, wherein the basic recognition models are obtained by carrying out universality training aiming at each human body attribute;
training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to a target user;
and identifying the target human body attribute of the identification image input by the user by adopting the target human body attribute model, and feeding back the identification result output by the target human body attribute model to the target user.
Optionally, before obtaining a plurality of target retraining samples, which are input by a target user and used for identifying target human body attributes, the method further includes:
responding to a retraining sample labeling request input by a target user, and displaying each human body image in a human body image library to the target user;
responding to the marking operation of the target user on the target human body attribute in the displayed at least one human body image, and generating at least one target retraining sample for identifying the target human body attribute;
and performing associated storage on each target retraining sample and the target user.
By adopting the technical scheme, the target retraining sample for identifying the target human body attribute is obtained according to the retraining sample marking request of the user and the marking operation on the target human body attribute, so that the high-efficiency obtaining of the target retraining sample corresponding to the target human body attribute can be realized.
Optionally, obtaining a plurality of target retraining samples input by the target user and used for identifying the target human body attributes includes:
responding to a target retraining sample viewing request of a target user, and displaying each target retraining sample stored locally by the user;
and responding to a training sample input instruction of the target user, and acquiring a plurality of target retraining samples selected by the target user in the currently displayed target retraining samples.
By adopting the technical scheme, the target retraining sample selected by the target user in each displayed target retraining sample is obtained according to the training sample input instruction of the target user, and the efficiency of inputting the target retraining sample by the target user is improved.
Optionally, before displaying, to the target user, each human body image in the human body image library in response to a retraining sample labeling request input by the target user, the method further includes:
acquiring an original image acquired by at least one camera;
in each original image, acquiring an alternative image containing a character image;
and identifying human body outlines in the alternative images, and forming human body images respectively corresponding to the human body outlines and storing the human body images in a human body image library.
By adopting the technical scheme, the alternative image containing the character image is obtained from the original image, and then the corresponding human body image is formed in the alternative image according to the identified human body contour, so that the obtaining efficiency of the human body image is improved.
Optionally, in each of the alternative images, a human body contour is identified, and a human body image corresponding to each human body contour is formed and stored in a human body image library, which specifically includes:
according to at least one human body contour detection algorithm, recognizing a human body contour in each alternative image; and acquiring a human body image corresponding to each human body contour according to the human body contour and preset external expansion parameters.
By adopting the technical scheme, the human body contour is identified in the alternative image through the human body contour detection algorithm, and then the corresponding human body image is obtained according to the human body contour and the preset external expansion parameter, so that the human body image obtaining efficiency is further improved.
Optionally, after the recognition result output by the target human body attribute model is fed back to the target user, the method further includes:
acquiring an artificial labeling result fed back by a target user and aiming at the target human body attribute in an identification image, and judging whether the artificial labeling result is consistent with the identification result or not;
if the manual marking result is determined to be inconsistent with the identification result, forming an abnormal identification sample and adding the abnormal identification sample into an abnormal identification sample set according to the manual marking result of the identification image;
when the loss function updating condition is met, updating the loss function of the target human body attribute model according to each abnormal recognition sample included in the recognition abnormal sample set;
and training the target human body attribute model again based on the updated loss function to obtain the updated target human body attribute model.
By adopting the technical scheme, the loss function is updated when the loss function updating condition is met according to the abnormal identification sample with the manual labeling result inconsistent with the identification result, and then the target human body attribute model is trained again according to the updated loss function to obtain the updated target human body attribute model, so that the target human body attribute model with more accurate target human body attribute identification is obtained, and meanwhile, the target human body attribute model is continuously updated according to the manual labeling result of the user on the identification image.
Optionally, when it is detected that a loss function update condition is satisfied, updating the loss function of the target human body attribute model according to each abnormal recognition sample included in the recognition abnormal sample set, specifically including:
according to the following formula:
Figure BDA0003174822710000041
updating a Loss function Loss of the target human body attribute model;
where N denotes the number of target retraining samples, ω denotes a weight coefficient, M denotes the number of abnormality identifying samples included in the set of identified abnormality samples, i denotes an index of the target retraining sample, and i is 1,2iArtificial annotation information, y, representing target retraining sample iiE {0,1}, 0 denotes the body attributeIs a negative sample, 1 indicates that the body attribute is a positive sample,
Figure BDA0003174822710000042
represents the recognition result of the target human body attribute model to the target retraining sample i, and represents a Sigmoid function, namely, the sigma (z) is 1/(1+ e ^ (-z)), j represents the index of the abnormal recognition sample, and j is 1,2jArtificial annotation information, y, representing anomaly identification samples jjE {0,1}, 0 denotes that the human body attribute is a negative sample, 1 denotes that the human body attribute is a positive sample,
Figure BDA0003174822710000051
and representing the recognition result of the target human body attribute model on the abnormal recognition sample j.
By adopting the technical scheme, the loss function is updated through the formula, so that the loss function can reflect the abnormal identification sample with the abnormal identification result, and the more accurate acquisition of the loss function is realized.
In a second aspect, an embodiment of the present invention further provides an apparatus for identifying a human body attribute, including:
the training sample acquisition module is used for acquiring a plurality of target retraining samples which are input by a target user and used for identifying the attributes of a target human body;
the target basic recognition model acquisition module is used for acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample, wherein the basic recognition model is obtained by carrying out universality training aiming at each human body attribute;
the target human body attribute model acquisition module is used for training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to a target user;
and the target human body attribute identification module is used for identifying the target human body attribute of the identification image input by the user by adopting the target human body attribute model and feeding back the identification result output by the target human body attribute model to the target user.
In a third aspect, an embodiment of the present invention further provides a computer device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of identifying a human attribute as described in any embodiment of the invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for identifying the human body attribute according to any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, a target basic recognition model is obtained from a plurality of basic recognition models generated by pre-training according to the quantity value of a target retraining sample input by a target user, and each target retraining sample is used for training the target basic recognition model to obtain a target human body attribute model corresponding to the target user; and then the target human body attribute model is adopted to identify the target human body attribute of the identification image input by the user, and the identification result output by the target human body attribute model is fed back to the target user, so that the target human body attribute is accurately identified, meanwhile, the matched basic identification model is determined according to the target retraining sample input by the user, and then the human body attribute model matched with the user is obtained through training, so that the human body attribute model matched with the user is obtained, the accuracy of the obtained human body attribute model is improved, and the identification accuracy of the target human body attribute of the identification image is improved.
Drawings
Fig. 1 is a flowchart of a method for identifying human body attributes according to an embodiment of the present invention;
fig. 2A is a flowchart of a human body attribute identification method according to a second embodiment of the present invention;
FIG. 2B is a schematic diagram of generating a human body image according to a human body contour according to a second embodiment of the present invention
Fig. 3A is a flowchart of a human body attribute identification method according to a third embodiment of the present invention;
fig. 3B is a schematic flowchart of a human body attribute identification method according to a third embodiment of the present invention;
fig. 4 is a block diagram of a human body attribute recognition apparatus according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a computer device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a human body attribute recognition method according to an embodiment of the present invention, where the embodiment of the present invention is applicable to obtaining a human body attribute model matched with a user according to a training sample input by the user, so as to implement an accurate recognition condition of a human body attribute of a recognition image, and the method may be implemented by a human body attribute recognition device in the embodiment of the present invention, and the device may be implemented by software and/or hardware and integrated on a computer device, and the computer device may be a PC, a tablet computer, a mobile phone, or the like, and the method specifically includes the following steps:
s110, obtaining a plurality of target retraining samples which are input by a target user and used for identifying the attributes of the target human body.
The human body attribute is characteristic information contained in the human body, and can comprise calling/non-calling, smoking/non-smoking, long hair/short hair, male/female and the like; the target human body attributes are preset human body attributes for a target user, and the number of the target human body attributes can be one or more.
The target retraining sample is a training sample which is input by a target user and matched with the target human body attribute, and can specifically comprise a human body image with the human body attribute being labeled; it should be noted that, in this embodiment, the type of the human body attribute corresponding to the target retraining sample may be the same as the type of the target human body attribute, or may be more than the type of the target human body attribute.
In this embodiment, the client may obtain the target retraining sample input by the target user by providing a retraining sample input interface to the target user, or the client may provide a retraining sample selection page to the target user, and then determine the target retraining sample matched with the user in the retraining samples stored locally according to the selection instruction information of the target user.
In this embodiment, optionally, the obtaining of a plurality of target retraining samples input by the target user and used for identifying the target human body attribute may include: responding to a target retraining sample viewing request of a target user, and displaying each target retraining sample stored locally by the user; and responding to a training sample input instruction of the target user, and acquiring a plurality of target retraining samples selected by the target user in the currently displayed target retraining samples.
Wherein, a certain amount of target retraining samples are stored in a local database in advance; when a target retraining sample viewing request sent by a target user is acquired, for example, when a selection instruction of a target retraining sample viewing option of the target user is acquired, displaying all target retraining samples stored in a local database in a client; further, when an input instruction of the training sample of the target user is acquired, for example, when a selection instruction of the target user for some displayed target retraining samples is detected, the target retraining sample matched with the target user is determined in the currently displayed target retraining samples, so that high-efficiency acquisition of the target retraining sample corresponding to the target human body attribute can be realized.
And S120, acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample.
The method comprises the following steps that a basic recognition model is obtained by carrying out universality training aiming at each human body attribute, and different basic recognition models are adapted to retraining samples with different orders of magnitude; in this embodiment, a certain number of initial recognition models are constructed in advance based on a neural network algorithm, and then a plurality of basic recognition models are obtained by performing commonality training of human attribute recognition on the initial recognition models.
It should be noted that a plurality of basic recognition models generated by pre-training correspond to neural network structures with different complexity (e.g., correspond to different numbers of hidden layers or neurons); for example, four basic recognition models are obtained through pre-training, wherein the basic recognition model A comprises 0 hidden layers; the basic recognition model B comprises 1 hidden layer, and the hidden layer comprises 10 neurons; the basic recognition model C includes 2 hidden layers, each including 20 neurons; the basic recognition model D includes 3 hidden layers, each including 30 neurons; the more the number of the hidden layers is, the more the number of the neurons included in each hidden layer is, the more complex the network structure representing the current neural network model is, the more complex the corresponding processable data set is, and the more the number of the required training samples is.
The values are noted that when the number of training samples is small, if a basic recognition model corresponding to a neural network structure with high complexity is adopted, the model is over-fitted, so that the trained basic recognition model cannot accurately recognize the human body attributes of the recognition image; when the number of training samples is large, if a basic recognition model corresponding to a neural network structure with low complexity is adopted, the model is under-fitted, and inaccurate human body attribute recognition can be caused. Therefore, after target retraining samples input by a target user are obtained, the number of the target retraining samples is determined; and then according to the number of the current target retraining samples, selecting a target basis recognition model with matched complexity, so that the occurrence of over-fitting or under-fitting conditions can be avoided, and further the acquisition of a target human body attribute model more matched with a user can be realized.
In this embodiment, the number range of the target retraining samples matched with each basic recognition model is preset, for example, the number range of the target retraining samples corresponding to the basic recognition model a is 0-10, and the number range of the target retraining samples corresponding to the basic recognition model B is 10-20; therefore, after the number of target retraining samples is obtained, for example, the number of target retraining samples is 15, it can be determined that the number of current target retraining samples is within the number range of the target retraining samples corresponding to the basic recognition model B, and therefore, the basic recognition model B is selected as the target basic recognition model, and accurate obtaining of the target basic recognition model can be achieved.
S130, training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to the target user.
Specifically, training a target basic recognition model by using each target retraining sample to obtain an intermediate human body attribute model; calculating a loss value of the current intermediate human body attribute model based on a loss function; and if the current loss value does not meet the preset threshold value, updating the parameters of the intermediate human body attribute model according to a back propagation mode, and training the updated intermediate human body attribute model again until the obtained loss value meets the preset threshold value, finishing the training of the target basic recognition model, and obtaining the target human body attribute model corresponding to the target user.
Wherein, based on the following formula:
Figure BDA0003174822710000101
and calculating the loss value of the intermediate human body attribute model.
Where N denotes the number of target retraining samples, i denotes the index of the target retraining samples, i is 1,2iArtificial annotation information, y, representing target retraining sample iiE {0,1}, where 0 denotes that the human body attribute is a negative sample, 1 denotes that the human body attribute is a positive sample, e.g., for the human body attribute of whether smoking behavior exists, 0 denotes that the human body does not have smoking behavior, and 1 denotes that the human body has smoking behavior;
Figure BDA0003174822710000102
representing objectsAnd the human body attribute model identifies the target retraining sample i, wherein sigma represents a Sigmoid function, namely sigma (z) is 1/(1+ e ^ (-z)).
In this embodiment, a target retraining sample for identifying the target human body attribute is obtained, and then a matched target basis recognition model is selected according to the quantity value of the target retraining sample, and each target retraining sample is used to train the target basis recognition model, so as to obtain a corresponding target human body attribute model. The target human body attribute can be adjusted as required, so that a target human body attribute model capable of identifying any type of human body attribute can be obtained; meanwhile, a target human body attribute model with the newly added target human body attribute recognition capability can be obtained by obtaining a target retraining sample corresponding to the newly added target human body attribute.
S140, identifying the target human body attribute of the identification image input by the user by adopting the target human body attribute model, and feeding back the identification result output by the target human body attribute model to the target user.
After a trained target human body attribute model matched with a target user is obtained, inputting an identification image input by the user into the target human body attribute model, and obtaining a target human body attribute identification result output by the target human body attribute model; typically, the recognition result of the target human body attribute model is a value between 0 and 1, taking the target human body attribute as smoking/non-smoking as an example, if the recognition result is 0.9, the recognition result is greater than 0.5, and the target human body attribute is smoking; if the recognition result is 0.2, the recognition result is less than 0.5, and the target human body attribute is non-smoking; the closer the recognition result is to 0, the higher the probability of representing that the target human body attribute is non-smoking, the closer the recognition result is to 1, the higher the probability of representing that the target human body attribute is smoking, and the accurate recognition of the target human body attribute of the recognition image can be realized.
In the embodiment, the target retraining sample aiming at the target human body attribute input by the target user is obtained, and the matched basic recognition model is retrained again, so that the recognition capability of the basic recognition model on the target human body attribute can be enhanced, and the target human body attribute can be recognized more accurately; meanwhile, the basic recognition model is obtained by carrying out universality training aiming at each human body attribute, so that the non-target human body attribute can still be recognized by the target human body attribute model obtained by carrying out retraining on the basis of the basic recognition model; therefore, even if the human body attribute corresponding to the identification image input by the target user is the non-target human body attribute, the target human body attribute model can still realize the human body attribute identification of the identification image, and the universality of the target human body attribute model is realized.
According to the technical scheme of the embodiment of the invention, a target basic recognition model is obtained from a plurality of basic recognition models generated by pre-training according to the quantity value of a target retraining sample input by a target user, and each target retraining sample is used for training the target basic recognition model to obtain a target human body attribute model corresponding to the target user; and then the target human body attribute model is adopted to identify the target human body attribute of the identification image input by the user, and the identification result output by the target human body attribute model is fed back to the target user, so that the target human body attribute is accurately identified, meanwhile, the matched basic identification model is determined according to the target retraining sample input by the user, and then the human body attribute model matched with the user is obtained through training, so that the human body attribute model matched with the user is obtained, the accuracy of the obtained human body attribute model is improved, and the identification accuracy of the target human body attribute of the identification image is improved.
Example two
Fig. 2A is a flowchart of a human body attribute identification method according to a second embodiment of the present invention, which is embodied on the basis of the foregoing embodiments, in which in this embodiment, a human body image is collected in advance, and a target retraining sample for identifying a target human body attribute is generated according to a retraining sample labeling request of a user, and the method specifically includes:
s210, obtaining an original image acquired by at least one camera.
In addition, optionally, acquiring the original image may further include capturing from the captured video and acquiring from the internet; in this embodiment, the manner of acquiring the original image is not particularly limited.
S220, acquiring alternative images containing character images in the original images.
In the embodiment, an original image acquired by a camera is screened to obtain an alternative image containing a character image; and if it is determined that at least one character exists in the original image, determining the current original image as the alternative image.
In addition, optionally, after the alternative images containing the character images are obtained, performing repetitive detection on the alternative images to respectively obtain alternative images corresponding to each target character image; and then sampling the alternative images corresponding to the same target character image according to a preset sampling frequency, for example, 2 images/second, and taking the sampled alternative images as final alternative images, so that the diversity of the alternative images can be ensured.
And S230, identifying human body outlines in the alternative images, forming human body images respectively corresponding to the human body outlines, and storing the human body images in a human body image library.
In this embodiment, optionally, in each of the candidate images, a human body contour is identified, and a human body image corresponding to each human body contour is formed and stored in a human body image library, which may specifically include: according to at least one human body contour detection algorithm, recognizing a human body contour in each alternative image; and acquiring a human body image corresponding to each human body contour according to the human body contour and preset external expansion parameters.
The human body contour detection algorithm comprises at least one of a human face detection algorithm, a human head detection algorithm and a human body detection algorithm; through a human body contour detection algorithm, a human body contour can be identified in the alternative image, and then a detection frame is adopted to mark the region of the human body contour in the alternative image; the length and width of the detection frame can be adaptively adjusted according to needs.
It should be noted that the detection frame may be represented by a coordinate parameter, and typically, the detection frame may be represented as (x, y, w, h); wherein, (x, y) represents the abscissa and ordinate of the upper left corner of the detection frame in the candidate image, and w and h represent the width and height of the detection frame respectively; the coordinate parameters can realize accurate representation of the detection frame.
In addition, after the human body contour detection frame is obtained, the human body contour detection frame is expanded according to preset external expansion parameters to obtain the human body detection frame, and then a candidate image area corresponding to the human body detection frame is intercepted to obtain a corresponding human body image; for example, as shown in FIG. 2B, assume that the ratio of the top two vertices of the human head detection frame to the horizontal axis of the human head detection frame is k1And k2The external expansion ratio of the two vertexes on the left side relative to the longitudinal axis of the human body detection frame is k3And k4(ii) a Wherein k is1=FB1/FG,k2=FC1/FG,k3=FB0/FE,k4=FA0a/FE; further, the following formula can be used:
X=x-k1×w/(k2-k1),
Y=y-k3×h/(k4-k3),
W=w/(k2-k1),
H=h/(k4-k3);
and calculating to obtain coordinate parameters (X, Y, W, H) of the human body detection frame in the alternative image.
The method comprises the following steps of (1) paying attention to a value, expanding a human body outline detection frame according to a preset external expansion parameter, and obtaining the human body detection frame, wherein the size of the obtained human body detection frame possibly exceeds the range of a current alternative image; at this time, optionally, for the region exceeding the candidate image in the human body detection frame, the pixel point of (128,128,128) is adopted for filling, so as to finally obtain the human body image corresponding to the candidate image.
In the embodiment, the human body contour is determined in the alternative image through the human body contour detection algorithm, and then the human body image is intercepted in the alternative image according to the human body contour, so that a large number of human body images are rapidly acquired, and the acquisition efficiency of the human body image is improved.
In addition, optionally, before the human body image is stored in the human body image library, the acquired human body image can be preprocessed according to a preset processing rule; for example, a human body image is normalized to a fixed pixel size (typically, 600 × 800); for another example, enhancement processing, mean processing or variance processing is performed on the human body image to improve the image quality of the human body image.
It should be noted that, when the candidate image includes a plurality of human images, human body contours of all the human images can be identified in the candidate image, and then corresponding human body images are respectively formed according to the human body contours; therefore, a plurality of human body images can be extracted from one alternative image, and the acquisition efficiency of the human body images can be further improved.
S240, responding to a retraining sample labeling request input by a target user, and displaying each human body image in the human body image library to the target user.
The method comprises the steps that a retraining sample labeling interface is pre-configured in a client, and a target user sends a retraining sample labeling request to the client by accessing the retraining sample labeling interface; and after receiving a retraining sample marking request of the target user, the client reads each human body image in the human body image library and displays the read human body image to the target user.
And S250, responding to the marking operation of the target user on the target human body attribute in the displayed at least one human body image, and generating at least one target retraining sample for identifying the target human body attribute.
In this embodiment, after the target user acquires the human body image displayed in the client, the attention of the target user is that the human body image at this time does not have any label; and the target user clicks and selects a corresponding human body image in the client, and carries out human body attribute marking operation on the selected human body image through a human body image marking functional module preset by the client, so as to add a manual marking result to the current human body image and further obtain at least one target retraining sample. By obtaining the target retraining sample matched with the target human body attribute according to the marking operation of the target user on the target human body attribute in the human body image, the target retraining sample corresponding to the specific human body attribute can be efficiently obtained.
It should be noted that, when selecting a human body image, a target user may specifically select a human body image matched with the target human body attribute; for example, if the target human body attribute is smoking/non-smoking, the user may select a human body image including a smoking action to label in the human body image, so as to quickly obtain a certain number of target retraining samples corresponding to the smoking human body attribute, and thus, the obtaining efficiency of the target retraining samples may be improved.
And S260, performing associated storage on each target retraining sample and the target user.
Specifically, after the target user finishes labeling the human body image, the client performs a target retraining sample obtained after the target user performs the labeling operation of the target human body attribute, and the target retraining sample is used as a target retraining sample set to be stored in association with the target user; for example, the target retraining sample set is stored under a folder named by a target user name, or the target user name may be added to the target retraining sample set file name to realize the associated storage of each target retraining sample and the target user.
And S270, responding to a target retraining sample checking request of a target user, and displaying each locally stored target retraining sample by the user.
Correspondingly, each target retraining sample and the target user are stored in an associated manner, so that after the target user successfully logs in the client, if the client obtains a target retraining sample checking request of the target user, the target retraining sample matched with the target user can be directly searched in the local storage, and the searched target retraining sample is displayed to the user, so that the obtaining efficiency of the target retraining sample can be further improved.
S280, responding to a training sample input instruction of a target user, and acquiring a plurality of target retraining samples selected by the target user in currently displayed target retraining samples.
And S290, acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample.
Wherein, the basic recognition model is obtained by carrying out universality training aiming at each human body attribute
S2100, training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to the target user.
And S2110, recognizing the target human body attribute of the recognition image input by the user by adopting the target human body attribute model, and feeding back the recognition result output by the target human body attribute model to the target user.
According to the technical scheme of the embodiment of the invention, the alternative images are screened from the original image, the human body image is obtained from the alternative images, and then the corresponding human body image labeling operation is executed according to the retraining sample labeling request of the target user, so that each target retraining sample corresponding to the target user is obtained, and the target retraining sample meeting the requirements of the target user is obtained; furthermore, the matched basic recognition model is trained according to a target retraining sample input by a target user to obtain a corresponding target human body attribute model, and finally, the target human body attribute of the recognition image is recognized according to the target human body attribute model, so that the recognition capability of the target human body attribute model on the target human body attribute is enhanced, and the accuracy of the target human body attribute model in recognizing the target human body attribute is improved.
EXAMPLE III
Fig. 3A is a flowchart of a human body attribute recognition method according to a third embodiment of the present invention, which is embodied on the basis of the foregoing embodiments, in this embodiment, after the recognition result is fed back to the target user, if it is determined that the artificial labeling result fed back by the target user is inconsistent with the recognition result, the loss function is updated, and the target human body attribute model is retrained based on the updated loss function, where the method specifically includes:
and S310, acquiring an original image acquired by at least one camera.
S320, obtaining alternative images containing character images in each original image.
S330, recognizing human body outlines in the alternative images, forming human body images respectively corresponding to the human body outlines, and storing the human body images in a human body image library.
S340, responding to a retraining sample labeling request input by a target user, and displaying each human body image in the human body image library to the target user.
And S350, responding to the marking operation of the target user on the target human body attribute in the displayed at least one human body image, and generating at least one target retraining sample for identifying the target human body attribute.
And S360, performing associated storage on each target retraining sample and the target user.
And S370, responding to the target retraining sample viewing request of the target user, and displaying each locally stored target retraining sample by the user.
And S380, responding to a training sample input instruction of the target user, and acquiring a plurality of target retraining samples selected by the target user in the currently displayed target retraining samples.
And S390, acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample.
Wherein, the basic recognition model is obtained by carrying out universality training aiming at each human body attribute
And S3100, training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to the target user.
S3110, recognizing the target human body attribute of the recognition image input by the user by adopting the target human body attribute model, and feeding back the recognition result output by the target human body attribute model to the target user.
S3120, acquiring an artificial labeling result fed back by a target user and aiming at the target human body attribute in the identification image, and judging whether the artificial labeling result is consistent with the identification result.
If yes, executing S3160; otherwise, S3130 is performed. Specifically, after the client sends the recognition result output by the target human body attribute model to the target user, if the target user determines that the current recognition result is abnormal or wrong, the client can add an artificial tagging result to the target human body attribute of the recognition image through a recognition image tagging functional module or an interface of the client. After receiving an artificial labeling result of a target user aiming at the target human body attribute in the identification image, the client judges whether the artificial labeling result is the same as the identification result; if the identification result is the same as the target human body attribute, the identification result is proved to be correct, and the identification of the target human body attribute of the current identification image is finished; if the determination is different, the recognition result is proved to be wrong, and the target human body attribute model needs to be retrained, so that the accuracy of the target human body attribute model in recognizing the target human body attribute is improved.
In addition, optionally, if the client does not receive the manual labeling result, fed back by the target user, for the target human body attribute in the current recognition image within the preset time threshold, it is determined that the current recognition result is correct, and the recognition process of the target human body attribute of the current recognition image is actively ended.
According to the technical scheme of the embodiment, after the identification result of the target human body attribute in the identification image is obtained, the artificial labeling result of the target user on the target human body attribute in the identification image is further obtained; and under the condition that the recognition result is inconsistent with the manual marking result, the loss function of the target human body attribute model is updated, so that the accuracy of the target human body attribute model in identifying the target human body attribute can be further improved.
And S3130, forming an abnormal identification sample according to the artificial labeling result of the identification image, and adding the abnormal identification sample into an identification abnormal sample set.
If the manual labeling result is inconsistent with the identification result, the identification result of the current identification image is abnormal or wrong; therefore, the manual labeling result is used as a label of the corresponding identification image, and the identification image added with the label is used as an abnormal identification sample and added into the abnormal identification sample set.
S3140, when the loss function updating condition is met, updating the loss function of the target human body attribute model according to each abnormal recognition sample included in the recognition abnormal sample set.
The loss function updating condition is a preset requirement condition for executing the loss function updating operation; for example, if the number of abnormal recognition samples in the abnormal sample set is greater than or equal to a preset sample number threshold, the loss function update condition is considered to be satisfied; furthermore, the loss function of the target human body attribute model is updated according to the number of the abnormal recognition samples included in the abnormal recognition sample set and the manual labeling result of each abnormal recognition sample.
In this embodiment, optionally, when it is detected that a loss function update condition is satisfied, updating the loss function of the target human body attribute model according to each abnormal recognition sample included in the recognition abnormal sample set may specifically include:
according to the following formula:
Figure BDA0003174822710000191
updating a Loss function Loss of the target human body attribute model;
where N denotes the number of target retraining samples, ω denotes a weight coefficient, and is usually set to 1, and may be set in advance as needed, M denotes the number of abnormality identifying samples included in the set of abnormality identifying samples, i denotes an index of the target retraining sample, and i is 1,2iArtificial annotation information, y, representing target retraining sample iiE {0,1}, 0 denotes that the human body attribute is a negative sample, 1 denotes that the human body attribute is a positive sample,
Figure BDA0003174822710000201
represents the recognition result of the target human body attribute model to the target retraining sample i, and represents a Sigmoid function, namely, the sigma (z) is 1/(1+ e ^ (-z)), j represents the index of the abnormal recognition sample, and j is 1,2jArtificial annotation information, y, representing anomaly identification samples jjE {0,1}, 0 denotes the human bodyNegative examples, 1 indicates that the human attribute is a positive example,
Figure BDA0003174822710000202
and representing the recognition result of the target human body attribute model on the abnormal recognition sample j.
In the embodiment, the loss function is updated according to the abnormality identification sample, so that the updated loss function can embody an identification image for identifying abnormality, and a more accurate loss function can be obtained; and then, the target human body attribute model is trained again according to the updated loss function, so that the accuracy of the obtained target human body attribute model can be improved.
S3150, retraining the target human body attribute model based on the updated loss function, and obtaining the updated target human body attribute model.
Specifically, after the updating operation of the loss function is completed, joint training is carried out on the target human body attribute model according to the recognition abnormal sample set and each target retraining sample; and calculating a loss value in the training process according to the loss function, further finishing retraining the target human body attribute model when the loss value is detected to be smaller than a preset loss threshold value, obtaining the updated target human body attribute model, and further improving the accuracy of the target human body attribute recognition of the target human body attribute model.
And S3160, ending.
In order to more clearly introduce the technical solution of the embodiment of the present invention, as shown in fig. 3B, the technical solution provided by the embodiment of the present invention may include: acquiring a video image acquired by at least one camera, and decoding the acquired video image to acquire an original image; acquiring alternative images containing human images from the original images, identifying human body contours from the alternative images, and forming human body images corresponding to the human body contours respectively; according to the preprocessing rule, executing image preprocessing operation on the human body image; and generating at least one target retraining sample for identifying the target human body attribute in response to the marking operation of the target user on the target human body attribute in the human body image after the image preprocessing operation is executed.
Further, according to the quantity value of the target retraining samples, a target basic recognition model is obtained from a plurality of basic recognition models generated by pre-training, and each target retraining sample is used for training the target basic recognition model to obtain a target human body attribute model corresponding to a target user; adopting a target human body attribute model to identify the target human body attribute of an identification image input by a user, and feeding back an identification result output by the target human body attribute model to the target user; acquiring an artificial labeling result fed back by a target user and aiming at the target human body attribute in the identification image, if the artificial labeling result is inconsistent with the identification result, generating an abnormal identification sample according to the artificial labeling result, and updating the loss function when the loss function updating condition is met; and finally, training the target human body attribute model again based on the updated loss function to obtain the trained target human body attribute model.
According to the technical scheme, after the identification result of the identification image is obtained, the artificial marking result of the target user aiming at the target human body attribute of the identification image is obtained, and when the artificial marking result is determined to be inconsistent with the identification result, the abnormal identification sample is generated according to the artificial marking result; and then when the condition that the loss function updating condition is met is detected, updating the loss function according to the abnormal recognition sample, training the target human body attribute model again based on the updated loss function, acquiring the updated target human body attribute model, realizing more accurate acquisition of the target human body attribute model, and further improving the accuracy of the target human body attribute model in identifying the target human body attribute.
Example four
Fig. 4 is a block diagram of a structure of a human body attribute recognition apparatus according to a fourth embodiment of the present invention, where the apparatus specifically includes: a training sample acquisition module 410, a target basis recognition model acquisition module 420, a target human body attribute model acquisition module 430 and a target human body attribute recognition module 440;
a training sample obtaining module 410, configured to obtain multiple target retraining samples that are input by a target user and used for identifying target human body attributes;
a target base recognition model obtaining module 420, configured to obtain a target base recognition model from multiple base recognition models generated by pre-training according to a quantity value of a target retraining sample, where the base recognition model is obtained by performing commonality training for each human body attribute;
a target human body attribute model obtaining module 430, configured to train the target base identification model using each target retraining sample, to obtain a target human body attribute model corresponding to the target user;
and the target human body attribute identification module 440 is configured to identify a target human body attribute of the identification image input by the user by using the target human body attribute model, and feed back an identification result output by the target human body attribute model to the target user.
Optionally, on the basis of the above technical solution, the apparatus for identifying a human body attribute further includes:
the retraining sample labeling request response module is used for responding to a retraining sample labeling request input by a target user and displaying each human body image in the human body image library to the target user;
the marking operation response module is used for responding to the marking operation of the target user on the target human body attribute in the displayed at least one human body image and generating at least one target retraining sample for identifying the target human body attribute;
and the sample storage module is used for storing each target retraining sample and the target user in an associated manner.
Optionally, on the basis of the above technical solution, the training sample obtaining module 410 includes:
the checking request response unit is used for responding to a target retraining sample checking request of a target user and displaying each target retraining sample stored locally by the user;
and the training sample input instruction response unit is used for responding to a training sample input instruction of the target user and acquiring a plurality of target retraining samples selected by the target user in currently displayed target retraining samples.
Optionally, on the basis of the above technical solution, the apparatus for identifying a human body attribute further includes:
the original image acquisition module is used for acquiring an original image acquired by at least one camera;
the alternative image acquisition module is used for acquiring alternative images containing human figures in each original image;
and the human body image storage module is used for identifying human body outlines in the alternative images, forming human body images respectively corresponding to the human body outlines and storing the human body images in a human body image library.
Optionally, on the basis of the above technical solution, the human body image storage module is specifically configured to identify a human body contour in each of the alternative images according to at least one human body contour detection algorithm; and acquiring a human body image corresponding to each human body contour according to the human body contour and preset external expansion parameters.
Optionally, on the basis of the above technical solution, the apparatus for identifying a human body attribute further includes:
the consistency judging module is used for acquiring an artificial labeling result fed back by a target user and aiming at the target human body attribute in the identification image and judging whether the artificial labeling result is consistent with the identification result or not;
an abnormal recognition sample forming module, configured to form an abnormal recognition sample according to the artificial labeling result of the recognition image and add the abnormal recognition sample to a recognition abnormal sample set if it is determined that the artificial labeling result is inconsistent with the recognition result;
a loss function updating module, configured to update the loss function of the target human body attribute model according to each abnormal recognition sample included in the recognition abnormal sample set when it is detected that a loss function updating condition is satisfied;
and the target human body attribute model retraining module is used for retraining the target human body attribute model based on the updated loss function to obtain the updated target human body attribute model.
Optionally, on the basis of the above technical solution, the loss function updating module is specifically configured to:
Figure BDA0003174822710000241
updating a Loss function Loss of the target human body attribute model;
where N denotes the number of target retraining samples, ω denotes a weight coefficient, M denotes the number of abnormality identifying samples included in the set of identified abnormality samples, i denotes an index of the target retraining sample, and i is 1,2iArtificial annotation information, y, representing target retraining sample iiE {0,1}, 0 denotes that the human body attribute is a negative sample, 1 denotes that the human body attribute is a positive sample,
Figure BDA0003174822710000242
represents the recognition result of the target human body attribute model to the target retraining sample i, and represents a Sigmoid function, namely, the sigma (z) is 1/(1+ e ^ (-z)), j represents the index of the abnormal recognition sample, and j is 1,2jArtificial annotation information, y, representing anomaly identification samples jjE {0,1}, 0 denotes that the human body attribute is a negative sample, 1 denotes that the human body attribute is a positive sample,
Figure BDA0003174822710000243
and representing the recognition result of the target human body attribute model on the abnormal recognition sample j.
The human body attribute identification device provided by the embodiment of the invention can execute the human body attribute identification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a computer apparatus according to a fifth embodiment of the present invention, as shown in fig. 5, the computer apparatus includes a processor 50, a memory 51, an input device 52, and an output device 53; let the number of processors 50 in the computer device be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52 and the output device 53 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5.
The memory 51 is used as a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the human body attribute identification method in the embodiment of the present invention (for example, the training sample acquisition module 410, the target basis recognition model acquisition module 420, the target human body attribute model acquisition module 430, and the target human body attribute identification module 440 in the human body attribute identification device). The processor 50 executes various functional applications and data processing of the computer device by running software programs, instructions and modules stored in the memory 51, namely, implements the above-mentioned human body attribute identification method, namely:
acquiring a plurality of target retraining samples which are input by a target user and used for identifying target human body attributes;
acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample, wherein the basic recognition models are obtained by carrying out universality training aiming at each human body attribute;
training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to a target user;
and identifying the target human body attribute of the identification image input by the user by adopting the target human body attribute model, and feeding back the identification result output by the target human body attribute model to the target user.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 52 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the device/terminal/server. The output device 53 may include a display device such as a display screen.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for identifying a human body attribute, where the method includes:
acquiring a plurality of target retraining samples which are input by a target user and used for identifying target human body attributes;
acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample, wherein the basic recognition models are obtained by carrying out universality training aiming at each human body attribute;
training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to a target user;
and identifying the target human body attribute of the identification image input by the user by adopting the target human body attribute model, and feeding back the identification result output by the target human body attribute model to the target user.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the human body attribute identification method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for identifying attributes of a human body is characterized by comprising the following steps:
acquiring a plurality of target retraining samples which are input by a target user and used for identifying target human body attributes;
acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample, wherein the basic recognition models are obtained by carrying out universality training aiming at each human body attribute;
training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to a target user;
and identifying the target human body attribute of the identification image input by the user by adopting the target human body attribute model, and feeding back the identification result output by the target human body attribute model to the target user.
2. The method of claim 1, further comprising, prior to obtaining a plurality of target retraining samples input by a target user for identifying target body attributes:
responding to a retraining sample labeling request input by a target user, and displaying each human body image in a human body image library to the target user;
responding to the marking operation of the target user on the target human body attribute in the displayed at least one human body image, and generating at least one target retraining sample for identifying the target human body attribute;
and performing associated storage on each target retraining sample and the target user.
3. The method of claim 1, wherein obtaining a plurality of target retraining samples input by a target user for identifying target body attributes comprises:
responding to a target retraining sample viewing request of a target user, and displaying each target retraining sample stored locally by the user;
and responding to a training sample input instruction of the target user, and acquiring a plurality of target retraining samples selected by the target user in the currently displayed target retraining samples.
4. The method of claim 2, further comprising, prior to presenting individual human images in a human image library to a target user in response to a retraining sample annotation request input by the target user:
acquiring an original image acquired by at least one camera;
in each original image, acquiring an alternative image containing a character image;
and identifying human body outlines in the alternative images, and forming human body images respectively corresponding to the human body outlines and storing the human body images in a human body image library.
5. The method according to claim 4, wherein the identifying of the human body contour in each of the candidate images and the forming of the human body image corresponding to each human body contour respectively are stored in a human body image library, and specifically comprises:
according to at least one human body contour detection algorithm, recognizing a human body contour in each alternative image; and acquiring a human body image corresponding to each human body contour according to the human body contour and preset external expansion parameters.
6. The method according to claim 1, wherein after the recognition result output by the target human body attribute model is fed back to the target user, the method further comprises:
acquiring an artificial labeling result fed back by a target user and aiming at the target human body attribute in an identification image, and judging whether the artificial labeling result is consistent with the identification result or not;
if the manual marking result is determined to be inconsistent with the identification result, forming an abnormal identification sample and adding the abnormal identification sample into an abnormal identification sample set according to the manual marking result of the identification image;
when the loss function updating condition is met, updating the loss function of the target human body attribute model according to each abnormal recognition sample included in the recognition abnormal sample set;
and training the target human body attribute model again based on the updated loss function to obtain the updated target human body attribute model.
7. The method according to claim 6, wherein when it is detected that a loss function update condition is satisfied, updating the loss function of the target human body attribute model according to each abnormal recognition sample included in the recognition abnormal sample set includes:
according to the following formula:
Figure FDA0003174822700000031
updating a Loss function Loss of the target human body attribute model;
where N denotes the number of target retraining samples, ω denotes a weight coefficient, M denotes the number of abnormality identifying samples included in the set of identified abnormality samples, i denotes an index of the target retraining sample, and i is 1,2iArtificial annotation information, y, representing target retraining sample iiE {0,1}, 0 denotes that the human body attribute is a negative sample, 1 denotes that the human body attribute is a positive sample,
Figure FDA0003174822700000032
represents the recognition result of the target human body attribute model to the target retraining sample i, and represents a Sigmoid function, namely, the sigma (z) is 1/(1+ e ^ (-z)), j represents the index of the abnormal recognition sample, and j is 1,2jArtificial annotation information, y, representing anomaly identification samples jjE {0,1}, 0 denotes that the human body attribute is a negative sample, 1 denotes that the human body attribute is a positive sample,
Figure FDA0003174822700000033
and representing the recognition result of the target human body attribute model on the abnormal recognition sample j.
8. An apparatus for identifying attributes of a human body, comprising:
the training sample acquisition module is used for acquiring a plurality of target retraining samples which are input by a target user and used for identifying the attributes of a target human body;
the target basic recognition model acquisition module is used for acquiring a target basic recognition model from a plurality of basic recognition models generated by pre-training according to the quantity value of the target retraining sample, wherein the basic recognition model is obtained by carrying out universality training aiming at each human body attribute;
the target human body attribute model acquisition module is used for training the target basic recognition model by using each target retraining sample to obtain a target human body attribute model corresponding to a target user;
and the target human body attribute identification module is used for identifying the target human body attribute of the identification image input by the user by adopting the target human body attribute model and feeding back the identification result output by the target human body attribute model to the target user.
9. A computer device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of human attribute identification as claimed in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method for identifying a person attribute according to any one of claims 1 to 7.
CN202110829044.5A 2021-07-22 2021-07-22 Human body attribute identification method, device, computer equipment and storage medium Active CN113537101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110829044.5A CN113537101B (en) 2021-07-22 2021-07-22 Human body attribute identification method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110829044.5A CN113537101B (en) 2021-07-22 2021-07-22 Human body attribute identification method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113537101A true CN113537101A (en) 2021-10-22
CN113537101B CN113537101B (en) 2024-04-30

Family

ID=78120383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110829044.5A Active CN113537101B (en) 2021-07-22 2021-07-22 Human body attribute identification method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113537101B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108197664A (en) * 2018-01-24 2018-06-22 北京墨丘科技有限公司 Model acquisition methods, device, electronic equipment and computer readable storage medium
CN110674756A (en) * 2019-09-25 2020-01-10 普联技术有限公司 Human body attribute recognition model training method, human body attribute recognition method and device
CN111444952A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Method and device for generating sample identification model, computer equipment and storage medium
CN111814759A (en) * 2020-08-24 2020-10-23 腾讯科技(深圳)有限公司 Method and device for acquiring face quality label value, server and storage medium
CN112651849A (en) * 2020-12-29 2021-04-13 广东电网有限责任公司电力科学研究院 Voltage monitoring abnormal data identification method and system based on unbalanced data set
CN113065512A (en) * 2021-04-21 2021-07-02 深圳壹账通智能科技有限公司 Face micro-expression recognition method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108197664A (en) * 2018-01-24 2018-06-22 北京墨丘科技有限公司 Model acquisition methods, device, electronic equipment and computer readable storage medium
CN110674756A (en) * 2019-09-25 2020-01-10 普联技术有限公司 Human body attribute recognition model training method, human body attribute recognition method and device
CN111444952A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Method and device for generating sample identification model, computer equipment and storage medium
CN111814759A (en) * 2020-08-24 2020-10-23 腾讯科技(深圳)有限公司 Method and device for acquiring face quality label value, server and storage medium
CN112651849A (en) * 2020-12-29 2021-04-13 广东电网有限责任公司电力科学研究院 Voltage monitoring abnormal data identification method and system based on unbalanced data set
CN113065512A (en) * 2021-04-21 2021-07-02 深圳壹账通智能科技有限公司 Face micro-expression recognition method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
袁配配 等: "基于深度学习的行人属性识别", 激光与光电子学进展, vol. 57, no. 6, 31 March 2020 (2020-03-31), pages 1 - 7 *
费兰英;范宁宁;: "基于人体图模型和背景减除的姿势估计", 苏州大学学报(工科版), vol. 1, no. 03, pages 32 - 14 *

Also Published As

Publication number Publication date
CN113537101B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
US10936911B2 (en) Logo detection
WO2021036059A1 (en) Image conversion model training method, heterogeneous face recognition method, device and apparatus
CN111310731A (en) Video recommendation method, device and equipment based on artificial intelligence and storage medium
CN110741377A (en) Face image processing method and device, storage medium and electronic equipment
CN112101386B (en) Text detection method, device, computer equipment and storage medium
CN111160134A (en) Human-subject video scene analysis method and device
CN112668608B (en) Image recognition method and device, electronic equipment and storage medium
CN112528058B (en) Fine-grained image classification method based on image attribute active learning
CN111507285A (en) Face attribute recognition method and device, computer equipment and storage medium
CN111832561B (en) Character sequence recognition method, device, equipment and medium based on computer vision
CN111553838A (en) Model parameter updating method, device, equipment and storage medium
CN111382791B (en) Deep learning task processing method, image recognition task processing method and device
CN114003160A (en) Data visualization display method and device, computer equipment and storage medium
CN109829484B (en) Clothing classification method and equipment and computer-readable storage medium
CN111881740A (en) Face recognition method, face recognition device, electronic equipment and medium
CN111539390A (en) Small target image identification method, equipment and system based on Yolov3
CN113537101B (en) Human body attribute identification method, device, computer equipment and storage medium
CN112101479B (en) Hair style identification method and device
CN113192108A (en) Human-in-loop training method for visual tracking model and related device
CN116433939B (en) Sample image generation method, training method, recognition method and device
CN116883794B (en) Spatial structure cognitive ability evaluation method and system based on graph attention network
CN115205555B (en) Method for determining similar images, training method, information determining method and equipment
US20210248755A1 (en) Product release method and image processing method, apparatus, device, and storage medium
CN115661883A (en) Face direction correction method and device, computer equipment and storage medium
CN113743445A (en) Target object identification method and device, computer equipment and storage medium

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