CN109241934A - Method and apparatus for generating information - Google Patents

Method and apparatus for generating information Download PDF

Info

Publication number
CN109241934A
CN109241934A CN201811110424.8A CN201811110424A CN109241934A CN 109241934 A CN109241934 A CN 109241934A CN 201811110424 A CN201811110424 A CN 201811110424A CN 109241934 A CN109241934 A CN 109241934A
Authority
CN
China
Prior art keywords
image
people
human body
attribute information
facial
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
CN201811110424.8A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201811110424.8A priority Critical patent/CN109241934A/en
Publication of CN109241934A publication Critical patent/CN109241934A/en
Pending legal-status Critical Current

Links

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
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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/103Static body considered as a whole, e.g. static pedestrian or occupant recognition
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the present application discloses the method and apparatus for generating information.One specific embodiment of this method includes: to obtain image to be processed;It determines people's image that image to be processed includes, obtains people's image collection;The human body image that the people's image includes is extracted in response to determining that the people's image does not include facial image for people's image in people's image collection;According to the human body image of extraction, the attribute information for the people that the people's image is shown is determined.The embodiment is realized when people's image that image to be processed includes does not include facial image, the human body image that can include according to people's image determines the attribute information for the people that people's image is shown, and then helps to be promoted the flexibility and robustness of the image procossing to people is related to.

Description

