CN111191503A - Pedestrian attribute identification method and device, storage medium and terminal - Google Patents

Pedestrian attribute identification method and device, storage medium and terminal Download PDF

Info

Publication number
CN111191503A
CN111191503A CN201911167625.6A CN201911167625A CN111191503A CN 111191503 A CN111191503 A CN 111191503A CN 201911167625 A CN201911167625 A CN 201911167625A CN 111191503 A CN111191503 A CN 111191503A
Authority
CN
China
Prior art keywords
model
sample
pedestrian
data sample
data
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
CN201911167625.6A
Other languages
Chinese (zh)
Inventor
王弯弯
张尉东
黄晓峰
殷海兵
贾惠柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Original Assignee
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced Institute of Information Technology AIIT of Peking University, Hangzhou Weiming Information Technology Co Ltd filed Critical Advanced Institute of Information Technology AIIT of Peking University
Priority to CN201911167625.6A priority Critical patent/CN111191503A/en
Publication of CN111191503A publication Critical patent/CN111191503A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements

Landscapes

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

Abstract

The invention discloses a pedestrian attribute identification method, a device, a storage medium and a terminal, wherein the method comprises the following steps: acquiring a target pedestrian image; inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, wherein the pedestrian attribute recognition model is generated based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model; and outputting each attribute value corresponding to the target pedestrian image. Therefore, by adopting the embodiment of the invention, since the second data sample is generated by inputting the first data sample into the style transition model, after the pedestrian attribute identification model is trained by using the data sample with high similarity, each attribute value corresponding to the output pedestrian image can be more accurate when the pedestrian attribute identification model is used for pedestrian attribute identification.

Description

