Movatterモバイル変換


[0]ホーム

URL:


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

A pedestrian attribute identification method, device, storage medium and terminal
Download PDF

Info

Publication number
CN111191503A
CN111191503ACN201911167625.6ACN201911167625ACN111191503ACN 111191503 ACN111191503 ACN 111191503ACN 201911167625 ACN201911167625 ACN 201911167625ACN 111191503 ACN111191503 ACN 111191503A
Authority
CN
China
Prior art keywords
model
data sample
pedestrian
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 LtdfiledCriticalAdvanced Institute of Information Technology AIIT of Peking University
Priority to CN201911167625.6ApriorityCriticalpatent/CN111191503A/en
Publication of CN111191503ApublicationCriticalpatent/CN111191503A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种行人属性识别方法、装置、存储介质及终端,所述方法包括:获取目标行人图像;将所述目标行人图像输入至预先训练的行人属性识别模型中,所述行人属性识别模型是基于第一数据样本和第二数据样本训练生成,所述第二数据样本是将所述第一数据样本输入到预先训练的风格迁移模型中所生成;输出所述目标行人图像对应的各属性值。因此,采用本发明实施例,由于第二数据样本是将第一数据样本输入至风格迁移模型中生成的,利用相似度高的数据样本对行人属性识别模型进行训练后,当使用行人属性识别模型进行行人属性识别时输出的行人图像对应的各属性值将会更加准确。

Figure 201911167625

The invention discloses a pedestrian attribute identification method, device, storage medium and terminal. The method includes: acquiring a target pedestrian image; inputting the target pedestrian image into a pre-trained pedestrian attribute identification model, and the pedestrian attribute identification The 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 transfer model; output each corresponding to the target pedestrian image. property value. Therefore, using the embodiment of the present invention, since the second data sample is generated by inputting the first data sample into the style transfer model, after the pedestrian attribute recognition model is trained by using the data samples with high similarity, when the pedestrian attribute recognition model is used The attribute values corresponding to the pedestrian image output during pedestrian attribute recognition will be more accurate.

Figure 201911167625

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. Thedevice 1 comprises animage acquisition module 10, animage input module 20 and an attributevalue output module 30.
Theimage acquisition module 10 is used for acquiring a target pedestrian image;
animage 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 attributevalue output module 30, configured to output each attribute value corresponding to the target pedestrian image.
Optionally, as shown in fig. 9, theapparatus 1 further includes:
asample acquiring module 40 for acquiring a first data sample and a target test data sample;
and the firstmodel 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, theapparatus 1 further includes:
and asample 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, theapparatus 1 further includes:
amodel creation module 70 for creating a pedestrian attribute identification model;
a lossvalue 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 secondmodel 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 oneprocessor 1001, at least onenetwork interface 1004, auser interface 1003,memory 1005, at least onecommunication bus 1002.
Wherein acommunication bus 1002 is used to enable connective communication between these components.
Theuser interface 1003 may include a Display screen (Display) and a Camera (Camera), and theoptional user interface 1003 may also include a standard wired interface and a wireless interface.
Thenetwork 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. Theprocessor 1001 interfaces various components throughout theelectronic device 1000 using various interfaces and lines to perform various functions of theelectronic device 1000 and to process data by executing or executing instructions, programs, code sets, or instruction sets stored in thememory 1005 and invoking data stored in thememory 1005. Alternatively, theprocessor 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). Theprocessor 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 theprocessor 1001, but may be implemented by a single chip.
TheMemory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, thememory 1005 includes a non-transitory computer-readable medium. Thememory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. Thememory 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. Thememory 1005 may optionally be at least one memory device located remotely from theprocessor 1001. As shown in fig. 10, amemory 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, theuser interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and theprocessor 1001 may be configured to invoke the pedestrian attribute identification application stored in thememory 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, theprocessor 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 theprocessor 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 theprocessor 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)