Method and apparatus for generating information
Technical field
The invention relates to field of computer technology, and in particular to the method and apparatus for generating information.
Background technique
In field of image processing, the image recognition technology of people is typically based on the image recognition of face, root for identification The relevant information of the people shown in image is obtained according to the feature of face.
But the face of the people in some cases, shown in image is blocked or relatively obscures, particularly, in some images Human body is only shown, without there is corresponding face.Identification and processing for this kind of images are also field of image processing One of the problem of requiring study.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for generating information.
In a first aspect, the embodiment of the present application provides a kind of method for generating information, this method comprises: obtaining wait locate Manage image;It determines people's image that image to be processed includes, obtains people's image collection;For people's image in people's image collection, ring Facial image should not be included in determining the people's image, extract the human body image that the people's image includes;According to the human body image of extraction, Determine the attribute information for the people that the people's image is shown.
In some embodiments, the above method further include: for people's image in people's image collection, in response to determining the people Image includes facial image and human body image, and the facial image in response to determining that the people's image includes does not meet preset condition, Extract the human body image that the people's image includes;According to the human body image of extraction, the attribute information for the people that the people's image is shown is determined.
In some embodiments, the above method further include: for people's image in people's image collection, in response to determining the people Image includes facial image, and in response to determining that the facial image that the people's image includes meets preset condition, extracts the people's image The facial image for including;According to the facial image of extraction, the attribute information for the people that the people's image is shown is determined.
In some embodiments, attribute information includes at least one of the following: age information, gender information.
In some embodiments, preset condition includes at least one of the following: that the resolution ratio of facial image is greater than preset point Resolution threshold value, the angle obtained to facial image progress human face modeling include less than preset angle threshold, facial image The gross area in face image region be greater than the gross area in the facial image non-face image region that includes.
In some embodiments, the above-mentioned human body image according to extraction, determines the attribute information for the people that the people's image is shown, It include: that the human body image of extraction is input to human body attribute Recognition Model trained in advance, the human body image extracted is shown Human body attribute information, wherein the human body that human body attribute Recognition Model is used to characterize human body image and human body image is shown The corresponding relationship of attribute information;The attribute information of obtained human body is determined as to the attribute information for the people that the people's image is shown.
In some embodiments, training obtains human body attribute Recognition Model as follows: training sample set is obtained, In, training sample includes the attribute information for the human body that human body image and human body image are shown;Determine initial human body Attribute Recognition mould Type;Using the method for machine learning, the human body image in the training sample that training sample is concentrated is known as initial human body attribute The input of other model, attribute information corresponding with the human body image of input is defeated as the expectation of initial human body attribute Recognition Model Out, training obtains above-mentioned human body attribute Recognition Model.
Second aspect, the embodiment of the present application provide it is a kind of for generating the device of information, the device include: obtain it is single Member is configured to obtain image to be processed;People's image determination unit is configured to determine people's image that image to be processed includes, Obtain people's image collection;Attribute information determination unit is configured to for people's image in people's image collection, should in response to determining People's image does not include facial image, extracts the human body image that the people's image includes;According to the human body image of extraction, determine that the people schemes The attribute information of people as shown in.
In some embodiments, above-mentioned attribute information determination unit is further configured to: in people's image collection People's image, in response to determining that the people's image includes facial image and human body image, and the people for including in response to determining the people's image Face image does not meet preset condition, extracts the human body image that the people's image includes;According to the human body image of extraction, determine that the people schemes The attribute information of people as shown in.
In some embodiments, above-mentioned attribute information determination unit is further configured to: in people's image collection People's image, in response to determining that the people's image includes facial image, and the facial image in response to determining that the people's image includes meets Preset condition extracts the facial image that the people's image includes;According to the facial image of extraction, determine the people's that the people's image is shown Attribute information.
In some embodiments, above-mentioned attribute information includes at least one of the following: age information, gender information.
In some embodiments, it is default to include at least one of the following: that the resolution ratio of facial image is greater than for above-mentioned preset condition Resolution threshold, carry out the obtained angle of human face modeling to facial image and be less than preset angle threshold, facial image The gross area in the face image region for including is greater than the gross area in the non-face image region that facial image includes.
In some embodiments, above-mentioned attribute information determination unit is further configured to: the human body image of extraction is defeated Enter to human body attribute Recognition Model trained in advance, the attribute information for the human body that the human body image extracted is shown, wherein people Body attribute Recognition Model is used to characterize the corresponding relationship of the attribute information for the human body that human body image and human body image are shown;It will obtain The attribute information of human body be determined as the attribute information of the people that the people's image is shown.
In some embodiments, training obtains human body attribute Recognition Model as follows: training sample set is obtained, In, training sample includes the attribute information for the human body that human body image and human body image are shown;Determine initial human body Attribute Recognition mould Type;Using the method for machine learning, the human body image in the training sample that training sample is concentrated is known as initial human body attribute The input of other model, attribute information corresponding with the human body image of input is defeated as the expectation of initial human body attribute Recognition Model Out, training obtains above-mentioned human body attribute Recognition Model.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, which includes: one or more processing Device;Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, make Obtain method of the one or more processors realization as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should The method as described in implementation any in first aspect is realized when computer program is executed by processor.
Method and apparatus provided by the embodiments of the present application for generating information, by obtaining image to be processed;Determine to People's image that processing image includes, obtains people's image collection;For people's image in people's image collection, in response to determining the people's figure As not including facial image, the human body image that the people's image includes is extracted;According to the human body image of extraction, determine that the people's image is aobvious The attribute information of the people shown, thus realize when people's image that image to be processed includes does not include facial image, it can basis The human body image that people's image includes determines the attribute information for the people that people's image is shown, and then helps to be promoted to being related to the image of people The flexibility and robustness of processing.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for generating information of the application;
Fig. 3 is the flow chart according to another embodiment of the method for generating information of the application;
Fig. 4 is the schematic diagram according to an application scenarios of the method for generating information of the embodiment of the present application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for generating information of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for generating information of the application or the implementation of the device for generating information The exemplary architecture 100 of example.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
Terminal device 101,102,103 is interacted by network 104 with server 105, to receive or send message etc..Terminal Various client applications can be installed in equipment 101,102,103.For example, the application of camera shooting class, image processing class application etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, it can be the various electronic equipments for supporting image transmitting and image storage, including but not limited to smart phone, plate electricity Brain, E-book reader, pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is software When, it may be mounted in above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as mentioning in it For the multiple softwares or software module of Distributed Services), single software or software module also may be implemented into.It does not do herein specific It limits.
Server 105 can be to provide the server of various services, for example, terminal device 101,102,103 send to The image processing server that processing image is handled.Image processing server can carry out figure to the image to be processed received As the processing such as analysis and identification.Further, image processing server processing result can also be fed back to terminal device 101, 102、103。
It should be noted that above-mentioned image to be processed can also be stored directly in the local of server 105, server 105 The local image to be processed stored can directly be extracted and handled, at this point it is possible to there is no terminal device 101,102, 103 and network 104.
It should be noted that the method provided by the embodiment of the present application for generating information is generally held by server 105 Row, correspondingly, the device for generating information is generally positioned in server 105.
It may also be noted that can also be equipped with image processing class application in terminal device 101,102,103, terminal is set Standby 101,102,103 can also be based on image processing class using handling facial image, at this point, the side for handling image Method can also be executed by terminal device 101,102,103, and correspondingly, the device for handling image also can be set to be set in terminal In standby 101,102,103.At this point, server 105 and network 104 can be not present in exemplary system architecture 100.
It should be noted that server can be hardware, it is also possible to software.When server is hardware, may be implemented At the distributed server cluster that multiple servers form, individual server also may be implemented into.It, can when server is software It, can also be with to be implemented as multiple softwares or software module (such as providing multiple softwares of Distributed Services or software module) It is implemented as single software or software module.It is not specifically limited herein.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, it illustrates the processes according to one embodiment of the method for generating information of the application 200.This be used for generate information method the following steps are included:
Step 201, image to be processed is obtained.
It in the present embodiment, can be first for generating the executing subject (server 105 as shown in Figure 1) of the method for information In the way of wired connection or wireless connection from local or other storage equipment (terminal device as shown in Figure 1 101,102, 103) image to be processed is obtained.
Step 202, it determines people's image that image to be processed includes, obtains people's image collection.
In the present embodiment, the various image-recognizing methods of field of image processing be can use to determine image packet to be processed The people's image contained, to obtain people's image collection.Wherein, people's image can refer to the image of display someone.Specifically, people's image can be with It shows the entirety of people, can also only show the part of people.
Specifically, can use existing various pedestrian detections method (method such as based on global characteristics, based on human body The method etc. at position) determine each personal images for including in image to be processed.Wherein, pedestrian detection has been research extensively at present With the well-known technique of application, details are not described herein.
Step 203, it is mentioned for people's image in people's image collection in response to determining that the people's image does not include facial image The human body image for taking the people's image to include, and according to the human body image of extraction, determine the attribute letter for the people that the people's image is shown Breath.
In the present embodiment, the method that can use existing various Face datections judges each in people's image collection one by one It whether include facial image in personal images.Wherein, people can be divided into face and human body two parts according to position.Accordingly, People's image can also be decoupled according to position is divided into facial image and human body image.It should be appreciated that face can also be further The parts such as eye, nose, mouth are divided into, human body can also be further divided into neck, trunk, four limbs etc., and four limbs can also further be drawn It is divided into hand, foot etc..Accordingly, people's image can also split into multiclass image according to the position of the people of display.
In the present embodiment, for people's image not comprising facial image, the human figure that the people's image includes can be extracted As and based on human body image determines the attribute information of people that people's image is shown.Wherein, the attribute of people can refer to either people The attribute in face.Attribute information can be used to indicate that the various forms of information of attribute.For example, the attribute information of people includes but not It is limited to age information, gender information, ethnic information, height information, clothes colouring information, body orientation information etc..
It specifically, can be according to actual application demand from the people's image for people's image not comprising facial image Extract human body image.For example, the people's image directly can be determined as human body image.In another example can also according to demand, into one The image-region that step detected from the people's image and extracted the part (such as extremity portion) for the human body that display the people's image is shown is made For human body image.Later, human body image can be handled, to determine the attribute information of people that the people's image is shown.
It is alternatively possible to be known using some human body attribute recognition approaches of open source to the human body that human body image is shown Not, to obtain corresponding attribute information.It should be appreciated that the difference of the attribute information obtained is wanted according to actual needs, it is right The human body attribution method answered can also be different.
It is alternatively possible to which the human body image of extraction to be input to human body attribute Recognition Model trained in advance, extracted The attribute information of human body that shows of human body image, and then the attribute information of obtained human body can be determined as to corresponding people's figure The attribute information of people as shown in.Wherein, human body attribute Recognition Model can be used for characterizing human body image and human body image is shown Human body attribute information corresponding relationship.
Specifically, trained in advance in several ways human body attribute Recognition Model can be obtained.
It is alternatively possible to obtain human body attribute Recognition Model by following step training:
Step 1 obtains training sample set.Wherein, training sample may include the people that human body image and human body image are shown The attribute information of body.It, can be by manually marking the corresponding attribute information of each human body image in practice.
Step 2 determines initial human body attribute Recognition Model.Wherein it is determined that initial human body attribute Recognition Model can be respectively The artificial neural network unbred or that training is not completed of seed type, such as deep learning model.Human body Attribute Recognition mould Type is also possible to the model being combined to artificial neural network a variety of unbred or that training is not completed.For example, Human body attribute Recognition Model can be to unbred convolutional neural networks, unbred Recognition with Recurrent Neural Network and without instruction The model that experienced full articulamentum is combined.
Optionally, technical staff can according to demand, determine network parameter (such as need include which layer, every layer of the number of plies, The size etc. of convolution kernel), then construct initial human body attribute Recognition Model.
Step 3, using the method for machine learning, the human body image in training sample that training sample is concentrated is as just The input of beginning human body attribute Recognition Model, using attribute information corresponding with the human body image of input as initial human body Attribute Recognition The desired output of model, training obtain human body attribute Recognition Model.
Specifically, initial human body attribute Recognition Model can be trained, instructed based on preset loss function Practice the human body attribute Recognition Model completed.
Wherein, the value of loss function can be used to indicate the reality output and training sample of initial human body attribute Recognition Model In attribute information between difference degree.It is then possible to which the value based on loss function, is adjusted just using the method for backpropagation The parameter of beginning human body attribute Recognition Model, and in the case where meeting preset trained termination condition, terminate training.Training is completed Afterwards, the initial human body attribute Recognition Model that training is completed can be determined as above-mentioned human body attribute Recognition Model.
Preset trained termination condition can include but is not limited at least one of following: the training time be more than preset duration, Frequency of training is more than preset times, the value of loss function less than default discrepancy threshold etc..
Optionally, human body attribute Recognition Model can also be obtained by the training of following step:
Step 1 obtains training sample set.Wherein, training sample includes human body image and the corresponding attribute letter of human body image Breath.
Step 2 determines initial model.Wherein, initial model may include initial pictures processing model, the inspection of initial trunk Survey model, initial four limbs detection model, initial attribute information output layer.
Initial pictures processing model can be used for obtaining the corresponding trunk image of human body image and four limbs according to human body image Image.Wherein, trunk image can refer to that the human body image for only showing trunk, four limbs image can refer to the human figure for only showing four limbs Picture.
Specifically, initial pictures processing model can by by human body image in addition to display trunk image-region other than Other image-regions in pixel all use color of object (such as white) covering, so that it is corresponding to obtain human body image Trunk image.Using similar method, the also corresponding four limbs image of available human body image.
The trunk image of initial pictures processing model output can be used as the input of initial trunk detection model, trunk detection Model can export trunk testing result information according to the trunk image of input.Wherein, trunk testing result information can be used for Indicate the corresponding attribute information of trunk that trunk image is shown.
The four limbs image of initial pictures processing model output can be used as the input of initial four limbs detection model, four limbs detection Model can export four limbs testing result information according to the four limbs image of input.Wherein, four limbs testing result information can be used for Indicate the corresponding attribute information of four limbs that four limbs image is shown.
The output of trunk detection model and the output of four limbs detection model can be used as the defeated of initial attribute information output layer Enter, initial attribute information output layer can export human body according to the trunk testing result information and four limbs testing result information of input The corresponding attribute information of image.
Wherein, initial pictures handle model, initial trunk detection model, initial four limbs detection model, initial attribute information Output layer can be based on existing some network models (such as convolutional neural networks), and adjustment obtains according to actual needs.
Step 3, using the method for machine learning, the human body image in training sample that training sample is concentrated is as just The input of beginning image processing model is instructed using attribute information corresponding with the human body image of input as desired output Practice the initial model completed, and the initial model that training is completed is determined as human body attribute Recognition Model.
The method provided by the above embodiment of the application is schemed by analyzing people's image in image to be processed in people When as not including facial image, according to comprising human body image further determine that the attribute information of people that people's image is shown, thus The diversity and flexibility for promoting the mode to the attribute information for obtaining the people that image to be processed is shown, avoid not wrapping in people's image , there is the case where can not handling in when containing facial image.
With further reference to Fig. 3, it illustrates the processes 300 of another embodiment of the method for generating information.The use In the process 300 for the method for generating information, comprising the following steps:
Step 301, image to be processed is obtained.
Step 302, it determines people's image that image to be processed includes, obtains people's image collection.
The specific implementation procedure of above-mentioned steps 301 and 302 can refer to step 201 in Fig. 2 corresponding embodiment and 202 Related description, details are not described herein.
Step 303, for people's image in people's image collection, determine whether the people's image includes facial image.If the people Image includes facial image, then executes following step 3031, if not including facial image in the people's image, executes following step 3032。
Step 3031, determine whether facial image meets preset condition.If facial image meets preset condition, under executing Step 30311 is stated, if facial image does not meet preset condition, executes following step 30312.
In this step, preset condition can be as technical staff previously according to set by application demand.Preset condition May include at least one of following: the resolution ratio of facial image is greater than preset resolution threshold, carries out face to facial image The angle that Attitude estimation obtains is less than preset angle threshold, the gross area in the face image region that facial image includes is greater than people The gross area in the non-face image region that face image includes.
Specifically, when the resolution ratio of facial image is too small, since image is relatively fuzzyyer, meeting large effect is based on The accuracy of the result of the Attribute Recognition of face.Similarly, the angle mistake that human face modeling obtains is being carried out to facial image When big, that is, show that the face that facial image is shown may be the face (such as part side face) with deflection, at this point, due to energy The feature for accessing face is less, and therefore, the accuracy of the result of the Attribute Recognition based on face also will be greatly reduced.It is similar Ground, the gross area in the face image region that facial image includes are less than total face in the non-face image region that facial image includes When product, that is, show that the face that facial image is shown largely is blocked (such as mask, glasses, hair), at this point, due to that can obtain Feature to face is also less, and therefore, the accuracy of the result of the Attribute Recognition based on face also will be greatly reduced.
Step 30311, the facial image that the people's image includes is extracted, and according to the facial image of extraction, determines the people The attribute information for the people that image is shown.
In this step, it can use existing face character recognizer to handle the facial image of extraction, with Obtain the attribute information for the people that corresponding people's image is shown.Attribute Recognition based on face has been research and application extensively at present Well-known technique, details are not described herein.
Step 30312, include human body image in response to determining the people's image, extract the human body image that the people's image includes, And the human body image according to extraction, determine the attribute information for the people that the people's image is shown.
In this step, about the human body image according to extraction, the tool of the attribute information for the people that the people's image is shown is determined The implementation procedure of body can refer to the related description of the step 203 in Fig. 2 corresponding embodiment, and details are not described herein.
Step 3032, the human body image that the people's image includes is extracted, and according to the human body image of extraction, determines that the people schemes The attribute information of people as shown in.
The specific implementation procedure of this step 3032 can refer to the related description of the step 203 in Fig. 2 corresponding embodiment, This is repeated no more.
With continued reference to the signal that Fig. 4, Fig. 4 are according to the application scenarios of the method for generating information of the present embodiment Figure.In the application scenarios of Fig. 4, above-mentioned executing subject can obtain image 401 to be processed first.It later, can be to be processed Image 401 carries out pedestrian detection and extracts the people that image 401 to be processed is shown, obtains people's image collection 402.Specifically, people schemes It includes three personal images that image set, which closes 402, is respectively people's image 4021, people's image 4022, people's image 4023.It later, can be to people Each personal images in image collection 402 are successively handled.
Face datection is carried out for people's image 4021, testing result shows that people's image 4021 shows face and display face The gross area in the image-region face image region that includes be greater than the gross area in non-face image region and therefore can extract The image-region for the face that people's image 4021 is shown is right to people's image 4021 as the corresponding facial image 403 of people's image 4021 The facial image 403 answered carries out face character identification, obtains 01 (such as figure label of attribute information of the people of the display of people's image 4021 Shown in 404).
Face datection is carried out for people's image 4022, testing result shows that people's image 4022 shows face and display face The gross area in the image-region face image region (as shown in the figure only have ear) that includes be less than non-face image region Therefore the gross area can extract the corresponding human body image 405 of people's image 4022, to the corresponding human body image 405 of people's image 4022 It carries out human body Attribute Recognition, obtains the attribute information 02 of the people of the display of people's image 4022 (as shown in figure label 406).
Face datection is carried out for people's image 4023, testing result shows that people's image 4023 does not include facial image, therefore, The corresponding human body image 407 of people's image 4023 can be extracted, human body attribute is carried out to the corresponding human body image 407 of people's image 4023 Identification obtains the attribute information 03 of the people of the display of people's image 4023 (as shown in figure label 408).
It is possible to further summarize the Attribute Recognition of each personal images in people's image collection 402 as a result, to be belonged to Property information aggregate 412.Specifically, attribute information set 412 includes attribute information 01, attribute information 02, attribute information 03.
Later, image 401 to be processed can be belonged to according to the corresponding attribute information set 412 of image 401 to be processed Property judgement.For example, may determine that in image 401 to be processed by attribute information set 412 is when attribute information includes gender It is no to show women.In another example may determine that figure to be processed by attribute information set 412 when attribute information includes the age As whether showing children in 401.
From figure 3, it can be seen that the method for generating information compared with the corresponding embodiment of Fig. 2, in the present embodiment Process 300 first whether include that facial image has carried out different disposal according to people's image so that when there is no facial image, Also the corresponding attribute information of people's image can be got.Further, for including facial image the case where, according to comprising face Whether image meets preset condition further to segment, and different processing is executed to different situations, to effectively prevent The case where obtaining accuracy poor attribute information based on facial image.The scheme of the present embodiment description can be to various as a result, People's image of type is effectively treated, the accuracy of the attribute information helped to ensure that, and then is enhanced to being related to people's The flexibility and robustness of image procossing.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides for generating information One embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to In various electronic equipments.
As shown in figure 5, the device 500 provided in this embodiment for generating information is true including acquiring unit 501, people's image Order member 502 and attribute information determination unit 503.Wherein, acquiring unit 501 is configured to obtain image to be processed;People's image Determination unit 502 is configured to determine people's image that image to be processed includes, and obtains people's image collection;Attribute information determination unit 503 are configured to, in response to determining that the people's image does not include facial image, extract the people for people's image in people's image collection The human body image that image includes;According to the human body image of extraction, the attribute information for the people that the people's image is shown is determined.
In the present embodiment, in the device 500 for generating information: acquiring unit 501,502 and of people's image determination unit The specific processing of attribute information determination unit 503 and its brought technical effect can be respectively with reference in Fig. 2 corresponding embodiments The related description of step 201, step 202 and step 203, details are not described herein.
In some optional implementations of the present embodiment, above-mentioned attribute information determination unit 503 is further configured At: for people's image in people's image collection, in response to determining that the people's image includes facial image and human body image, and in response to It determines that the facial image that the people's image includes does not meet preset condition, extracts the human body image that the people's image includes;According to extraction Human body image, determine the attribute information for the people that the people's image is shown.
In some optional implementations of the present embodiment, above-mentioned attribute information determination unit 503 is further configured At: for people's image in people's image collection, in response to determining that the people's image includes facial image, and in response to determining the people's figure As comprising facial image meet preset condition, extract the facial image that the people's image includes;According to the facial image of extraction, really Determine the attribute information for the people that the people's image is shown.
In some optional implementations of the present embodiment, above-mentioned attribute information includes at least one of the following: that the age believes Breath, gender information.
In some optional implementations of the present embodiment, above-mentioned preset condition includes at least one of the following: face figure The resolution ratio of picture is less than preset greater than preset resolution threshold, to the angle that facial image progress human face modeling obtains The gross area in the face image region that angle threshold, facial image include is greater than the non-face image region that facial image includes The gross area.
In some optional implementations of the present embodiment, above-mentioned attribute information determination unit 503 is further configured At: the human body image of extraction is input to human body attribute Recognition Model trained in advance, what the human body image extracted was shown The attribute information of human body, wherein human body attribute Recognition Model is used to characterize the category for the human body that human body image and human body image are shown The corresponding relationship of property information;The attribute information of obtained human body is determined as to the attribute information for the people that the people's image is shown.
In some optional implementations of the present embodiment, human body attribute Recognition Model is trained as follows It arrives: obtaining training sample set, wherein training sample includes the attribute information for the human body that human body image and human body image are shown;Really Fixed initial human body attribute Recognition Model;Using the method for machine learning, by the human figure in the training sample of training sample concentration As the input as initial human body attribute Recognition Model, using attribute information corresponding with the human body image of input as initial human body The desired output of attribute Recognition Model, training obtain above-mentioned human body attribute Recognition Model.
The device provided by the above embodiment of the application obtains image to be processed by acquiring unit;People's image determines single Member determines people's image that image to be processed includes, and obtains people's image collection;Attribute information determination unit is in people's image collection People's image extract the people's image human body image for including in response to determining that the people's image does not include facial image;According to extraction Human body image, the attribute information for the people that the people's image is shown is determined, to realize the people's image for including in image to be processed When not comprising facial image, the human body image that can include according to people's image determines the attribute information for the people that people's image is shown, into And help to be promoted the flexibility and robustness of the image procossing to people is related to.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the electronic equipment for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, function to the embodiment of the present application and should not use model Shroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.
It should be noted that the computer-readable medium of the application can be computer-readable signal media or computer Readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimited In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates The more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wires Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer readable storage medium can be it is any include or storage program Tangible medium, which can be commanded execution system, device or device use or in connection.And in this Shen Please in, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for by Instruction execution system, device or device use or program in connection.The journey for including on computer-readable medium Sequence code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor, packet Include acquiring unit, people's image determination unit and attribute information determination unit.Wherein, the title of these units is under certain conditions simultaneously The restriction to the unit itself is not constituted, for example, acquiring unit is also described as " obtaining the unit of image to be processed ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are held by the electronic equipment When row, so that the electronic equipment: obtaining image to be processed;It determines people's image that image to be processed includes, obtains people's image collection; For people's image in people's image collection, in response to determining that the people's image does not include facial image, extracting the people's image includes Human body image;According to the human body image of extraction, the attribute information for the people that the people's image is shown is determined.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (16)

