WO2021051650A1 - 人脸和人手关联检测方法及装置、电子设备和存储介质 - Google Patents

人脸和人手关联检测方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2021051650A1
WO2021051650A1 PCT/CN2019/120901 CN2019120901W WO2021051650A1 WO 2021051650 A1 WO2021051650 A1 WO 2021051650A1 CN 2019120901 W CN2019120901 W CN 2019120901W WO 2021051650 A1 WO2021051650 A1 WO 2021051650A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
feature
feature map
human
map
Prior art date
Application number
PCT/CN2019/120901
Other languages
English (en)
French (fr)
Inventor
杨昆霖
颜鲲
侯军
伊帅
Original Assignee
北京市商汤科技开发有限公司
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 北京市商汤科技开发有限公司 filed Critical 北京市商汤科技开发有限公司
Priority to KR1020217021540A priority Critical patent/KR102632647B1/ko
Priority to JP2021538256A priority patent/JP7238141B2/ja
Priority to SG11202106831QA priority patent/SG11202106831QA/en
Publication of WO2021051650A1 publication Critical patent/WO2021051650A1/zh
Priority to US17/362,037 priority patent/US20210326587A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • G06V40/173Classification, e.g. identification face re-identification, e.g. recognising unknown faces across different face tracks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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/107Static hand or arm
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20016Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present disclosure relates to the field of computer vision technology, and in particular to a method and device for the position of a human face and a human hand, an electronic device, and a storage medium.
  • Human face and hand association refers to associating the detected face with the human hand, so that a certain operation performed by the human hand can be associated with a specific person through the associated information.
  • the present disclosure proposes a technical solution for detecting human faces and human hands in image processing.
  • a method for detecting a human face and a human hand which includes: acquiring a first image, where the first image is an image of a human object; performing feature extraction on the first image to obtain multiple A first feature map of multiple scales; performing feature fusion processing on the first feature map of multiple scales to obtain a second feature map of multiple scales, and the scale of the second feature map is the same as that of the first feature map Scale one-to-one correspondence; based on the obtained second feature maps of the multiple scales, the associated face position and human hand position for the same person object in the first image are detected.
  • the embodiment of the present disclosure can easily and conveniently obtain the human face and the human hand related to each other in the image, and at the same time can improve the detection accuracy.
  • the acquiring the first image includes: acquiring the second image, where the second image is an image including at least one human object; performing human target detection on the second image to obtain The detection frame of any one of the at least one person object in the first image; determining the corresponding image area of the detection frame of any one of the human objects in the second image as the any The first image of a character object.
  • the first image obtained by the embodiment of the present disclosure removes the influence of other environmental factors, which can further improve the detection accuracy.
  • the performing feature extraction on the first image to obtain a first feature map of multiple scales includes: adjusting the first image to a third image of a preset scale; The third image is input to the residual network to obtain the first feature maps of the multiple scales. Based on the above configuration, the scale of the image can be unified and the applicability can be improved.
  • the performing feature fusion processing on the first feature maps of the multiple scales to obtain the second feature maps of the multiple scales includes: inputting the first feature maps of the multiple scales To the feature pyramid network, the feature fusion processing is performed through the feature pyramid network to obtain the second feature maps of the multiple scales. Based on the above configuration, the feature accuracy of the obtained second feature map of multiple scales can be improved.
  • the multiple first feature maps are represented as ⁇ C 1 ,...,C n ⁇ , where n represents the number of first feature maps, and n Is an integer greater than 1;
  • the performing feature fusion processing on the first feature maps of the multiple scales to obtain the second feature maps of multiple scales includes: using the first convolution kernel to perform convolution on the first feature map C n product treatment, to obtain a second characteristic to the first characteristic of FIG.
  • FIG C n corresponding to F n, wherein said first dimension feature map of the second C n F n in FIG feature scale; the second feature map F n performs linear interpolation processing to obtain the second feature map F n corresponding to the first intermediate feature FIGS F 'n, wherein the first intermediate feature map F' n first feature map scale the same dimensions as C n-1; the use of the first feature a second convolution collation FIG C than the first characteristic graph C n i convolution processing, to obtain the first characteristic corresponding to FIG.
  • the map F i includes: adding the second intermediate feature map C'i and the corresponding first intermediate feature map F'i+1 to obtain the second feature map F i . Based on the above configuration, the feature information of the two intermediate features can be effectively merged.
  • the detecting the associated face position and human hand position of the same person object in the first image based on the obtained second feature maps of the multiple scales includes: The second feature map with the largest scale in the second feature map of two scales performs convolution processing to obtain a mask map representing the position of the face and a mask map representing the position of the hand; based on the face position The mask image of and the mask image of the position of the human hand determine the location area where the human hand and face associated in the first image are located. Based on the above configuration, it is possible to conveniently predict and indicate the position of the associated face and hand.
  • the scale relationship between the first feature maps of the multiple scales is: And Wherein, C i represents each first feature map, L(C i ) represents the length of the first feature map C i , W(C i ) represents the width of the first feature map C i , and k 1 is greater than or An integer equal to 1, i is a variable, and the range of i is [2, n], and n represents the number of first feature maps.
  • the method further includes at least one of the following ways: highlighting the associated human hand and face in the first image; and displaying the association detected in the first image
  • the position of the face and the position of the hand are assigned the same label. Based on the above configuration, the image area where the associated human face and hand are located can be intuitively reflected, and at the same time, the associated detection results of different human objects can be effectively distinguished.
  • the method is implemented by a neural network, wherein the step of training the neural network includes: obtaining a training image, the training image is an image including a person object, and the training image has real associations The annotation information of the face position and the hand position; the training image is input to the neural network, and the neural network predicts the associated face position and the hand position of the same person object in the training image; based on the prediction The associated face position and hand position and the label information determine the network loss, and adjust the network parameters of the neural network according to the network loss until the training requirements are met. Based on the above configuration, optimized training of the neural network can be realized to ensure the accuracy of network detection.
  • an associated detection device for a human face and a human hand which includes: an acquisition module for acquiring a first image, where the first image is an image of a human object; and a feature extraction module for Perform feature extraction on the first image to obtain first feature maps of multiple scales; a fusion module for performing feature fusion processing on the first feature maps of multiple scales to obtain second feature maps of multiple scales ,
  • the scale of the second feature map corresponds to the scale of the first feature map in a one-to-one correspondence; the detection module is configured to detect the same person in the first image based on the obtained second feature maps of the multiple scales The associated face position and hand position of the object.
  • the acquisition module includes: an acquisition unit, configured to acquire the second image, where the second image is an image including at least one person object; and a target detection unit, configured to Perform human target detection on the second image to obtain the detection frame of any one of the at least one human object in the first image; the determining unit is configured to place the detection frame of any one of the human objects in the first image The corresponding image area in the two images is determined to be the first image of any one of the human objects.
  • the feature extraction module is further configured to adjust the first image to a third image of a preset scale; input the third image to the residual network to obtain the multiple scales The first feature map.
  • the fusion unit is further configured to input the first feature maps of the multiple scales into a feature pyramid network, and perform the feature fusion processing through the feature pyramid network to obtain the multiple The second feature map of the scale.
  • the multiple first feature maps are represented as ⁇ C 1 ,...,C n ⁇ , where n represents the number of first feature maps, and n is an integer greater than 1;
  • the fusion module is further configured to check a first convolution using FIG C n wherein the convolution processing to obtain a second characteristic to the first characteristic of FIG.
  • FIG C n corresponding to F n, wherein , dimensions of the first feature with the FIG C n F and n second feature map scale;
  • FIG feature of the second F n processing performs linear interpolation to obtain the second characteristic corresponds to F n of FIG.
  • FIG. 1 wherein an intermediate F 'n, wherein the first intermediate feature map F' n is the same scale dimensions of the first feature of the FIG. C n-1; using the first feature a second convolution FIG collation than C n wherein a first convolution processing in FIG C i, to obtain the first feature FIG C i corresponding to a second intermediate characteristic graph C 'i, said second intermediate feature FIG C' scale i is the first intermediate feature FIG.
  • F′ i+1 has the same scale, where i is an integer variable greater than or equal to 1 and less than n; use the second intermediate feature map C'i and the corresponding first intermediate feature map F'i+1 A second feature map F i other than the second feature map F n is obtained , wherein the first intermediate feature map F'i+1 is obtained by linear interpolation of the corresponding second feature map F i+1.
  • the fusion module is further configured to add the second intermediate feature map C'i and the corresponding first intermediate feature map F'i+1 to obtain the first intermediate feature map F'i+1.
  • Two feature map F i is further configured to add the second intermediate feature map C'i and the corresponding first intermediate feature map F'i+1 to obtain the first intermediate feature map F'i+1.
  • the detection module is further configured to perform convolution processing on the second feature map with the largest scale in the second feature maps of the multiple scales to obtain masks representing the positions of the faces.
  • Figure, and a mask diagram showing the position of the human hand based on the mask diagram of the position of the human face and the mask diagram of the position of the human hand, determine the location area where the human hand and the face are associated in the first image.
  • the scale relationship between the first feature maps of the multiple scales is: And Wherein, C i represents each first feature map, L(C i ) represents the length of the first feature map C i , W(C i ) represents the width of the first feature map C i , and k 1 is greater than or An integer equal to 1, i is a variable, and the range of i is [2, n], and n represents the number of first feature maps.
  • the device further includes at least one of a display module and an allocation module, wherein the display module is configured to highlight the associated human hand and human face in the first image;
  • the allocation module is configured to allocate the same label to the associated face position and human hand position detected in the first image.
  • the device includes a neural network, the feature extraction module, the fusion module, and the detection module apply the neural network, and the device further includes a training module for training the neural network.
  • Network wherein the step of training the neural network includes: obtaining training images, the training images are images including human objects, and the training images have labeling information that is actually associated with face positions and hand positions; The image is input to the neural network, and the associated face position and hand position of the same person object in the training image are predicted by the neural network; the face position and hand position and the position of the hand based on the predicted association
  • the labeling information determines the network loss, and adjusts the network parameters of the neural network according to the network loss until the training requirements are met.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to call the instructions stored in the memory to Perform the method described in any one of the first aspect.
  • a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method described in any one of the first aspect is implemented.
  • a computer program including computer readable code, when the computer readable code runs in an electronic device, the processor in the electronic device executes The method described in any one of the first aspect is implemented.
  • a first image corresponding to a region where a person object is located can be determined from the first image, and feature extraction processing is performed on the first image to obtain a corresponding feature map, and then multi-scale feature fusion processing is performed on the feature map , To obtain a second feature map of multiple scales, where the second feature map has more accurate feature information than the first feature map.
  • the associated human hand and face information in the first image can be obtained. Position, improve the accuracy of face and hand detection.
  • the technical solutions of the embodiments of the present disclosure do not need to obtain the key points of the human ear or the wrist, and can directly obtain the positions of the associated human hands and faces in the image, which is simple, convenient and highly accurate.
  • Fig. 1 shows a flow chart of a method for detecting a human face and a human hand association according to an embodiment of the present disclosure
  • Fig. 2 shows a flow chart of step S10 in a method for detecting the correlation of a face and a hand according to an embodiment of the present disclosure
  • Fig. 3 shows a schematic diagram of a second image according to an embodiment of the present disclosure
  • FIG. 4 shows a flowchart of step S20 of a method for detecting a human face and a human hand associated with it according to an embodiment of the present disclosure
  • Fig. 5 shows a flow chart of step S30 in a method for detecting a human face and a human hand associated according to an embodiment of the present disclosure
  • Fig. 6 shows a schematic diagram of a feature extraction and feature fusion process according to an embodiment of the present disclosure
  • FIG. 7 shows a flow chart of step S40 in a method for detecting a human face and a human hand associated according to an embodiment of the present disclosure
  • FIG. 8 shows a flowchart of training a neural network according to an embodiment of the present disclosure
  • FIG. 9 shows a block diagram of a device for detecting the association of a human face and a human hand according to an embodiment of the present disclosure
  • FIG. 10 shows a block diagram of an electronic device according to an embodiment of the present disclosure
  • Fig. 11 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
  • the embodiments of the present disclosure provide a method for detecting the association of a face and a human hand, which can be applied to any image processing device.
  • the method can be applied to a terminal device or a server, or can also be applied to other processing devices.
  • terminal devices may include user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, vehicle-mounted devices, and portable devices. Wearable equipment, etc.
  • the method for detecting a human face and a human hand association may be implemented by a processor invoking a computer-readable instruction stored in a memory.
  • Fig. 1 shows a flow chart of a method for detecting a face and a hand associated with according to an embodiment of the present disclosure.
  • the method for detecting a face with a hand associated with it includes:
  • the first image may be an image of a human object, which may include at least one human face and at least one human hand.
  • the embodiment of the present disclosure can realize the image of the human hand and human face of the human object in the first image.
  • Association detection the association means that the obtained human face and human hand are the same human face and human hand.
  • the method of acquiring the first image may include: directly acquiring the first image through an image acquisition device, where the image acquisition device may be a device with an image acquisition function such as a mobile phone, a camera, or a camera.
  • the method of acquiring the first image may also include receiving the first image transmitted from another device, or reading the first image from the memory, or the first image may also be an image frame obtained after a frame selection operation is performed from a video stream. This disclosure does not specifically limit this.
  • the first image may also be a partial image area of other images.
  • the first image may be an image area selected from other images through the received selection information, or it may be a pass target detection
  • the human body is detected and the image area obtained by the detection is not specifically limited in the present disclosure.
  • S20 Perform feature extraction on the first image to obtain first feature maps of multiple scales
  • the embodiment of the present disclosure may perform feature extraction processing on the first image to obtain the first feature map of multiple scales.
  • the embodiment of the present disclosure may input the first image to the feature extraction network to obtain The first feature map of multiple scales, where the feature extraction network can be a convolutional neural network, such as a residual network (Res-Net), the feature extraction of the first image is performed through the residual network, and the first image of at least two scales is obtained A feature map.
  • the feature map of multiple scales may be obtained by up-sampling or down-sampling the first image, for example, the first feature map of multiple scales may be obtained through different sampling rates.
  • S30 Perform feature fusion processing on the first feature maps of multiple scales to obtain second feature maps of multiple scales, and the scales of the second feature maps correspond to the scales of the first feature maps one-to-one;
  • feature fusion processing may be performed on the first feature maps of multiple scales to obtain second feature maps of corresponding scales.
  • the accuracy of the feature information in each second feature map can be improved through feature fusion, so that the accuracy of the correlation detection between the face and the hand can be further improved.
  • the feature fusion processing of the first feature maps of the multiple scales can be performed through a feature pyramid network, where feature information of the first feature maps of adjacent scales can be feature fused, and the feature fusion process can be performed sequentially from small
  • the feature information of the first feature map of the scale is fused to the feature information of the first feature map of the large scale, and finally a second feature map that integrates the feature information of the first feature map of all scales can be obtained.
  • S40 Based on the obtained second feature maps of the multiple scales, detect the associated face position and human hand position for the same person object in the first image.
  • the association detection of the human face and the human hand may be performed based on the second feature maps of the multiple scales.
  • convolution processing may be performed on at least one second feature map in the second feature map of each scale, so as to obtain the associated face position and human hand position in the first image.
  • the second feature map with the largest scale can be input to the convolutional layer to perform convolution processing to obtain mask maps about the face position and the hand position respectively, which can include a first mask map of the face position, and
  • the second mask image at the left hand position and the third mask image at the right hand position can be used to determine the associated human hand and face positions in the first image through the obtained mask images.
  • the embodiments of the present disclosure do not need to acquire the key points of human ears or wrists, and also do not need to analyze whether the Gaussian distribution is satisfied, and can directly obtain the associated human hands and hands through the multi-scale extraction and feature fusion of the features of the first image.
  • the human face is simple, convenient and highly accurate.
  • the first image obtained by the embodiment of the present disclosure may be an image of a person object.
  • the obtained image may include multiple person objects, in order to improve the face of the same person object.
  • the present disclosure can obtain the image area of each person object from the obtained image, and then perform feature extraction and feature fusion on each image area respectively, and finally obtain the face and hand position of each person object .
  • Fig. 2 shows a flow chart of step S10 in a method for detecting the correlation of a face and a hand according to an embodiment of the present disclosure.
  • the acquiring the first image includes:
  • S101 Acquire a second image, where the second image is an image including at least one person object;
  • the first image may be an image obtained based on the second image, where the second image may be an image of at least one human object.
  • the manner of acquiring the second image may include: directly acquiring the first image through an image acquisition device, where the image acquisition device may be a device having an image acquisition function such as a mobile phone, a camera, or a camera.
  • the method of acquiring the second image may also include receiving the second image transmitted from another device, or reading the second image from the memory, or the second image may also be an image frame obtained by performing a frame selection operation from a video stream. This disclosure does not specifically limit this.
  • Fig. 3 shows a schematic diagram of a second image according to an embodiment of the present disclosure.
  • five human objects A, B, C, D, and E can be included.
  • the second image may also include only one person object, or may also include another number of person objects, which is not specifically limited in the present disclosure.
  • S102 Perform human target detection on the second image to obtain a detection frame of any one of the at least one human object in the second image;
  • the position of the human body region for each person object in the first image can be detected to obtain the first image corresponding to the person object.
  • the obtained first image may include a human body area of one human object, and at least a part of images of other human objects, such as human faces or hands of other objects, may also be included.
  • a human hand and a human face that are a human object in the first image are obtained by performing subsequent processing on the first image.
  • the second image may include at least one human object
  • the present disclosure can perform target detection on the second image to realize the human body region detection of the human object in the second image, and obtain the detection frame of each human object.
  • the detection frame corresponding to the human object in the second image can be detected by a neural network capable of performing human target detection.
  • the neural network can be a convolutional neural network, which can be trained to accurately recognize the image.
  • the convolutional neural network of each person object in and the location area (ie detection frame) of the corresponding person object for example, may be an R-CNN network, or may also be another neural network that can achieve target detection. There is no specific limitation.
  • the detection frame corresponding to the human body area of the human object in the image is obtained, for example, the detection frame A1 of the human object A and the detection frame D1 of the human object D.
  • the detection frame A1 of the human object A and the detection frame D1 of the human object D is obtained, for example, the detection frame A1 of the human object A and the detection frame D1 of the human object D.
  • the above is only an exemplary description. , You can also detect the detection frame of other human objects.
  • the detection frame of each person object in the image can be identified, and the detection frame that meets the quality requirements can also be identified.
  • the quality value is less than the quality threshold.
  • the detection frames corresponding to the character objects B, C, and D can be determined as the detection frames that do not meet the quality requirements, and the detection frame can be deleted.
  • the quality value of the detection frame can be the score or confidence of the detection frame obtained at the same time when the detection frame is obtained when the target detection process is performed. When the score or confidence is greater than the quality threshold, it is determined that the detection frame satisfies Quality requirements.
  • the quality threshold may be a set value, such as 80%, or may also be another value less than 1, which is not specifically limited in the present disclosure.
  • S103 Determine an image area of the detection frame of any human object in the second image as the first image corresponding to any human object.
  • the image area corresponding to the detection frame in the second image may be determined as the first image of the human object corresponding to the detection frame.
  • the detection frame A1 of the person object A and the detection frame D1 of the person object D in the second image can be obtained.
  • the image area corresponding to A1 may be determined as the first image of the person object A
  • the image area corresponding to the detection frame D1 may be determined as the first image of the person object D.
  • the first image obtained by the embodiment of the present disclosure removes the influence of other environmental factors, which can further improve the detection accuracy.
  • the image area (first image) for a person object can be obtained from the second image.
  • the first image obtained is an image for a person object, in the actual application process, because the second image includes The characters in may be similar, and the first image obtained at this time may also include at least a part of other character objects.
  • the detection frame D1 in FIG. 3 may include a part of the face of the character C in addition to the character object D. It is disclosed that the positions of the faces and hands of the same person in the first image can be obtained through subsequent processing.
  • Fig. 4 shows a flowchart of step S20 of a method for detecting a human face and a hand associated detection according to an embodiment of the present disclosure, wherein the performing feature extraction on the first image to obtain a first feature map of multiple scales includes :
  • the scales of the obtained first image may be different.
  • the obtained first image can be adjusted to the same scale, that is, to a preset scale, so that subsequent images of the same scale can be performed.
  • the preset scale of the embodiment of the present disclosure may be determined according to the design and configuration of the network. For example, the preset scale of the embodiment of the present disclosure may be 256*192 (height*width), but it is not a specific limitation of the present disclosure.
  • the method for adjusting the image scale may include at least one of up-sampling, down-sampling, and image interpolation, which is not specifically limited in the present disclosure, and the third image with a preset scale may also be obtained in other ways.
  • S202 Input the third image to the residual network to obtain first feature maps of the multiple scales.
  • feature extraction processing can be performed on the third image.
  • the third image can be input to a residual network (such as Resnet50) to perform feature extraction processing of the image to obtain first images of different scales.
  • Resnet50 a residual network
  • the first feature maps of different scales can be output through different convolutional layers of the residual network.
  • the multi-scale first feature map can also be obtained through other feature extraction networks, such as a pyramid feature extraction network, or the multi-scale first feature map can be obtained through up-sampling or down-sampling, for example,
  • the sampling frequency of the embodiment of the present disclosure may be 1/8, 1/16, 1/32, etc., but the embodiment of the present disclosure does not limit this.
  • the relationship between the obtained first feature maps is And Among them, C i represents each first feature map, L(C i ) represents the length of the first feature map C i , W(C i ) represents the width of the first feature map C i , and k 1 is an integer greater than or equal to 1. , I is a variable, and the range of i is [2,n], and n is the number of the first feature map. That is, the relationship between the length and the width of each first feature map in the embodiment of the present disclosure are all times of the k1 power of 2.
  • the number of first feature maps obtained in the present disclosure can be 4, which can be represented as first feature maps C 1 , C 2 , C 3 and C 4 , where the length of the first feature map C 1 and may correspond to the width of a first characteristic diagram are respectively the length and width of twice the C 2, wherein the second length and width FIGS C 2 may correspond to the length and width respectively twice a C 3 as a third characteristic diagram, and twice the length and width of the length and width of the third characteristic diagram C 3 may correspond respectively to the fourth feature of the C 4 of FIG.
  • the length multiples and width multiples between C 1 and C 2, between C 2 and C 3 , and between C 3 and C 4 are the same, that is, the value of k 1 is 1.
  • k 1 may have different values, for example: the length and width of the first characteristic map C 1 may correspond to twice the length and width of the first characteristic map C 2, and the second wherein the length and width FIGS C 2 may correspond to the third feature, respectively length and width quadruple FIGS C 3, and a third length and width characteristics FIGS C 3 may correspond respectively to the fourth feature of the C 4 of FIG. Eight times the length and width.
  • the embodiment of the present disclosure does not limit this.
  • feature fusion processing of each first feature map may be further executed to improve the accuracy of the obtained feature information of the second feature map.
  • performing feature fusion processing on the first feature map may be performed using a pyramid feature extraction network (FPN). That is, the first feature maps of multiple scales can be input to the feature pyramid network, and the feature fusion processing is performed through the feature pyramid network to obtain the second feature map corresponding to the first feature map.
  • FPN pyramid feature extraction network
  • feature fusion processing can also be performed in other ways, for example, multiple scale second feature maps can be obtained through convolution processing and up-sampling processing. Based on the above configuration, the feature accuracy of the obtained second feature map of multiple scales can be improved.
  • FIG. 5 shows a flowchart of step S30 in a method for detecting the association of faces and hands according to an embodiment of the present disclosure, in which the feature fusion processing is performed on the first feature maps of the multiple scales to obtain multiple scales
  • the second feature map includes:
  • the first feature map obtained by the embodiment of the present disclosure can be expressed as ⁇ C 1 ,...,C n ⁇ , that is, n first feature maps, and C n can be the smallest in length and width
  • the feature map is the first feature map with the smallest scale.
  • the scale of the corresponding first feature map becomes smaller.
  • the scales of the first feature maps C 1 , C 2 , C 3 and C 4 mentioned above are sequentially reduced.
  • the second feature map F n corresponding to the first feature map C n with the smallest scale can be obtained first.
  • convolution processing can be performed by matching the first characteristic first convolution FIG C n, C n FIG obtain a first feature a second feature corresponding to FIG. F n, wherein dimensions of the first feature and the second FIG C n wherein The scales of the graphs F n are the same.
  • the second feature map F n is also the feature map with the smallest scale in the second feature map.
  • the first convolution kernel may be a 3*3 convolution kernel, or may also be other types of convolution kernels.
  • the second feature map F n performs linear interpolation processing to obtain a first and a second intermediate feature map F n corresponding to FIG feature F 'n, wherein the first intermediate feature map F' n first feature map scale The scale of C n-1 is the same;
  • FIG. 1 After obtaining a second characteristic graph F n, which may be utilized to obtain a second characteristic graph F n corresponding first intermediate characteristic graph F 'n, embodiments of the present disclosure may be obtained by performing linear interpolation processing on the n second feature F in FIG. FIG second characteristic intermediate F n corresponding to a first characteristic diagram F 'n, wherein the first intermediate feature map F' n dimensions wherein the first dimension FIGS C n-1 is the same as, for example, in the C n-1 when the scale of C n is twice the scale, the first intermediate feature map F 'n is the length of the second length of twice the characteristic diagram F n, and a first intermediate characteristic diagram F' n is the width of the second feature Twice the width of the graph F n.
  • each of the first feature may be obtained than the first characteristic C of FIG. FIG C n 1 ... C n-1 corresponding to the second intermediate characteristic graph C '1 ... C' n- 1
  • the second convolution kernel can be used to perform convolution processing on the first feature maps C 1 ... C n-1 , respectively, to obtain a one -to-one correspondence with each first feature map C 1 ... C n-1 a second intermediate characteristic graph C '1 ... C' n- 1, wherein the second core may be a convolution kernel convolution 1 * 1, but the present disclosure which is not particularly limited.
  • the scale of each second intermediate feature map obtained through the convolution processing of the second convolution kernel is the same as the scale of the corresponding first feature map, respectively.
  • FIG C n-1 a first descending FIG C 1 ... C n-1 to obtain each of the first feature FIG C 1 ... C n-1 wherein a second intermediate FIG C '1 .. .C′ n-1 . That is, it is possible to obtain the first characteristic corresponds to FIG. C n-1, the second intermediate feature FIG C 'n-1, then to obtain a first characteristic corresponding to FIG C n-2 second intermediate FIG C' n-2, in on, until obtaining a first characteristic diagram corresponding to a second intermediate C 1 characterized in FIG C '1.
  • first intermediate feature maps F′ 1 ... F′ n- other than the first intermediate feature map F′ n can be correspondingly obtained. 1.
  • C n-1 C′ i +F′ i+1 , where the second intermediate feature map C 'i dimensions (length and width) with the first intermediate feature map F' i + 1 dimensions (length and width) are equal, and the second intermediate feature map C 'length and width of the i wherein the first length and width the same as FIG C i, the second features of FIG obtained F i length and width respectively the length and width of the first C i, wherein FIG. Wherein, i is an integer greater than or equal to 1 and less than n.
  • each second feature map F i other than the second feature map F n in a reverse order processing manner. That is, the embodiment of the present disclosure can first obtain the first intermediate feature map F n-1 , where the second intermediate map C'n-1 and the first intermediate feature map F'corresponding to the first feature map C n-1 can be used. and n is added to obtain the second feature FIGS F. n-1, wherein the second intermediate feature map C 'length and width, respectively, n-1, the first intermediate feature map F' n is the same length and width, and a second FIGS F n-1 wherein the length and width of the second intermediate feature FIG C 'n-1 and F' n in length and width.
  • the length and width of the second feature map F n-1 are respectively twice the length and width of the second feature map F n (the scale of C n -1 is twice the scale of C n).
  • F. N-1 may be linear interpolation processing on the second feature maps, to give a first intermediate characteristic diagram F 'n-1, so that F' n-1 of the same dimension and the dimension C n-1, which in turn can be used the first characteristic graph C n-2 corresponding to the second intermediate FIG intermediate C wherein 'n-2 and the first intermediate feature map F' n-1 obtained by adding up the second processing characteristic graph F n-2, wherein the second The length and width of the graph C'n-2 are the same as those of the first intermediate characteristic graph F'n -1 , and the length and width of the second characteristic graph F n-2 are the second intermediate characteristic graph C'n -2 and F'n -1 length and width.
  • FIG. 6 shows a schematic diagram of a feature extraction and feature fusion process according to an embodiment of the present disclosure.
  • the feature extraction process can be performed through the residual network a, and the four convolutional layers in the residual network can be used to output four first feature maps C 1 , C 2 , C 3 and C 4 of different scales, and then use
  • the feature extraction network b performs feature fusion processing to obtain a multi-scale second feature map.
  • the first C 4 may be calculated through a convolution core 3 * 3 to obtain a new feature F in FIG. 4 (a second characteristic diagram), the same length and width F 4 and C 4 size.
  • FIG. 1 ( FIG second feature), characterized in that the second panel F, respectively length and width of a second F 2 characterized twice FIG. After FPN, four second feature maps of different scales are also obtained, which are respectively denoted as F 1 , F 2 , F 3 and F 4 .
  • the multiple of the length and width between F 1 and F 2 is the same as the multiple of the length and width between C 1 and C 2
  • the multiple of the length and width between F 2 and F 3 is the same as that of C 2 and C 3 the same factor between length and width, the same length and width between F 3 and F 4 and C fold multiple of the length and width of between 3 and C 4.
  • feature information of different scales can be merged to further improve feature accuracy.
  • the second feature maps corresponding to the first feature maps of multiple scales can be obtained in the above manner, and the feature information of the second feature maps has improved accuracy compared with the feature information of the first feature maps.
  • Fig. 7 shows a flowchart of step S40 in a method for detecting a human face and a human hand in association according to an embodiment of the present disclosure.
  • detecting the associated face position and hand position of the same person object in the first image includes:
  • S401 Perform convolution processing on the second feature map with the largest scale in the second feature maps of multiple scales to obtain a mask map representing the position of the face and a mask map representing the position of the human hand respectively;
  • At least one second feature map of the obtained second feature maps of multiple scales may be input into the convolutional layer, and further feature fusion may be performed on the at least one second feature map, and Correspondingly, the mask map of the face position of the same person object and the mask map of the human hand position corresponding to the first image are generated.
  • the present disclosure can input the second feature map into the convolutional layer to perform the associated detection of the position of the human hand and the face.
  • the elements in the obtained mask map can be represented as composed of 1 and 0, where 1 represents the location area of a human hand or a human face.
  • the embodiment of the present disclosure can obtain the first mask image of the face position of the same person object, the second mask image of the left hand position, and the third mask image of the right hand position, through the position of element 1 in each mask image , That is, the position of the corresponding face and hand in the first image can be obtained.
  • the mask image corresponding to the undetected human hand may be an all-zero mask image.
  • the output mask image can also be an all-zero mask image.
  • the obtained mask image may be associated with a person object identifier and a type identifier.
  • the person object identifier is used to distinguish different person objects, and different person objects may have different person object identifiers and type identifiers. It can be used to indicate the face position, left hand position, or right hand position corresponding to the mask image.
  • S402 Determine the location area where the human hand and the face are associated in the first image based on the mask image of the human face position and the mask image of the human hand position.
  • the position area corresponding to the associated human hand and the human face in the first image is further obtained.
  • the scales of the first mask image and the second mask image obtained by the embodiment of the present disclosure can be the same as the first image, so that the face position determined according to the mask image can be mapped to the corresponding face image area in the first image, And the human hand position determined according to the mask image is mapped to the human hand image area in the first image, and then the position area where the associated human hand and face are obtained.
  • the matching human face and human hand may be highlighted in the first image based on the obtained mask image, for example,
  • the mask image is represented in the image area of the first image in the form of a detection frame to prompt the associated human face and human hand.
  • the face detection frame D11 and the hand detection frames D12 and D13 associated with the person object D can be displayed in the image.
  • the embodiment of the present disclosure can also assign the same label to the associated human face and human hand to identify that the human face and human hand are the human face and human hand of the same person object.
  • the associated human face and hand position obtained in the embodiment of the present disclosure may also be used to determine the posture change of the human object.
  • the first image may be obtained based on the image frames in the video stream.
  • the method of the embodiment of the present disclosure may detect the change of the face position and the change of the human hand position for the same task object in the image frame.
  • the face and hand associated detection method in the embodiment of the present disclosure can be applied to a neural network, such as a convolutional neural network.
  • a neural network such as a convolutional neural network.
  • the above-mentioned convolutional neural network can be constructed by a residual network and a pyramid network.
  • the present disclosure can also train the neural network to obtain a neural network that meets the accuracy requirements.
  • FIG. 8 shows a flowchart of training a neural network according to an embodiment of the present disclosure.
  • the training neural network may include:
  • S501 Obtain a training image, where the training image is an image including a human object, and the training image has labeling information of a real-associated face position and a human hand position;
  • the training image may be an image of a person object, and at the same time, the training image may also include parts of the faces or hands of other person objects, so that the training accuracy can be improved.
  • the number of training images is multiple, and the present disclosure does not limit the number of training images.
  • the training image may be associated with real annotation information to supervise the training of the neural network.
  • each training image has the actual associated face position and hand position label information, which is used to represent the face position and hand position (left hand and right hand) of the same person object in the training image, where the label information can indicate It is a labeling frame, or it can be expressed in the form of position coordinates, or it can be expressed as a mask map of the actual associated human hand and face position, as long as the associated face position and human hand position in the training image can be determined It can be used as an embodiment of the present disclosure.
  • S502 Input the training image to the neural network, and predict the associated face position and human hand position for the same person object in the training image through the neural network;
  • the training image can be input to the neural network to perform feature extraction, feature fusion, and detection of associated human hands and face positions.
  • the multi-scale feature extraction of the training image can be performed through a feature extraction network such as a residual network to obtain a first predicted feature map of multiple scales.
  • a feature extraction network such as a residual network to obtain a first predicted feature map of multiple scales.
  • feature fusion processing can be performed on the first predicted feature maps of multiple scales.
  • the pyramid network FPN is used to perform feature fusion of the multiple first predicted feature maps to obtain multiple
  • the second prediction feature map of the scale in which the specific process of feature fusion will not be repeated here, and the specific process can be referred to the above-mentioned embodiment.
  • convolution processing can be performed based on each second predicted feature map to obtain a prediction mask of the associated face and hand position predicted based on each second predicted feature map Figure.
  • S503 Determine a network loss based on the associated face position and hand position predicted for the training image and the label information, and adjust the network parameters of the neural network according to the network loss until the training requirement is met.
  • the embodiment of the present disclosure can obtain the network loss according to the difference between the face prediction mask map and the human hand prediction mask map predicted by the second prediction feature map of each scale and the corresponding mask map of the real human face and human hand.
  • the network loss can be determined by the logarithmic loss function.
  • the embodiment of the present disclosure can directly use the log loss function to obtain the loss between the predicted mask map obtained by the second predicted feature map of each scale and the labeled real mask map, and use the loss as the network loss , Adjust the parameters of the neural network.
  • the loss corresponding to each scale can be regarded as the network loss, and the neural network parameters can be optimized separately.
  • the embodiment of the present disclosure may determine the face prediction mask map obtained by the second prediction feature map of each scale through the logarithmic loss function, the mask corresponding to the human hand prediction mask map and the real label information.
  • the sub-network loss between the graphs, and the weighted sum of the sub-network loss corresponding to each scale is used to determine the network loss.
  • the network loss can be determined according to the weighted sum of the loss corresponding to each scale to optimize the neural network parameters together.
  • the embodiment of the present disclosure can obtain network loss based on the prediction result of each second prediction feature map, the accuracy of the prediction result of the second prediction feature map of the obtained neural network will be higher regardless of the scale, thereby improving the overall The detection accuracy of the neural network.
  • the network loss When the network loss is obtained, adjust the network parameters of the neural network based on the comparison result of the network loss and the loss threshold. For example, when the network loss is greater than the loss threshold, feedback and adjust the parameters of the neural network, such as adjusting the feature extraction network, pyramid The parameters of the feature network and the convolutional layer of the mask image are obtained, and the training image is reprocessed until the obtained network parameters are less than the loss threshold. And when the network loss is less than the loss threshold, it can be determined that the neural network meets the training requirements, and the training can be terminated at this time. Based on the above configuration, optimized training of the neural network can be realized to ensure the accuracy of network detection.
  • the first image corresponding to the area where a human object is located can be determined from the first image, and feature extraction processing is performed on the first image to obtain the corresponding feature map, and then the feature map can be multiplied.
  • Scale feature fusion processing to obtain multiple scales of second feature maps, where the second feature map has more accurate feature information than the first feature map.
  • the associated information in the first image can be obtained.
  • the position of human hand and human face improves the detection accuracy of human face and human hand.
  • the technical solutions of the embodiments of the present disclosure do not need to obtain the key points of the human ears or the wrists, and can directly obtain the positions of the associated human hands and faces in the image, which is simple, convenient and highly accurate.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • the present disclosure also provides a face and human hand associated detection device, electronic equipment, computer-readable storage medium, and a program, all of which can be used to implement any of the face and human hand associated detection methods provided in the present disclosure, and the corresponding technical solutions and The description and refer to the corresponding records in the method section, and will not repeat them.
  • Fig. 9 shows a block diagram of a face and hand associated detection device according to an embodiment of the present disclosure. As shown in Fig. 9, the face and hand associated detection device includes:
  • the obtaining module 10 is configured to obtain a first image, where the first image is an image of a person object;
  • the feature extraction module 20 is configured to perform feature extraction on the first image to obtain first feature maps of multiple scales
  • the fusion module 30 is configured to perform feature fusion processing on the first feature maps of multiple scales to obtain second feature maps of multiple scales, and the scale of the second feature map is the same as the scale of the first feature map.
  • the detection module 40 is configured to detect the associated face position and human hand position of the same person object in the first image based on the obtained second feature maps of the multiple scales.
  • the acquisition module includes:
  • An acquiring unit configured to acquire the second image, where the second image is an image including at least one person object;
  • a target detection unit configured to perform human target detection on the second image to obtain a detection frame of any one of the at least one human object in the first image
  • the determining unit is configured to determine an image area corresponding to the detection frame of any person object in the second image as the first image of any person object.
  • the feature extraction module is further configured to obtain the second image, and the second image is an image including at least one person object;
  • the fusion unit is further configured to input the first feature maps of the multiple scales into a feature pyramid network, and perform the feature fusion processing through the feature pyramid network to obtain the multiple The second feature map of the scale.
  • the multiple first feature maps are represented as ⁇ C 1 ,...,C n ⁇ , where n represents the number of first feature maps, and n Is an integer greater than 1;
  • the fusion module is further configured to use a first convolution check C n wherein FIG convolution process to obtain a second characteristic to the first characteristic of FIG. FIG C n corresponding to F n, wherein said first feature
  • the scale of the image C n is the same as the scale of the second feature image F n;
  • the second feature of FIG. F n performs linear interpolation processing to obtain the first intermediate feature and the second feature FIG FIGS F n corresponding to F 'n, wherein the first intermediate feature map F' of the n-th dimension
  • the scales of a feature map C n-1 are the same;
  • FIG convolution processing is executed to obtain the first characteristic corresponding to FIG. I C wherein FIG second intermediate C 'i, said first FIG intermediate wherein two C 'scale i is the first intermediate feature map F' i + 1 of the same dimensions, wherein, i is greater than or equal to 1 and smaller than n integer variable;
  • the fusion module is further configured to add the second intermediate feature map C'i and the corresponding first intermediate feature map F'i+1 to obtain the first intermediate feature map F'i+1.
  • Two feature map F i is further configured to add the second intermediate feature map C'i and the corresponding first intermediate feature map F'i+1 to obtain the first intermediate feature map F'i+1.
  • the detection module is further configured to perform convolution processing on the second feature map with the largest scale in the second feature maps of the multiple scales to obtain masks representing the positions of the faces.
  • the location area where the human hand and the human face are associated in the first image is determined.
  • the scale relationship between the first feature maps of the multiple scales is: And Wherein, C i represents each first feature map, L(C i ) represents the length of the first feature map C i , W(C i ) represents the width of the first feature map C i , and k 1 is greater than or An integer equal to 1, i is a variable, and the range of i is [2, n], and n represents the number of first feature maps.
  • the device further includes at least one of a display module and a distribution module, wherein
  • the display module is configured to highlight the associated human hand and human face in the first image
  • the allocation module is configured to allocate the same label to the associated face position and human hand position detected in the first image.
  • the device includes a neural network, the feature extraction module, the fusion module, and the detection module apply the neural network,
  • the device also includes a training module for training the neural network, wherein the step of training the neural network includes:
  • the training image is an image including a human object, and the training image has labeling information of a real-associated face position and a human hand position;
  • the network loss is determined based on the predicted associated face position and hand position and the label information, and the network parameters of the neural network are adjusted according to the network loss until the training requirement is met.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the above method.
  • the electronic device can be provided as a terminal, server or other form of device.
  • Fig. 10 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable and Programmable read only memory
  • PROM programmable read only memory
  • ROM read only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the power supply component 806 provides power for various components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the above-mentioned peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field-available A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application-specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field-available A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • Fig. 11 shows a block diagram of another electronic device according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server. 11, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932, for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to the network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as the instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet). connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that makes these instructions when executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner. Thus, the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more components for realizing the specified logical function.
  • Executable instructions may also occur in a different order than the order marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Electrophonic Musical Instruments (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

本公开涉及一种人脸和人手关联检测方法及装置、电子设备和存储介质,所述方法包括:获取第一图像,所述第一图像为人物对象的图像;对所述第一图像执行特征提取,得到多个尺度的第一特征图;对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,所述第二特征图的尺度与所述第一特征图的尺度一一对应;基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置。本公开实施例可简单方便的实现人脸和人手的关联检测。

Description

人脸和人手关联检测方法及装置、电子设备和存储介质
本公开要求在2019年09月18日提交中国专利局、申请号为201910882139.6、申请名称为“人脸和人手关联检测方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及计算机视觉技术领域,尤其涉及一种人脸和人手位置方法及装置、电子设备和存储介质。
背景技术
人体人脸人手关联是指将检测出的人脸和人手进行关联,从而通过这个关联的信息来将人手进行的某项操作与某个具体的人对应起来。
因为人体中人脸与人手之间有较远的距离,无法通过位置信息直接进行关联。所以,现有的技术中,通常使用关键点技术以及物体检测技术,来将对应的人脸框、人手框进行关联。
发明内容
本公开提出了一种图像处理中检测人脸和人手的技术方案。
根据本公开的一方面,提供了一种人脸和人手关联检测方法,其包括:获取第一图像,所述第一图像为人物对象的图像;对所述第一图像执行特征提取,得到多个尺度的第一特征图;对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,所述第二特征图的尺度与所述第一特征图的尺度一一对应;基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置。基于上述配置,本公开实施例可以简单方便的得到图像中相互关联的人脸和人手,同时还可以提高检测精度。
在一些可能的实施方式中,所述获取第一图像,包括:获取所述第二图像,所述第二图像为包括至少一个人物对象的图像;对所述第二图像执行人体目标检测,得到所述第一图像中所述至少一个人物对象中任一人物对象的检测框;将所述任一人物对象的所述检测框在所述第二图像中对应的图像区域,确定为所述任一人物对象的第一图像。基于上述配置,本公开实施例得到的第一图像中删除了其他环境因素的影响,能够进一步提高检测精度。
在一些可能的实施方式中,所述对所述第一图像执行特征提取,得到多个尺度的第一特征图,包括:将所述第一图像调整为预设尺度的第三图像;将所述第三图像输入至残差网络,得到所述多个尺度的第一特征图。基于上述配置,可以实现图像的尺度统一,提高适用性。
在一些可能的实施方式中,所述对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,包括:将所述多个尺度的第一特征图输入至特征金字塔网络,通过所述特征金字塔网络执行所述特征融合处理,得到所述多个尺度的第二特征图。基于上述配置,可以提高得到的多个尺度的第二特征图的特征精度。
在一些可能的实施方式中,按照尺度从小到大的顺序,所述多个第一特征图表示为{C 1,...,C n},其中,n表示第一特征图的数量,n为大于1的整数;所述对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,包括:利用第一卷积核对第一特征图C n执行卷积处理,获得与所述第一特征图C n对应的第二特征图F n,其中,所述第一特征图C n的尺度与所述第二特征图F n的尺度相同;对所述第二特征图F n执行线性插值处理获得与所述第二特征图F n对应的第一中间特征图F′ n,其中,所述第一中间特征图F′ n的尺度与第一特征图C n-1的尺度相同;利用第二卷积核对所述第 一特征图C n以外的第一特征图C i执行卷积处理,得到所述第一特征图C i对应的第二中间特征图C' i,所述第二中间特征图C' i的尺度与第一中间特征图F′ i+1的尺度相同,其中,i为大于或者等于1且小于n的整数变量;利用所述第二中间特征图C' i和对应的所述第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,其中,所述第一中间特征图F′ i+1由对应的所述第二特征图F i+1经线性插值得到。基于上述配置,可以融合不同尺度的特征信息,进一步提高特征精度。
在一些可能的实施方式中,所述利用所述第二中间特征图C' i和对应的所述第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,包括:将所述第二中间特征图C' i与对应的所述第一中间特征图F′ i+1进行加和处理,得到所述第二特征图F i。基于上述配置,可以有效的融合两个中间特征的特征信息。
在一些可能的实施方式中,所述基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置,包括:对所述多个尺度的第二特征图中尺度最大的第二特征图执行卷积处理,分别得到表示所述人脸位置的掩码图,以及表示所述人手位置的掩码图;基于所述人脸位置的掩码图以及所述人手位置的掩码图确定所述第一图像中关联的人手和人脸所在的位置区域。基于上述配置,可以方便的预测和表示关联的人脸和人手的位置。
在一些可能的实施方式中,所述多个尺度的第一特征图之间的尺度关系为:
Figure PCTCN2019120901-appb-000001
Figure PCTCN2019120901-appb-000002
其中,C i表示各第一特征图,L(C i)表示所述第一特征图C i的长度,W(C i)表示所述第一特征图C i的宽度,k 1为大于或者等于1的整数,i为变量,且i的范围为[2,n],n表示第一特征图的数量。
在一些可能的实施方式中,所述方法还包括以下方式中的至少一种:在所述第一图像中突出显示所述关联的人手和人脸;为所述第一图像中检测到的关联的人脸位置和人手位置分配相同的标签。基于上述配置,可以直观的体现关联的人脸和人手所在的图像区域,同时有效的区分不同人物对象的关联检测结果。
在一些可能的实施方式中,所述方法通过神经网络实现,其中,训练所述神经网络的步骤包括:获取训练图像,所述训练图像为包括人物对象的图像,所述训练图像具有真实关联的人脸位置和人手位置的标注信息;将所述训练图像输入至所述神经网络,通过所述神经网络预测所述训练图像中针对同一人物对象的关联的人脸位置和人手位置;基于预测出的关联的所述人脸位置以及人手位置以及所述标注信息确定网络损失,并根据所述网络损失调整所述神经网络的网络参数,直至满足训练要求。基于上述配置,可以实现神经网络的优化训练,保证网络检测精度。
根据本公开的第二方面,提供了一种人脸和人手关联检测装置,其包括:获取模块,用于获取第一图像,所述第一图像为人物对象的图像;特征提取模块,用于对所述第一图像执行特征提取,得到多个尺度的第一特征图;融合模块,用于对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,所述第二特征图的尺度与所述第一特征图的尺度一一对应;检测模块,用于基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置。
在一些可能的实施方式中,所述获取模块包括:获取单元,用于获取所述第二图像,所述第二图像为包括至少一个人物对象的图像;目标检测单元,用于对所述第二图像执行人体目标检测,得到所述第一图像中所述至少一个人物对象中任一人物对象的检测框;确定单元,用于将所述任一人物对象的所述检测框在所述第二图像中对应的图像区域,确定为所述任一人物对象的第一图像。
在一些可能的实施方式中,所述特征提取模块还用于将所述第一图像调整为预设尺度的第三图像;将所述第三图像输入至残差网络,得到所述多个尺度的第一特征图。
在一些可能的实施方式中,所述融合单元还用于将所述多个尺度的第一特征图输入至特征金字塔网络,通过所述特征金字塔网络执行所述特征融合处理,得到所述多个尺度的第二特征图。
在一些可能的实施方式中,按照尺度从小到大的顺序,所述多个第一特征图表示为{C 1,...,C n},其中,n表示第一特征图的数量,n为大于1的整数;所述融合模块还用于利用第一卷积核对第一特征图C n执行卷积处理,获得与所述第一特征图C n对应的第二特征图F n,其中,所述第一特征图C n的尺度与所述第二特征图F n的尺度相同;对所述第二特征图F n执行线性插值处理获得与所述第二特征图F n对应的第一中间特征图F′ n,其中,所述第一中间特征图F′ n的尺度与第一特征图C n-1的尺度相同;利用第二卷积核对所述第一特征图C n以外的第一特征图C i执行卷积处理,得到所述第一特征图C i对应的第二中间特征图C' i,所述第二中间特征图C' i的尺度与第一中间特征图F′ i+1的尺度相同,其中,i为大于或者等于1且小于n的整数变量;利用所述第二中间特征图C' i和对应的所述第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,其中,所述第一中间特征图F′ i+1由对应的所述第二特征图F i+1经线性插值得到。
在一些可能的实施方式中,所述融合模块还用于将所述第二中间特征图C' i与对应的所述第一中间特征图F′ i+1进行加和处理,得到所述第二特征图F i
在一些可能的实施方式中,所述检测模块还用于对所述多个尺度的第二特征图中尺度最大的第二特征图执行卷积处理,分别得到表示所述人脸位置的掩码图,以及表示所述人手位置的掩码图;基于所述人脸位置的掩码图以及所述人手位置的掩码图确定所述第一图像中关联的人手和人脸所在的位置区域。
在一些可能的实施方式中,所述多个尺度的第一特征图之间的尺度关系为:
Figure PCTCN2019120901-appb-000003
Figure PCTCN2019120901-appb-000004
其中,C i表示各第一特征图,L(C i)表示所述第一特征图C i的长度,W(C i)表示所述第一特征图C i的宽度,k 1为大于或者等于1的整数,i为变量,且i的范围为[2,n],n表示第一特征图的数量。
在一些可能的实施方式中,所述装置还包括显示模块和分配模块中的至少一种,其中所述显示模块,用于在所述第一图像中突出显示所述关联的人手和人脸;所述分配模块,用于为所述第一图像中检测到的关联的人脸位置和人手位置分配相同的标签。
在一些可能的实施方式中,所述装置包括神经网络,所述特征提取模块、所述融合模块和所述检测模块应用所述神经网络,所述装置还包括训练模块,用于训练所述神经网络,其中,训练所述神经网络的步骤包括:获取训练图像,所述训练图像为包括人物对象的图像,所述训练图像具有真实关联的人脸位置和人手位置的标注信息;将所述训练图像输入至所述神经网络,通过所述神经网络预测所述训练图像中针对同一人物对象的关联的人脸位置和人手位置;基于预测出的关联的所述人脸位置以及人手位置以及所述标注信息确定网络损失,并根据所述网络损失调整所述神经网络的网络参数,直至满足训练要求。
根据本公开的第三方面,提供了一种电子设备,其包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行第一方面中任意一项所述的方法。
根据本公开的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现第一方面中任意一项所述的方法。
根据本公开的第五方面,提供了一种计算机程序,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现第一方面中任意一项所述的方法。
本公开实施例,可以从第一图像中确定一个人物对象所在的区域对应的第一图像,并对第一图像进行特征提取处理得到相应的特征图,而后对特征图进行多尺度的特征融合处理,得到多个尺度的第二特征图,其中第二特征图相对于第一特征图具有更精确的特征信息,通过对第二特征图进行处理可以得到第一图像中关联的人手和人脸的位置,提高人脸和人手检测精度。另外,本公开实施例的技术方案不需要获取人耳或者手腕的关键点,可以直接得到图像中关联的人手和人脸的位置,具有简单方便且精度高的特点。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的一种人脸和人手关联检测方法的流程图;
图2示出根据本公开实施例的一种人脸和人手关联检测方法中步骤S10的流程图;
图3示出根据本公开实施例的第二图像的示意图;
图4示出根据本公开实施例的一种人脸和人手关联检测方法的步骤S20的流程图;
图5示出根据本公开实施例的一种人脸和人手关联检测方法中步骤S30的流程图;
图6示出根据本公开实施例的特征提取和特征融合过程的示意图;
图7示出根据本公开实施例的一种人脸和人手关联检测方法中步骤S40的流程图;
图8示出根据本公开实施例的训练神经网络的流程图;
图9示出根据本公开实施例的一种人脸和人手关联检测装置的框图;
图10示出根据本公开实施例的一种电子设备的框图;
图11示出根据本公开实施例的另一种电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一 种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
本公开实施例提供了一种人脸和人手关联检测方法,其可以应用在任意的图像处理装置中,例如,该方法可以应用在终端设备或服务器中,或者也可以应用在其它处理设备中,其中,终端设备可以包括用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该人脸和人手关联检测方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
图1示出根据本公开实施例的一种人脸和人手关联检测方法的流程图,如图1所示,所述人脸和人手关联检测方法包括:
S10:获取第一图像;
在一些可能的实施方式中,第一图像可以为人物对象的图像,其中可以包括至少一个人脸和至少一个人手,本公开实施例可以实现该第一图像中的人物对象的人手和人脸的关联检测,该关联是指得到的人脸和人手为同一人物对象的人脸和人手。
在一些可能的实施方式中,获取第一图像的方式可以包括:直接通过图像采集设备采集第一图像,其中图像采集设备可以为手机、摄像头、照相机等具有图像采集功能的设备。获取第一图像的方式也可以包括从其他设备接收传输的第一图像,或者从存储器中读取第一图像,或者第一图像也可以为从视频流中执行选帧操作后得到的图像帧,本公开对此不作具体限定。
在另一些可能的实施方式中,第一图像也可以为其他图像的部分图像区域,例如第一图像可以为通过接收的选择信息从其他图像中选择出的图像区域,或者也可以为通过目标检测的方式,如检测人体,检测得到的图像区域,本公开对此不作具体限定。
S20:对所述第一图像执行特征提取,得到多个尺度的第一特征图;
在一些可能的实施方式中,本公开实施例可以对第一图像执行特征提取处理,得到多个尺度的第一特征图,例如,本公开实施例可以将第一图像输入至特征提取网络,得到多个尺度的第一特征图,其中特征提取网络可以为卷积神经网络,如残差网络(Res-Net),通过该残差网络执行第一图像的特征提取,得到至少两个尺度的第一特征图。或者,在其他实施例中也可以采用其他类型的特征提取网络,得到该多个尺度的第一特征图,本公开对此不作具体限定。或者,在另一些可能的实施方式中,也可以通过对第一图像进行升采样或者降采样的方式得到多个尺度的第一特征图,例如通过不同的采样率得到相应的多个尺度的第一特征图。
S30:对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,所述第二特征图的尺度与所述第一特征图的尺度一一对应;
在一些可能的实施方式中,在得到多个尺度的第一特征图的情况下,可以对该多个尺度的第一特征图执行特征融合处理,得到相应尺度的第二特征图。其中,通过特征融合可以提高每个第二特征图内特征信息的精确度,从而可以进一步提高人脸和人手的关联检测精度。
在一些可能的实施方式中,可以通过特征金字塔网络执行该多个尺度的第一特征图的特征融合处理,其中,可以对相邻尺度的第一特征图的特征信息进行特征融合,通过依次从小尺度的第一特征图的特征信息融合到大尺度的第一特征图的特征信息,最终可以得到融合了所有尺度的第一特征图中的特征信息的第二特征图。
S40:基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置。
在一些可能的实施方式中,在得到多个尺度的第二特征图之后,可以基于该多个尺度的第二特征图执行人脸和人手的关联检测。其中,可以对各个尺度的第二特征图中的至少一个第二特征图执行卷 积处理,从而得到第一图像中关联的人脸位置和人手位置。例如,可以将尺度最大的第二特征图输入至卷积层执行卷积处理,分别得到关于人脸位置和人手位置的掩码图,其中可以包括一个人脸位置的第一掩码图,以及左手位置的第二掩码图,和右手位置的第三掩码图,通过得到的各掩码图可以对应的在第一图像中确定出关联的人手和人脸位置。
基于上述配置,本公开实施例可以不需要获取人耳或者手腕的关键点,以及也不需要分析是否满足高斯分布,可以直接通过第一图像的特征的多尺度提取以及特征融合得到关联的人手和人脸,具有简单方便且精度高的特点。
下面结合附图,对本公开实施例的过程进行详细说明。如上述实施例所述,本公开实施例得到的第一图像可以为人物对象的图像,其中,在实际应用过程中,得到的图像中可能包括多个人物对象,为了提高同一人物对象的人脸和人手的关联检测精度,本公开可以从得到的图像中得到每个人物对象的图像区域,再分别对每个图像区域执行特征提取和特征融合,最终得到每个人物对象的人脸和人手位置。图2示出根据本公开实施例的一种人脸和人手关联检测方法中步骤S10的流程图。所述获取第一图像,包括:
S101:获取第二图像,所述第二图像为包括至少一个人物对象的图像;
在一些可能的实施方式中,第一图像可以是基于第二图像获得的图像,其中,第二图像可以为至少一个人物对象的图像。获取第二图像的方式可以包括:直接通过图像采集设备采集第一图像,其中图像采集设备可以为手机、摄像头、照相机等具有图像采集功能的设备。获取第二图像的方式也可以包括从其他设备接收传输的第二图像,或者从存储器中读取第二像,或者第二图像也可以为从视频流中执行选帧操作后得到的图像帧,本公开对此不作具体限定。
图3示出根据本公开实施例的第二图像的示意图。其中,可以包括5个人物对象A、B、C、D和E。在其他实施例中,第二图像也可以仅包括一个人物对象,或者也可以包括其他数量的人物对象,本公开对此不作具体限定。
S102:对所述第二图像执行人体目标检测,得到所述第二图像中所述至少一个人物对象中任一人物对象的检测框;
在一些可能的实施方式中,在通过第二图像得到第一图像时,可以检测第一图像中针对每个人物对象的人体区域的位置,得到与该人物对象对应的第一图像,其中在第二图像中包括多个人物对象时,在得到的第一图像中可以包括一个人物对象的人体区域,同时也可以其他人物对象的至少一部分图像,如包括其他对象的人脸或者人手的至少一部分。本公开实施例通过对第一图像进行后续处理得到第一图像中为一个人物对象的人手和人脸。
如上所述,第二图像中可以包括至少一个人物对象,本公开可以对该第二图像执行目标检测,实现第二图像中人物对象的人体区域检测,得到每个人物对象的检测框。
在一些可能的实施方式中,可以通过能够执行人体目标检测神经网络检测第二图像中人物对象对应的检测框,该神经网络可以为卷积神经网络,其可以是经过训练能够精确的识别出图像中的每个人物对象,以及相应人物对象的位置区域(即检测框)的卷积神经网络,例如可以为R-CNN网络,或者也可以为其他能够实现目标检测的神经网络,本公开对此不作具体限定。
如图3所示,通过目标检测处理,得到了图像中的人物对象的人体区域对应的检测框,例如人物对象A的检测框A1,以及人物对象D的检测框D1,上述仅为示例性说明,也可以检测出其他人物对象的检测框。
其中,在得到检测框的过程中,可以识别图像中每个人物对象的检测框,也可以识别满足质量要求的检测框,例如图3中对于人物对象B、C和D,得到的检测框的质量值小于质量阈值,此时可以将人物对象B、C和D对应的检测框确定为不满足质量要求的检测框,做删除处理。其中检测框的质量值可以是在执行目标检测处理时,在得到检测框同时得到的关于该检测框的得分或者置信度,在该得分或者置信度大于质量阈值的情况下,则确定检测框满足质量要求。其中质量阈值可以为设定的数值,如80%,或者也可以为其他小于1的数值,本公开对此不作具体限定。
S103:将所述任一人物对象的所述检测框在所述第二图像中的图像区域,确定为所述任一人物对 象对应的第一图像。
在得到第二图像中每个人物对象的检测框的情况下,可以将第二图像中与检测框对应的图像区域,确定为该检测框对应的人物对象的第一图像。例如图3示出的实施例,可以得到第二图像中人物对象A的检测框A1,以及人物对象D的检测框D1。对应的可以将A1对应的图像区域确定为人物对象A的第一图像,以及检测框D1对应的图像区域确定为人物对象D的第一图像。
基于上述配置,本公开实施例得到的第一图像中删除了其他环境因素的影响,能够进一步提高检测精度。另外基于上述可以从第二图像中得到针对一个人物对象的图像区域(第一图像),虽然得到的第一图像为针对一个人物对象的图像,但是在实际应用过程中,由于第二图像中包括的各人物可能相近,此时得到的第一图像中也可能包括其他人物对象的至少一部分,例如,图3中的检测框D1除了包括人物对象D还可以包括人物C的人脸的一部分,本公开可以通过后续的处理过程得到第一图像中为同一人物对象的人脸和人手的位置。
图4示出根据本公开实施例的一种人脸和人手关联检测方法的步骤S20的流程图,其中所述对所述第一图像执行特征提取,得到多个尺度的第一特征图,包括:
S201:将所述第一图像调整为预设规格的第三图像;
在一些可能的实施方式中,得到的第一图像的尺度可能不同,本公开实施例可以将得到的第一图像调整为同一尺度,即调整为预设尺度,从而可以对相同尺度的图像执行后续的特征提取处理。其中,本公开实施例的预设尺度可以根据网络的设计和配置确定,例如本公开实施例的预设尺度可以为256*192(高度*宽度),但不作为本公开的具体限定。
其中,调整图像尺度的方式可以包括、上采样、降采样、图像插值中的至少一种,本公开对此也不作具体限定,也可以通过其他方式得到预设尺度的第三图像。
S202:将所述第三图像输入至残差网络,得到所述多个尺度的第一特征图。
在得到预设尺度的第三图像的情况下,可以对第三图像执行特征提取处理,例如可以将第三图像输入至残差网络(如Resnet50)执行图像的特征提取处理,得到不同尺度的第一特征图。其中,可以通过残差网络的不同卷积层输出不同尺度的第一特征图。
或者,在其他实施方式中,也可以通过其他特征提取网络得到该多尺度的第一特征图,如金字塔特征提取网络,或者通过升采样或者降采样的方式得到多尺度的第一特征图,例如本公开实施例的采样频率可以为1/8、1/16、1/32等,但本公开实施例对此不进行限定。
在一些可能的实施方式中,得到的各第一特征图之间的关系为
Figure PCTCN2019120901-appb-000005
Figure PCTCN2019120901-appb-000006
其中,C i表示各第一特征图,L(C i)表示第一特征图C i的长度,W(C i)表示第一特征图C i的宽度,k 1为大于或者等于1的整数,i为变量,且i的范围为[2,n],n为第一特征图的数量。即本公开实施例中的各第一特征图的长度和宽度之间的关系均为2的k1次方倍。
在一个示例中,本公开得到的第一特征图的数量可以为4个,可以分别表示为第一特征图C 1、C 2、C 3和C 4,其中,第一特征图C 1的长度和宽度可以分别对应的为第一特征图C 2的长度和宽度的二倍,第二特征图C 2的长度和宽度可以分别对应的为第三特征图C 3的长度和宽度的二倍,以及第三特征图C 3的长度和宽度可以分别对应的为第四特征图C 4的长度和宽度的二倍。本公开实施例上述C 1和C 2之间、C 2和C 3之间,以及C 3和C 4之间的长度倍数以及宽度倍数均相同,即k 1取值为1。在其他的实施例中,k 1可以为不同的值,例如可以为:第一特征图C 1的长度和宽度可以分别对应的为 第一特征图C 2的长度和宽度的二倍,第二特征图C 2的长度和宽度可以分别对应的为第三特征图C 3的长度和宽度的四倍,以及第三特征图C 3的长度和宽度可以分别对应的为第四特征图C 4的长度和宽度的八倍。本公开实施例对此不进行限定。
在得到第一图像对应的多个尺度的第一特征图的情况下,可以进一步执行各第一特征图的特征融合处理,提高得到的第二特征图的特征信息的精确度。
在一些可能的实施方式中,对第一特征图执行特征融合处理,可以利用金字塔特征提取网络(FPN)执行。即可以将多个尺度的第一特征图输入至特征金字塔网络,通过所述特征金字塔网络执行所述特征融合处理,得到第一特征图对应的第二特征图。或者也可以通过其他方式执行特征融合处理,例如可以通过卷积处理和上采样处理得到多个尺度第二特征图。基于上述配置,可以提高得到的多个尺度的第二特征图的特征精度。
图5示出根据本公开实施例的一种人脸和人手关联检测方法中步骤S30的流程图,其中所述对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,包括:
S301:利用第一卷积核对第一特征图C n执行卷积处理,获得与第一特征图C n对应的第二特征图F n,其中,第一特征图C n的尺度与第二特征图F n的尺度相同;
在一些可能的实施方式中,本公开实施例得到的第一特征图可以表示成{C 1,...,C n},即n个第一特征图,且C n可以为长度和宽度最小的特征图,即尺度最小的第一特征图。其中随着n值越大对应的第一特征图的尺度就越小,例如上述第一特征图C 1、C 2、C 3和C 4,尺度依次降低。
在执行特征融合处理时,可以首先得到尺度最小的第一特征图C n对应的第二特征图F n。例如,可以通过第一卷积核对第一特征图C n执行卷积处理,得到第一特征图C n对应的第二特征图F n,其中,第一特征图C n的尺度与第二特征图F n的尺度相同。同样的,第二特征图F n也是第二特征图中尺度最小的特征图。通过第一卷积核执行的卷积处理可以得到相对于第一特征图C n的特征信息更精确的第二特征图F n。其中,第一卷积核可以为3*3的卷积核,或者也可以是其他类型的卷积核。
S302:对所述第二特征图F n执行线性插值处理获得与第二特征图F n对应的第一中间特征图F′ n,其中第一中间特征图F′ n的尺度与第一特征图C n-1的尺度相同;
在得到第二特征图F n之后,可以利用该第二特征图F n获得与其对应的第一中间特征图F′ n,本公开实施例可以通过对第二特征图F n执行线性插值处理获得与第二特征图F n对应的第一中间特征图F′ n,其中,第一中间特征图F′ n的尺度与第一特征图C n-1的尺度相同,例如,在C n-1的尺度为C n的尺度 的二倍时,第一中间特征图F′ n的长度为第二特征图F n的长度的二倍,以及第一中间特征图F′ n的宽度为第二特征图F n的宽度的二倍。
S303:利用第二卷积核对第一特征图C n以外的第一特征图C i执行卷积处理,得到所述第一特征图C i对应的第二中间特征图C' i,所述第二中间特征图C' i的尺度与第一中间特征图F′ i+1的尺度相同,其中,i为大于或者等与1且小于n的整数变量;
在一些可能的实施方式中,可以获得第一特征图C n以外的各第一特征图C 1...C n-1对应的第二中间特征图C' 1...C' n-1,其中,可以利用第二卷积核分别对第一特征图C 1...C n-1进行卷积处理,分别得到与各第一特征图C 1...C n-1一一对应的第二中间特征图C' 1...C' n-1,其中第二卷积核可以为1*1的卷积核,但本公开对此不作具体限定。通过第二卷积核的卷积处理得到的各第二中间特征图的尺度与对应的第一特征图的尺度分别相同。其中,本公开实施例可以按照第一特征图C 1...C n-1的倒序,获得各第一特征图C 1...C n-1的第二中间特征图C′ 1...C′ n-1。即,可以先获得第一特征图C n-1对应的第二中间特征图C' n-1,而后获得第一特征图C n-2的对应的第二中间图C' n-2,以此类推,直至获得第一特征图C 1对应的第二中间特征图C' 1
S304:利用所述第二中间特征图C' i和对应的第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,其中,第一中间特征图F′ i+1由对应的第二特征图F i+1经线性插值得到。
在获得各第二中间特征图的,或者获得各第二中间特征图之后还可以对应的获得第一中间特征图F′ n以外的其他第一中间特征图F′ 1...F′ n-1,本公开实施例中,与第一特征图C 1...C n-1中的第一特征图C i对应的第二特征图F i=C′ i+F′ i+1,其中,第二中间特征图C′ i的尺度(长度和宽度)分别与第一中间特征图F′ i+1的尺度(长度和宽度)相等,并且第二中间特征图C′ i的长度和宽度与第一特征图C i的长度和宽度相同,因此得到的第二特征图F i的长度和宽度分别为第一特征图C i的长度和宽度。其中,i为大于或者等于1且小于n的整数。
具体的,本公开实施例依然可以采用倒序的处理方式获得第二特征图F n以外的各第二特征图F i。即,本公开实施例可以首先获得第一中间特征图F n-1,其中,可以利用第一特征图C n-1对应的第二中间图C' n-1与第一中间特征图F′ n进行加和处理得到第二特征图F n-1,其中,第二中间特征图C' n-1的长度 和宽度分别与第一中间特征图F′ n的长度和宽度相同,以及第二特征图F n-1的长度和宽度为第二中间特征图C' n-1和F′ n的长度和宽度。此时第二特征图F n-1的长度和宽度分别为第二特征图F n的长度和宽度的二倍(C n-1的尺度为C n的尺度的二倍)。进一步地,可以对第二特征图F n-1进行线性插值处理,得到第一中间特征图F′ n-1,使得F′ n-1的尺度与C n-1的尺度相同,继而可以利用第一特征图C n-2对应的第二中间图C' n-2与第一中间特征图F′ n-1进行加和处理得到第二特征图F n-2,其中,第二中间特征图C' n-2的长度和宽度分别与第一中间特征图F′ n-1的长度和宽度相同,以及第二特征图F n-2的长度和宽度为第二中间特征图C' n-2和F′ n-1的长度和宽度。例如第二特征图F n-2的长度和宽度分别为第二特征图F n-1的长度和宽度的二倍。以此类推,可以最终获得第一中间特征图F′ 2,以及根据该第一中间特征图F′ 2与第一特征图C' 1的加和处理得到第二特征图F 1,F 1的长度和宽度分别为与C 1的长度和宽度的相同。从而得到各第二特征图,并满足
Figure PCTCN2019120901-appb-000007
Figure PCTCN2019120901-appb-000008
并且L(F n)=L(C n),W(F n)=W(C n)。
例如,以上述四个第一特征图C 1、C 2、C 3和C 4为例进行说明。图6示出根据本公开实施例的特征提取和特征融合过程的示意图。其中,可以通过残差网络a执行特征提取处理,以及利用残差网络中的四个卷积层分别输出四个不同尺度的第一特征图C 1、C 2、C 3和C 4,而后利用特征提取网络b执行特征融合处理,获得多尺度的第二特征图。其中,首先可以将C 4经过一个3*3的第一卷积核计算得到一个新的特征图F 4(第二特征图),F 4的长度和宽度的大小与C 4相同。对F 4进行双线性插值的上采样(upsample)操作,得到一个长和宽都放大两倍的特征图,即第一中间特征图F′ 4。C 3经过一个1*1的第二卷积核计算得到一个第二中间特征图C' 3,C' 3与F′ 4大小相同,两个中间特征图相加,得到新的特征图F 3(第二特征图),使得第二特征图F 3的长度和宽度分别为第二特征图F 4二倍,同时与第一特征图C 3的尺度相同。对F 3进行双线形插值的上采样(upsample)操作,得到一个长和宽都放大两倍的特征图,即第一中间特征图F′ 3。C 2经过一个1*1的第二卷积核计算得到一个第二中间特征图C' 2,C' 2与F′ 3大小相同,两个中间特征图相加,得到新的特征图F 2(第二特征图),使得第二特征图F 2的长度和宽度分别为第二特征图F 3二倍。对F 2进行双线性插值的上采样(upsample)操作,得到一个长和宽都放大两倍的特征图,即第一中间特征图F′ 2。C 1经过一个1*1的第二卷积核计算得到一个第二中间特征图C' 1,C' 1与F′ 2大小相同,两个特征图相加,得到新的特征图F 1(第二特征图),使得第二特征图F 1的长度和宽度分别为第二特征图F 2二倍。经过FPN之后,同样得到了四个不同尺度的第二特征图,分别记为F 1、F 2、F 3和F 4。并且F 1和F 2之间的长度和宽度的倍数与C 1和C 2之间的长 度和宽度的倍数相同,以及F 2和F 3之间的长度和宽度的倍数与C 2和C 3之间的长度和宽度的倍数相同,F 3和F 4之间的长度和宽度的倍数与C 3和C 4之间的长度和宽度的倍数相同。
基于上述配置,可以融合不同尺度的特征信息,进一步提高特征精度。通过上述方式可以得到与多个尺度的第一特征图分别对应的第二特征图,第二特征图的特征信息相对于第一特征图的特征信息提高了精确度。
在得到第二特征图的情况下,可以根据第二特征图得到第一图像中针对同一人物对象的人脸和人手的位置。图7示出根据本公开实施例的一种人脸和人手关联检测方法中步骤S40的流程图。如上述实施例所述,本公开实施例中基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置,包括:
S401:对所述多个尺度的第二特征图中尺度最大的第二特征图执行卷积处理,分别得到表示所述人脸位置的掩码图,以及表示所述人手位置的掩码图;
在一些可能的实施方式中,可以将得到的多个尺度的第二特征图中的至少一个第二特征图输入至卷积层中,对该至少一个第二特征图执行进一步的特征融合,并对应的生成第一图像对应的同一人物对象的人脸位置的掩码图以及人手位置的掩码图。其中,由于尺度最高的第二特征图融合了各个尺度的特征图的特征信息,本公开可以将第二特征图输入至该卷积层中执行人手和人脸位置的关联检测。其中,得到的掩码图中的元素可以表示为由1和0构成,其中1表示人手或者人脸的位置区域。例如,本公开实施例可以得到同一人物对象的人脸位置的第一掩码图,左手位置的第二掩码图以及右手位置的第三掩码图,通过各掩码图中元素1的位置,即可以得到相应的关联的人脸和人手在第一图像中的位置。
在一些可能的实施方式中,如果只能检测到左手和右手中的一个手,则检测不到的人手对应的掩码图可以为全0掩码图。或者,如果检测不到关联的人脸和人手,则输出的掩码图也可以为全0掩码图。
在一些可能的实施方式中,得到的掩码图可以对应关联有人物对象标识以及类型标识,其中人物对象标识用于区分不同的人物对象,不同的人物对象可以具有不同的人物对象标识,类型标识可以用于表示掩码图对应的人脸位置、左手位置或者右手位置。通过上述人物对象标识以及类型标识可以清楚的确定每个掩码图对应的人物对象以及确定掩码图对应的是人脸或者人手(左手或者右手)。
S402:基于所述人脸位置的掩码图以及所述人手位置的掩码图确定所述第一图像中关联的人手和人脸所在的位置区域。
在得到关联的人手和人脸对应的掩码图的情况下,进一步得到第一图像中的关联的人手和人脸对应的位置区域。
本公开实施例得到的第一掩码图和第二掩码图的尺度可以和第一图像相同,从而可以根据掩码图确定的人脸位置映射到第一图像中相应的人脸图像区域,以及根据掩码图确定的人手位置映射到第一图像中的人手图像区域,进而得到关联的人手和人脸所在的位置区域。
在一些可能的实施方式中,在检测到所述第一图像中的关联的人脸和人手的位置后,可以基于得到的掩码图在第一图像中突出显示匹配的人脸和人手,例如将掩码图在第一图像中图像区域以检测框的方式表示,以提示关联的人脸和人手。如图3所示,在图像中可以显示人物对象D关联的人脸检测框D11和人手检测框D12和D13。同时,本公开实施例还可以为相关联的人脸和人手分配相同的标签,用以标识该人脸和人手为同一个人物对象的人脸和人手。
基于上述配置可以方便的预测和表示关联的人脸和人手的位置。
在一些可能的实施方式中,本公开实施例得到的关联人脸和人手的位置还可以用于确定人物对象姿态变化。例如,第一图像可以为基于视频流中的图像帧得到的,通过本公开实施例的方法可以检测出图像帧中针对同一任务对象的人脸位置的变化以及人手位置的变化,更进一步的,还可以通过对相应图像帧中的人脸位置进行表情识别,或者基于人手位置执行手势识别,从而可以得到表情的变化情况,或者手势的变化情况。
如上述实施例所述,本公开实施例中的人脸和人手关联检测方法可以应用在神经网络中,如卷积神经网络中,例如可以由残差网络和金字塔网络构建形成上述卷积神经网络。本公开还可以对神经网 络进行训练得到满足精度要求的神经网络。图8示出根据本公开实施例的训练神经网络的流程图。其中,所述训练神经网络可以包括:
S501:获取训练图像,所述训练图像为包括人物对象的图像,所述训练图像具有真实关联的人脸位置和人手位置的标注信息;
在一些可能的实施方式中,训练图像可以为一个人物对象的图像,同时训练图像中也可以包括其余人物对象的人脸或者人手中的一部分,从而可以提高训练精度。其中训练图像的数量为多个,本公开对训练图像的数量不作限制。
在一些可能的实施方式中,训练图像可以关联有真实的标注信息,用以监督神经网络的训练。其中,每个训练图像均具有真实关联的人脸位置和人手位置的标注信息,用以表示训练图像中针对同一人物对象的人脸位置和人手位置(左手和右手),其中,标注信息可以表示为标注框,或者也可以表示为位置坐标的形式,或者也可以表示成真实的关联的人手和人脸位置的掩码图,只要是能够确定训练图像中的关联的人脸位置和人手位置就可以作为本公开实施例。S502:将所述训练图像输入至所述神经网络,通过所述神经网络预测所述训练图像中针对同一人物对象的关联的人脸位置和人手位置;
在一些可能的实施方式,可以将训练图像输入至神经网络,进行特征提取、特征融合、以及关联的人手和人脸位置的检测。
例如,可以通过残差网络等特征提取网络执行训练图像的多尺度特征提取,得到多个尺度的第一预测特征图,具体特征提取的过程可以参照上述实施例的说明,在此不再重复说明。
在得到多个尺度的第一特征图之后,可以对该多个尺度的第一预测特征图执行特征融合处理,例如利用金字塔网络FPN执行该多个第一预测特征图的特征融合,得到多个尺度的第二预测特征图,其中,特征融合的具体过程在此也不作重复说明,具体可以参照上述实施例的过程。
在得到多个第二预测特征图的情况下,可以基于每个第二预测特征图执行卷积处理,得到基于每个第二预测特征图预测的关联的人脸和人手的位置的预测掩码图。
S503:基于针对所述训练图像预测出的关联的所述人脸位置以及人手位置以及所述标注信息确定网络损失,并根据所述网络损失调整所述神经网络的网络参数,直至满足训练要求。
本公开实施例可以根据各个尺度的第二预测特征图预测得到的人脸预测掩码图和人手预测掩码图与真实的人脸和人手的对应的掩码图之间的差异,得到网络损失,其中可以通过对数损失函数确定网络损失。例如,本公开实施例可以直接利用对数损失函数处理,得到每个尺度的第二预测特征图得到的预测掩码图和标注的真实掩码图之间的损失,并将该损失作为网络损失,调整神经网络的参数。也就是说,可以将每个尺度对应的损失都作为网络损失,单独的优化神经网络参数。
或者,在其他实施方式中,本公开实施例可以通过对数损失函数确定每个尺度的第二预测特征图得到的人脸预测掩码图、人手预测掩码图与真实标注信息对应的掩码图之间的子网络损失,并利用各尺度对应得到的子网络损失的加权和确定网络损失。也就是说,可以根据每个尺度对应的损失的加权和确定网络损失,用以一起优化神经网络参数。
另外,由于本公开实施例可以基于每个第二预测特征图的预测结果得到网络损失,因此得到的神经网络无论哪个尺度的第二预测特征图的预测结果的精度都会较高,进而可以提高整个神经网络的检测精度。
在得到网络损失的情况下,基于网络损失和损失阈值的比较结果调整神经网络的网络参数,例如,在网络损失大于损失阈值的情况下,反馈调整神经网络的参数,如调整特征提取网络、金字塔特征网络以及得到掩码图的卷积层的参数,重新对训练图像进行处理,直至得到的网络参数小于损失阈值。以及在网络损失小于损失阈值的情况下,可以确定为神经网络满足训练要求,此时可以终止训练。基于上述配置,可以实现神经网络的优化训练,保证网络检测精度。
综上所述,本公开实施例,可以从第一图像中确定一个人体对象所在的区域对应的第一图像,并对第一图像进行特征提取处理得到相应的特征图,而后对特征图进行多尺度的特征融合处理,得到多个尺度的第二特征图,其中第二特征图相对于第一特征图具有更精确的特征信息,通过对第二特征图进行处理可以得到第一图像中关联的人手和人脸的位置,提高人脸和人手检测精度。另外,本公开实 施例的技术方案不需要获取人耳或者手腕的关键点,可以直接得到图像中关联的人手和人脸的位置,具有简单方便且精度高的特点。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开还提供了人脸和人手关联检测装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种人脸和人手关联检测方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图9示出根据本公开实施例的一种人脸和人手关联检测装置的框图,如图9所示,所述人脸和人手关联检测装置包括:
获取模块10,用于获取第一图像,所述第一图像为人物对象的图像;
特征提取模块20,用于对所述第一图像执行特征提取,得到多个尺度的第一特征图;
融合模块30,用于对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,所述第二特征图的尺度与所述第一特征图的尺度一一对应;
检测模块40,用于基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置。
在一些可能的实施方式中,所述获取模块包括:
获取单元,用于获取所述第二图像,所述第二图像为包括至少一个人物对象的图像;
目标检测单元,用于对所述第二图像执行人体目标检测,得到所述第一图像中所述至少一个人物对象中任一人物对象的检测框;
确定单元,用于将所述任一人物对象的所述检测框在所述第二图像中对应的图像区域,确定为所述任一人物对象的第一图像。
在一些可能的实施方式中,所述特征提取模块还用于获取所述第二图像,所述第二图像为包括至少一个人物对象的图像;
对所述第二图像执行人体目标检测,得到所述第一图像中所述至少一个人物对象中任一人物对象的检测框;
将所述任一人物对象的所述检测框在所述第二图像中对应的图像区域,确定为所述任一人物对象的第一图像。
在一些可能的实施方式中,所述融合单元还用于将所述多个尺度的第一特征图输入至特征金字塔网络,通过所述特征金字塔网络执行所述特征融合处理,得到所述多个尺度的第二特征图。
在一些可能的实施方式中,按照尺度从小到大的顺序,所述多个第一特征图表示为{C 1,...,C n},其中,n表示第一特征图的数量,n为大于1的整数;
所述融合模块还用于利用第一卷积核对第一特征图C n执行卷积处理,获得与所述第一特征图C n对应的第二特征图F n,其中,所述第一特征图C n的尺度与所述第二特征图F n的尺度相同;
对所述第二特征图F n执行线性插值处理获得与所述第二特征图F n对应的第一中间特征图F′ n,其中,所述第一中间特征图F′ n的尺度与第一特征图C n-1的尺度相同;
利用第二卷积核对所述第一特征图C n以外的第一特征图C i执行卷积处理,得到所述第一特征图 C i对应的第二中间特征图C' i,所述第二中间特征图C' i的尺度与第一中间特征图F′ i+1的尺度相同,其中,i为大于或者等于1且小于n的整数变量;
利用所述第二中间特征图C' i和对应的所述第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,其中,所述第一中间特征图F′ i+1由对应的所述第二特征图F i+1经线性插值得到。
在一些可能的实施方式中,所述融合模块还用于将所述第二中间特征图C' i与对应的所述第一中间特征图F′ i+1进行加和处理,得到所述第二特征图F i
在一些可能的实施方式中,所述检测模块还用于对所述多个尺度的第二特征图中尺度最大的第二特征图执行卷积处理,分别得到表示所述人脸位置的掩码图,以及表示所述人手位置的掩码图;
基于所述人脸位置的掩码图以及所述人手位置的掩码图确定所述第一图像中关联的人手和人脸所在的位置区域。
在一些可能的实施方式中,所述多个尺度的第一特征图之间的尺度关系为:
Figure PCTCN2019120901-appb-000009
Figure PCTCN2019120901-appb-000010
其中,C i表示各第一特征图,L(C i)表示所述第一特征图C i的长度,W(C i)表示所述第一特征图C i的宽度,k 1为大于或者等于1的整数,i为变量,且i的范围为[2,n],n表示第一特征图的数量。
在一些可能的实施方式中,所述装置还包括显示模块和分配模块中的至少一种,其中
所述显示模块,用于在所述第一图像中突出显示所述关联的人手和人脸;
所述分配模块,用于为所述第一图像中检测到的关联的人脸位置和人手位置分配相同的标签。
在一些可能的实施方式中,所述装置包括神经网络,所述特征提取模块、所述融合模块和所述检测模块应用所述神经网络,
所述装置还包括训练模块,用于训练所述神经网络,其中,训练所述神经网络的步骤包括:
获取训练图像,所述训练图像为包括人物对象的图像,所述训练图像具有真实关联的人脸位置和人手位置的标注信息;
将所述训练图像输入至所述神经网络,通过所述神经网络预测所述训练图像中针对同一人物对象的关联的人脸位置和人手位置;
基于预测出的关联的所述人脸位置以及人手位置以及所述标注信息确定网络损失,并根据所述网络损失调整所述神经网络的网络参数,直至满足训练要求。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图10示出根据本公开实施例的一种电子设备的框图图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图10,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理***,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存 储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图11示出根据本公开实施例的另一种电子设备的框图。例如,电子设备1900可以被提供为一服务器。参照图11,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作***,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是***、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(***)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设 备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (21)

  1. 一种人脸和人手关联检测方法,其特征在于,包括:
    获取第一图像,所述第一图像为人物对象的图像;
    对所述第一图像执行特征提取,得到多个尺度的第一特征图;
    对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,所述第二特征图的尺度与所述第一特征图的尺度一一对应;
    基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置。
  2. 根据权利要求1所述的方法,其特征在于,所述获取第一图像,包括:
    获取第二图像,所述第二图像为包括至少一个人物对象的图像;
    对所述第二图像执行人体目标检测,得到所述第一图像中所述至少一个人物对象中任一人物对象的检测框;
    将所述任一人物对象的所述检测框在所述第二图像中对应的图像区域,确定为所述任一人物对象的第一图像。
  3. 根据权利要求1或2所述的方法,其特征在于,所述对所述第一图像执行特征提取,得到多个尺度的第一特征图,包括:
    将所述第一图像调整为预设尺度的第三图像;
    将所述第三图像输入至残差网络,得到所述多个尺度的第一特征图。
  4. 根据权利要求1-3中任意一项所述的方法,其特征在于,所述对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,包括:
    将所述多个尺度的第一特征图输入至特征金字塔网络,通过所述特征金字塔网络执行所述特征融合处理,得到所述多个尺度的第二特征图。
  5. 根据权利要求1-4中任意一项所述的方法,其特征在于,按照尺度从小到大的顺序,所述多个第一特征图表示为{C 1,...,C n},其中,n表示第一特征图的数量,n为大于1的整数;
    所述对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,包括:
    利用第一卷积核对第一特征图C n执行卷积处理,获得与所述第一特征图C n对应的第二特征图F n,其中,所述第一特征图C n的尺度与所述第二特征图F n的尺度相同;
    对所述第二特征图F n执行线性插值处理获得与所述第二特征图F n对应的第一中间特征图F′ n,其中,所述第一中间特征图F′ n的尺度与第一特征图C n-1的尺度相同;
    利用第二卷积核对所述第一特征图C n以外的第一特征图C i执行卷积处理,得到所述第一特征图C i对应的第二中间特征图C′ i,所述第二中间特征图C′ i的尺度与第一中间特征图F′ i+1的尺度相同,其中,i为大于或者等于1且小于n的整数变量;
    利用所述第二中间特征图C′ i和对应的所述第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,其中,所述第一中间特征图F′ i+1由对应的所述第二特征图F i+1经线性插值得到。
  6. 根据权利要求5所述的方法,其特征在于,所述利用所述第二中间特征图C′ i和对应的所 述第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,包括:
    将所述第二中间特征图C′ i与对应的所述第一中间特征图F′ i+1进行加和处理,得到所述第二特征图F i
  7. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置,包括:
    对所述多个尺度的第二特征图中尺度最大的第二特征图执行卷积处理,分别得到表示所述人脸位置的掩码图,以及表示所述人手位置的掩码图;
    基于所述人脸位置的掩码图以及所述人手位置的掩码图确定所述第一图像中关联的人手和人脸所在的位置区域。
  8. 根据权利要求1-7中任意一项所述的方法,其特征在于,所述方法还包括以下方式中的至少一种:
    在所述第一图像中突出显示所述关联的人手和人脸;
    为所述第一图像中检测到的关联的人脸位置和人手位置分配相同的标签。
  9. 根据权利要求1-8中任意一项所述的方法,其特征在于,所述方法通过神经网络实现,其中,训练所述神经网络的步骤包括:
    获取训练图像,所述训练图像为包括人物对象的图像,所述训练图像具有真实关联的人脸位置和人手位置的标注信息;
    将所述训练图像输入至所述神经网络,通过所述神经网络预测所述训练图像中针对同一人物对象的关联的人脸位置和人手位置;
    基于预测出的关联的所述人脸位置以及人手位置以及所述标注信息确定网络损失,并根据所述网络损失调整所述神经网络的网络参数,直至满足训练要求。
  10. 一种人脸和人手关联检测装置,其特征在于,包括:
    获取模块,用于获取第一图像,所述第一图像为人物对象的图像;
    特征提取模块,用于对所述第一图像执行特征提取,得到多个尺度的第一特征图;
    融合模块,用于对所述多个尺度的第一特征图执行特征融合处理,得到多个尺度的第二特征图,所述第二特征图的尺度与所述第一特征图的尺度一一对应;
    检测模块,用于基于得到的所述多个尺度的第二特征图检测所述第一图像中针对同一人物对象的关联的人脸位置和人手位置。
  11. 根据权利要求10所述的装置,其特征在于,所述获取模块包括:
    获取单元,用于获取第二图像,所述第二图像为包括至少一个人物对象的图像;
    目标检测单元,用于对所述第二图像执行人体目标检测,得到所述第一图像中所述至少一个人物对象中任一人物对象的检测框;
    确定单元,用于将所述任一人物对象的所述检测框在所述第二图像中对应的图像区域,确定为所述任一人物对象的第一图像。
  12. 根据权利要求10或11所述的装置,其特征在于,所述特征提取模块还用于将所述第一图像调整为预设尺度的第三图像;
    将所述第三图像输入至残差网络,得到所述多个尺度的第一特征图。
  13. 根据权利要求10-12中任意一项所述的装置,其特征在于,所述融合单元还用于将所述多个尺度的第一特征图输入至特征金字塔网络,通过所述特征金字塔网络执行所述特征融合处理,得到所述多个尺度的第二特征图。
  14. 根据权利要求10-13中任意一项所述的装置,其特征在于,按照尺度从小到大的顺序,所述多 个第一特征图表示为{C 1,...,C n},其中,n表示第一特征图的数量,n为大于1的整数;
    所述融合模块还用于利用第一卷积核对第一特征图C n执行卷积处理,获得与所述第一特征图C n对应的第二特征图F n,其中,所述第一特征图C n的尺度与所述第二特征图F n的尺度相同;
    对所述第二特征图F n执行线性插值处理获得与所述第二特征图F n对应的第一中间特征图F′ n,其中,所述第一中间特征图F′ n的尺度与第一特征图C n-1的尺度相同;
    利用第二卷积核对所述第一特征图C n以外的第一特征图C i执行卷积处理,得到所述第一特征图C i对应的第二中间特征图C′ i,所述第二中间特征图C′ i的尺度与第一中间特征图F′ i+1的尺度相同,其中,i为大于或者等于1且小于n的整数变量;
    利用所述第二中间特征图C′ i和对应的所述第一中间特征图F′ i+1得到所述第二特征图F n以外的第二特征图F i,其中,所述第一中间特征图F′ i+1由对应的所述第二特征图F i+1经线性插值得到。
  15. 根据权利要求14所述的装置,其特征在于,所述融合模块还用于将所述第二中间特征图C′ i与对应的所述第一中间特征图F′ i+1进行加和处理,得到所述第二特征图F i
  16. 根据权利要求10-15中任意一项所述的装置,其特征在于,所述检测模块还用于对所述多个尺度的第二特征图中尺度最大的第二特征图执行卷积处理,分别得到表示所述人脸位置的掩码图,以及表示所述人手位置的掩码图;
    基于所述人脸位置的掩码图以及所述人手位置的掩码图确定所述第一图像中关联的人手和人脸所在的位置区域。
  17. 根据权利要求10-16中任意一项所述的装置,其特征在于,所述装置还包括显示模块和分配模块中的至少一种,其中
    所述显示模块,用于在所述第一图像中突出显示所述关联的人手和人脸;
    所述分配模块,用于为所述第一图像中检测到的关联的人脸位置和人手位置分配相同的标签。
  18. 根据权利要求10-17中任意一项所述的装置,其特征在于,所述装置包括神经网络,所述特征提取模块、所述融合模块和所述检测模块应用所述神经网络,
    所述装置还包括训练模块,用于训练所述神经网络,其中,训练所述神经网络的步骤包括:
    获取训练图像,所述训练图像为包括人物对象的图像,所述训练图像具有真实关联的人脸位置和人手位置的标注信息;
    将所述训练图像输入至所述神经网络,通过所述神经网络预测所述训练图像中针对同一人物对象的关联的人脸位置和人手位置;
    基于预测出的关联的所述人脸位置以及人手位置以及所述标注信息确定网络损失,并根据所述网络损失调整所述神经网络的网络参数,直至满足训练要求。
  19. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至9中任意一项所述的方法。
  20. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。
  21. 一种计算机程序,其特征在于,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至9中的任意一项所述的方法。
PCT/CN2019/120901 2019-09-18 2019-11-26 人脸和人手关联检测方法及装置、电子设备和存储介质 WO2021051650A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020217021540A KR102632647B1 (ko) 2019-09-18 2019-11-26 얼굴과 손을 관련지어 검출하는 방법 및 장치, 전자기기 및 기억매체
JP2021538256A JP7238141B2 (ja) 2019-09-18 2019-11-26 顔と手を関連付けて検出する方法及び装置、電子機器、記憶媒体及びコンピュータプログラム
SG11202106831QA SG11202106831QA (en) 2019-09-18 2019-11-26 Method and apparatus for association detection for human face and human hand, electronic device, and storage medium
US17/362,037 US20210326587A1 (en) 2019-09-18 2021-06-29 Human face and hand association detecting method and a device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910882139.6A CN110647834B (zh) 2019-09-18 2019-09-18 人脸和人手关联检测方法及装置、电子设备和存储介质
CN201910882139.6 2019-09-18

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/362,037 Continuation US20210326587A1 (en) 2019-09-18 2021-06-29 Human face and hand association detecting method and a device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021051650A1 true WO2021051650A1 (zh) 2021-03-25

Family

ID=69010775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/120901 WO2021051650A1 (zh) 2019-09-18 2019-11-26 人脸和人手关联检测方法及装置、电子设备和存储介质

Country Status (7)

Country Link
US (1) US20210326587A1 (zh)
JP (1) JP7238141B2 (zh)
KR (1) KR102632647B1 (zh)
CN (1) CN110647834B (zh)
SG (1) SG11202106831QA (zh)
TW (1) TWI781359B (zh)
WO (1) WO2021051650A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113591967A (zh) * 2021-07-27 2021-11-02 南京旭锐软件科技有限公司 一种图像处理方法、装置、设备及计算机存储介质
CN113723322A (zh) * 2021-09-02 2021-11-30 南京理工大学 一种基于单阶段无锚点框架的行人检测方法及***
CN113936256A (zh) * 2021-10-15 2022-01-14 北京百度网讯科技有限公司 一种图像目标检测方法、装置、设备以及存储介质
CN114005178A (zh) * 2021-10-29 2022-02-01 北京百度网讯科技有限公司 人物交互检测方法、神经网络及其训练方法、设备和介质

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229455B (zh) * 2017-02-23 2020-10-16 北京市商汤科技开发有限公司 物体检测方法、神经网络的训练方法、装置和电子设备
WO2021146890A1 (en) * 2020-01-21 2021-07-29 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for object detection in image using detection model
CN111507408B (zh) * 2020-04-17 2022-11-04 深圳市商汤科技有限公司 图像处理方法及装置、电子设备和存储介质
CN111709415B (zh) * 2020-04-29 2023-10-27 北京迈格威科技有限公司 目标检测方法、装置、计算机设备和存储介质
CN111783621B (zh) * 2020-06-29 2024-01-23 北京百度网讯科技有限公司 人脸表情识别及模型训练的方法、装置、设备及存储介质
WO2022144601A1 (en) * 2020-12-29 2022-07-07 Sensetime International Pte. Ltd. Method and apparatus for detecting associated objects
AU2021203821B2 (en) * 2020-12-31 2022-08-18 Sensetime International Pte. Ltd. Methods, devices, apparatuses and storage media of detecting correlated objects involved in images
CN112528977B (zh) * 2021-02-10 2021-07-02 北京优幕科技有限责任公司 目标检测方法、装置、电子设备和存储介质
WO2022195338A1 (en) * 2021-03-17 2022-09-22 Sensetime International Pte. Ltd. Methods, apparatuses, devices and storage media for detecting correlated objects involved in image
WO2022195336A1 (en) * 2021-03-17 2022-09-22 Sensetime International Pte. Ltd. Methods, apparatuses, devices and storage medium for predicting correlation between objects
CN113557546B (zh) * 2021-03-17 2024-04-09 商汤国际私人有限公司 图像中关联对象的检测方法、装置、设备和存储介质
AU2021204583A1 (en) * 2021-03-17 2022-10-06 Sensetime International Pte. Ltd. Methods, apparatuses, devices and storage medium for predicting correlation between objects
CN113031464B (zh) * 2021-03-22 2022-11-22 北京市商汤科技开发有限公司 设备控制方法、装置、电子设备及存储介质
CN112766244B (zh) * 2021-04-07 2021-06-08 腾讯科技(深圳)有限公司 目标对象检测方法、装置、计算机设备和存储介质
WO2022096957A1 (en) * 2021-06-22 2022-05-12 Sensetime International Pte. Ltd. Body and hand association method and apparatus, device, and storage medium
JP2023504319A (ja) 2021-06-22 2023-02-03 センスタイム インターナショナル ピーティーイー.リミテッド 人体と人手を関連付ける方法、装置、機器及び記憶媒体
CN113591567A (zh) * 2021-06-28 2021-11-02 北京百度网讯科技有限公司 目标检测方法、目标检测模型的训练方法及其装置
CN113642505B (zh) * 2021-08-25 2023-04-18 四川大学 一种基于特征金字塔的人脸表情识别方法及装置
JP7446338B2 (ja) 2021-09-16 2024-03-08 センスタイム インターナショナル プライベート リミテッド 顔と手との関連度の検出方法、装置、機器及び記憶媒体
WO2023041969A1 (en) * 2021-09-16 2023-03-23 Sensetime International Pte. Ltd. Face-hand correlation degree detection method and apparatus, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460362A (zh) * 2018-03-23 2018-08-28 成都品果科技有限公司 一种检测人体部位的***及方法
CN109614876A (zh) * 2018-11-16 2019-04-12 北京市商汤科技开发有限公司 关键点检测方法及装置、电子设备和存储介质
EP3493105A1 (en) * 2017-12-03 2019-06-05 Facebook, Inc. Optimizations for dynamic object instance detection, segmentation, and structure mapping
CN109886066A (zh) * 2018-12-17 2019-06-14 南京理工大学 基于多尺度和多层特征融合的快速目标检测方法

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012053606A (ja) * 2010-08-31 2012-03-15 Sony Corp 情報処理装置および方法、並びにプログラム
CN109145911A (zh) * 2017-11-15 2019-01-04 中国石油大学(华东) 一种街拍照片目标人物提取方法
US10692243B2 (en) * 2017-12-03 2020-06-23 Facebook, Inc. Optimizations for dynamic object instance detection, segmentation, and structure mapping
CN108764164B (zh) * 2018-05-30 2020-12-08 华中科技大学 一种基于可变形卷积网络的人脸检测方法及***
CN109325450A (zh) * 2018-09-25 2019-02-12 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN109508681B (zh) * 2018-11-20 2021-11-30 北京京东尚科信息技术有限公司 生成人体关键点检测模型的方法和装置
CN109711273B (zh) * 2018-12-04 2020-01-17 北京字节跳动网络技术有限公司 图像关键点提取方法、装置、可读存储介质及电子设备
CN109858402B (zh) * 2019-01-16 2021-08-31 腾讯科技(深圳)有限公司 一种图像检测方法、装置、终端以及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3493105A1 (en) * 2017-12-03 2019-06-05 Facebook, Inc. Optimizations for dynamic object instance detection, segmentation, and structure mapping
CN108460362A (zh) * 2018-03-23 2018-08-28 成都品果科技有限公司 一种检测人体部位的***及方法
CN109614876A (zh) * 2018-11-16 2019-04-12 北京市商汤科技开发有限公司 关键点检测方法及装置、电子设备和存储介质
CN109886066A (zh) * 2018-12-17 2019-06-14 南京理工大学 基于多尺度和多层特征融合的快速目标检测方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113591967A (zh) * 2021-07-27 2021-11-02 南京旭锐软件科技有限公司 一种图像处理方法、装置、设备及计算机存储介质
CN113591967B (zh) * 2021-07-27 2024-06-11 南京旭锐软件科技有限公司 一种图像处理方法、装置、设备及计算机存储介质
CN113723322A (zh) * 2021-09-02 2021-11-30 南京理工大学 一种基于单阶段无锚点框架的行人检测方法及***
CN113936256A (zh) * 2021-10-15 2022-01-14 北京百度网讯科技有限公司 一种图像目标检测方法、装置、设备以及存储介质
CN114005178A (zh) * 2021-10-29 2022-02-01 北京百度网讯科技有限公司 人物交互检测方法、神经网络及其训练方法、设备和介质
CN114005178B (zh) * 2021-10-29 2023-09-01 北京百度网讯科技有限公司 人物交互检测方法、神经网络及其训练方法、设备和介质

Also Published As

Publication number Publication date
TWI781359B (zh) 2022-10-21
KR20210113612A (ko) 2021-09-16
SG11202106831QA (en) 2021-07-29
TW202113680A (zh) 2021-04-01
JP2022517914A (ja) 2022-03-11
CN110647834A (zh) 2020-01-03
US20210326587A1 (en) 2021-10-21
CN110647834B (zh) 2021-06-25
KR102632647B1 (ko) 2024-02-01
JP7238141B2 (ja) 2023-03-13

Similar Documents

Publication Publication Date Title
WO2021051650A1 (zh) 人脸和人手关联检测方法及装置、电子设备和存储介质
TWI724736B (zh) 圖像處理方法及裝置、電子設備、儲存媒體和電腦程式
CN110287874B (zh) 目标追踪方法及装置、电子设备和存储介质
CN111310616B (zh) 图像处理方法及装置、电子设备和存储介质
TWI747325B (zh) 目標對象匹配方法及目標對象匹配裝置、電子設備和電腦可讀儲存媒介
US11086482B2 (en) Method and device for displaying history pages in application program and computer-readable medium
WO2020134866A1 (zh) 关键点检测方法及装置、电子设备和存储介质
CN110781813B (zh) 图像识别方法及装置、电子设备和存储介质
WO2019205605A1 (zh) 人脸特征点的定位方法及装置
CN109522937B (zh) 图像处理方法及装置、电子设备和存储介质
JP2022533065A (ja) 文字認識方法及び装置、電子機器並びに記憶媒体
CN111242303A (zh) 网络训练方法及装置、图像处理方法及装置
CN113486830A (zh) 图像处理方法及装置、电子设备和存储介质
CN109344703B (zh) 对象检测方法及装置、电子设备和存储介质
CN109447258B (zh) 神经网络模型的优化方法及装置、电子设备和存储介质
CN108062168B (zh) 一种候选词上屏方法、装置和用于候选词上屏的装置
CN112381223A (zh) 神经网络训练与图像处理方法及装置
CN110019928B (zh) 视频标题的优化方法及装置
CN117893591B (zh) 光幕模板识别方法及装置、设备、存储介质和程序产品
KR20150027502A (ko) 이미지 촬영 방법 및 그 전자 장치
CN114594862A (zh) 一种推荐方法、装置和电子设备
CN111753596A (zh) 神经网络的训练方法及装置、电子设备和存储介质
CN112446265A (zh) 一种输入方法及装置
CN111694769A (zh) 数据读取方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19945573

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021538256

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.07.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19945573

Country of ref document: EP

Kind code of ref document: A1