Translated fromChinese
1.一种行人属性识别方法,其特征在于,所述方法包括:1. a pedestrian attribute identification method, is characterized in that, described method comprises:获取目标行人图像;Get the target pedestrian image;将所述目标行人图像输入至预先训练的行人属性识别模型中,所述行人属性识别模型是基于第一数据样本和第二数据样本训练生成,所述第二数据样本是将所述第一数据样本输入到预先训练的风格迁移模型中所生成;The target pedestrian image is input into a pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated based on the training of a first data sample and a second data sample, and the second data sample is the first data sample. The samples are generated by inputting the pre-trained style transfer model;输出所述目标行人图像对应的各属性值。Each attribute value corresponding to the target pedestrian image is output.2.根据权利要求1所述的方法,其特征在于,所述获取目标行人图像之前,还包括:2. The method according to claim 1, wherein before acquiring the target pedestrian image, the method further comprises:获取第一数据样本和目标测试数据样本;Obtain the first data sample and the target test data sample;创建风格迁移模型,将所述第一数据样本和目标测试数据样本输入至所述风格迁移模型中进行训练,生成训练完成的风格迁移模型。A style transfer model is created, the first data sample and the target test data sample are input into the style transfer model for training, and a trained style transfer model is generated.3.根据权利要求2所述的方法,其特征在于,所述将所述第一数据样本和目标测试数据样本输入至所述风格迁移模型中进行训练,生成训练完成的风格迁移模型之后,还包括:3. The method according to claim 2, wherein the first data sample and the target test data sample are input into the style transfer model for training, and after the style transfer model after the training is generated, further include:将所述第一样本数据输入至所述训练完成的风格迁移模型中生成第二数据样本。Inputting the first sample data into the trained style transfer model to generate a second data sample.4.根据权利要求3所述的方法,其特征在于,所述将所述第一样本数据输入至所述训练完成的风格迁移模型中生成第二数据样本之后,还包括:4. The method according to claim 3, characterized in that, after the inputting the first sample data into the trained style transfer model to generate the second data sample, the method further comprises:创建行人属性识别模型;Create a pedestrian attribute recognition model;将所述第一样本数据和所述第二样本数据合并后输入至所述行人属性识别模型中,输出所述模型的损失值;The first sample data and the second sample data are combined and input into the pedestrian attribute recognition model, and the loss value of the model is output;当所述损失值达到预设阈值时,生成训练完成的行人属性识别模型。When the loss value reaches a preset threshold, a trained pedestrian attribute recognition model is generated.5.一种行人属性识别装置,其特征在于,所述装置包括:5. A pedestrian attribute identification device, wherein the device comprises:图像获取模块,用于获取目标行人图像;The image acquisition module is used to acquire the target pedestrian image;图像输入模块,用于将所述目标行人图像输入至预先训练的行人属性识别模型中,所述行人属性识别模型是基于第一数据样本和第二数据样本训练生成,所述第二数据样本是将所述第一数据样本输入到预先训练的风格迁移模型中所生成;The image input module is used to input the target pedestrian image into the pre-trained pedestrian attribute recognition model, the pedestrian attribute recognition model is generated based on the training of the first data sample and the second data sample, and the second data sample is Generated by inputting the first data sample into a pre-trained style transfer model;属性值输出模块,用于输出所述目标行人图像对应的各属性值。The attribute value output module is used for outputting each attribute value corresponding to the target pedestrian image.6.根据权利要求6所述的装置,其特征在于,所述装置还包括:6. The apparatus according to claim 6, wherein the apparatus further comprises:样本获取模块,用于获取第一数据样本和目标测试数据样本;a sample acquisition module, used to acquire the first data sample and the target test data sample;第一模型生成模块,用于创建风格迁移模型,将所述第一数据样本和目标测试数据样本输入至所述风格迁移模型中进行训练,生成训练完成的风格迁移模型。The first model generation module is used to create a style transfer model, input the first data sample and the target test data sample into the style transfer model for training, and generate a trained style transfer model.7.根据权利要求7所述的装置,其特征在于,所述装置还包括:7. The apparatus according to claim 7, wherein the apparatus further comprises:样本生成模块,用于将所述第一样本数据输入至所述训练完成的风格迁移模型中生成第二数据样本。A sample generation module, configured to input the first sample data into the trained style transfer model to generate a second data sample.8.根据权利要求8所述的装置,其特征在于,所述装置还包括:8. The apparatus according to claim 8, wherein the apparatus further comprises:模型创建模块,用于创建行人属性识别模型;The model creation module is used to create a pedestrian attribute recognition model;损失值输出模块,用于将所述第一样本数据和所述第二样本数据合并输入至所述行人属性识别模型中,输出所述模型的损失值;a loss value output module, configured to combine the first sample data and the second sample data into the pedestrian attribute recognition model, and output the loss value of the model;第二模型生成模块,用于当所述损失值达到预设阈值时,生成训练完成的行人属性识别模型。The second model generation module is configured to generate a trained pedestrian attribute recognition model when the loss value reaches a preset threshold.9.一种计算机存储介质,其特征在于,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行如权利要求1~4任意一项的方法步骤。9. A computer storage medium, characterized in that the computer storage medium stores a plurality of instructions, the instructions are suitable for being loaded by a processor and performing the method steps of any one of claims 1-4.10.一种终端,其特征在于,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行如权利要求1~4任意一项的方法步骤。10. A terminal, comprising: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute any one of claims 1 to 4 method steps.
CN201911167625.6A2019-11-252019-11-25 A pedestrian attribute identification method, device, storage medium and terminalPendingCN111191503A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201911167625.6ACN111191503A (en)2019-11-252019-11-25 A pedestrian attribute identification method, device, storage medium and terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201911167625.6ACN111191503A (en)2019-11-252019-11-25 A pedestrian attribute identification method, device, storage medium and terminal