1. a kind of method for generating information, comprising:
Obtain image to be processed;
It determines people's image that the image to be processed includes, obtains people's image collection;
The people's figure is extracted in response to determining that the people's image does not include facial image for people's image in people's image collection As comprising human body image;According to the human body image of extraction, the attribute information for the people that the people's image is shown is determined.
2. according to the method described in claim 1, wherein, the method also includes:
For people's image in people's image collection, in response to determining that the people's image includes facial image and human body image, and In response to determining that the facial image that the people's image includes does not meet preset condition, the human body image that the people's image includes is extracted;Root According to the human body image of extraction, the attribute information for the people that the people's image is shown is determined.
3. according to the method described in claim 1, wherein, the method also includes:
For people's image in people's image collection, in response to determining that the people's image includes facial image, and in response to determination The facial image that the people's image includes meets preset condition, extracts the facial image that the people's image includes;According to the face of extraction Image determines the attribute information for the people that the people's image is shown.
4. according to the method described in claim 1, wherein, the attribute information includes at least one of the following: age information, gender Information.
5. according to the method in claim 2 or 3, wherein the preset condition includes at least one of the following: facial image Resolution ratio is less than preset angle greater than preset resolution threshold, the angle obtained to facial image progress human face modeling The gross area in the face image region that threshold value, facial image include is greater than total face in the non-face image region that facial image includes Product.
6. according to the method described in claim 1, wherein, the human body image according to extraction determines what the people's image was shown The attribute information of people, comprising:
The human body image of extraction is input to human body attribute Recognition Model trained in advance, what the human body image extracted was shown The attribute information of human body, wherein the human body attribute Recognition Model is used to characterize the human body that human body image and human body image are shown Attribute information corresponding relationship;
The attribute information of obtained human body is determined as to the attribute information for the people that the people's image is shown.
7. according to the method described in claim 6, wherein, training obtains the human body attribute Recognition Model as follows:
Obtain training sample set, wherein training sample includes the attribute information for the human body that human body image and human body image are shown;
Determine initial human body attribute Recognition Model;
Using the method for machine learning, the human body image in training sample that the training sample is concentrated is as initial human body category The input of property identification model, using attribute information corresponding with the human body image of input as the phase of initial human body attribute Recognition Model Output, training is hoped to obtain the human body attribute Recognition Model.
8. a kind of for generating the device of information, comprising:
Acquiring unit is configured to obtain image to be processed;
People's image determination unit is configured to determine people's image that the image to be processed includes, obtains people's image collection;
Attribute information determination unit is configured to for people's image in people's image collection, in response to determining the people's image Not comprising facial image, the human body image that the people's image includes is extracted;According to the human body image of extraction, determine that the people's image is shown People attribute information.
9. device according to claim 8, wherein the attribute information determination unit is further configured to:
For people's image in people's image collection, in response to determining that the people's image includes facial image and human body image, and In response to determining that the facial image that the people's image includes does not meet preset condition, the human body image that the people's image includes is extracted;Root According to the human body image of extraction, the attribute information for the people that the people's image is shown is determined.
10. device according to claim 8, wherein the attribute information determination unit is further configured to:
For people's image in people's image collection, in response to determining that the people's image includes facial image, and in response to determination The facial image that the people's image includes meets preset condition, extracts the facial image that the people's image includes;According to the face of extraction Image determines the attribute information for the people that the people's image is shown.
11. device according to claim 8, wherein the attribute information includes at least one of the following: age information, property Other information.
12. device according to claim 9 or 10, wherein the preset condition includes at least one of the following: facial image Resolution ratio be greater than preset resolution threshold, the obtained angle of human face modeling is carried out to facial image be less than preset angle The gross area in the face image region that degree threshold value, facial image include is greater than the total of the non-face image region that facial image includes Area.
13. device according to claim 8, wherein the attribute information determination unit is further configured to:
The human body image of extraction is input to human body attribute Recognition Model trained in advance, what the human body image extracted was shown The attribute information of human body, wherein the human body attribute Recognition Model is used to characterize the human body that human body image and human body image are shown Attribute information corresponding relationship;
The attribute information of obtained human body is determined as to the attribute information for the people that the people's image is shown.
14. device according to claim 13, wherein the human body attribute Recognition Model is trained as follows It arrives:
Obtain training sample set, wherein training sample includes the attribute information for the human body that human body image and human body image are shown;
Determine initial human body attribute Recognition Model;
Using the method for machine learning, the human body image in training sample that the training sample is concentrated is as initial human body category The input of property identification model, using attribute information corresponding with the human body image of input as the phase of initial human body attribute Recognition Model Output, training is hoped to obtain the human body attribute Recognition Model.
15. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-7.
16. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Method as described in any in claim 1-7.
CN201811110424.8A 2018-09-21 2018-09-21 Method and apparatus for generating information Pending CN109241934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811110424.8A CN109241934A (en) 2018-09-21 2018-09-21 Method and apparatus for generating information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811110424.8A CN109241934A (en) 2018-09-21 2018-09-21 Method and apparatus for generating information

Publications (1)

Publication Number Publication Date
CN109241934A true CN109241934A (en) 2019-01-18

Family

ID=65056488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811110424.8A Pending CN109241934A (en) 2018-09-21 2018-09-21 Method and apparatus for generating information

Country Status (1)

Country Link
CN (1) CN109241934A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109934149A (en) * 2019-03-06 2019-06-25 百度在线网络技术(北京)有限公司 Method and apparatus for output information
CN109993150A (en) * 2019-04-15 2019-07-09 北京字节跳动网络技术有限公司 The method and apparatus at age for identification
CN110472611A (en) * 2019-08-21 2019-11-19 图谱未来(南京)人工智能研究院有限公司 Method, apparatus, electronic equipment and the readable storage medium storing program for executing of character attribute identification
CN110569826A (en) * 2019-09-18 2019-12-13 深圳市捷顺科技实业股份有限公司 Face recognition method, device, equipment and medium
CN111666786A (en) * 2019-03-06 2020-09-15 杭州海康威视数字技术股份有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN115019350A (en) * 2022-08-09 2022-09-06 中科视语(北京)科技有限公司 Human body attribute identification method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103201763A (en) * 2010-10-22 2013-07-10 Nec软件有限公司 Attribute determination method, attribute determination device, program, recording medium, and attribute determination system
GB2504711B (en) * 2012-08-07 2015-06-03 Toshiba Res Europ Ltd Methods and systems for generating a 3D representation of a subject
CN107292240A (en) * 2017-05-24 2017-10-24 深圳市深网视界科技有限公司 It is a kind of that people's method and system are looked for based on face and human bioequivalence
CN107633223A (en) * 2017-09-15 2018-01-26 深圳市唯特视科技有限公司 A kind of video human attribute recognition approach based on deep layer confrontation network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103201763A (en) * 2010-10-22 2013-07-10 Nec软件有限公司 Attribute determination method, attribute determination device, program, recording medium, and attribute determination system
GB2504711B (en) * 2012-08-07 2015-06-03 Toshiba Res Europ Ltd Methods and systems for generating a 3D representation of a subject
CN107292240A (en) * 2017-05-24 2017-10-24 深圳市深网视界科技有限公司 It is a kind of that people's method and system are looked for based on face and human bioequivalence
CN107633223A (en) * 2017-09-15 2018-01-26 深圳市唯特视科技有限公司 A kind of video human attribute recognition approach based on deep layer confrontation network

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109934149A (en) * 2019-03-06 2019-06-25 百度在线网络技术(北京)有限公司 Method and apparatus for output information
CN111666786A (en) * 2019-03-06 2020-09-15 杭州海康威视数字技术股份有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN109934149B (en) * 2019-03-06 2022-08-09 百度在线网络技术(北京)有限公司 Method and apparatus for outputting information
CN111666786B (en) * 2019-03-06 2024-05-03 杭州海康威视数字技术股份有限公司 Image processing method, device, electronic equipment and storage medium
CN109993150A (en) * 2019-04-15 2019-07-09 北京字节跳动网络技术有限公司 The method and apparatus at age for identification
CN110472611A (en) * 2019-08-21 2019-11-19 图谱未来(南京)人工智能研究院有限公司 Method, apparatus, electronic equipment and the readable storage medium storing program for executing of character attribute identification
CN110569826A (en) * 2019-09-18 2019-12-13 深圳市捷顺科技实业股份有限公司 Face recognition method, device, equipment and medium
CN110569826B (en) * 2019-09-18 2022-05-24 深圳市捷顺科技实业股份有限公司 Face recognition method, device, equipment and medium
CN115019350A (en) * 2022-08-09 2022-09-06 中科视语(北京)科技有限公司 Human body attribute identification method and device and electronic equipment
CN115019350B (en) * 2022-08-09 2022-12-06 中科视语(北京)科技有限公司 Human body attribute identification method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN109241934A (en) Method and apparatus for generating information
CN108509915A (en) The generation method and device of human face recognition model
CN107644209A (en) Method for detecting human face and device
CN108898185A (en) Method and apparatus for generating image recognition model
CN108898186A (en) Method and apparatus for extracting image
CN110288049A (en) Method and apparatus for generating image recognition model
CN108073910A (en) For generating the method and apparatus of face characteristic
CN108416323A (en) The method and apparatus of face for identification
CN109034069A (en) Method and apparatus for generating information
CN108494778A (en) Identity identifying method and device
CN109086719A (en) Method and apparatus for output data
CN108062544A (en) For the method and apparatus of face In vivo detection
CN108388889B (en) Method and device for analyzing face image
CN109344752A (en) Method and apparatus for handling mouth image
CN108491823A (en) Method and apparatus for generating eye recognition model
CN107910060A (en) Method and apparatus for generating information
CN109285181A (en) The method and apparatus of image for identification
CN109887077A (en) Method and apparatus for generating threedimensional model
CN108133197A (en) For generating the method and apparatus of information
CN108509994A (en) character image clustering method and device
CN108491812A (en) The generation method and device of human face recognition model
CN108960110A (en) Method and apparatus for generating information
CN108509904A (en) Method and apparatus for generating information
CN108509921A (en) Method and apparatus for generating information
CN108460366A (en) Identity identifying method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190118

RJ01 Rejection of invention patent application after publication