Pedestrian attribute identification method and device, storage medium and terminal
Technical Field
The invention relates to the technical field of computers, in particular to a pedestrian attribute identification method, a pedestrian attribute identification device, a storage medium and a terminal.
Background
In recent years, image recognition and analysis techniques based on human beings have been widely used, such as age recognition, public security and access control systems. The pedestrian body type judgment in the image is an important attribute for semantic description of pedestrians, namely the body type characteristics of height, fat and thin of pedestrians in a pedestrian picture or video are detected.
At present, pedestrian attribute identification is an important research direction in the field of computer vision and is also an important component of structural analysis in video monitoring. In current pedestrian attribute discernment, when the identification model that the data training that utilize to contain pedestrian attribute mark information was discerned, because the data sample that this kind of identification model was gathered in the training process is abundant inadequately to pedestrian's attribute mark, when marking a large amount of data samples, the waste time has increased the cost. Therefore, the recognition using the model results in inaccurate recognition results.
Disclosure of Invention
The embodiment of the invention provides a pedestrian attribute identification method, a pedestrian attribute identification device, a storage medium and a terminal. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the present invention provides a method for identifying a pedestrian attribute, where the method includes:
acquiring a target pedestrian image;
inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, wherein the pedestrian attribute recognition model is generated based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model;
and outputting each attribute value corresponding to the target pedestrian image.
Optionally, before the acquiring the target pedestrian image, the method further includes:
acquiring a first data sample and a target test data sample;
and creating a style migration model, inputting the first data sample and the target test data sample into the style migration model for training, and generating the trained style migration model.
Optionally, after the first data sample and the target test data sample are input into the style migration model for training and a trained style migration model is generated, the method further includes:
and inputting the first sample data into the trained style migration model to generate a second data sample.
Optionally, after the inputting the first sample data into the trained style migration model to generate a second data sample, the method further includes:
creating a pedestrian attribute identification model;
merging the first sample data and the second sample data, inputting the merged first sample data and second sample data into the pedestrian attribute identification model, and outputting a loss value of the model;
and when the loss value reaches a preset threshold value, generating a trained pedestrian attribute recognition model.
In a second aspect, an embodiment of the present invention provides a pedestrian attribute identification apparatus, including:
the image acquisition module is used for acquiring a target pedestrian image;
the image input module is used for inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model;
and the attribute value output module is used for outputting each attribute value corresponding to the target pedestrian image.
Optionally, the apparatus further comprises:
the system comprises a sample acquisition module, a data analysis module and a data analysis module, wherein the sample acquisition module is used for acquiring a first data sample and a target test data sample;
and the first model generation module is used for creating a style migration model, inputting the first data sample and the target test data sample into the style migration model for training, and generating a trained style migration model.
Optionally, the apparatus further comprises:
and the sample generation module is used for inputting the first sample data into the trained style migration model to generate a second data sample.
Optionally, the apparatus further comprises:
the model creating module is used for creating a pedestrian attribute identification model;
the loss value output module is used for merging and inputting the first sample data and the second sample data into the pedestrian attribute identification model and outputting a loss value of the model;
and the second model generation module is used for generating a trained pedestrian attribute recognition model when the loss value reaches a preset threshold value.
In a third aspect, embodiments of the present invention provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present invention provides a terminal, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a target pedestrian image is obtained firstly, then the target pedestrian image is input into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated by training based on a first data sample and a second data sample, the second data sample is generated by inputting the first data sample into a pre-trained style transition model, and finally, each attribute value corresponding to the target pedestrian image is output. Therefore, by adopting the embodiment of the invention, since the second data sample is generated by inputting the first data sample into the style transition model, after the pedestrian attribute identification model is trained by using the data sample with high similarity, each attribute value corresponding to the output pedestrian image can be more accurate when the pedestrian attribute identification model is used for pedestrian attribute identification.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic flow chart of a pedestrian attribute identification method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another method for identifying attributes of pedestrians according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a style migration model generation provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of a data sample being converted into another data sample by using a style migration model according to an embodiment of the present invention;
FIG. 5 is a schematic illustration of pedestrian attribute identification model generation;
FIG. 6 is a process diagram of a pedestrian attribute identification process provided by an embodiment of the present invention;
FIG. 7 is a schematic flow chart of model calculation loss values provided by the embodiment of the present invention;
fig. 8 is a schematic structural diagram of a pedestrian attribute identification apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another pedestrian property identification apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Up to now, in the current pedestrian attribute identification, when the identification model trained by using the data containing the pedestrian attribute labeling information is used for identification, because the data samples collected by the identification model in the training process are not rich enough to label the attributes of the pedestrian, when a large number of data samples are labeled, the time is wasted, and the cost is increased. Therefore, the recognition using the model results in inaccurate recognition results. To solve the problems involved in the related art described above. In the technical scheme provided by the invention, because the second data sample is generated by inputting the first data sample into the style migration model, after the pedestrian attribute identification model is trained by using the data sample with high similarity, each attribute value corresponding to the output pedestrian image is more accurate when the pedestrian attribute identification model is used for pedestrian attribute identification.
The pedestrian attribute identification method provided by the embodiment of the invention will be described in detail below with reference to fig. 1 to 6. The method may be implemented in dependence on a computer program, executable on a pedestrian property analysis apparatus based on the von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application. The pedestrian attribute identification device in the embodiment of the present invention may be a user terminal, including but not limited to: personal computers, tablet computers, handheld devices, in-vehicle devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and the like. The user terminals may be called different names in different networks, for example: user equipment, access terminal, subscriber unit, subscriber station, mobile station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user equipment, cellular telephone, cordless telephone, Personal Digital Assistant (PDA), terminal equipment in a 5G network or future evolution network, and the like.
Referring to fig. 1, a flow chart of a pedestrian attribute analysis method is provided in an embodiment of the present invention. As shown in fig. 1, the method of an embodiment of the present invention may include the steps of:
s101, acquiring a target pedestrian image;
the image is a picture with visual effect, which is the basis of human vision, and comprises a picture on paper, a picture or a photo, a television, a projector or a computer screen. The target pedestrian image is an image shot by a terminal with a camera, and the shot target image is an appearance image of a pedestrian. The target image captured at this time may include various kinds of appearance information such as a face region, a body region of a person. The face area in turn includes the eye area, nose area, mouth area, etc. The eye region includes the pupil, iris, eyelash, eyebrow, etc.
The mode for acquiring the target pedestrian image can be that a user adopts a user terminal with a camera to shoot to obtain the pedestrian image, or the user selects a certain pedestrian image stored in advance from an image set in a local image library or selects a pedestrian image downloaded from a network terminal, and the like. For the pedestrian image, the user may select different manners to obtain, which is not limited in this respect.
In a feasible implementation mode, when the terminal camera detects that a pedestrian passes through, the terminal camera firstly obtains a target pedestrian image through an internal program of the terminal, and then uploads the target pedestrian image to the memory for storage through a wired network or a wireless network.
S102, inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, wherein the pedestrian attribute recognition model is generated based on a first data sample and a second data sample through training, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model;
wherein the target pedestrian image is based on one pedestrian image acquired in step S101. The pedestrian attribute identification model is a mathematical model capable of identifying the appearance characteristics of pedestrians. The mathematical model is created based on at least one of a Convolutional Neural Network (CNN) model, a Deep Neural Network (DNN) model, a Recurrent Neural Network (RNN) model, an embedding (embedding) model, a Long-Short Term Memory (LSTM) model, and a Gradient Boosting Decision Tree (GBDT) model. The style migration model is a mathematical model with the function of converting the attribute features of a first data sample into another similar data sample, and the model can be created and generated based on at least one of RNN, CNN, LSTM and the like. A style migration model refers to the content that can be captured from one image and combined with the style of another image.
Generally, the pedestrian attribute identification model is generated based on a first data sample and a second data sample, wherein the second data sample is generated by inputting the first data sample into a style transition model which is trained in advance, and the second data sample contains the characteristic attribute of the first data sample after being converted by the style transition model.
And S103, outputting each attribute value corresponding to the target pedestrian image.
The attribute values corresponding to the target pedestrian image comprise attribute characteristic values of the gender, the body orientation, the length of the hair style, whether the backpack is available or not, the color of clothes and the like of the pedestrian.
In a feasible implementation mode, firstly, a camera on a terminal monitors a road surface, when a pedestrian passes by, a body appearance image of the pedestrian is obtained through a terminal internal program, then the body appearance image is uploaded to a terminal internal memory through a wireless network or a wired network for storage, when the terminal monitors the pedestrian image, the terminal obtains a pre-trained pedestrian attribute recognition model through the internal program, then the pedestrian image is input into the pedestrian attribute recognition model for attribute recognition, and after the recognition is successful, body area attribute values of the pedestrian image are generated. And finally, the attribute value can be used for monitoring social security, recognizing human faces and the like.
For example, as shown in fig. 6, after the user appearance image is identified by the pedestrian attribute identification model, the appearance attribute values of the user are correspondingly generated, for example, a first parameter of 1 indicates that the gender of the user is female, a second parameter of 0 indicates that the body of the user is a side face, and a third parameter of 2 indicates that the user is long hair.
In the embodiment of the invention, a target pedestrian image is obtained firstly, then the target pedestrian image is input into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated by training based on a first data sample and a second data sample, the second data sample is generated by inputting the first data sample into a pre-trained style transition model, and finally, each attribute value corresponding to the target pedestrian image is output. Therefore, by adopting the embodiment of the invention, since the second data sample is generated by inputting the first data sample into the style transition model, after the pedestrian attribute identification model is trained by using the data sample with high similarity, each attribute value corresponding to the output pedestrian image can be more accurate when the pedestrian attribute identification model is used for pedestrian attribute identification.
Referring to fig. 2, a flow chart of a pedestrian attribute identification method according to an embodiment of the present invention is schematically shown. As shown in fig. 2, the method of an embodiment of the present invention may include the steps of:
s201, acquiring a first data sample and a target test data sample;
the data samples are data information sets which are formed by characters, words and sentences and have the functions of expressing the product performance, the functions, the structural principles and the size parameters of the data samples, the data information sets of the data samples are stored in a special data warehouse, and a database is formed, and the data samples are specifically a language text library in the embodiment. The electronic upgrading method is an electronic upgrading version of traditional paper sample data, can be transmitted through a network, is displayed in front of a user in a novel and visual mode, has a visual and friendly human-computer interaction interface, is rich in expressive force, is diversified in expression method, enables the query speed of the user to be faster, and is higher in efficiency of searching for the sample data.
Generally, collected data samples are also called data acquisition, and today in the rapid development of the internet industry, data collection is widely applied to the internet field, accurate selection of the data samples to be collected has a profound influence on products, if the collected data samples are not accurate enough, large deviation of test results can be caused, and inestimable loss is caused to the products. Therefore, it is necessary to accurately collect the sample data information.
In the embodiment of the present invention, the first data sample is a data sample already having pedestrian attribute labeling information, and each region attribute value in the sample image is labeled on the data sample. The target test data sample is a set of data samples having a different scene and a different style than the first data sample.
S202, creating a style migration model, inputting the first data sample and the target test data sample into the style migration model for training, and generating a trained style migration model;
in the style migration model training stage, a style migration model is created first, wherein the style migration model is a deep neural network model and is created based on at least one model of CNN (CNN), RNN (RNN) and LSTM (local Scale neural network) models.
For example, as shown in FIG. 3, the first data sample may be considered as data set A and the target test data sample may be considered as data set B. Firstly, creating a style migration algorithm, then inputting the data set A and the data set B into a created style migration algorithm model for training, and generating a data model with a style migration function after training, namely (style _ transfer).
S203, inputting the first sample data into the trained style migration model to generate a second data sample;
the trained style migration model is generated based on step S202, and then the first data sample is input into the trained style migration model to generate a second data sample.
For example, as shown in fig. 4, a first data sample, i.e., data set a, is input into a style migration model (style _ transfer), and then a data sample having the attribute features of data set B, i.e., data set a', is generated.
S204, creating a pedestrian attribute identification model, merging the first sample data and the second sample data, and inputting the merged data into the pedestrian attribute identification model to obtain each attribute value of the first sample data and each attribute value of the second sample data;
specifically, the specific creation of the pedestrian attribute identification model may refer to step S102, and is not described herein again. And after the creation is finished, inputting the first data sample and the second data sample with the characteristics of the first data sample into a pedestrian attribute recognition model for model training, and generating a mathematical model with the appearance attribute of the detected pedestrian after the training is finished.
For example, as shown in fig. 5, the first data sample is a data set a, the second data sample is a data set a ', the data set a and the data set a' are input into the created pedestrian attribute recognition algorithm model for training, and after the training is finished, the pedestrian attribute recognition model can be generated.
S206, when the loss value reaches a preset threshold value, generating a trained pedestrian attribute recognition model;
for example, as shown in fig. 7, the data sets a and a' are merged to be a final training set, and the merged picture is first sent to the CNN network structure according to the manner shown in fig. 7. The invention uses the structure of the resnet50 and modifies num _ output of the last layer of full connection into the number N of the pedestrian attribute categories which the algorithm needs to identify. And then performing loss calculation on the predicted label and the real label according to a cross entropy loss function, adding the N loss values for back propagation, and continuously updating the CNN network structure parameters by using a gradient descent method. And stopping training until loss converges or the maximum iteration times is reached, wherein the weight file of the CNN network structure is the algorithm model for identifying the pedestrian attributes. And when the loss value reaches a set threshold value, finishing training of the pedestrian attribute recognition model.
S207, acquiring a target pedestrian image;
specifically, refer to step S101, which is not described herein again.
S208, inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, wherein the pedestrian attribute recognition model is generated by training based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model
Specifically, refer to step S102, which is not described herein again.
And S209, outputting each attribute value corresponding to the target pedestrian image.
Specifically, refer to step S103, which is not described herein again.
In the embodiment of the invention, a target pedestrian image is obtained firstly, then the target pedestrian image is input into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated by training based on a first data sample and a second data sample, the second data sample is generated by inputting the first data sample into a pre-trained style transition model, and finally, each attribute value corresponding to the target pedestrian image is output. Therefore, by adopting the embodiment of the invention, since the second data sample is generated by inputting the first data sample into the style transition model, after the pedestrian attribute identification model is trained by using the data sample with high similarity, each attribute value corresponding to the output pedestrian image can be more accurate when the pedestrian attribute identification model is used for pedestrian attribute identification.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Referring to fig. 8, a schematic structural diagram of a pedestrian attribute identification apparatus according to an exemplary embodiment of the present invention is shown. The pedestrian attribute identification method device can be realized by software, hardware or a combination of the software and the hardware to form all or part of the terminal. The device 1 comprises an image acquisition module 10, an image input module 20 and an attribute value output module 30.
The image acquisition module 10 is used for acquiring a target pedestrian image;
an image input module 20, configured to input the target pedestrian image into a pre-trained pedestrian attribute recognition model, where the pedestrian attribute recognition model is generated based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model;
and an attribute value output module 30, configured to output each attribute value corresponding to the target pedestrian image.
Optionally, as shown in fig. 9, the apparatus 1 further includes:
a sample acquiring module 40 for acquiring a first data sample and a target test data sample;
and the first model generation module 50 is configured to create a style migration model, input the first data sample and the target test data sample into the style migration model for training, and generate a trained style migration model.
Optionally, as shown in fig. 9, the apparatus 1 further includes:
and a sample generating module 60, configured to input the first sample data into the trained style migration model to generate a second data sample.
Optionally, as shown in fig. 9, the apparatus 1 further includes:
a model creation module 70 for creating a pedestrian attribute identification model;
a loss value output module 80, configured to merge and input the first sample data and the second sample data into the pedestrian attribute identification model, and output a loss value of the model;
and the second model generation module 90 is configured to generate a trained pedestrian attribute identification model when the loss value reaches a preset threshold value.
It should be noted that, when the pedestrian attribute identification apparatus provided in the foregoing embodiment performs the method for identifying pedestrian attributes, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules, so as to complete all or part of the above described functions. In addition, the embodiment of the pedestrian attribute identification device and the embodiment of the pedestrian attribute identification method provided by the above embodiment belong to the same concept, and the detailed implementation process is shown in the embodiment of the method, which is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the embodiment of the invention, a target pedestrian image is obtained firstly, then the target pedestrian image is input into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated by training based on a first data sample and a second data sample, the second data sample is generated by inputting the first data sample into a pre-trained style transition model, and finally, each attribute value corresponding to the target pedestrian image is output. Therefore, by adopting the embodiment of the invention, since the second data sample is generated by inputting the first data sample into the style transition model, after the pedestrian attribute identification model is trained by using the data sample with high similarity, each attribute value corresponding to the output pedestrian image can be more accurate when the pedestrian attribute identification model is used for pedestrian attribute identification.
The present invention also provides a computer readable medium having stored thereon program instructions which, when executed by a processor, implement the pedestrian attribute identification method provided by the above-described method embodiments.
The present invention also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of pedestrian property identification as described in the various method embodiments above.
Fig. 10 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in fig. 10, the terminal 1000 can include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
Wherein a communication bus 1002 is used to enable connective communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 1001 may include one or more processing cores, among other things. The processor 1001 interfaces various components throughout the electronic device 1000 using various interfaces and lines to perform various functions of the electronic device 1000 and to process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005 and invoking data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 10, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a pedestrian property identification application program.
In the terminal 1000 shown in fig. 10, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to invoke the pedestrian attribute identification application stored in the memory 1005, and specifically perform the following operations:
acquiring a target pedestrian image;
inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, wherein the pedestrian attribute recognition model is generated based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model;
and outputting each attribute value corresponding to the target pedestrian image.
In one embodiment, the processor 1001 further performs the following operations before performing the acquiring of the target pedestrian image:
acquiring a first data sample and a target test data sample;
and creating a style migration model, inputting the first data sample and the target test data sample into the style migration model for training, and generating the trained style migration model.
In one embodiment, after the processor 1001 performs the training by inputting the first data sample and the target test data sample into the style migration model and generates a trained style migration model, the following operations are further performed:
and inputting the first sample data into the trained style migration model to generate a second data sample.
In one embodiment, after the processor 1001 performs the inputting of the first sample data into the trained style migration model to generate a second data sample, the processor further performs the following operations:
creating a pedestrian attribute identification model;
merging the first sample data and the second sample data, inputting the merged first sample data and second sample data into the pedestrian attribute identification model, and outputting a loss value of the model;
and when the loss value reaches a preset threshold value, generating a trained pedestrian attribute recognition model.
In the embodiment of the invention, a target pedestrian image is obtained firstly, then the target pedestrian image is input into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated by training based on a first data sample and a second data sample, the second data sample is generated by inputting the first data sample into a pre-trained style transition model, and finally, each attribute value corresponding to the target pedestrian image is output. Therefore, by adopting the embodiment of the invention, since the second data sample is generated by inputting the first data sample into the style transition model, after the pedestrian attribute identification model is trained by using the data sample with high similarity, each attribute value corresponding to the output pedestrian image can be more accurate when the pedestrian attribute identification model is used for pedestrian attribute identification.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, it should be understood that the disclosed methods, articles of manufacture (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
It should be understood that the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. The present invention is not limited to the procedures and structures that have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A pedestrian attribute identification method, the method comprising:
acquiring a target pedestrian image;
inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, wherein the pedestrian attribute recognition model is generated based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model;
and outputting each attribute value corresponding to the target pedestrian image.
2. The method of claim 1, wherein prior to said obtaining the target pedestrian image, further comprising:
acquiring a first data sample and a target test data sample;
and creating a style migration model, inputting the first data sample and the target test data sample into the style migration model for training, and generating the trained style migration model.
3. The method of claim 2, wherein after inputting the first data sample and the target test data sample into the style migration model for training and generating the trained style migration model, further comprising:
and inputting the first sample data into the trained style migration model to generate a second data sample.
4. The method of claim 3, wherein after inputting the first sample data into the trained style migration model to generate a second data sample, further comprising:
creating a pedestrian attribute identification model;
merging the first sample data and the second sample data, inputting the merged first sample data and second sample data into the pedestrian attribute identification model, and outputting a loss value of the model;
and when the loss value reaches a preset threshold value, generating a trained pedestrian attribute recognition model.
5. A pedestrian property identification apparatus, characterized in that the apparatus comprises:
the image acquisition module is used for acquiring a target pedestrian image;
the image input module is used for inputting the target pedestrian image into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated based on a first data sample and a second data sample, and the second data sample is generated by inputting the first data sample into a pre-trained style transition model;
and the attribute value output module is used for outputting each attribute value corresponding to the target pedestrian image.
6. The apparatus of claim 6, further comprising:
the system comprises a sample acquisition module, a data analysis module and a data analysis module, wherein the sample acquisition module is used for acquiring a first data sample and a target test data sample;
and the first model generation module is used for creating a style migration model, inputting the first data sample and the target test data sample into the style migration model for training, and generating a trained style migration model.
7. The apparatus of claim 7, further comprising:
and the sample generation module is used for inputting the first sample data into the trained style migration model to generate a second data sample.
8. The apparatus of claim 8, further comprising:
the model creating module is used for creating a pedestrian attribute identification model;
the loss value output module is used for merging and inputting the first sample data and the second sample data into the pedestrian attribute identification model and outputting a loss value of the model;
and the second model generation module is used for generating a trained pedestrian attribute recognition model when the loss value reaches a preset threshold value.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1 to 4.
10. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 4.
CN201911167625.6A 2019-11-25 2019-11-25 Pedestrian attribute identification method and device, storage medium and terminal Pending CN111191503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911167625.6A CN111191503A (en) 2019-11-25 2019-11-25 Pedestrian attribute identification method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911167625.6A CN111191503A (en) 2019-11-25 2019-11-25 Pedestrian attribute identification method and device, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN111191503A true CN111191503A (en) 2020-05-22

Family

ID=70709436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911167625.6A Pending CN111191503A (en) 2019-11-25 2019-11-25 Pedestrian attribute identification method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN111191503A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401343A (en) * 2020-06-04 2020-07-10 北京金山云网络技术有限公司 Method for identifying attributes of people in image and training method and device for identification model
CN112016490A (en) * 2020-08-28 2020-12-01 中国科学院重庆绿色智能技术研究院 Pedestrian attribute identification method based on generation countermeasure learning
CN113011377A (en) * 2021-04-06 2021-06-22 新疆爱华盈通信息技术有限公司 Pedestrian attribute identification method and device, electronic equipment and storage medium
CN113139005A (en) * 2021-04-22 2021-07-20 康键信息技术(深圳)有限公司 Same-person identification method based on same-person identification model and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960181A (en) * 2017-02-28 2017-07-18 中科唯实科技(北京)有限公司 A kind of pedestrian's attribute recognition approach based on RGBD data
CN110008842A (en) * 2019-03-09 2019-07-12 同济大学 A kind of pedestrian's recognition methods again for more losing Fusion Model based on depth
CN110135458A (en) * 2019-04-15 2019-08-16 深圳中兴网信科技有限公司 Image data set augmentation method, system, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960181A (en) * 2017-02-28 2017-07-18 中科唯实科技(北京)有限公司 A kind of pedestrian's attribute recognition approach based on RGBD data
CN110008842A (en) * 2019-03-09 2019-07-12 同济大学 A kind of pedestrian's recognition methods again for more losing Fusion Model based on depth
CN110135458A (en) * 2019-04-15 2019-08-16 深圳中兴网信科技有限公司 Image data set augmentation method, system, computer equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401343A (en) * 2020-06-04 2020-07-10 北京金山云网络技术有限公司 Method for identifying attributes of people in image and training method and device for identification model
CN111401343B (en) * 2020-06-04 2021-04-30 北京金山云网络技术有限公司 Method for identifying attributes of people in image and training method and device for identification model
CN112016490A (en) * 2020-08-28 2020-12-01 中国科学院重庆绿色智能技术研究院 Pedestrian attribute identification method based on generation countermeasure learning
CN112016490B (en) * 2020-08-28 2022-08-02 中国科学院重庆绿色智能技术研究院 Pedestrian attribute identification method based on generation countermeasure learning
CN113011377A (en) * 2021-04-06 2021-06-22 新疆爱华盈通信息技术有限公司 Pedestrian attribute identification method and device, electronic equipment and storage medium
CN113139005A (en) * 2021-04-22 2021-07-20 康键信息技术(深圳)有限公司 Same-person identification method based on same-person identification model and related equipment

Similar Documents

Publication Publication Date Title
WO2021238631A1 (en) Article information display method, apparatus and device and readable storage medium
CN111191503A (en) Pedestrian attribute identification method and device, storage medium and terminal
WO2023185785A1 (en) Image processing method, model training method, and related apparatuses
CN108280166B (en) Method and device for making expression, terminal and computer readable storage medium
CN107657056B (en) Method and device for displaying comment information based on artificial intelligence
CN113362263B (en) Method, apparatus, medium and program product for transforming an image of a virtual idol
CN110719525A (en) Bullet screen expression package generation method, electronic equipment and readable storage medium
CN112328823A (en) Training method and device for multi-label classification model, electronic equipment and storage medium
CN108304376B (en) Text vector determination method and device, storage medium and electronic device
JP2022088304A (en) Method for processing video, device, electronic device, medium, and computer program
CN114066718A (en) Image style migration method and device, storage medium and terminal
CN113408570A (en) Image category identification method and device based on model distillation, storage medium and terminal
CN116168119A (en) Image editing method, image editing device, electronic device, storage medium, and program product
CN107609487B (en) User head portrait generation method and device
CN116994021A (en) Image detection method, device, computer readable medium and electronic equipment
CN114529635A (en) Image generation method, device, storage medium and equipment
CN112738555B (en) Video processing method and device
CN107423441B (en) Picture association method and device and electronic equipment
CN117194625A (en) Intelligent dialogue method and device for digital person, electronic equipment and storage medium
CN116543798A (en) Emotion recognition method and device based on multiple classifiers, electronic equipment and medium
CN115098644B (en) Image and text matching method and device, electronic equipment and storage medium
CN116524475A (en) Method and device for generating recommended dressing, vehicle, electronic equipment and storage medium
CN113761281B (en) Virtual resource processing method, device, medium and electronic equipment
CN112862073B (en) Compressed data analysis method and device, storage medium and terminal
CN112560848B (en) Training method and device for POI (Point of interest) pre-training model and electronic equipment

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 101, building 1, block C, Qianjiang Century Park, ningwei street, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Weiming Information Technology Co.,Ltd.

Applicant after: Institute of Information Technology, Zhejiang Peking University

Address before: Room 288-1, 857 Xinbei Road, Ningwei Town, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant before: Institute of Information Technology, Zhejiang Peking University

Applicant before: Hangzhou Weiming Information Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200522