Publications (1)

Publication NumberPublication Date
CN111191503Atrue CN111191503A (en)2020-05-22

Family

ID=70709436

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201911167625.6APendingCN111191503A (en)2019-11-252019-11-25 A pedestrian attribute identification method, device, storage medium and terminal

Country Status (1)

CountryLink
CN (1)CN111191503A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111401343A (en)*2020-06-042020-07-10北京金山云网络技术有限公司Method for identifying attributes of people in image and training method and device for identification model
CN112016490A (en)*2020-08-282020-12-01中国科学院重庆绿色智能技术研究院Pedestrian attribute identification method based on generation countermeasure learning
CN112257548A (en)*2020-10-192021-01-22戴姆勒股份公司Method and apparatus for generating pedestrian image and storage medium
CN113011377A (en)*2021-04-062021-06-22新疆爱华盈通信息技术有限公司Pedestrian attribute identification method and device, electronic equipment and storage medium
CN113139005A (en)*2021-04-222021-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 numberPriority datePublication dateAssigneeTitle
CN106960181A (en)*2017-02-282017-07-18中科唯实科技(北京)有限公司A kind of pedestrian's attribute recognition approach based on RGBD data
CN110008842A (en)*2019-03-092019-07-12同济大学A kind of pedestrian's recognition methods again for more losing Fusion Model based on depth
CN110135458A (en)*2019-04-152019-08-16深圳中兴网信科技有限公司Image data set augmentation method, system, computer equipment and storage medium

Patent Citations (3)

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

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111401343A (en)*2020-06-042020-07-10北京金山云网络技术有限公司Method for identifying attributes of people in image and training method and device for identification model
CN111401343B (en)*2020-06-042021-04-30北京金山云网络技术有限公司Method for identifying attributes of people in image and training method and device for identification model
CN112016490A (en)*2020-08-282020-12-01中国科学院重庆绿色智能技术研究院Pedestrian attribute identification method based on generation countermeasure learning
CN112016490B (en)*2020-08-282022-08-02中国科学院重庆绿色智能技术研究院Pedestrian attribute identification method based on generation countermeasure learning
CN112257548A (en)*2020-10-192021-01-22戴姆勒股份公司Method and apparatus for generating pedestrian image and storage medium
CN113011377A (en)*2021-04-062021-06-22新疆爱华盈通信息技术有限公司Pedestrian attribute identification method and device, electronic equipment and storage medium
CN113139005A (en)*2021-04-222021-07-20康键信息技术(深圳)有限公司Same-person identification method based on same-person identification model and related equipment

Similar Documents

PublicationPublication DateTitle
CN111191503A (en) A pedestrian attribute identification method, device, storage medium and terminal
CN107169430B (en) Reading environment sound effect enhancement system and method based on image processing semantic analysis
WO2023185785A1 (en)Image processing method, model training method, and related apparatuses
CN113362263B (en)Method, apparatus, medium and program product for transforming an image of a virtual idol
CN110599393B (en)Picture style conversion method, device, equipment and computer readable storage medium
CN115049799B (en)Method and device for generating 3D model and virtual image
CN108280166B (en)Method and device for making expression, terminal and computer readable storage medium
CN114360018B (en)Rendering method and device of three-dimensional facial expression, storage medium and electronic device
CN110288513B (en) Method, device, device and storage medium for changing human face attributes
TW201937344A (en)Smart robot and man-machine interaction method
CN107169002A (en)A kind of personalized interface method for pushing and device recognized based on face
CN105404878A (en) A photo classification method and device
CN111539897A (en) Method and apparatus for generating an image transformation model
US20200176019A1 (en)Method and system for recognizing emotion during call and utilizing recognized emotion
CN116994021A (en) Image detection methods, devices, computer-readable media and electronic equipment
CN115130493A (en)Face deformation recommendation method, device, equipment and medium based on image recognition
KR102549937B1 (en)Apparatus and method for providing model for analysis of user's interior style based on text data of social network service
CN116894881A (en)Image generation method, device, electronic equipment and storage medium
CN111062207A (en)Expression image processing method and device, computer storage medium and electronic equipment
CN117635741A (en)Image generation method and device
CN107609487B (en)User head portrait generation method and device
KR102549939B1 (en)Server, user terminal and method for providing model for analysis of user's interior style based on sns text
CN113515702A (en) Content recommendation method, model training method, apparatus, equipment and storage medium
CN117354584B (en)Virtual object driving method, device, electronic equipment and storage medium
CN113761281A (en)Virtual resource processing method, device, medium and electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change 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.

CB02Change of applicant information
RJ01Rejection of invention patent application after publication

Application publication date:20200522

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp