[go: up one dir, main page]

WO2018033143A1 - Video image processing method, apparatus and electronic device - Google Patents

Video image processing method, apparatus and electronic device Download PDF

Info

Publication number
WO2018033143A1
WO2018033143A1 PCT/CN2017/098040 CN2017098040W WO2018033143A1 WO 2018033143 A1 WO2018033143 A1 WO 2018033143A1 CN 2017098040 W CN2017098040 W CN 2017098040W WO 2018033143 A1 WO2018033143 A1 WO 2018033143A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
video image
business object
information
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/098040
Other languages
French (fr)
Chinese (zh)
Inventor
栾青
张伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Publication of WO2018033143A1 publication Critical patent/WO2018033143A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/174Facial expression recognition

Definitions

  • the present application relates to artificial intelligence technology, and in particular, to a video image processing method, apparatus, and electronic device.
  • Internet video is considered a premium resource for ad placement because it can be an important entry point for business traffic.
  • Existing video advertisements are mainly inserted into a fixed-time advertisement at a certain time of video playback, or placed in a fixed position in the area where the video is played and its surrounding area.
  • the embodiment of the present application provides a technical solution for video image processing.
  • a method for processing a video image includes: performing facial expression detection of a face on a currently played video image including face information; and detecting a facial expression and a corresponding predetermined face When the expressions match, the presentation position of the business object to be presented in the video image is determined; and the business object is drawn by computer drawing at the presentation position.
  • a video image detecting module configured to perform facial expression detection of a face on a currently played video image including face information
  • a display position determining module configured to Determining, when the facial expression detected by the video image detecting module matches the corresponding predetermined facial expression, a presentation position of the business object to be presented in the video image
  • a business object drawing module configured to perform computer drawing at the display position The way to draw the business object.
  • another electronic device including:
  • a processor and a video image processing apparatus according to any of the above embodiments of the present application.
  • the processor runs the structured text detection system
  • the units in the video image processing apparatus of any of the above embodiments of the present application are executed.
  • a computer program comprising computer readable code, when a computer readable code is run on a device, a processor in the device performs the above-described An instruction of each step in the method of processing a video image according to an embodiment.
  • a computer readable storage medium for storing computer readable instructions, when executed, to implement the video image described in any of the above embodiments of the present application.
  • the method, device, and terminal device for processing a video image according to an embodiment of the present application perform facial expression detection on a currently played video image including face information, and match the detected facial expression with a corresponding predetermined facial expression.
  • the two match determine the presentation position of the business object to be presented in the video image, and then draw the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying advertisements, on the one hand,
  • the determined display position is drawn by using a computer drawing manner, and the business object is combined with the video playing, and the video data of the business object such as an advertisement, which is not related to the video, is transmitted through the network, thereby saving network resources and/or customers.
  • the business object is closely combined with the facial expressions in the video image to preserve the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing. Users can watch videos normally, which can reduce user's view Disgusted with the business object image in the show, but also the audience's attention to a certain extent, increase the influence of business objects.
  • FIG. 1 is a flow chart showing an embodiment of a method for processing a video image of the present application
  • FIG. 2 is a flow chart showing an embodiment of an acquisition method of a first convolutional network model of the present application
  • FIG. 3 is a schematic structural diagram of an embodiment of a first convolutional network model of the present application.
  • FIG. 4 is a flow chart showing another embodiment of a method for processing a video image of the present application.
  • FIG. 5 is a flow chart showing still another embodiment of a processing method of a video image of the present application.
  • FIG. 6 is a block diagram showing the structure of an embodiment of a processing apparatus for video images of the present application.
  • FIG. 7 is a structural block diagram showing another embodiment of a processing apparatus for a video image of the present application.
  • FIG. 8 is a schematic structural diagram of an embodiment of a terminal device according to the present application.
  • FIG. 9 is a schematic structural diagram of another embodiment of an electronic device according to the present application.
  • Embodiments of the present application can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with numerous other general purpose or special purpose computing system environments or configurations.
  • Examples of well-known terminal devices, computing systems, environments, and/or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, and the like include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients Machines, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, small computer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above, and the like.
  • Electronic devices such as terminal devices, computer systems, servers, etc., can be described in the general context of computer system executable instructions (such as program modules) being executed by a computer system.
  • program modules may include routines, programs, target programs, components, logic, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the computer system/server can be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communication network.
  • program modules may be located on a local or remote computing system storage medium including storage devices.
  • FIG. 1 is a flow chart of an embodiment of a method for processing a video image of the present application.
  • the method is performed by a computer system including a processing device of a video image.
  • the method of processing a video image of various embodiments of the present application may be exemplarily performed by an electronic device such as a computer system, an electronic device, or a server.
  • a method for processing a video image of this embodiment includes:
  • step S110 facial expression detection of the face is performed on the currently played video image containing the face information.
  • the face information may include, for example, but is not limited to, information related to the face, eyes, nose, and/or hair.
  • the video image may be an image of a live video that is being broadcast live, or a video image that has been recorded or is in the process of being recorded. Facial expressions include, but are not limited to, happiness, anger, pain, sadness, contemplation, daze, excitement, and the like.
  • a live video is taken as an example.
  • the live video platform includes multiple, such as a pepper live broadcast platform, a YY live broadcast platform, etc., each live broadcast platform includes multiple live broadcast rooms.
  • Each live room will include at least one anchor, and the anchor can broadcast a video to the fans in the live room where the electronic device is located, the live video includes multiple video images.
  • the subject in the above video image is usually a main character (ie, anchor) and a simple background (such as the anchor's home or other video recording venue, etc.), and the anchor often occupies a larger area in the video image.
  • the video image in the current live video can be obtained, and the video image can be detected by a preset face detection mechanism to determine the Whether the face information of the anchor is included in the video image, if the face information of the anchor is included, the video image is acquired or recorded for subsequent processing; if the face information of the anchor is not included, the video image of the next frame may be continued.
  • the above related processing is performed to obtain a video image in which the video image includes the face information of the anchor.
  • the video image may also be a video image in a short video that has been recorded.
  • the user can play the short video using the electronic device, and during the playing process, the electronic device can detect each frame of the video image. Whether to include the face letter of the anchor If the face information of the anchor is included, the video image is acquired for subsequent processing; if the face information of the anchor is not included, the video image may be discarded or not processed, and the next frame is obtained. The video image continues with the above processing.
  • the user can use his electronic device to detect whether the video image of each frame is included in the recorded video image of the anchor, if the person including the anchor For the face information, the video image is acquired for subsequent processing; if the face information of the anchor is not included, the video image may be discarded or not processed, and the next frame of the video image may be acquired to continue the above processing.
  • the electronic device that plays the video image or the electronic device used by the anchor is provided with a mechanism for performing facial expression detection on the video image, and the video image of each frame including the face information currently played by the facial expression detection mechanism can be Perform facial expression detection to obtain a facial expression of a face detected from the video image.
  • An optional process may be that the electronic device acquires a video image currently being played, and is detected by a preset facial expression.
  • the mechanism may extract an image including a face region from the video image, and then analyze and extract the image of the face region to obtain feature data of each part (including eyes, mouth, face, etc.) in the face region. By analyzing the feature data, it is determined which facial expression of the face in the video image belongs to happy, angry, painful, sad, contemplative, dazed, excited, and the like.
  • step S110 may be performed by the processor invoking a corresponding instruction stored in the memory, or may be performed by video image detection module 601 being executed by the processor.
  • step S120 when the detected facial expression matches the corresponding predetermined facial expression, the presentation position of the business object to be presented in the video image is determined.
  • the business object is an object created according to a certain business requirement, such as advertisement, entertainment, weather forecast, traffic forecast, pet, education, consultation, service, and the like.
  • the presentation position may be a center position of a designated area in the video image, or may be a coordinate of a plurality of edge positions in the specified area or the like.
  • the business object may be a special effect including semantic information, for example, may include at least one or any of the following special effects including the advertisement information: two-dimensional sticker special effects, three-dimensional special effects, particle special effects, and the like.
  • feature data of a plurality of different facial expressions may be stored in advance, and different facial expressions are marked correspondingly to distinguish the meaning represented by each facial expression.
  • the facial expression of the face can be detected from the video image by the processing of the above step S110, and the feature data of the detected facial expression of the face can be compared with the feature data of each facial expression stored in advance, if The feature data of the plurality of different facial expressions stored in advance includes the same feature data as the feature data of the facial expression of the detected face, and then it can be determined that the detected facial expression matches the corresponding predetermined facial expression.
  • the matching result may be determined by a calculation manner.
  • a matching algorithm may be set to calculate a matching degree between the feature data of any two facial expressions, for example, a facial expression that detects a human face may be used.
  • the feature data is matched with the feature data of any of the pre-stored facial expressions to obtain a matching degree value between the two, and the detected facial expression of the face and each of the pre-stored faces are respectively calculated by the above manner.
  • the matching degree value between the expressions is selected from the obtained matching degree value, and if the maximum matching degree value exceeds the predetermined matching threshold, the pre-stored facial expression corresponding to the largest matching degree value may be determined. Matches the detected facial expressions. If the maximum matching degree value does not exceed the predetermined matching threshold, the matching fails, that is, the detected facial expression is not a predetermined facial expression, and at this time, the processing of the above step S110 may be continued on the subsequent video image.
  • the meaning represented by the predetermined facial expression matched by the detected facial expression may be determined first, and may be in a plurality of preset display positions.
  • the presentation position associated with the meaning of the matched predetermined facial expression or the corresponding presentation position is selected as the presentation position of the business object to be presented in the video image. For example, taking a live video as an example, when detecting a happy facial expression of the anchor, the face area or the background area may be selected as a presentation position related to or corresponding to the facial expression of the school.
  • step S120 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a presentation location determining module 602 executed by the processor.
  • step S130 the business object is drawn by computer drawing at the presentation position.
  • a corresponding business object such as an image advertisement with a predetermined product identifier
  • a computer drawing in the area where the anchor of the video image is located.
  • the fan is interested in the business object, the area where the business object is located may be clicked on the electronic device, and the electronic device of the fan may obtain the network link corresponding to the business object, and enter the business object through the network link.
  • the business object can be drawn by computer drawing, and the appropriate computer graphics image can be adopted.
  • Implementation by drawing or rendering may include, but is not limited to, drawing based on an Open Graphics Language (OpenGL) graphics rendering engine, and the like.
  • OpenGL defines a professional graphical program interface for cross-programming language and cross-platform programming interface specifications. It is hardware-independent and can easily draw 2D or 3D graphics images.
  • the application is not limited to the drawing method based on the OpenGL graphics rendering engine, and other methods may be adopted.
  • the drawing method based on the graphics engine (Unity) or the Open Computing Language (OpenCL) is also applicable to the present invention. Apply for each embodiment.
  • step S130 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a business object rendering module 603 executed by the processor.
  • the method for processing a video image provided by the embodiment of the present application performs facial expression detection on a currently played video image including face information, and matches the detected facial expression with a corresponding predetermined facial expression, when the two match Determining the presentation position of the business object to be presented in the video image, and then drawing the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying the advertisement, on the one hand, the computer is used at the determined display position.
  • the business object is combined with video playing, and does not need to transmit video data of a business object such as an advertisement that is not related to the video through the network, thereby saving network resources and/or system resources of the client;
  • a business object such as an advertisement that is not related to the video through the network, thereby saving network resources and/or system resources of the client;
  • the business object is closely combined with the facial expressions in the video image, and can retain the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing the user to watch the video normally, Reduce the number of business pairs that users display on video images Resentment, but also to attract the audience's attention to a certain extent, increase the influence of business objects.
  • the process of performing face facial expression detection on the video image in the step S110 in the first embodiment may be implemented by using a corresponding feature extraction algorithm or using a neural network model such as a convolutional network model.
  • 2 is a flow chart of an embodiment of a method for acquiring a first convolutional network model of the present application.
  • a convolutional network model is taken as an example to describe facial expression detection of a face on a video image.
  • a first convolutional network model for detecting a face attribute in an image may be pre-trained.
  • the method for acquiring the first convolutional network model of this embodiment may be performed by any electronic device having data acquisition, processing, and transmission functions, including, but not limited to, a mobile terminal.
  • the training sample may be obtained in a plurality of manners, and the training sample may be at least one sample image including face information, and the information of the face attribute is marked in the sample image.
  • the method for obtaining the first convolutional network model of the embodiment includes:
  • step S210 at least one sample image including face information is acquired.
  • the sample image is labeled with information about the face attribute.
  • the face attributes may include, for example, local attributes and global attributes, for example, but not limited to: hair color, hair length, eyebrow length, eyebrow thick or sparse, eye size, eyes open or The closure, the height of the bridge of the nose, the size of the mouth, the opening or closing of the mouth, whether or not to wear glasses, whether to wear a mask, etc.
  • global attributes include, for example, but not limited to, race, gender, age, and expression.
  • the sample image in this embodiment may be a plurality of images of video or continuous shooting, or may be any image including an image including a human face and/or an image not including a human face.
  • the sample image may be an image that satisfies a preset resolution condition.
  • the above preset resolution condition may be: the longest side of the image does not exceed 640 pixels, the shortest side does not exceed 480 pixels, and the like.
  • the sample image in various embodiments of the present application may be obtained by an image acquisition device, which may be, for example, a dedicated camera or a camera integrated in other devices.
  • the acquired image may not satisfy the above preset resolution condition, in order to obtain a sample image that satisfies the above preset resolution condition, in the present application
  • the collected image may be scaled to obtain at least one sample image that meets the preset resolution condition.
  • the information of the face attribute such as happiness, pain, sadness, anger, etc.
  • the information of the face attribute marked in each sample image and the sample image may be used as training data. storage.
  • the face in the sample image can be positioned to obtain the exact position of the face in the sample image. For details, refer to the process of step S220 described below.
  • step S220 for each sample image in the at least one sample image, a face and a face key point in the sample image are detected, and a face in the sample image is located through a face key point to obtain a face face. information.
  • each face has a certain feature point, such as a corner of the eye, an end of the eyebrow, a corner of the mouth, a tip of the nose, and the like, and a boundary point of the face, etc., in which a key point of the face is obtained ( That is, the key feature points), you can calculate the sample through the key points of the face. a mapping of a face in the image to a preset standard face or a similar transformation, aligning the face in the sample image with the standard face, thereby positioning the face in the sample image to obtain a sample image. Positioning information of the face.
  • a certain feature point such as a corner of the eye, an end of the eyebrow, a corner of the mouth, a tip of the nose, and the like, and a boundary point of the face, etc.
  • step S230 a sample image containing face positioning information is taken as a training sample.
  • the supervision information for training the first convolutional network model may be set in advance. For details, refer to the processing of step S240 described below.
  • steps S210-S230 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a training sample acquisition module 604 executed by the processor.
  • step S240 an attribute having a size order feature in the face attribute is encoded.
  • the attributes of the size order feature may be, for example, age, distance between two eyes, and the like.
  • the age is taken as an example, and the standard age a is set, and the code may be one of the following forms or a combination thereof:
  • Form 1 Encoded as x 1 , x 2 , ... x i ..., where x i is a binary value, and the value is 0 or 1. If the age i is less than or equal to a, the value of x i is 1, if the age If i is greater than a, the value of x i is 0.
  • Form 2 coded as x 1 , x 2 ,...x i ..., where x i is a binary value, and the value is 0 or 1. If the age i is equal to a divided by k, then x i has a value of 1, otherwise, the value of i x is 0. Where k can be a positive integer of any value, and its value can be manually defined or randomly selected.
  • step S240 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by an encoding module 605 executed by the processor.
  • step S250 the coded attribute is used as the supervision information of the training first convolutional network model, and the first convolutional network model is trained using the training samples to obtain a first convolutional network model for detecting the face attribute in the image. .
  • the front end of the first convolutional network model may include a combination of multiple convolutional layers, pooling layers, and non-linear layers, and the back end may be a loss layer, such as based on a cost function (softmax) and / or loss layer of an algorithm such as cross entropy.
  • a loss layer such as based on a cost function (softmax) and / or loss layer of an algorithm such as cross entropy.
  • FIG. 3 an optional structure of the first convolutional network model is shown in FIG. 3, wherein:
  • A is an input layer for reading sample images, face attributes, and encoding of partial face attributes.
  • the input layer may preprocess the sample image, and output a face image including positioning information, information of a face attribute, or a code of a partial face attribute.
  • the input layer outputs the preprocessed face image to the convolution layer, and inputs the information of the preprocessed face attribute and/or the code of the partial face attribute to the loss layer.
  • the B layer is a convolution layer, and the input of the convolution layer is a pre-processed face image or image feature, and the feature of the face image is obtained by a predetermined linear transformation output.
  • the C layer is a nonlinear layer, and the nonlinear layer can nonlinearly transform the characteristics of the input of the convolution layer, so that the characteristics of the output have strong expression ability.
  • the D is a pooling layer, which can map multiple values to a value. Therefore, the pooling layer can enhance the nonlinearity of the learned features, and can also make the spatial size of the output features smaller. Enhance the translation (ie, face translation) invariance of the learned features, keeping the extracted features unchanged.
  • the output feature of the pooling layer can be used again as the input data of the convolution layer or the input data of the fully connected layer.
  • the outermost rectangular frame of the convolutional layer, the nonlinear layer, and the pooling layer indicates that the convolutional layer, the nonlinear layer, and the pooled layer may be repeated one or more times, that is, a convolutional layer or a nonlinear layer.
  • the combination with the pooling layer may be repeated one or more times, wherein the output data of each pooling layer may be used as the re-input data of the convolution layer.
  • Multiple combinations of the convolutional layer, the nonlinear layer and the pooled layer can better process the input sample image, so that the features in the sample image have better expression ability.
  • the E layer is a fully connected layer that linearly transforms the input data of the pooled layer and projects the learned features into a better subspace to facilitate property prediction.
  • the F layer is a nonlinear layer, and the nonlinear layer functions as a nonlinear layer, and the input characteristics of the fully connected layer are nonlinearly transformed. Its output characteristics can be used as input data for the loss layer or as input data for the fully connected layer again.
  • the outermost rectangular frame of the fully connected layer and the nonlinear layer indicates that the fully connected layer and the nonlinear layer may be repeated one or more times.
  • the G layer is one or more loss layers that are primarily responsible for calculating the information of the predicted face attributes and/or the errors of the information and/or coding of the encoded face attributes.
  • the network parameters in the first convolutional network model can be trained by the gradient descent algorithm passed backwards, which can make the input layer input only the image, and can output the face attribute corresponding to the face in the input image. The information thus leads to the first convolutional network model.
  • the input layer is responsible for simply processing the input
  • the combination of the convolutional layer, the nonlinear layer and the pooling layer is responsible for the feature extraction of the sample image, the information extracted from the fully connected layer and the nonlinear layer to the face attribute information and/or Or the mapped map
  • the loss layer is responsible for calculating the prediction error.
  • step S250 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a first convolutional network model determination module 606 executed by the processor.
  • the first convolutional network model obtained by the training can facilitate subsequent facial expression detection on the currently played video image containing the face information, and match the detected facial expression with the corresponding predetermined facial expression.
  • determine the presentation position of the business object to be presented in the video image and then draw the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying advertisements, on the one hand,
  • the determined display position is drawn by using a computer drawing manner, and the business object is combined with the video playing, and the video data of the business object such as an advertisement, which is not related to the video, is transmitted through the network, thereby saving network resources and/or customers.
  • the business object is closely combined with the facial expressions in the video image to preserve the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing.
  • the user can watch the video normally, which can reduce the user's view on the video image.
  • a method for processing a video image of this embodiment includes:
  • step S410 the currently played video image containing the face information is acquired.
  • step S410 For the specific processing of the foregoing step S410, refer to the related content in step S110 in the foregoing embodiment shown in FIG. 1 , and details are not described herein again.
  • step S420 based on the face information in the video image, the pre-trained first convolutional network model for detecting the face attribute in the image is used to perform facial expression detection of the face on the video image.
  • the acquired video image including the face information may be input into the first convolutional network model trained in the foregoing embodiment shown in FIG. 2, and the video may be used by the first convolutional network model.
  • the image performs processing such as pre-processing such as scaling, feature extraction, mapping, and transformation to perform facial expression detection on the face of the video image to obtain a facial expression of the face included in the video image.
  • steps S410-S420 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a video image detection module 601 that is executed by the processor.
  • step S430 when the detected facial expression matches the corresponding predetermined facial expression, the feature point of the face attribute in the face region corresponding to the detected facial expression is extracted.
  • a certain feature point such as an eye, a nose, a mouth, a facial contour, and the like may be included in the face.
  • the detection of the face in the video image and the determination of the feature point can be implemented in any suitable related art, which is not limited in the embodiment of the present application.
  • linear feature extraction methods such as principal component analysis (PCA), linear discriminant analysis (LDA), independent component analysis (ICA), etc.; for example, nonlinear feature extraction methods such as kernel principal component analysis (Kernel PCA), manifolds
  • PCA principal component analysis
  • LDA linear discriminant analysis
  • ICA independent component analysis
  • kernel PCA kernel principal component analysis
  • the learning and the like can also be performed by using the trained neural network model, such as the convolutional network model in the embodiment of the present application, for the feature point extraction of the face attribute.
  • the face is detected from the video image of the live video and the feature points of the face attribute are determined; for example, during the playback of a recorded video. , detecting a face from the played video image and determining a feature point of the face attribute; for example, detecting a face from the recorded video image and determining a feature point of the face attribute during recording of a certain video, etc. .
  • step S440 the presentation position of the business object to be presented in the video image is determined according to the feature point of the face attribute.
  • the one or more presentation positions of the business object to be displayed in the video image may be determined based on the basis.
  • an optional implementation manner may include, but is not limited to:
  • the second convolutional network model for determining the presentation position of the business object in the video image is used to determine the presentation position of the business object to be presented in the video image.
  • the second method determines the presentation position of the business object to be presented in the video image according to the feature point of the face attribute and the type of the business object to be presented.
  • a convolutional network model is pre-trained, that is, the second convolutional network model, and the trained second convolutional network model has the determined service object in the The function of presenting the position in the video image; alternatively, a convolutional network model that has been trained by a third party to have the function of determining the presentation position of the business object in the video image can also be used directly.
  • the training of the business object is described, but those skilled in the art should understand that the second convolutional network model can also train the face when training the business object. Joint training of faces and business objects.
  • an optional training method includes the following process:
  • the feature vector includes position information and/or confidence information of the business object in the sample image of the training sample, and a face feature vector corresponding to the face attribute in the sample image.
  • the confidence information of the business object indicates the probability that the business object can achieve the effect (such as being focused or clicked or viewed) when the current location is displayed.
  • the probability may be set according to the statistical analysis result of the historical data, or may be According to the results of the simulation experiment, it can also be set according to the artificial experience.
  • only the location information of the business object may be trained according to actual needs, or only the confidence information of the business object may be trained, and the location information and or the confidence information of the business object may be trained.
  • the location information and or the confidence information of the business object are trained, so that the trained second convolutional network model can more effectively and accurately determine the location information and the confidence information of the business object, so as to provide the display of the business object. in accordance with.
  • the second convolutional network model is trained by a large number of sample images.
  • the sample image of the training sample may be at least one sample image including the face information in the embodiment shown in FIG. 2, which may be used.
  • the business object sample image with the business object is trained on the second convolutional network model.
  • the business object sample image used for training may include face information in addition to the business object.
  • the business object in the business object sample image in the embodiment of the present application may be marked with pre-labeled location information, or confidence information, or location information and or confidence information. Of course, in practical applications, this information can also be obtained through other means.
  • the location information and/or confidence information of the business object and the sample image of a certain face attribute are used as training samples, and the feature vector is extracted to obtain the feature information including the location information and/or the confidence information of the business object.
  • the vector, as well as the face feature vector corresponding to the face attribute are used as training samples, and the feature vector is extracted to obtain the feature information including the location information and/or the confidence information of the business object.
  • the second convolutional network model can be used to simultaneously train the face and the business object.
  • the feature vector of the sample image also includes the features of the face.
  • the obtained feature vector convolution result includes the location information and/or the confidence information of the service object, and the feature vector convolution result corresponding to the face feature vector corresponding to the face attribute.
  • the feature vector convolution result may also include face information.
  • the number of times of convolution processing on the feature vector can be set according to actual needs, that is, in the second convolutional network model, the number of layers of the convolution layer can be set according to actual needs, and will not be described here.
  • the convolution result is the result of feature extraction of the feature vector, which can effectively represent the business object corresponding to the feature of the face in the video image.
  • the feature vector when the feature vector includes both the location information of the service object and the confidence information of the service object, that is, when the location information and the confidence information of the service object are trained,
  • the eigenvector convolution result is shared in the subsequent judgment of the convergence condition, and no need to perform repeated processing and calculation, which is beneficial to reduce resource loss caused by data processing, and improve data processing speed and efficiency.
  • the convergence condition can be appropriately set by a person skilled in the art according to actual needs.
  • the information satisfies the convergence condition, it can be considered that the network parameters in the second convolutional network model are properly set; when the information cannot satisfy the convergence condition, it can be considered that the network parameters in the second convolutional network model are not properly set and need to be performed.
  • the adjustment may be an iterative process until the result of convolution processing the feature vector using the adjusted network parameters satisfies the convergence condition.
  • the convergence condition may be set according to a preset standard location and/or a preset standard confidence, for example, a location indicated by the location information of the service object in the feature vector convolution result and a preset The distance between the standard positions satisfies a certain threshold as a convergence condition of the location information of the service object; the difference between the confidence level indicated by the confidence information of the service object in the feature vector convolution result and the preset standard confidence satisfies a certain threshold The convergence condition of the confidence information as a business object, and the like.
  • a preset standard location and/or a preset standard confidence for example, a location indicated by the location information of the service object in the feature vector convolution result and a preset The distance between the standard positions satisfies a certain threshold as a convergence condition of the location information of the service object; the difference between the confidence level indicated by the confidence information of the service object in the feature vector convolution result and the preset standard confidence satisfies a certain threshold.
  • the preset standard location may be an average location obtained by averaging the location of the service object in the sample image of the training sample; the preset standard confidence may be in the sample image of the training sample.
  • the confidence level of the business object is averaged after the average processing. Since the sample image is a sample to be trained and the amount of data is large, the standard position and/or standard confidence can be set according to the position and/or confidence of the business object in the sample image of the training sample, so as to set the standard position and standard confidence. The degree is more objective and precise.
  • an optional manner includes:
  • the confidence information of the corresponding service object in the feature vector convolution result Obtaining the confidence information of the corresponding service object in the feature vector convolution result, calculating the Euclidean distance between the confidence level indicated by the confidence information of the corresponding service object and the preset standard confidence, and obtaining the confidence of the corresponding business object.
  • the Euclidean distance method is adopted, and the implementation is simple and can effectively indicate whether the convergence condition is satisfied.
  • the embodiment of the present application is not limited thereto, and other methods such as a horse distance, a bar distance, and the like may also be adopted.
  • the preset standard position is an average position obtained by averaging the positions of the business objects in the sample image of the training sample; and/or, the preset standard confidence is the pair of training samples.
  • the confidence level of the business object in the sample image is averaged after the average processing.
  • determining whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence condition it can be set by a person skilled in the art according to actual conditions, which is not limited by the embodiment of the present application.
  • the network parameters are iteratively trained on the second convolutional network model until the position information and/or the confidence information and the face feature vector of the service object after the iterative training satisfy the corresponding convergence condition.
  • the second convolutional network model can feature extracting and classifying the presentation position of the business object based on the face presentation, thereby having the position of determining the presentation position of the business object in the video image.
  • the second convolutional network model can also determine the order of the presentation effects in the plurality of presentation locations by the training of the confidence of the business object, and the plurality of presentations are based on the order of the pros and cons The final presentation position is determined in the presentation position.
  • a valid presentation location can be determined based on the current image in the video.
  • the sample image may be pre-processed, including: acquiring a plurality of sample images, where each sample image includes the annotation information of the business object; Determining the location of the business object, determining whether the distance between the determined location of the business object and the preset location is less than or equal to a set threshold; determining a sample image corresponding to the business object that is less than or equal to the set threshold as the sample image of the training sample.
  • the preset position and the set threshold may be appropriately set by any suitable means by a person skilled in the art, for example, according to the statistical analysis result of the data or the related distance calculation formula or the artificial experience, etc., which is not limited by the embodiment of the present application.
  • the sample image that does not meet the condition can be filtered out to improve the accuracy of the training result.
  • the training of the second convolutional network model is implemented by the above process, and the trained second convolutional network model can be used to determine the presentation position of the business object in the video image.
  • the display location of the display business object may be indicated.
  • the anchor's forehead position which in turn controls the live application to display the business object at that location; or, during the live broadcast of the video, If the anchor clicks on the business object to indicate the display of the business object, the second convolutional network model can directly determine the presentation location of the business object according to the live video image.
  • the presentation position of the business object to be displayed may be determined according to the set rule.
  • determining the presentation position of the business object to be displayed includes, for example but not limited to, at least one or any of the following: a hair area of the character in the video image, a forehead area, a cheek area, a chin area, a body area other than the head, a video The background area in the image, the area within the setting range centering on the area where the hand is located in the video image, the area preset in the video image, and the like.
  • the preset area may be appropriately set according to an actual situation, for example, an area within a setting range centering on a face area, or an area within a setting range other than a face area, or a background area, or the like.
  • the embodiment of the present application does not limit this.
  • the presentation location of the business object to be displayed in the video image can be further determined.
  • the center point of the presentation location is used as the center point of the presentation location of the business object to display the business object; for example, determining a certain coordinate position in the presentation area corresponding to the presentation location as the center point of the presentation location, etc., This example does not limit this.
  • the service to be displayed is determined not only according to the feature point of the face attribute but also according to the type of the business object to be displayed.
  • the type of the business object may include, but is not limited to, at least one of the following or any of a plurality of types: a forehead patch type, a cheek patch type, a chin patch type, a virtual hat type, a virtual clothing type, a virtual makeup type, and a virtual type. Headwear type, virtual hair accessory type, virtual jewelry type, background type, virtual pet type, virtual container type, and the like.
  • the type of the business object may be other suitable types, such as a virtual cap type, a virtual cup type, a text type, and the like.
  • the feature location of the face attribute can be used as a reference to select an appropriate presentation location for the business object.
  • At least one presentation position may be selected from the plurality of presentation positions.
  • the final display location For example, for a text type business object, it can be displayed in the background area, or it can be displayed on the person's forehead or body area.
  • the correspondence between the facial expression and the presentation position may be stored in advance, and when the detected facial expression matches the corresponding predetermined facial expression, the pre-stored facial expression may be In the correspondence with the presentation position, the target presentation position corresponding to the predetermined facial expression is acquired as the presentation position of the business object to be presented in the video image.
  • the facial expression is not necessarily related to the presentation position, and the facial expression is only a way to trigger the presentation of the business object, and the position and the face are displayed.
  • a business object can be displayed in a certain area of the face, or can be displayed in other areas than the face, such as the background area of the video image.
  • steps S430-S440 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a presentation location determining module 602 executed by the processor.
  • step S450 the business object is drawn by computer drawing at the presentation position.
  • the business object is a sticker containing semantic information, such as an advertisement sticker
  • relevant information of the business object such as the identifier and size of the business object
  • the business object may be acquired first.
  • the business object may be scaled, rotated, etc. according to the coordinates of the presentation position, and then the business object is drawn by a corresponding drawing method such as the drawing method of the OpenGL graphics rendering engine.
  • ads can also be displayed in 3D special effects, such as text or logos (LOGOs) that display ads through particle effects.
  • the virtual bottle cap type of advertising sticker displays the name of a product to attract viewers to watch, improving the efficiency of advertising and display.
  • step S450 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a business object rendering module 603 executed by the processor.
  • the method for processing a video image provided by the embodiment of the present application, when the business object is used for displaying an advertisement, on the one hand, the business object is drawn by using a computer drawing manner at the determined display position, and the business object is combined with the video playing without passing through
  • the network transmits video data of a business object such as an advertisement that is not related to the video, which is beneficial to save network resources and/or system resources of the client; on the other hand, the business object is closely combined with the facial expression in the video image, and can be retained in the video image.
  • the main image and action of the video subject adds interest to the video image, and does not disturb the user to watch the video normally, which can reduce the user's dislike of the business object displayed in the video image, and can also be to some extent Attract the attention of the audience and increase the influence of business objects.
  • FIG. 5 is a flow chart of still another embodiment of a method for processing a video image of the present application.
  • the business object contains the advertisement information.
  • the video image processing scheme of the embodiment of the present application is described by taking a two-dimensional sticker special effect, specifically an advertisement sticker as an example. Referring to FIG. 5, the processing method of the video image in this embodiment includes:
  • step S501 at least one sample image including face information is acquired as a training sample.
  • the sample image is labeled with information about the face attribute.
  • step S501 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a training sample acquisition module 604 executed by the processor.
  • step S502 an attribute having a size order feature in the face attribute is encoded.
  • step S502 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by an encoding module 605 executed by the processor.
  • step S503 the coded attribute is used as the supervision information of the training first convolutional network model, and the first convolutional network model is trained by using the training samples to obtain a first convolutional network model for detecting the face attribute in the image. .
  • step S503 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a first convolutional network model determination module 606 executed by the processor.
  • step S504 a feature vector of the sample image of the above training sample is acquired.
  • the feature vector includes position information and/or confidence information of the business object in the sample image of the business object, and a face feature vector corresponding to the face attribute in the sample image.
  • the face attribute ie, the facial expression of the face
  • the face attribute in the sample image can be determined when training the first convolutional network model.
  • sample images in the sample image that do not meet the training standard of the second convolutional network model, and the samples that do not conform to the training standard of the second convolutional network model may be preprocessed by the sample image.
  • the image is filtered out.
  • the sample image includes a business object, and each business object is labeled with location information and confidence information.
  • the location information of the central point of the business object is used as the location information of the business object.
  • the sample image is exemplarily filtered according to the location information of the business object. After obtaining the coordinates of the location indicated by the location information, the coordinates are compared with the preset location coordinates of the business object of the type, and the position variance of the two is calculated. If the position variance is less than or equal to the set threshold, the sample image may be used as a sample image of the training sample; if the position variance is greater than the set threshold, the business object sample image is filtered out.
  • the preset position coordinates and the set thresholds may be appropriately set by a person skilled in the art according to actual conditions.
  • the images generally used for the second convolutional network model training have the same size, and the threshold that can be set may be
  • the length or width of the image is 1/20 to 1/5, and alternatively, it may be 1/10 of the length or width of the image.
  • the position and confidence of the business object in the sample image of the determined training sample may be averaged to obtain an average position and an average confidence, and the average position and the average confidence may be used as a basis for determining the convergence condition subsequently.
  • the sample image used for training in this embodiment needs to be marked with the coordinates of the advertisement location and the confidence of the advertisement slot.
  • the size of the confidence indicates the probability that this ad slot is the best ad slot. For example, if this ad slot is mostly occluded, the confidence is low.
  • the advertisement position can be marked in the face, the front background and the like, and the joint training of the advertisement points of the facial feature point and the front background can be realized, which is advantageous for the separate training scheme based on a certain technique such as facial expression. Save computing resources.
  • step S504 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a feature vector acquisition module 607 executed by the processor.
  • step S505 the feature vector is convoluted to obtain a feature vector convolution result.
  • convolution processing is performed on the feature information corresponding to the location information and/or the confidence information of the business object in the sample image, and also in each sample image.
  • the face feature vector corresponding to the face attribute is convoluted, and the corresponding feature vector convolution result is obtained respectively.
  • step S505 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a convolution module 608 executed by the processor.
  • step S506 it is determined whether the location information and/or the confidence information of the corresponding service object in the feature vector convolution result satisfies the convergence condition of the service object, and determines whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence. condition.
  • step S506 may be performed by the processor invoking a corresponding instruction stored in the memory, or may be performed by a convergence condition determination module 609 executed by the processor.
  • step S507 if the convergence conditions in step S506 are satisfied, the training of the second convolutional network model is completed; otherwise, as long as one convergence condition is not satisfied, the network parameters of the second convolutional network model are adjusted and adjusted according to the adjustment Second convolutional network model network The parameters are iteratively trained on the second convolutional network model until the position information and/or confidence information of the service object after the iterative training and the face feature vector satisfy the corresponding convergence conditions.
  • step S507 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a model training module 610 that is executed by the processor.
  • the trained second convolutional network model can be obtained.
  • the first convolutional network model and the second convolutional network model obtained by the above training may perform corresponding processing on the video image, and may include the following steps S508 to S512.
  • step S508 the currently played video image containing the face information is acquired.
  • step S509 based on the face information in the video image, the pre-trained first convolutional network model for detecting the face attribute in the image is used to perform facial expression detection of the face on the video image.
  • steps S508-S509 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a video image detection module 601 that is executed by the processor.
  • step S510 when it is determined that the detected facial expression matches the corresponding predetermined facial expression, the feature point of the face attribute in the face region corresponding to the detected facial expression is extracted.
  • step S510 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a presentation location determining module 602 executed by the processor.
  • step S511 according to the feature points of the face attribute, the second convolutional network model for determining the presentation position of the business object in the video image is used to determine the presentation of the business object to be presented in the video image. position.
  • step S511 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a presentation location determining module 602 executed by the processor or a presentation location determining unit therein.
  • step S512 the business object is drawn by computer drawing at the presentation position.
  • step S512 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a business object rendering module 603 executed by the processor.
  • the video image during the video playback process can be detected in real time through the solution provided in this embodiment, and the advertisement placement position with better effect is given.
  • the business object is drawn by computer drawing in the determined presentation position, and the business object is combined with the video playing, and no additional business objects such as advertisements that are not related to the video are transmitted through the network.
  • Video data is conducive to saving network resources and/or system resources of the client; in addition, the business object is closely combined with facial expressions in the video image, and retains the main image and motion of the video subject (such as the anchor) in the video image, and The video image adds interest, and does not disturb the user to watch the video normally, which can reduce the user's dislike of the business object displayed in the video image, and can attract the viewer's attention to a certain extent and improve the influence of the business object. It can be understood that, in addition to advertising, business objects can be widely applied to other aspects, such as education, consulting, services, etc., by providing entertainment, appreciation and other business information to improve interaction and improve user experience.
  • the processing method of any video image provided by the embodiment of the present application may be performed by any suitable device having data processing capability, including but not limited to: a terminal device, a server, and the like.
  • the processing method of any video image provided by the embodiment of the present application may be executed by a processor, such as a processor, by executing a corresponding instruction stored in a memory to perform a processing method of any video image mentioned in the embodiment of the present application. This will not be repeated below.
  • the foregoing program may be stored in a computer readable storage medium. When executed, the steps including the above method embodiments are performed; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • FIG. 6 is a schematic structural diagram of an embodiment of a processing apparatus for video images of the present application.
  • the video image processing apparatus of the embodiments of the present application can be used to implement the foregoing method for processing each video image of the present application.
  • the processing apparatus for the video image of this embodiment includes: a video image detecting module 601, a presentation position determining module 602, and a business object drawing module 603. among them:
  • the video image detecting module 601 is configured to perform facial expression detection of the face on the currently played video image including the face information.
  • a presentation location determining module 602 configured to: when the facial expression detected by the video image detecting module 602 is associated with a corresponding predetermined facial expression When matching, the presentation position of the business object to be presented in the video image is determined.
  • the business object drawing module 603 is configured to draw a business object by using a computer drawing manner at the presentation position.
  • the processing apparatus for the video image provided by the embodiment performs facial expression detection on the currently played video image including the face information, and matches the detected facial expression with the corresponding predetermined facial expression, when the two match Determining the presentation position of the business object to be presented in the video image, and then drawing the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying the advertisement, on the one hand, the computer is used at the determined display position.
  • the business object is combined with video playing, and does not need to transmit video data of a business object such as an advertisement that is not related to the video through the network, thereby saving network resources and/or system resources of the client;
  • a business object such as an advertisement that is not related to the video through the network, thereby saving network resources and/or system resources of the client;
  • the business object is closely combined with the facial expressions in the video image, and can retain the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing the user to watch the video normally, Reduce the number of business pairs that users display on video images Resentment, but also to attract the audience's attention to a certain extent, increase the influence of business objects.
  • the video image detecting module 601 is configured to use the pre-trained and used for the face information in the video image that includes the face information that is currently played.
  • a first convolutional network model of the face attribute in the image is detected, and a facial expression of the face is detected on the video image.
  • FIG. 7 is a schematic structural diagram of another embodiment of a processing apparatus for video images of the present application.
  • the processing apparatus of the video image further includes: a training sample obtaining module 604, configured to acquire at least one sample image including face information as a training sample, wherein the sample is compared with the embodiment shown in FIG.
  • the image is labeled with the information of the face attribute;
  • the encoding module 605 is configured to encode the attribute having the size order feature in the face attribute;
  • the first convolutional network model determining module 606 is configured to use the coded attribute as the training first volume.
  • the supervisory information of the product network model is trained on the first convolutional network model using training samples to obtain a first convolutional network model for detecting face attributes in the image.
  • the training sample obtaining module 604 may include: a sample image acquiring unit, configured to acquire at least one sample image including face information; and a face positioning information determining unit, configured to detect the sample image in each sample image The face and the face key point, the face in the sample image is positioned by the face key point to obtain the face location information; the training sample determination unit is configured to use the sample image containing the face location information as the training sample.
  • the presentation location determining module 602 may include: a feature point extraction unit, configured to acquire a feature point of a face attribute in a face region corresponding to the detected facial expression; a presentation position determining unit, configured to use the face attribute The feature point determines the presentation location of the business object to be presented in the video image.
  • the presentation location determining unit is configured to determine, according to the feature point of the face attribute, a pre-trained second convolution network model for determining a presentation position of the service object in the video image, to determine the service to be presented. The position at which the object appears in the video image.
  • the processing apparatus for the video image of the embodiment of the present application may further include: a feature vector obtaining module 607, configured to acquire a feature vector of the sample image of the training sample, where the feature vector includes location information of the business object in the sample image. And/or confidence information, and a face feature vector corresponding to the face attribute in the sample image;
  • the convolution module 608 is configured to perform convolution processing on the feature vector to obtain a feature vector convolution result;
  • the convergence condition determination module 609 uses Determining whether the location information and/or the confidence information of the corresponding business object in the feature vector convolution result satisfies the convergence condition of the business object, and determining whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence condition;
  • the training module 610 is configured to: when the convergence conditions are satisfied, that is, the location information and/or the confidence information of the corresponding service object in the feature vector convolution result satisfies the convergence condition of the service object, and the corresponding result in the feature vector con
  • the network parameters of the second convolutional network model are adjusted, and the second convolutional network model is iteratively trained according to the adjusted network parameters of the second convolutional network model until iterative training
  • the location information and/or confidence information of the subsequent business object and the face feature vector satisfy the corresponding convergence conditions.
  • the presentation location determining module 602 is configured to determine a presentation location of the business object to be presented in the video image according to the feature point of the facial attribute and the type of the business object to be presented.
  • the presentation location determining module 602 includes: a presentation location obtaining unit, configured to obtain, according to the feature point of the facial attribute and the type of the business object to be presented, a plurality of presentation locations of the business object to be presented in the video image; And a presentation location selection unit, configured to select at least one presentation location from the plurality of presentation locations as a presentation location of the business object to be presented in the video image.
  • the presentation location determining module 602 is configured to obtain, from a correspondence between the pre-stored facial expression and the presentation location, a target presentation location corresponding to the predetermined facial expression as a presentation location of the business object to be presented in the video image.
  • the business object may include: an effect containing semantic information; the video image may include a live video image or any other video image.
  • the special effect including the semantic information may include at least one or any of the following special effects including the advertisement information: a two-dimensional sticker effect, a three-dimensional special effect, a particle special effect, and the like.
  • the presentation location may include, but is not limited to, at least one or any of the following: a hair area of the person in the video image, a forehead area, a cheek area, a chin area, a body area other than the head, a background area in the video image In the video image, the area within the setting range centering on the area where the hand is located, and the area preset in the video image.
  • the type of the business object includes at least one of the following or any of the following types: a forehead patch type, a cheek patch type, a chin patch type, a virtual hat type, a virtual clothing type, a virtual makeup type, a virtual headwear type, Virtual hair accessory type, virtual jewelry type, background type, virtual pet type, virtual container type.
  • the facial expression includes at least one or any of the following: happy, angry, painful, sad, contemplative, exhausted, and the like.
  • the electronic device can include a processor 802, a communications interface 804, a memory 806, and a communications bus 808. among them:
  • Processor 802, communication interface 804, and memory 806 complete communication with one another via communication bus 808.
  • the communication interface 804 is configured to communicate with network elements of other devices, such as other clients or servers.
  • the processor 802 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, or a graphics processor ( Graphics Processing Unit, GPU).
  • the one or more processors included in the terminal device may be the same type of processor, such as one or more CPUs, or one or more GPUs; or may be different types of processors, such as one or more CPUs and One or more GPUs.
  • the memory 806 is for at least one executable instruction that causes the processor 802 to perform operations corresponding to a method of presenting a business object in a video image as in any of the above-described embodiments of the present application.
  • the memory 806 may include a high speed random access memory (RAM), and may also include a non-volatile memory such as at least one disk memory.
  • FIG. 9 is a schematic structural diagram of another embodiment of an electronic device according to the present invention.
  • the electronic device includes one or more processors, a communication unit, etc., such as one or more central processing units (CPUs) 901, and/or one or more A graphics processor (GPU) 913 or the like, the processor may execute various types according to executable instructions stored in read only memory (ROM) 902 or executable instructions loaded from random access memory (RAM) 903 from storage portion 908. Proper action and handling.
  • CPUs central processing units
  • GPU graphics processor
  • Communication portion 912 can include, but is not limited to, a network card, which can include, but is not limited to, an IB (Infiniband) network card, and the processor can communicate with read only memory 902 and/or random access memory 903 to execute executable instructions over bus 904.
  • the operation corresponding to the processing method of any video image provided by the embodiment of the present application is performed, for example, the currently played video image including the face information is connected to the communication unit 912 and communicates with other target devices via the communication unit 912. Facial expression detection of a face; determining a presentation position of a business object to be presented in the video image when the detected facial expression matches a corresponding predetermined facial expression; drawing a computer drawing manner at the presentation position The business object.
  • RAM 903 various programs and data required for the operation of the device can be stored.
  • the CPU 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904.
  • ROM 902 is an optional module.
  • the RAM 903 stores executable instructions or writes executable instructions to the ROM 902 at runtime, the executable instructions causing the processor 901 to perform operations corresponding to the processing methods of the video images described above.
  • An input/output (I/O) interface 905 is also coupled to bus 904.
  • the communication unit 912 may be integrated or may be provided with a plurality of sub-modules (for example, a plurality of IB network cards) and on the bus link.
  • the following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a storage portion 908 including a hard disk or the like. And a communication portion 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the Internet.
  • the drive 911 is also connected to the I/O interface 905 as needed.
  • a removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like is mounted on the drive 911 as needed so that a computer program read therefrom is installed into the storage portion 908 as needed.
  • FIG. 9 is only an optional implementation manner.
  • the number and type of components in FIG. 9 may be selected, deleted, added, or replaced according to actual needs;
  • Different function components can also be implemented in separate settings or integrated settings, such as GPU and CPU detachable settings or GPU can be integrated on the CPU, the communication part can be separated, or integrated on the CPU or GPU. and many more.
  • an embodiment of the present disclosure includes a computer program product comprising a computer program tangibly embodied on a machine readable medium, the computer program comprising program code for executing the method illustrated in the flowchart, the program code comprising Executing instructions corresponding to the method steps provided in the embodiments of the present application, for example, performing facial expression detection on a face of a currently played video image containing face information; and when the detected facial expression matches a corresponding predetermined facial expression, Determining a presentation location of the business object to be presented in the video image; drawing the business object in a computer drawing manner at the presentation location.
  • the embodiment of the present application further provides a computer program, the computer program comprising computer readable code, the program code includes computer operating instructions, when the computer readable code is run on the device, the processor in the device executes An instruction for implementing each step in the processing method of the video image of any of the embodiments of the present application.
  • the embodiment of the present application further provides a computer readable storage medium for storing computer readable instructions, which are executed to implement the operations of the steps in the video image processing method of any embodiment of the present application.
  • the above method according to the present application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or can be downloaded through a network.
  • a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or can be downloaded through a network.
  • the computer code originally stored in a remote recording medium or non-transitory machine readable medium and to be stored in a local recording medium, whereby the methods described herein can be stored using a general purpose computer, a dedicated processor, or programmable or dedicated Such software processing on a recording medium of hardware such as an ASIC or an FPGA.
  • a computer, processor, microprocessor controller or programmable hardware includes storage components (eg, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, when the software or computer code is The processing methods described herein are implemented when the processor or hardware is accessed and executed. Moreover, when a general purpose computer accesses code for implementing the processing shown herein, the execution of the code converts the general purpose computer into a special purpose computer for performing the processing shown herein.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

Provided in the embodiments of the present application are a video image processing method, apparatus and electronic device. The method comprises: performing human face facial expression detection on a video image currently being played back which contains human face information; determining a presentation position of a service object to be presented in the video image when a detected facial expression matches a corresponding predetermined facial expression; and drawing the service object in the presentation position using a computer drawing mode. Using the embodiments of the present application may save network resources and/or system resources of a client, make a video image more interesting, and avoid bothering a user when normally watching a video, thereby reducing the user's feelings of opposition to a service object presented in the video image, while attracting the attention of an audience to a certain extent, and increasing the impact of the service object.

Description

视频图像的处理方法、装置和电子设备Video image processing method, device and electronic device

本申请要求在2016年08月19日提交中国专利局、申请号为CN201610697472.6、发明名称为“视频图像的处理方法、装置和终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on August 19, 2016, the Chinese Patent Application No. CN201610697472.6, entitled "Processing Method, Apparatus and Terminal Device for Video Image", the entire contents of which are incorporated by reference. Combined in this application.

技术领域Technical field

本申请涉及人工智能技术,尤其涉及一种视频图像的处理方法、装置和电子设备。The present application relates to artificial intelligence technology, and in particular, to a video image processing method, apparatus, and electronic device.

背景技术Background technique

随着互联网技术的发展,人们越来越多地使用互联网观看视频,互联网视频为许多新的业务提供了商机。由于可以成为重要的业务流量入口,互联网视频被认为是广告植入的优质资源。With the development of Internet technology, people are increasingly using the Internet to watch video, and Internet video offers business opportunities for many new businesses. Internet video is considered a premium resource for ad placement because it can be an important entry point for business traffic.

现有视频广告主要通过植入的方式,在视频播放的某个时间插入固定时长的广告,或在视频播放的区域及其周边区域固定位置放置广告。Existing video advertisements are mainly inserted into a fixed-time advertisement at a certain time of video playback, or placed in a fixed position in the area where the video is played and its surrounding area.

发明内容Summary of the invention

本申请实施例提供一种视频图像处理的技术方案。The embodiment of the present application provides a technical solution for video image processing.

根据本申请实施例的一方面,提供一种视频图像的处理方法,包括:对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测;当检测到的面部表情与对应的预定面部表情相匹配时,确定待展现的业务对象在所述视频图像中的展现位置;在所述展现位置采用计算机绘图方式绘制所述业务对象。According to an aspect of the embodiments of the present application, a method for processing a video image includes: performing facial expression detection of a face on a currently played video image including face information; and detecting a facial expression and a corresponding predetermined face When the expressions match, the presentation position of the business object to be presented in the video image is determined; and the business object is drawn by computer drawing at the presentation position.

根据本申请实施例的另一方面,提供一种,包括:视频图像检测模块,用于对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测;展现位置确定模块,用于当视频图像检测模块检测到的面部表情与对应的预定面部表情相匹配时,确定待展现的业务对象在所述视频图像中的展现位置;业务对象绘制模块,用于在所述展现位置采用计算机绘图方式绘制所述业务对象。According to another aspect of the embodiments of the present application, there is provided a video image detecting module, configured to perform facial expression detection of a face on a currently played video image including face information, and a display position determining module, configured to Determining, when the facial expression detected by the video image detecting module matches the corresponding predetermined facial expression, a presentation position of the business object to be presented in the video image; and a business object drawing module, configured to perform computer drawing at the display position The way to draw the business object.

根据本申请实施例的再一方面,提供另一种电子设备,包括:According to still another aspect of the embodiments of the present application, another electronic device is provided, including:

处理器和本申请上述任一实施例所述的视频图像的处理装置;A processor and a video image processing apparatus according to any of the above embodiments of the present application;

在处理器运行所述结构化文本检测系统时,本申请上述任一实施例所述的视频图像的处理装置中的单元被运行。When the processor runs the structured text detection system, the units in the video image processing apparatus of any of the above embodiments of the present application are executed.

根据本申请实施例的再一方面,提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在设备上运行时,所述设备中的处理器执行用于实现本申请上述任一实施例所述的视频图像的处理方法中各步骤的指令。According to still another aspect of an embodiment of the present application, a computer program is provided, comprising computer readable code, when a computer readable code is run on a device, a processor in the device performs the above-described An instruction of each step in the method of processing a video image according to an embodiment.

根据本申请实施例的又一方面,还提供了一种计算机可读存储介质,用于存储计算机可读取的指令,所述指令被执行时实现本申请上述任一实施例所述的视频图像的处理方法中各步骤的操作。根据本申请实施例提供的视频图像的处理方法、装置和终端设备,通过对当前播放的包含人脸信息的视频图像进行面部表情检测,并将检测到的面部表情与对应的预定面部表情进行匹配,当两者相匹配时,确定待展现的业务对象在视频图像中的展现位置,进而在该展现位置采用计算机绘图的方式绘制业务对象,这样当业务对象用于展示广告时,一方面,在确定的展现位置采用计算机绘图方式绘制所述业务对象,该业务对象与视频播放相结合,无须通过网络传输与视频无关的额外如广告等业务对象的视频数据,有利于节约网络资源和/或客户端的系统资源;另一方面,业务对象与视频图像中的面部表情紧密结合,可以保留视频图像中视频主体(如主播)的主要形象和动作,为视频图像增加了趣味性,并且还不会打扰用户正常观看视频,可以减少用户对视频图像中展现的业务对象的反感,还可以在一定程度上吸引观众的注意力,提高业务对象的影响力。According to still another aspect of the embodiments of the present application, a computer readable storage medium is provided for storing computer readable instructions, when executed, to implement the video image described in any of the above embodiments of the present application. The operation of each step in the processing method. The method, device, and terminal device for processing a video image according to an embodiment of the present application perform facial expression detection on a currently played video image including face information, and match the detected facial expression with a corresponding predetermined facial expression. When the two match, determine the presentation position of the business object to be presented in the video image, and then draw the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying advertisements, on the one hand, The determined display position is drawn by using a computer drawing manner, and the business object is combined with the video playing, and the video data of the business object such as an advertisement, which is not related to the video, is transmitted through the network, thereby saving network resources and/or customers. On the other hand, the business object is closely combined with the facial expressions in the video image to preserve the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing. Users can watch videos normally, which can reduce user's view Disgusted with the business object image in the show, but also the audience's attention to a certain extent, increase the influence of business objects.

下面通过附图和实施例,对本申请的技术方案做进一步的详细描述。The technical solutions of the present application are further described in detail below through the accompanying drawings and embodiments.

附图说明DRAWINGS

构成说明书的一部分的附图描述了本申请的实施例,并且连同描述一起用于解释本申请的原理。The accompanying drawings, which are incorporated in FIG.

参照附图,根据下面的详细描述,可以更加清楚地理解本申请,其中:The present application can be more clearly understood from the following detailed description, in which:

图1示出本申请视频图像的处理方法一实施例的流程图; 1 is a flow chart showing an embodiment of a method for processing a video image of the present application;

图2示出本申请第一卷积网络模型的获取方法一实施例的流程图;2 is a flow chart showing an embodiment of an acquisition method of a first convolutional network model of the present application;

图3示出本申请第一卷积网络模型一实施例的结构示意图;3 is a schematic structural diagram of an embodiment of a first convolutional network model of the present application;

图4示出本申请视频图像的处理方法另一实施例的流程图;4 is a flow chart showing another embodiment of a method for processing a video image of the present application;

图5示出本申请视频图像的处理方法又一实施例的流程图;FIG. 5 is a flow chart showing still another embodiment of a processing method of a video image of the present application; FIG.

图6示出本申请视频图像的处理装置一实施例的的结构框图;6 is a block diagram showing the structure of an embodiment of a processing apparatus for video images of the present application;

图7示出本申请视频图像的处理装置另一实施例的结构框图;7 is a structural block diagram showing another embodiment of a processing apparatus for a video image of the present application;

图8示出本申请终端设备一实施例的结构示意图;FIG. 8 is a schematic structural diagram of an embodiment of a terminal device according to the present application;

图9为本申请电子设备另一实施例的结构示意图。FIG. 9 is a schematic structural diagram of another embodiment of an electronic device according to the present application.

具体实施方式detailed description

现在将参照附图来详细描述本申请的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本申请的范围。Various exemplary embodiments of the present application will now be described in detail with reference to the drawings. It should be noted that the relative arrangement of the components and steps, numerical expressions and numerical values set forth in the embodiments are not intended to limit the scope of the application.

同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。In the meantime, it should be understood that the dimensions of the various parts shown in the drawings are not drawn in the actual scale relationship for the convenience of the description.

以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本申请及其应用或使用的任何限制。The following description of the at least one exemplary embodiment is merely illustrative and is in no way

对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。Techniques, methods and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but the techniques, methods and apparatus should be considered as part of the specification, where appropriate.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that similar reference numerals and letters indicate similar items in the following figures, and therefore, once an item is defined in one figure, it is not required to be further discussed in the subsequent figures.

本申请实施例可以应用于终端设备、计算机系统、服务器等电子设备,其可与众多其它通用或专用计算系统环境或配置一起操作。适于与终端设备、计算机系统、服务器等电子设备一起使用的众所周知的终端设备、计算系统、环境和/或配置的例子包括但不限于:个人计算机系统、服务器计算机系统、瘦客户机、厚客户机、手持或膝上设备、基于微处理器的系统、机顶盒、可编程消费电子产品、网络个人电脑、小型计算机系统﹑大型计算机系统和包括上述任何系统的分布式云计算技术环境,等等。Embodiments of the present application can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and/or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, and the like include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients Machines, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, small computer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above, and the like.

终端设备、计算机系统、服务器等电子设备可以在由计算机系统执行的计算机系统可执行指令(诸如程序模块)的一般语境下描述。通常,程序模块可以包括例程、程序、目标程序、组件、逻辑、数据结构等等,它们执行特定的任务或者实现特定的抽象数据类型。计算机系统/服务器可以在分布式云计算环境中实施,分布式云计算环境中,任务是由通过通信网络链接的远程处理设备执行的。在分布式云计算环境中,程序模块可以位于包括存储设备的本地或远程计算系统存储介质上。Electronic devices such as terminal devices, computer systems, servers, etc., can be described in the general context of computer system executable instructions (such as program modules) being executed by a computer system. Generally, program modules may include routines, programs, target programs, components, logic, data structures, and the like that perform particular tasks or implement particular abstract data types. The computer system/server can be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communication network. In a distributed cloud computing environment, program modules may be located on a local or remote computing system storage medium including storage devices.

图1是本申请视频图像的处理方法一实施例的流程图。通过包括视频图像的处理装置的计算机系统执行所述方法。本申请各实施例的视频图像的处理方法可以示例性地通过计算机系统、电子设备、服务器等电子设备执行。参照图1,该实施例视频图像的处理方法包括:1 is a flow chart of an embodiment of a method for processing a video image of the present application. The method is performed by a computer system including a processing device of a video image. The method of processing a video image of various embodiments of the present application may be exemplarily performed by an electronic device such as a computer system, an electronic device, or a server. Referring to FIG. 1, a method for processing a video image of this embodiment includes:

在步骤S110,对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测。In step S110, facial expression detection of the face is performed on the currently played video image containing the face information.

本申请各实施例中,人脸信息例如可以包括但不限于与面部、眼睛、鼻子和/或头发等相关的信息。视频图像可以是正在直播的直播类视频的图像,也可以是已录制完成的或者正在录制过程中的视频中的视频图像等。面部表情包括但不限于开心、愤怒、痛苦、悲伤、沉思、发呆、激动等。In various embodiments of the present application, the face information may include, for example, but is not limited to, information related to the face, eyes, nose, and/or hair. The video image may be an image of a live video that is being broadcast live, or a video image that has been recorded or is in the process of being recorded. Facial expressions include, but are not limited to, happiness, anger, pain, sadness, contemplation, daze, excitement, and the like.

在本申请各实施例的其中一个可选示例中,以直播类视频为例,目前,视频直播平台包括多个,如花椒直播平台、YY直播平台等,每一个直播平台包括有多个直播房间,每个直播房间中会包括至少一个主播,主播可以通过电子设备的摄像头向其所在的直播房间中的粉丝直播视频,该直播类视频包括多个视频图像。上述视频图像中的主体通常为一个主要人物(即主播)和简单的背景(如主播的家或者其他视频录制场地等),主播常常在视频图像中所占的区域较大。当需要在直播视频的过程中插入业务对象(如广告等)时,可以获取当前直播类视频中的视频图像,可以通过预先设置的人脸检测机制对该视频图像进行人脸检测,以判断该视频图像中是否包括主播的人脸信息,如果包括主播的人脸信息,则获取或记录该视频图像,以进行后续处理;如果不包括主播的人脸信息,则可以继续对下一帧视频图像执行上述相关处理,以得到视频图像包括主播的人脸信息的视频图像。In an optional example of the embodiments of the present application, a live video is taken as an example. Currently, the live video platform includes multiple, such as a pepper live broadcast platform, a YY live broadcast platform, etc., each live broadcast platform includes multiple live broadcast rooms. Each live room will include at least one anchor, and the anchor can broadcast a video to the fans in the live room where the electronic device is located, the live video includes multiple video images. The subject in the above video image is usually a main character (ie, anchor) and a simple background (such as the anchor's home or other video recording venue, etc.), and the anchor often occupies a larger area in the video image. When a business object (such as an advertisement) needs to be inserted in the process of the live video, the video image in the current live video can be obtained, and the video image can be detected by a preset face detection mechanism to determine the Whether the face information of the anchor is included in the video image, if the face information of the anchor is included, the video image is acquired or recorded for subsequent processing; if the face information of the anchor is not included, the video image of the next frame may be continued. The above related processing is performed to obtain a video image in which the video image includes the face information of the anchor.

此外,视频图像还可以是已录制完成的短视频中的视频图像,对于此种情况,用户可以使用其电子设备播放该短视频,在播放的过程中,电子设备可以检测每一帧视频图像中是否包括主播的人脸信 息,如果包括主播的人脸信息,则获取该视频图像,以进行后续处理;如果不包括主播的人脸信息,则可以丢弃该视频图像或者不对该视频图像做任何处理,并获取下一帧视频图像继续进行上述处理。In addition, the video image may also be a video image in a short video that has been recorded. In this case, the user can play the short video using the electronic device, and during the playing process, the electronic device can detect each frame of the video image. Whether to include the face letter of the anchor If the face information of the anchor is included, the video image is acquired for subsequent processing; if the face information of the anchor is not included, the video image may be discarded or not processed, and the next frame is obtained. The video image continues with the above processing.

另外,对于视频图像是正在录制过程中的视频图像的情况,在录制的过程中,用户可以使用其电子设备检测录制的每一帧视频图像中是否包括主播的人脸信息,如果包括主播的人脸信息,则获取该视频图像,以进行后续处理;如果不包括主播的人脸信息,则可以丢弃该视频图像或者不对该视频图像做任何处理,并获取下一帧视频图像继续进行上述处理。In addition, in the case that the video image is a video image being recorded, during the recording process, the user can use his electronic device to detect whether the video image of each frame is included in the recorded video image of the anchor, if the person including the anchor For the face information, the video image is acquired for subsequent processing; if the face information of the anchor is not included, the video image may be discarded or not processed, and the next frame of the video image may be acquired to continue the above processing.

播放视频图像的电子设备或者主播使用的电子设备中设置有对视频图像进行人脸的面部表情检测的机制,通过该面部表情检测的机制可以对当前播放的包括人脸信息的每一帧视频图像进行面部表情检测,得到从视频图像中检测到的人脸的面部表情,一种可选的处理过程可以为,电子设备获取当前正在播放的一帧视频图像,通过预先设定的面部表情检测的机制可以从该视频图像中截取出包括人脸区域的图像,然后,可以对人脸区域的图像进行分析和特征提取,得到人脸区域中各个部位(包括眼睛、嘴和面部等)的特征数据,通过对该特征数据的分析,确定视频图像中人脸的面部表情属于开心、愤怒、痛苦、悲伤、沉思、发呆、激动等表情中的哪一种。The electronic device that plays the video image or the electronic device used by the anchor is provided with a mechanism for performing facial expression detection on the video image, and the video image of each frame including the face information currently played by the facial expression detection mechanism can be Perform facial expression detection to obtain a facial expression of a face detected from the video image. An optional process may be that the electronic device acquires a video image currently being played, and is detected by a preset facial expression. The mechanism may extract an image including a face region from the video image, and then analyze and extract the image of the face region to obtain feature data of each part (including eyes, mouth, face, etc.) in the face region. By analyzing the feature data, it is determined which facial expression of the face in the video image belongs to happy, angry, painful, sad, contemplative, dazed, excited, and the like.

在一个可选示例中,步骤S110可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的视频图像检测模块601执行。In an alternative example, step S110 may be performed by the processor invoking a corresponding instruction stored in the memory, or may be performed by video image detection module 601 being executed by the processor.

在步骤S120,当检测到的面部表情与对应的预定面部表情相匹配时,确定待展现的业务对象在视频图像中的展现位置。In step S120, when the detected facial expression matches the corresponding predetermined facial expression, the presentation position of the business object to be presented in the video image is determined.

本申请各实施例中,业务对象是根据一定的业务需求而创建的对象,例如广告、娱乐、天气预报、交通预报、宠物、教育、咨询、服务等信息。展现位置可以是视频图像中指定区域的中心位置,或者可以是上述指定区域中多个边缘位置的坐标等。本申请各实施例中,业务对象可以是包含有语义信息的特效,例如可以包括包含广告信息的以下至少一种或任意多种形式的特效:二维贴纸特效、三维特效、粒子特效等。In various embodiments of the present application, the business object is an object created according to a certain business requirement, such as advertisement, entertainment, weather forecast, traffic forecast, pet, education, consultation, service, and the like. The presentation position may be a center position of a designated area in the video image, or may be a coordinate of a plurality of edge positions in the specified area or the like. In various embodiments of the present application, the business object may be a special effect including semantic information, for example, may include at least one or any of the following special effects including the advertisement information: two-dimensional sticker special effects, three-dimensional special effects, particle special effects, and the like.

在本申请各实施中,可以预先存储多种不同的面部表情的特征数据,并对不同的面部表情进行相应的标记,以区分各个面部表情所代表的含义。通过上述步骤S110的处理可以从视频图像中检测到人脸的面部表情,可以将检测到的人脸的面部表情的特征数据分别与预先存储的每一种面部表情的特征数据进行比对,如果预先存储的多种不同的面部表情的特征数据中包括与检测到人脸的面部表情的特征数据相同的特征数据,则可以确定检测到的面部表情与对应的预定面部表情相匹配。In various implementations of the present application, feature data of a plurality of different facial expressions may be stored in advance, and different facial expressions are marked correspondingly to distinguish the meaning represented by each facial expression. The facial expression of the face can be detected from the video image by the processing of the above step S110, and the feature data of the detected facial expression of the face can be compared with the feature data of each facial expression stored in advance, if The feature data of the plurality of different facial expressions stored in advance includes the same feature data as the feature data of the facial expression of the detected face, and then it can be determined that the detected facial expression matches the corresponding predetermined facial expression.

为了提高匹配的准确度,可以通过计算的方式确定上述匹配结果,例如,可以设置匹配算法计算任意两个面部表情的特征数据之间的匹配度,例如,可以使用检测到人脸的面部表情的特征数据和预先存储的任一种面部表情的特征数据进行匹配计算,得到两者之间的匹配度数值,通过上述方式分别计算得到检测到的人脸的面部表情与预先存储的每一种面部表情之间的匹配度数值,从得到的匹配度数值中选取最大的匹配度数值,如果该最大的匹配度数值超过预定的匹配阈值,则可以确定最大的匹配度数值对应的预先存储的面部表情与检测到的面部表情相匹配。如果该最大的匹配度数值未超过预定的匹配阈值,则匹配失败,即检测到的面部表情不是预定面部表情,此时,可以继续对后续视频图像执行上述步骤S110的处理。In order to improve the accuracy of the matching, the matching result may be determined by a calculation manner. For example, a matching algorithm may be set to calculate a matching degree between the feature data of any two facial expressions, for example, a facial expression that detects a human face may be used. The feature data is matched with the feature data of any of the pre-stored facial expressions to obtain a matching degree value between the two, and the detected facial expression of the face and each of the pre-stored faces are respectively calculated by the above manner. The matching degree value between the expressions is selected from the obtained matching degree value, and if the maximum matching degree value exceeds the predetermined matching threshold, the pre-stored facial expression corresponding to the largest matching degree value may be determined. Matches the detected facial expressions. If the maximum matching degree value does not exceed the predetermined matching threshold, the matching fails, that is, the detected facial expression is not a predetermined facial expression, and at this time, the processing of the above step S110 may be continued on the subsequent video image.

可选地,当确定检测到的面部表情与对应的预定面部表情相匹配时,可以先确定检测到的面部表情匹配到的预定面部表情所代表的含义,可以在预先设定的多个展现位置中选取与匹配到的预定面部表情的含义相关或相应的展现位置作为待展现的业务对象在视频图像中的展现位置。例如,以直播类视频为例,当检测到主播开心的面部表情时,可以将面部区域或背景区域选取为与该开学的面部表情相关或相应的展现位置。Optionally, when it is determined that the detected facial expression matches the corresponding predetermined facial expression, the meaning represented by the predetermined facial expression matched by the detected facial expression may be determined first, and may be in a plurality of preset display positions. The presentation position associated with the meaning of the matched predetermined facial expression or the corresponding presentation position is selected as the presentation position of the business object to be presented in the video image. For example, taking a live video as an example, when detecting a happy facial expression of the anchor, the face area or the background area may be selected as a presentation position related to or corresponding to the facial expression of the school.

在一个可选示例中,步骤S120可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的展现位置确定模块602执行。In an alternative example, step S120 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a presentation location determining module 602 executed by the processor.

在步骤S130,在展现位置采用计算机绘图方式绘制业务对象。In step S130, the business object is drawn by computer drawing at the presentation position.

例如,以直播类视频为例,当检测到主播开心的面部表情时,可以在视频图像中主播的面部所在的区域内采用计算机绘图方式绘制相应的业务对象,例如带有预定商品标识的图片广告等,如果粉丝对该业务对象感兴趣,则可以在电子设备上点击该业务对象所在的区域,粉丝的电子设备可以获取该业务对象对应的网络链接,并通过该网络链接进入与该业务对象相关的页面,可以在该页面中获取与该业务对象相关的资源。For example, in the case of a live video, when a happy facial expression is detected, a corresponding business object, such as an image advertisement with a predetermined product identifier, may be drawn by using a computer drawing in the area where the anchor of the video image is located. If the fan is interested in the business object, the area where the business object is located may be clicked on the electronic device, and the electronic device of the fan may obtain the network link corresponding to the business object, and enter the business object through the network link. A page on which you can get resources related to the business object.

在本申请各实施例中,可以采用计算机绘图方式绘制业务对象,可以通过适当的计算机图形图像 绘制或渲染等方式实现,例如可以包括但不限于:基于开放图形语言(OpenGL)图形绘制引擎进行绘制等。OpenGL定义了一个跨编程语言、跨平台的编程接口规格的专业的图形程序接口,其与硬件无关,可以方便地进行2D或3D图形图像的绘制。通过OpenGL图形绘制引擎,不仅可以实现2D效果如2D贴纸的绘制,还可以实现3D特效的绘制及粒子特效的绘制等等。但本申请不限于基于OpenGL图形绘制引擎的绘制方式,还可以采取其它方式,例如基于游戏引擎(Unity)或开放运算语言(Open Computing Language,OpenCL)等图形绘制引擎的绘制方式也同样适用于本申请各实施例。In various embodiments of the present application, the business object can be drawn by computer drawing, and the appropriate computer graphics image can be adopted. Implementation by drawing or rendering, for example, may include, but is not limited to, drawing based on an Open Graphics Language (OpenGL) graphics rendering engine, and the like. OpenGL defines a professional graphical program interface for cross-programming language and cross-platform programming interface specifications. It is hardware-independent and can easily draw 2D or 3D graphics images. Through the OpenGL graphics rendering engine, not only can 2D effects be drawn, but also 3D stickers can be drawn, and 3D effects can be drawn and particle effects can be drawn. However, the application is not limited to the drawing method based on the OpenGL graphics rendering engine, and other methods may be adopted. For example, the drawing method based on the graphics engine (Unity) or the Open Computing Language (OpenCL) is also applicable to the present invention. Apply for each embodiment.

在一个可选示例中,步骤S130可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的业务对象绘制模块603执行。In an alternative example, step S130 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a business object rendering module 603 executed by the processor.

本申请实施例提供的视频图像的处理方法,通过对当前播放的包含人脸信息的视频图像进行面部表情检测,并将检测到的面部表情与对应的预定面部表情进行匹配,当两者相匹配时,确定待展现的业务对象在视频图像中的展现位置,进而在该展现位置采用计算机绘图的方式绘制业务对象,这样当业务对象用于展示广告时,一方面,在确定的展现位置采用计算机绘图方式绘制所述业务对象,该业务对象与视频播放相结合,无须通过网络传输与视频无关的额外如广告等业务对象的视频数据,有利于节约网络资源和/或客户端的系统资源;另一方面,业务对象与视频图像中的面部表情紧密结合,可以保留视频图像中视频主体(如主播)的主要形象和动作,为视频图像增加了趣味性,并且还不会打扰用户正常观看视频,可以减少用户对视频图像中展现的业务对象的反感,还可以在一定程度上吸引观众的注意力,提高业务对象的影响力。The method for processing a video image provided by the embodiment of the present application performs facial expression detection on a currently played video image including face information, and matches the detected facial expression with a corresponding predetermined facial expression, when the two match Determining the presentation position of the business object to be presented in the video image, and then drawing the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying the advertisement, on the one hand, the computer is used at the determined display position. Drawing the business object, the business object is combined with video playing, and does not need to transmit video data of a business object such as an advertisement that is not related to the video through the network, thereby saving network resources and/or system resources of the client; Aspects, the business object is closely combined with the facial expressions in the video image, and can retain the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing the user to watch the video normally, Reduce the number of business pairs that users display on video images Resentment, but also to attract the audience's attention to a certain extent, increase the influence of business objects.

上述实施例一中步骤S110的对视频图像进行人脸的面部表情检测的处理,可以采用相应的特征提取算法、或者使用神经网络模型如卷积网络模型等实现。图2是本申请第一卷积网络模型的获取方法一实施例的流程图。本实施例中以卷积网络模型为例,对视频图像进行人脸的面部表情检测进行说明,为此,可以预先训练用于检测图像中人脸属性的第一卷积网络模型。本实施例第一卷积网络模型的获取方法可以由任意具有数据采集、处理和传输功能的电子设备执行,例如包括但不限于移动终端。个人计算机(PC)、服务器等,本申请实施对此不做限定。为了对第一卷积网络模型进行训练,可以通过多种方式获取训练样本,该训练样本可以是至少一张包括人脸信息的样本图像,该样本图像中标注有人脸属性的信息。The process of performing face facial expression detection on the video image in the step S110 in the first embodiment may be implemented by using a corresponding feature extraction algorithm or using a neural network model such as a convolutional network model. 2 is a flow chart of an embodiment of a method for acquiring a first convolutional network model of the present application. In this embodiment, a convolutional network model is taken as an example to describe facial expression detection of a face on a video image. To this end, a first convolutional network model for detecting a face attribute in an image may be pre-trained. The method for acquiring the first convolutional network model of this embodiment may be performed by any electronic device having data acquisition, processing, and transmission functions, including, but not limited to, a mobile terminal. Personal computers (PCs), servers, etc., are not limited in this application. In order to train the first convolutional network model, the training sample may be obtained in a plurality of manners, and the training sample may be at least one sample image including face information, and the information of the face attribute is marked in the sample image.

参照图2,该实施例第一卷积网络模型的获取方法包括:Referring to FIG. 2, the method for obtaining the first convolutional network model of the embodiment includes:

在步骤S210,获取至少一张包括人脸信息的样本图像。其中,样本图像标注有人脸属性的信息。In step S210, at least one sample image including face information is acquired. The sample image is labeled with information about the face attribute.

本申请各实施例中,人脸属性例如可包括局部属性和全局属性,其中,局部属性例如包括但不限于:头发颜色、头发长短、眉毛长短、眉毛浓密或稀疏、眼睛大小、眼睛睁开或闭合、鼻梁高低、嘴巴大小、嘴巴张开或闭合、是否佩戴眼镜、是否戴口罩等,全局属性例如包括但不限于人种、性别、年龄和表情等。本实施例中的样本图像可以是视频或连续拍摄的多张图像,也可以是包括包含人脸的图像和/或不包含人脸的图像等的任意图像。In various embodiments of the present application, the face attributes may include, for example, local attributes and global attributes, for example, but not limited to: hair color, hair length, eyebrow length, eyebrow thick or sparse, eye size, eyes open or The closure, the height of the bridge of the nose, the size of the mouth, the opening or closing of the mouth, whether or not to wear glasses, whether to wear a mask, etc., global attributes include, for example, but not limited to, race, gender, age, and expression. The sample image in this embodiment may be a plurality of images of video or continuous shooting, or may be any image including an image including a human face and/or an image not including a human face.

在本申请各实施例中,由于图像的分辨率越大其数据量也就越大,进行人脸属性检测时,所需要的计算资源越多,检测速度越慢,鉴于此,在本申请的一种具体实现方式中,上述样本图像可以是满足预设分辨率条件的图像。例如,上述预设分辨率条件可以是:图像的最长边不超过640个像素点,最短边不超过480个像素点等等。In various embodiments of the present application, the larger the resolution of the image, the larger the amount of data. When the face attribute detection is performed, the more computing resources are required, the slower the detection speed. In view of this, in the present application, In a specific implementation manner, the sample image may be an image that satisfies a preset resolution condition. For example, the above preset resolution condition may be: the longest side of the image does not exceed 640 pixels, the shortest side does not exceed 480 pixels, and the like.

本申请各实施例中的样本图像可以是通过图像采集设备得到,其中,该图像采集设备例如可以是专用相机或集成在其他设备中的相机等。然而,实际应用中由于图像采集设备的硬件参数不同、设置不同等等,所采集的图像可能不满足上述预设分辨率条件,为得到满足上述预设分辨率条件的样本图像,在本申请的一种可选实现方式中,还可以在图像采集设备采集到图像之后,对所采集到的图像进行缩放处理,以获得符合预设分辨率条件的至少一张样本图像。The sample image in various embodiments of the present application may be obtained by an image acquisition device, which may be, for example, a dedicated camera or a camera integrated in other devices. However, in actual applications, due to different hardware parameters, different settings, and the like of the image acquisition device, the acquired image may not satisfy the above preset resolution condition, in order to obtain a sample image that satisfies the above preset resolution condition, in the present application In an optional implementation manner, after the image acquisition device acquires the image, the collected image may be scaled to obtain at least one sample image that meets the preset resolution condition.

得到样本图像后,可以在每张样本图像中标注人脸属性的信息,例如开心、痛苦、悲伤、愤怒等,可以将每张样本图像中标注的人脸属性的信息与该样本图像作为训练数据存储。After obtaining the sample image, the information of the face attribute, such as happiness, pain, sadness, anger, etc., may be marked in each sample image, and the information of the face attribute marked in each sample image and the sample image may be used as training data. storage.

为了使得对样本图像中的人脸属性的检测更加准确,可以对样本图像中的人脸进行定位,从而得到样本图像中人脸的准确位置,具体可参见下述步骤S220的处理。In order to make the detection of the face attribute in the sample image more accurate, the face in the sample image can be positioned to obtain the exact position of the face in the sample image. For details, refer to the process of step S220 described below.

在步骤S220,对上述至少一张样本图像中的每张样本图像,检测样本图像中的人脸和人脸关键点,通过人脸关键点对样本图像中的人脸进行定位,得到人脸定位信息。In step S220, for each sample image in the at least one sample image, a face and a face key point in the sample image are detected, and a face in the sample image is located through a face key point to obtain a face face. information.

在本申请各实施例中,每张人脸都有一定的特征点,例如眼角、眉毛的末端、嘴角、鼻尖等特征点,再如人脸的边界点等,在获得了人脸关键点(即关键特征点)后,通过人脸关键点可以计算该样 本图像中的人脸到预先设定的标准人脸的映射或者相似变换,将该样本图像中的人脸与上述标准人脸对齐,从而将样本图像中的人脸进行定位,得到样本图像中人脸的定位信息。In each embodiment of the present application, each face has a certain feature point, such as a corner of the eye, an end of the eyebrow, a corner of the mouth, a tip of the nose, and the like, and a boundary point of the face, etc., in which a key point of the face is obtained ( That is, the key feature points), you can calculate the sample through the key points of the face. a mapping of a face in the image to a preset standard face or a similar transformation, aligning the face in the sample image with the standard face, thereby positioning the face in the sample image to obtain a sample image. Positioning information of the face.

在步骤S230,将包含人脸定位信息的样本图像作为训练样本。In step S230, a sample image containing face positioning information is taken as a training sample.

为了使得训练得到的第一卷积网络模型输出的检测结果更加准确,可以预先设置对第一卷积网络模型进行训练的监督信息,具体可参见下述步骤S240的处理。In order to make the detection result of the output of the first convolutional network model obtained by the training more accurate, the supervision information for training the first convolutional network model may be set in advance. For details, refer to the processing of step S240 described below.

在一个可选示例中,步骤S210~S230可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的训练样本获取模块604执行。In an alternative example, steps S210-S230 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a training sample acquisition module 604 executed by the processor.

在步骤S240,对人脸属性中具有大小顺序特征的属性进行编码。In step S240, an attribute having a size order feature in the face attribute is encoded.

其中,大小顺序特征的属性例如可以为年龄、两眼睛之间的距离等。The attributes of the size order feature may be, for example, age, distance between two eyes, and the like.

在实施例中,以年龄为例,设定标准年龄a,其编码可以为以下几种形式之一或者其组合:In the embodiment, the age is taken as an example, and the standard age a is set, and the code may be one of the following forms or a combination thereof:

形式一:编码为x1,x2,…xi…,其中xi为二值的数值,取值为0或者1,如果年龄i小于等于a,则xi的取值为1,如果年龄i大于a,则xi的取值为0。Form 1: Encoded as x 1 , x 2 , ... x i ..., where x i is a binary value, and the value is 0 or 1. If the age i is less than or equal to a, the value of x i is 1, if the age If i is greater than a, the value of x i is 0.

形式二:编码为x1,x2,…xi…,其中xi为二值的数值,取值为0或者1,如果年龄i等于a除以k,则xi的取值为1,否则,x的取值i为0。其中k可以为任意取值的正整数,其数值可以人工定义或者随机选取。Form 2: coded as x 1 , x 2 ,...x i ..., where x i is a binary value, and the value is 0 or 1. If the age i is equal to a divided by k, then x i has a value of 1, otherwise, the value of i x is 0. Where k can be a positive integer of any value, and its value can be manually defined or randomly selected.

在一个可选示例中,步骤S240可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的编码模块605执行。In an alternative example, step S240 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by an encoding module 605 executed by the processor.

在步骤S250,将编码后的属性作为训练第一卷积网络模型的监督信息,使用训练样本对第一卷积网络模型进行训练,得到用于检测图像中人脸属性的第一卷积网络模型。In step S250, the coded attribute is used as the supervision information of the training first convolutional network model, and the first convolutional network model is trained using the training samples to obtain a first convolutional network model for detecting the face attribute in the image. .

在本申请各实施例中,第一卷积网络模型的前端可以包括多个卷积层、池化层和非线性层的组合,其后端可以是损耗层,例如基于代价函数(softmax)和/或叉熵函数(crossentropy)等算法的损耗层。In various embodiments of the present application, the front end of the first convolutional network model may include a combination of multiple convolutional layers, pooling layers, and non-linear layers, and the back end may be a loss layer, such as based on a cost function (softmax) and / or loss layer of an algorithm such as cross entropy.

作为本申请各实施例的一个可选示例,第一卷积网络模型的一个可选结构如图3所示,其中:As an optional example of various embodiments of the present application, an optional structure of the first convolutional network model is shown in FIG. 3, wherein:

A为输入层,该输入层用于读入样本图像、人脸属性及部分人脸属性的编码等。该输入层可以对样本图像进行预处理,输出包括定位信息的人脸图像、人脸属性的信息或者部分人脸属性的编码等。输入层将经过预处理的人脸图像输出到卷积层,并将经过预处理的人脸属性的信息和/或部分人脸属性的编码输入到损耗层。A is an input layer for reading sample images, face attributes, and encoding of partial face attributes. The input layer may preprocess the sample image, and output a face image including positioning information, information of a face attribute, or a code of a partial face attribute. The input layer outputs the preprocessed face image to the convolution layer, and inputs the information of the preprocessed face attribute and/or the code of the partial face attribute to the loss layer.

B层为卷积层,该卷积层的输入是经过预处理的人脸图像或者图像特征,通过预定的线性变换输出得到人脸图像的特征。The B layer is a convolution layer, and the input of the convolution layer is a pre-processed face image or image feature, and the feature of the face image is obtained by a predetermined linear transformation output.

C层为非线性层,该非线性层可以通过非线性函数对卷积层输入的特征进行非线性变换,使得其输出的特征有较强的表达能力。The C layer is a nonlinear layer, and the nonlinear layer can nonlinearly transform the characteristics of the input of the convolution layer, so that the characteristics of the output have strong expression ability.

D为池化层,该池化层可以将多个数值映射到一个数值,因此,该池化层可以加强学习到的特征的非线性,还可以使得输出的特征的空间大小变小,而从增强学习的特征的平移(即人脸平移)不变性,保持提取的特征不变。其中,池化层的输出特征可以再次作为卷积层的输入数据或者全连接层的输入数据。D is a pooling layer, which can map multiple values to a value. Therefore, the pooling layer can enhance the nonlinearity of the learned features, and can also make the spatial size of the output features smaller. Enhance the translation (ie, face translation) invariance of the learned features, keeping the extracted features unchanged. Wherein, the output feature of the pooling layer can be used again as the input data of the convolution layer or the input data of the fully connected layer.

如图3所示,卷积层、非线性层和池化层最外面的矩形框表示卷积层、非线性层和池化层层可以重复一次或者多次,即卷积层、非线性层和池化层组合可以重复一次或多次,其中,每一次池化层的输出数据可以作为卷积层的再次输入数据。卷积层、非线性层和池化层三层的多次组合,可以更好的处理输入的样本图像,使得样本图像中的特征具有较佳的表达能力。As shown in FIG. 3, the outermost rectangular frame of the convolutional layer, the nonlinear layer, and the pooling layer indicates that the convolutional layer, the nonlinear layer, and the pooled layer may be repeated one or more times, that is, a convolutional layer or a nonlinear layer. The combination with the pooling layer may be repeated one or more times, wherein the output data of each pooling layer may be used as the re-input data of the convolution layer. Multiple combinations of the convolutional layer, the nonlinear layer and the pooled layer can better process the input sample image, so that the features in the sample image have better expression ability.

E层为全连接层,该全连接层对池化层的输入数据进行线性变换,将学习得到的特征投影到一个更好的子空间以利于属性预测。The E layer is a fully connected layer that linearly transforms the input data of the pooled layer and projects the learned features into a better subspace to facilitate property prediction.

F层为非线性层,该非线性层与非线性层的功能一样,对全连接层的输入特征进行非线性变换。其输出特征可以作为损耗层的输入数据或者再次作为全连接层的输入数据。The F layer is a nonlinear layer, and the nonlinear layer functions as a nonlinear layer, and the input characteristics of the fully connected layer are nonlinearly transformed. Its output characteristics can be used as input data for the loss layer or as input data for the fully connected layer again.

如图3所示,全连接层和非线性层最外面的矩形框表示全连接层和非线性层可以重复一次或者多次。As shown in FIG. 3, the outermost rectangular frame of the fully connected layer and the nonlinear layer indicates that the fully connected layer and the nonlinear layer may be repeated one or more times.

G层为一个或者多个损耗层,其主要负责计算预测的人脸属性的信息和/或编码与输入的人脸属性的信息和/或编码的误差。The G layer is one or more loss layers that are primarily responsible for calculating the information of the predicted face attributes and/or the errors of the information and/or coding of the encoded face attributes.

可以示例性地通过向后传递的梯度下降算法,训练得到第一卷积网络模型中的网络参数,这样可以使得输入层只输入图像,即可输出与输入图像中的人脸相应的人脸属性的信息,从而得到第一卷积网络模型。 The network parameters in the first convolutional network model can be trained by the gradient descent algorithm passed backwards, which can make the input layer input only the image, and can output the face attribute corresponding to the face in the input image. The information thus leads to the first convolutional network model.

通过上述过程,输入层负责简单处理输入,卷积层、非线性层和池化层的组合负责对样本图像的特征提取,全连接层和非线性层提取的特征到人脸属性的信息和/或编码的映射,损耗层负责计算预测误差。通过上述第一卷积网络模型的多层设计,可以使提取的特征具有丰富的表达能力,从而更好的预测人脸属性。另外,多个人脸属性的信息和编码同时连接损耗层,可确保多个任务同时学习,共享卷积网络学到的特征。Through the above process, the input layer is responsible for simply processing the input, and the combination of the convolutional layer, the nonlinear layer and the pooling layer is responsible for the feature extraction of the sample image, the information extracted from the fully connected layer and the nonlinear layer to the face attribute information and/or Or the mapped map, the loss layer is responsible for calculating the prediction error. Through the multi-layer design of the first convolutional network model described above, the extracted features can be richly expressed, thereby better predicting the face attributes. In addition, the information and coding of multiple face attributes are connected to the loss layer at the same time, which ensures that multiple tasks learn at the same time and share the features learned by the convolutional network.

在一个可选示例中,步骤S250可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第一卷积网络模型确定模块606执行。In an alternative example, step S250 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a first convolutional network model determination module 606 executed by the processor.

本实施例中,通过训练得到的第一卷积网络模型,可方便后续对当前播放的包含人脸信息的视频图像进行面部表情检测,并将检测到的面部表情与对应的预定面部表情进行匹配,当两者相匹配时,确定待展现的业务对象在视频图像中的展现位置,进而在该展现位置采用计算机绘图的方式绘制业务对象,这样当业务对象用于展示广告时,一方面,在确定的展现位置采用计算机绘图方式绘制所述业务对象,该业务对象与视频播放相结合,无须通过网络传输与视频无关的额外如广告等业务对象的视频数据,有利于节约网络资源和/或客户端的系统资源;另一方面,业务对象与视频图像中的面部表情紧密结合,可以保留视频图像中视频主体(如主播)的主要形象和动作,为视频图像增加了趣味性,并且还不会打扰用户正常观看视频,可以减少用户对视频图像中展现的业务对象的反感,还可以在一定程度上吸引观众的注意力,提高业务对象的影响力。In this embodiment, the first convolutional network model obtained by the training can facilitate subsequent facial expression detection on the currently played video image containing the face information, and match the detected facial expression with the corresponding predetermined facial expression. When the two match, determine the presentation position of the business object to be presented in the video image, and then draw the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying advertisements, on the one hand, The determined display position is drawn by using a computer drawing manner, and the business object is combined with the video playing, and the video data of the business object such as an advertisement, which is not related to the video, is transmitted through the network, thereby saving network resources and/or customers. On the other hand, the business object is closely combined with the facial expressions in the video image to preserve the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing. The user can watch the video normally, which can reduce the user's view on the video image. Now objectionable business objects, but also to attract the audience's attention to a certain extent, increase the influence of business objects.

图4是本申请视频图像的处理方法另一实施例的流程图。本申请实施例中视频图像可以是直播类视频中的视频图像,例如花椒直播平台中某主播进行视频直播时的视频图像。参见图4,该实施例视频图像的处理方法包括:4 is a flow chart of another embodiment of a method for processing a video image of the present application. The video image in the embodiment of the present application may be a video image in a live video, such as a video image when an anchor of a pepper live broadcast platform performs live video broadcast. Referring to FIG. 4, a method for processing a video image of this embodiment includes:

在步骤S410,获取当前播放的包含人脸信息的视频图像。In step S410, the currently played video image containing the face information is acquired.

其中,上述步骤S410的具体处理可参见上述图1所示实施例中步骤S110中的相关内容,在此不再赘述。For the specific processing of the foregoing step S410, refer to the related content in step S110 in the foregoing embodiment shown in FIG. 1 , and details are not described herein again.

在步骤S420,基于视频图像中的人脸信息,使用预先训练好的、用于检测图像中人脸属性的第一卷积网络模型,对视频图像进行人脸的面部表情检测。In step S420, based on the face information in the video image, the pre-trained first convolutional network model for detecting the face attribute in the image is used to perform facial expression detection of the face on the video image.

在本实施例中,可以将获取到的包含人脸信息的视频图像输入到上述图2所示实施例中训练得到的第一卷积网络模型中,通过该第一卷积网络模型可以对视频图像进行如缩放等预处理、特征提取、映射和变换等处理,以对视频图像进行人脸的面部表情检测,得到视频图像中包含的人脸的面部表情。In this embodiment, the acquired video image including the face information may be input into the first convolutional network model trained in the foregoing embodiment shown in FIG. 2, and the video may be used by the first convolutional network model. The image performs processing such as pre-processing such as scaling, feature extraction, mapping, and transformation to perform facial expression detection on the face of the video image to obtain a facial expression of the face included in the video image.

在一个可选示例中,步骤S410~S420可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的视频图像检测模块601执行。In an alternative example, steps S410-S420 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a video image detection module 601 that is executed by the processor.

在步骤S430,当检测到的面部表情与对应的预定面部表情相匹配时,提取与检测到的面部表情相应的人脸区域内人脸属性的特征点。In step S430, when the detected facial expression matches the corresponding predetermined facial expression, the feature point of the face attribute in the face region corresponding to the detected facial expression is extracted.

在本申请的各实施例中,对于包含人脸信息的视频图像,人脸中会包含有一定的特征点,例如眼睛、鼻子、嘴巴、脸部轮廓等特征点。对视频图像中的人脸进行检测并确定特征点,可以采用任意适当的相关技术中的方式实现,本申请实施例对此不作限定。例如,线性特征提取方式如主成分分析(PCA)、线性判别分析(LDA)、独立成分分析(ICA)等等;再如,非线性特征提取方式如核主成分分析(Kernel PCA)、流形学习等;也可以使用训练完成的神经网络模型如本申请实施例中的卷积网络模型进行人脸属性的特征点的提取,本申请实施例对此不作限制。In various embodiments of the present application, for a video image including face information, a certain feature point such as an eye, a nose, a mouth, a facial contour, and the like may be included in the face. The detection of the face in the video image and the determination of the feature point can be implemented in any suitable related art, which is not limited in the embodiment of the present application. For example, linear feature extraction methods such as principal component analysis (PCA), linear discriminant analysis (LDA), independent component analysis (ICA), etc.; for example, nonlinear feature extraction methods such as kernel principal component analysis (Kernel PCA), manifolds The learning and the like can also be performed by using the trained neural network model, such as the convolutional network model in the embodiment of the present application, for the feature point extraction of the face attribute.

以直播类视频为例,在进行视频直播的过程中,从直播类视频的视频图像中检测人脸并确定人脸属性的特征点;再如,在某一已录制完成的视频的播放过程中,从播放的视频图像中检测人脸并确定人脸属性的特征点;又如,在某一视频的录制过程中,从录制的视频图像中检测人脸并确定人脸属性的特征点等等。Taking a live video as an example, in the process of video live broadcast, the face is detected from the video image of the live video and the feature points of the face attribute are determined; for example, during the playback of a recorded video. , detecting a face from the played video image and determining a feature point of the face attribute; for example, detecting a face from the recorded video image and determining a feature point of the face attribute during recording of a certain video, etc. .

在步骤S440,根据人脸属性的特征点,确定待展现的业务对象在视频图像中的展现位置。In step S440, the presentation position of the business object to be presented in the video image is determined according to the feature point of the face attribute.

在实施中,在人脸属性的特征点确定后,可以以此为依据,确定待展示的业务对象在视频图像中的一个或多个展现位置。In the implementation, after the feature points of the face attribute are determined, the one or more presentation positions of the business object to be displayed in the video image may be determined based on the basis.

在本实施例中,在根据目标对象的特征点确定待展示的业务对象在视频图像中的展现位置时,一种可选的实现方式例如可以包括但不限于:In this embodiment, when determining the presentation position of the business object to be displayed in the video image according to the feature point of the target object, an optional implementation manner may include, but is not limited to:

方式一,根据人脸属性的特征点,使用预先训练好的、用于确定业务对象在视频图像中的展现位置的第二卷积网络模型,确定待展现的业务对象在视频图像中的展现位置;方式二,根据人脸属性的特征点和待展现的业务对象的类型,确定待展现的业务对象在视频图像中的展现位置。 In the first method, according to the feature point of the face attribute, the second convolutional network model for determining the presentation position of the business object in the video image is used to determine the presentation position of the business object to be presented in the video image. The second method determines the presentation position of the business object to be presented in the video image according to the feature point of the face attribute and the type of the business object to be presented.

以下,分别对上述两种方式进行示例性说明。Hereinafter, the above two modes will be exemplarily described.

方式一method one

在使用方式一确定待展示的业务对象在视频图像中的展现位置时,预先训练一个卷积网络模型,即:第二卷积网络模型,训练完成的第二卷积网络模型具有确定业务对象在视频图像中的展现位置的功能;或者,也可以直接使用第三方已训练完成的、具有确定业务对象在视频图像中的展现位置的功能的卷积网络模型。When the usage mode 1 determines the presentation position of the business object to be displayed in the video image, a convolutional network model is pre-trained, that is, the second convolutional network model, and the trained second convolutional network model has the determined service object in the The function of presenting the position in the video image; alternatively, a convolutional network model that has been trained by a third party to have the function of determining the presentation position of the business object in the video image can also be used directly.

需要说明的是,本实施例中,以对业务对象的训练进行说明,但本领域技术人员应当明了,第二卷积网络模型在对业务对象进行训练时,也可以对人脸进行训练,实现人脸和业务对象的联合训练。It should be noted that, in this embodiment, the training of the business object is described, but those skilled in the art should understand that the second convolutional network model can also train the face when training the business object. Joint training of faces and business objects.

预先训练第二卷积网络模型时,一种可选的训练方式包括以下过程:When pre-training the second convolutional network model, an optional training method includes the following process:

(1)获取训练样本的样本图像的特征向量。(1) Obtaining a feature vector of a sample image of the training sample.

其中,特征向量中包含有训练样本的样本图像中的业务对象的位置信息和/或置信度信息,以及样本图像中人脸属性对应的人脸特征向量。业务对象的置信度信息指示了业务对象展示在当前位置时,能够达到的效果(如被关注或被点击或被观看)的概率,该概率可以根据对历史数据的统计分析结果设定,也可以根据仿真实验的结果设定,还可以根据人工经验进行设定。在实际应用中,可以根据实际需要,仅对业务对象的位置信息进行训练,也可以仅对业务对象的置信度信息进行训练,还可以对业务对象的位置信息和或置信度信息均进行训练。对业务对象的位置信息和或置信度信息均进行训练,使得训练后的第二卷积网络模型可以更为有效和精准地确定业务对象的位置信息和置信度信息,以便为业务对象的展示提供依据。The feature vector includes position information and/or confidence information of the business object in the sample image of the training sample, and a face feature vector corresponding to the face attribute in the sample image. The confidence information of the business object indicates the probability that the business object can achieve the effect (such as being focused or clicked or viewed) when the current location is displayed. The probability may be set according to the statistical analysis result of the historical data, or may be According to the results of the simulation experiment, it can also be set according to the artificial experience. In practical applications, only the location information of the business object may be trained according to actual needs, or only the confidence information of the business object may be trained, and the location information and or the confidence information of the business object may be trained. The location information and or the confidence information of the business object are trained, so that the trained second convolutional network model can more effectively and accurately determine the location information and the confidence information of the business object, so as to provide the display of the business object. in accordance with.

第二卷积网络模型通过大量的样本图像进行训练,本申请实施例中,训练样本的样本图像可以是上述图2所示实施例中的至少一张包括人脸信息的样本图像,可使用包含有业务对象的业务对象样本图像对第二卷积网络模型进行训练,本领域技术人员应当明了的是,用来训练的业务对象样本图像中,除了包含业务对象外,也可以包含人脸信息。此外,本申请实施例中的业务对象样本图像中的业务对象可以被预先标注位置信息、或者置信度信息,或者位置信息和或置信度信息都标注。当然,在实际应用中,这些信息也可以通过其它途径获取。而通过预先在对业务对象进行相应信息的标注,可以有效节约数据处理的数据和交互次数,提高数据处理效率。The second convolutional network model is trained by a large number of sample images. In the embodiment of the present application, the sample image of the training sample may be at least one sample image including the face information in the embodiment shown in FIG. 2, which may be used. The business object sample image with the business object is trained on the second convolutional network model. It should be understood by those skilled in the art that the business object sample image used for training may include face information in addition to the business object. In addition, the business object in the business object sample image in the embodiment of the present application may be marked with pre-labeled location information, or confidence information, or location information and or confidence information. Of course, in practical applications, this information can also be obtained through other means. By marking the corresponding information on the business object in advance, the data processing data and the number of interactions can be effectively saved, and the data processing efficiency is improved.

将具有业务对象的位置信息和/或置信度信息,以及某种人脸属性的样本图像作为训练样本,对其进行特征向量提取,获得包含有业务对象的位置信息和/或置信度信息的特征向量,以及人脸属性对应的人脸特征向量。The location information and/or confidence information of the business object and the sample image of a certain face attribute are used as training samples, and the feature vector is extracted to obtain the feature information including the location information and/or the confidence information of the business object. The vector, as well as the face feature vector corresponding to the face attribute.

可选地,可以使用第二卷积网络模型对人脸和业务对象同时进行训练,在此情况下,样本图像的特征向量中,也包含人脸的特征。Optionally, the second convolutional network model can be used to simultaneously train the face and the business object. In this case, the feature vector of the sample image also includes the features of the face.

对特征向量的提取可以采用相关技术中的适当方式实现,本申请实施例在此不再赘述。The extraction of the feature vector can be implemented in an appropriate manner in the related art, and details are not described herein again.

(2)对特征向量进行卷积处理,获取特征向量卷积结果。(2) Convolution processing of the feature vector to obtain the feature vector convolution result.

在本实施例中,获取的特征向量卷积结果中包含有业务对象的位置信息和/或置信度信息,人脸属性对应的人脸特征向量对应的特征向量卷积结果。在对人脸和业务对象进行联合训练的情况下,特征向量卷积结果中还可以包含人脸信息。In this embodiment, the obtained feature vector convolution result includes the location information and/or the confidence information of the service object, and the feature vector convolution result corresponding to the face feature vector corresponding to the face attribute. In the case of joint training of faces and business objects, the feature vector convolution result may also include face information.

对特征向量的卷积处理次数可以根据实际需要进行设定,也即:第二卷积网络模型中,卷积层的层数根据可以实际需要进行设置,在此不再赘述。The number of times of convolution processing on the feature vector can be set according to actual needs, that is, in the second convolutional network model, the number of layers of the convolution layer can be set according to actual needs, and will not be described here.

卷积结果是对特征向量进行了特征提取后的结果,该结果可以有效表征视频图像中人脸的特征对应的业务对象。The convolution result is the result of feature extraction of the feature vector, which can effectively represent the business object corresponding to the feature of the face in the video image.

本申请实施例中,当特征向量中既包含业务对象的位置信息,又包含业务对象的置信度信息时,也即:对业务对象的位置信息和置信度信息均进行了训练的情况下,该特征向量卷积结果在后续分别进行收敛条件判断时共享,无须进行重复处理和计算,有利于减少由数据处理引起的资源损耗、提高数据处理速度和效率。In the embodiment of the present application, when the feature vector includes both the location information of the service object and the confidence information of the service object, that is, when the location information and the confidence information of the service object are trained, The eigenvector convolution result is shared in the subsequent judgment of the convergence condition, and no need to perform repeated processing and calculation, which is beneficial to reduce resource loss caused by data processing, and improve data processing speed and efficiency.

(3)判断特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息是否满足业务对象收敛条件,并判断特征向量卷积结果中对应的人脸特征向量是否满足人脸收敛条件。(3) determining whether the location information and/or the confidence information of the corresponding service object in the feature vector convolution result satisfies the convergence condition of the service object, and determining whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence condition .

其中,收敛条件可以由本领域技术人员根据实际需求适当设定。当信息满足收敛条件时,可以认为第二卷积网络模型中的网络参数设置适当;当信息不能满足收敛条件时,可以认为第二卷积网络模型中的网络参数设置不适当,需要对其进行调整,该调整可以是一个迭代的过程,直至使用调整后的网络参数对特征向量进行卷积处理的结果满足收敛条件。 The convergence condition can be appropriately set by a person skilled in the art according to actual needs. When the information satisfies the convergence condition, it can be considered that the network parameters in the second convolutional network model are properly set; when the information cannot satisfy the convergence condition, it can be considered that the network parameters in the second convolutional network model are not properly set and need to be performed. Adjustment, the adjustment may be an iterative process until the result of convolution processing the feature vector using the adjusted network parameters satisfies the convergence condition.

一种可选方式中,收敛条件可以根据预设的标准位置和/或预设的标准置信度进行设定,例如,将特征向量卷积结果中业务对象的位置信息指示的位置与预设的标准位置之间的距离满足一定阈值作为业务对象的位置信息的收敛条件;将特征向量卷积结果中业务对象的置信度信息指示的置信度与预设的标准置信度之间的差别满足一定阈值作为业务对象的置信度信息的收敛条件等。In an optional manner, the convergence condition may be set according to a preset standard location and/or a preset standard confidence, for example, a location indicated by the location information of the service object in the feature vector convolution result and a preset The distance between the standard positions satisfies a certain threshold as a convergence condition of the location information of the service object; the difference between the confidence level indicated by the confidence information of the service object in the feature vector convolution result and the preset standard confidence satisfies a certain threshold The convergence condition of the confidence information as a business object, and the like.

其中,可选地,上述预设的标准位置可以是对训练样本的样本图像中的业务对象的位置进行平均处理后获得的平均位置;预设的标准置信度可以是对训练样本的样本图像中的业务对象的置信度进行平均处理后获取的平均置信度。因样本图像为待训练样本且数据量庞大,可依据训练样本的样本图像中的业务对象的位置和/或置信度设定标准位置和/或标准置信度,以便设定的标准位置和标准置信度更为客观和精确。Optionally, the preset standard location may be an average location obtained by averaging the location of the service object in the sample image of the training sample; the preset standard confidence may be in the sample image of the training sample. The confidence level of the business object is averaged after the average processing. Since the sample image is a sample to be trained and the amount of data is large, the standard position and/or standard confidence can be set according to the position and/or confidence of the business object in the sample image of the training sample, so as to set the standard position and standard confidence. The degree is more objective and precise.

在具体进行特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息是否满足收敛条件的判断时,一种可选的方式包括:When determining whether the location information and/or the confidence information of the corresponding service object meets the convergence condition in the feature vector convolution result, an optional manner includes:

获取特征向量卷积结果中对应的业务对象的位置信息,通过计算对应的业务对象的位置信息指示的位置与预设的标准位置之间的欧式距离,得到对应的业务对象的位置信息指示的位置与预设的标准位置之间的第一距离,根据第一距离判断对应的业务对象的位置信息是否满足收敛条件;Obtaining the location information of the corresponding service object in the feature vector convolution result, and calculating the location indicated by the location information of the corresponding service object by calculating the Euclidean distance between the location indicated by the location information of the corresponding service object and the preset standard location Determining, according to the first distance, a first distance between the preset standard position and determining whether the location information of the corresponding service object satisfies the convergence condition;

和/或,and / or,

获取特征向量卷积结果中对应的业务对象的置信度信息,计算对应的业务对象的置信度信息指示的置信度与预设的标准置信度之间的欧式距离,得到对应的业务对象的置信度信息指示的置信度与预设的标准置信度之间的第二距离,根据第二距离判断对应的业务对象的置信度信息是否满足收敛条件。其中,采用欧式距离的方式,实现简单且能够有效指示收敛条件是否被满足。但本申请实施例并不限于此,还可以采用马式距离、巴式距离等其它方式。Obtaining the confidence information of the corresponding service object in the feature vector convolution result, calculating the Euclidean distance between the confidence level indicated by the confidence information of the corresponding service object and the preset standard confidence, and obtaining the confidence of the corresponding business object. A second distance between the confidence level of the information indication and the preset standard confidence, and determining, according to the second distance, whether the confidence information of the corresponding service object satisfies the convergence condition. Among them, the Euclidean distance method is adopted, and the implementation is simple and can effectively indicate whether the convergence condition is satisfied. However, the embodiment of the present application is not limited thereto, and other methods such as a horse distance, a bar distance, and the like may also be adopted.

可选地,如前所述,预设的标准位置为对训练样本的样本图像中的业务对象的位置进行平均处理后获得的平均位置;和/或,预设的标准置信度为对训练样本的样本图像中的业务对象的置信度进行平均处理后获取的平均置信度。Optionally, as described above, the preset standard position is an average position obtained by averaging the positions of the business objects in the sample image of the training sample; and/or, the preset standard confidence is the pair of training samples. The confidence level of the business object in the sample image is averaged after the average processing.

对于判断该特征向量卷积结果中对应的人脸特征向量是否满足人脸收敛条件可以由本领域技术人员根据实际情况进行设定,本申请实施例对此不做限定。For determining whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence condition, it can be set by a person skilled in the art according to actual conditions, which is not limited by the embodiment of the present application.

(4)若上述收敛条件都满足,即:特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息满足业务对象收敛条件,且特征向量卷积结果中对应的人脸特征向量满足人脸收敛条件,则完成对第二卷积网络模型的训练;否则,只要有一个收敛条件不满足,例如,特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息不满足业务对象收敛条件,和/或特征向量卷积结果中对应的人脸特征向量不满足人脸收敛条件,调整第二卷积网络模型的网络参数,并根据调整后的第二卷积网络模型的网络参数对该第二卷积网络模型进行迭代训练,直至迭代训练后的业务对象的位置信息和/或置信度信息以及人脸特征向量均满足相应的收敛条件。(4) If the above convergence conditions are satisfied, that is, the position information and/or the confidence information of the corresponding business object in the feature vector convolution result satisfies the convergence condition of the business object, and the corresponding face feature vector in the feature vector convolution result If the face convergence condition is satisfied, the training of the second convolutional network model is completed; otherwise, as long as one convergence condition is not satisfied, for example, the location information and/or confidence information of the corresponding business object in the feature vector convolution result is not satisfied. Satisfying the convergence condition of the business object, and/or the corresponding face feature vector in the feature vector convolution result does not satisfy the face convergence condition, adjusting the network parameter of the second convolutional network model, and according to the adjusted second convolutional network model The network parameters are iteratively trained on the second convolutional network model until the position information and/or the confidence information and the face feature vector of the service object after the iterative training satisfy the corresponding convergence condition.

通过对第二卷积网络模型进行上述训练,第二卷积网络模型可以对基于人脸进行展示的业务对象的展现位置进行特征提取和分类,从而具有确定业务对象在视频图像中的展现位置的功能。其中,当展现位置包括多个时,通过上述业务对象置信度的训练,第二卷积网络模型还可以确定出多个展现位置中的展示效果的优劣顺序,基于该优劣顺序从多个展现位置中确定最终的展现位置。在后续应用中,当需要展示业务对象时,根据视频中的当前图像即可确定出有效的展现位置。By performing the above training on the second convolutional network model, the second convolutional network model can feature extracting and classifying the presentation position of the business object based on the face presentation, thereby having the position of determining the presentation position of the business object in the video image. Features. Wherein, when the presentation location includes multiple, the second convolutional network model can also determine the order of the presentation effects in the plurality of presentation locations by the training of the confidence of the business object, and the plurality of presentations are based on the order of the pros and cons The final presentation position is determined in the presentation position. In subsequent applications, when a business object needs to be displayed, a valid presentation location can be determined based on the current image in the video.

此外,在对第二卷积网络模型进行上述训练之前,还可以预先对样本图像进行预处理,包括:获取多个样本图像,其中,每个样本图像中包括业务对象的标注信息;根据标注信息确定业务对象的位置,判断确定的业务对象的位置与预设位置的距离是否小于或等于设定阈值;将小于或等于设定阈值的业务对象对应的样本图像,确定为训练样本的样本图像。其中,预设位置和设定阈值均可以由本领域技术人员采用任意适当方式进行适当设置,如根据数据统计分析结果或者相关距离计算公式或者人工经验等,本申请实施例对此不作限定。In addition, before performing the foregoing training on the second convolutional network model, the sample image may be pre-processed, including: acquiring a plurality of sample images, where each sample image includes the annotation information of the business object; Determining the location of the business object, determining whether the distance between the determined location of the business object and the preset location is less than or equal to a set threshold; determining a sample image corresponding to the business object that is less than or equal to the set threshold as the sample image of the training sample. The preset position and the set threshold may be appropriately set by any suitable means by a person skilled in the art, for example, according to the statistical analysis result of the data or the related distance calculation formula or the artificial experience, etc., which is not limited by the embodiment of the present application.

通过预先对业务对象样本图像进行预处理,可以过滤掉不符合条件的样本图像,以提高训练结果的准确性。By pre-processing the business object sample image, the sample image that does not meet the condition can be filtered out to improve the accuracy of the training result.

通过上述过程实现了第二卷积网络模型的训练,训练完成的第二卷积网络模型可以用来确定业务对象在视频图像中的展现位置。例如,在视频直播过程中,若主播点击业务对象指示进行业务对象展示时,在第二卷积网络模型获得了直播的视频图像中主播的面部特征点后,可以指示出展示业务对象的展示位置如主播的额头位置,进而控制直播应用在该位置展示业务对象;或者,在视频直播过程中, 若主播点击业务对象指示进行业务对象展示时,第二卷积网络模型可以直接根据直播的视频图像确定业务对象的展现位置。The training of the second convolutional network model is implemented by the above process, and the trained second convolutional network model can be used to determine the presentation position of the business object in the video image. For example, in the live broadcast process, if the anchor clicks on the business object to indicate the display of the business object, after the second convolutional network model obtains the facial feature point of the anchor in the live video image, the display location of the display business object may be indicated. Such as the anchor's forehead position, which in turn controls the live application to display the business object at that location; or, during the live broadcast of the video, If the anchor clicks on the business object to indicate the display of the business object, the second convolutional network model can directly determine the presentation location of the business object according to the live video image.

方式二Way two

根据人脸属性的特征点和待展现的业务对象的类型,确定待展现的业务对象在视频图像中的展现位置。Determining the presentation position of the business object to be presented in the video image according to the feature point of the face attribute and the type of the business object to be presented.

在本实施中,在获取了人脸属性的特征点之后,可以按照设定的规则确定待展示的业务对象的展现位置。其中,确定待展示的业务对象的展现位置例如包括但不限于以下至少之一或任意多个:视频图像中人物的头发区域、额头区域、脸颊区域、下巴区域、头部以外的身体区域、视频图像中的背景区域、视频图像中以手部所在的区域为中心的设定范围内的区域、视频图像中预先设定的区域等。其中,该预先设定的区域可以由根据实际情况适当设置,例如,以人脸区域为中心的设定范围内的区域,或者,人脸区域以外的设定范围内的区域,或者背景区域等等,本申请实施例对此不作限制。In this implementation, after the feature points of the face attribute are acquired, the presentation position of the business object to be displayed may be determined according to the set rule. Wherein, determining the presentation position of the business object to be displayed includes, for example but not limited to, at least one or any of the following: a hair area of the character in the video image, a forehead area, a cheek area, a chin area, a body area other than the head, a video The background area in the image, the area within the setting range centering on the area where the hand is located in the video image, the area preset in the video image, and the like. The preset area may be appropriately set according to an actual situation, for example, an area within a setting range centering on a face area, or an area within a setting range other than a face area, or a background area, or the like. The embodiment of the present application does not limit this.

在确定了展现位置后,可以进一步确定待展示的业务对象在视频图像中的展现位置。例如,以展现位置的中心点为业务对象的展现位置中心点进行业务对象的展示;再如,将展现位置对应的展现区域中的某一坐标位置确定为展现位置的中心点等,本申请实施例对此不作限定。After the presentation location is determined, the presentation location of the business object to be displayed in the video image can be further determined. For example, the center point of the presentation location is used as the center point of the presentation location of the business object to display the business object; for example, determining a certain coordinate position in the presentation area corresponding to the presentation location as the center point of the presentation location, etc., This example does not limit this.

在一种可选的实施方案中,在确定待展示的业务对象在视频图像中的展现位置时,不仅根据人脸属性的特征点,还根据待展示的业务对象的类型,确定待展示的业务对象在视频图像中的展现位置。其中,业务对象的类型例如可以包括但不限于以下至少之一或任意多种类型:额头贴片类型、脸颊贴片类型、下巴贴片类型、虚拟帽子类型、虚拟服装类型、虚拟妆容类型、虚拟头饰类型、虚拟发饰类型、虚拟首饰类型、背景类型、虚拟宠物类型、虚拟容器类型等。但不限于此,业务对象的类型还可以为其它适当类型,如虚拟瓶盖类型,虚拟杯子类型、文字类型等等。In an optional implementation, when determining the presentation location of the business object to be displayed in the video image, the service to be displayed is determined not only according to the feature point of the face attribute but also according to the type of the business object to be displayed. The position at which the object appears in the video image. The type of the business object may include, but is not limited to, at least one of the following or any of a plurality of types: a forehead patch type, a cheek patch type, a chin patch type, a virtual hat type, a virtual clothing type, a virtual makeup type, and a virtual type. Headwear type, virtual hair accessory type, virtual jewelry type, background type, virtual pet type, virtual container type, and the like. However, it is not limited thereto, and the type of the business object may be other suitable types, such as a virtual cap type, a virtual cup type, a text type, and the like.

由此,根据业务对象的类型,可以以人脸属性的特征点为参考,为业务对象选择适当的展现位置。Thus, according to the type of the business object, the feature location of the face attribute can be used as a reference to select an appropriate presentation location for the business object.

此外,在根据人脸属性的特征点和待展示的业务对象的类型,获得待展示的业务对象在视频图像中的多个展现位置的情况下,可以从多个展现位置中选择至少一个展现位置作为最终的展现位置。例如,对于文字类型的业务对象,可以展示在背景区域,也可以展示在人物的额头或身体区域等。In addition, in a case where a plurality of presentation positions of the business object to be displayed in the video image are obtained according to the feature point of the face attribute and the type of the business object to be displayed, at least one presentation position may be selected from the plurality of presentation positions. As the final display location. For example, for a text type business object, it can be displayed in the background area, or it can be displayed on the person's forehead or body area.

此外,在本申请各实施例的另一示例中,可以预先存储面部表情与展现位置的对应关系,在确定检测到的面部表情与对应的预定面部表情相匹配时,可从预先存储的面部表情与展现位置的对应关系中,获取预定面部表情对应的目标展现位置作为待展现的业务对象在视频图像中的展现位置。其中,需要说明的是,尽管存在上述面部表情与展现位置的对应关系,但是,面部表情与展现位置并没有必然关系,面部表情仅仅是触发业务对象展现的一种方式,而且展现位置与人脸也不存在必然关系,也即是业务对象可以展现在人脸的某一个区域,也可以显示在人脸之外的其它区域,如视频图像的背景区域等。In addition, in another example of the embodiments of the present application, the correspondence between the facial expression and the presentation position may be stored in advance, and when the detected facial expression matches the corresponding predetermined facial expression, the pre-stored facial expression may be In the correspondence with the presentation position, the target presentation position corresponding to the predetermined facial expression is acquired as the presentation position of the business object to be presented in the video image. It should be noted that, although there is a corresponding relationship between the facial expression and the display position, the facial expression is not necessarily related to the presentation position, and the facial expression is only a way to trigger the presentation of the business object, and the position and the face are displayed. There is also no necessary relationship, that is, a business object can be displayed in a certain area of the face, or can be displayed in other areas than the face, such as the background area of the video image.

在一个可选示例中,步骤S430~S440可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的展现位置确定模块602执行。In an alternative example, steps S430-S440 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a presentation location determining module 602 executed by the processor.

在步骤S450,在展现位置采用计算机绘图方式绘制业务对象。In step S450, the business object is drawn by computer drawing at the presentation position.

当业务对象为包含有语义信息的贴纸,例如广告贴纸时,在进行业务对象的绘制之前,可以先获取业务对象的相关信息,如业务对象的标识、大小等。在确定了展现位置后,可以根据展现位置的坐标,对业务对象进行缩放、旋转等调整,然后,通过相应的绘图方式如OpenGL图形绘制引擎的绘制方式对业务对象进行绘制。在某些情况下,广告还可以以三维特效形式展示,如通过粒子特效方式展示广告的文字或商标(LOGO)等。例如,通过虚拟瓶盖类型的广告贴纸展示某一产品的名称,吸引观众观看,提高广告投放和展示效率。When the business object is a sticker containing semantic information, such as an advertisement sticker, before the business object is drawn, relevant information of the business object, such as the identifier and size of the business object, may be acquired first. After the display position is determined, the business object may be scaled, rotated, etc. according to the coordinates of the presentation position, and then the business object is drawn by a corresponding drawing method such as the drawing method of the OpenGL graphics rendering engine. In some cases, ads can also be displayed in 3D special effects, such as text or logos (LOGOs) that display ads through particle effects. For example, the virtual bottle cap type of advertising sticker displays the name of a product to attract viewers to watch, improving the efficiency of advertising and display.

在一个可选示例中,步骤S450可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的业务对象绘制模块603执行。In an alternative example, step S450 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a business object rendering module 603 executed by the processor.

本申请实施例提供的视频图像的处理方法,当业务对象用于展示广告时,一方面,在确定的展现位置采用计算机绘图方式绘制所述业务对象,该业务对象与视频播放相结合,无须通过网络传输与视频无关的额外如广告等业务对象的视频数据,有利于节约网络资源和/或客户端的系统资源;另一方面,业务对象与视频图像中的面部表情紧密结合,可以保留视频图像中视频主体(如主播)的主要形象和动作,为视频图像增加了趣味性,并且还不会打扰用户正常观看视频,可以减少用户对视频图像中展现的业务对象的反感,还可以在一定程度上吸引观众的注意力,提高业务对象的影响力。The method for processing a video image provided by the embodiment of the present application, when the business object is used for displaying an advertisement, on the one hand, the business object is drawn by using a computer drawing manner at the determined display position, and the business object is combined with the video playing without passing through The network transmits video data of a business object such as an advertisement that is not related to the video, which is beneficial to save network resources and/or system resources of the client; on the other hand, the business object is closely combined with the facial expression in the video image, and can be retained in the video image. The main image and action of the video subject (such as the anchor) adds interest to the video image, and does not disturb the user to watch the video normally, which can reduce the user's dislike of the business object displayed in the video image, and can also be to some extent Attract the attention of the audience and increase the influence of business objects.

图5是本申请视频图像的处理方法又一实施例的流程图。本实施例以业务对象为包含有广告信息 的二维贴纸特效,具体为广告贴纸为例,对本申请实施例的视频图像处理方案进行说明。参见图5,本实施例的视频图像的处理方法包括:FIG. 5 is a flow chart of still another embodiment of a method for processing a video image of the present application. In this embodiment, the business object contains the advertisement information. The video image processing scheme of the embodiment of the present application is described by taking a two-dimensional sticker special effect, specifically an advertisement sticker as an example. Referring to FIG. 5, the processing method of the video image in this embodiment includes:

在步骤S501,获取至少一张包括人脸信息的样本图像作为训练样本。其中,样本图像标注有人脸属性的信息。In step S501, at least one sample image including face information is acquired as a training sample. The sample image is labeled with information about the face attribute.

在一个可选示例中,步骤S501可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的训练样本获取模块604执行。In an alternative example, step S501 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a training sample acquisition module 604 executed by the processor.

在步骤S502,对人脸属性中具有大小顺序特征的属性进行编码。In step S502, an attribute having a size order feature in the face attribute is encoded.

在一个可选示例中,步骤S502可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的编码模块605执行。In an alternative example, step S502 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by an encoding module 605 executed by the processor.

在步骤S503,将编码后的属性作为训练第一卷积网络模型的监督信息,使用训练样本对第一卷积网络模型进行训练,得到用于检测图像中人脸属性的第一卷积网络模型。In step S503, the coded attribute is used as the supervision information of the training first convolutional network model, and the first convolutional network model is trained by using the training samples to obtain a first convolutional network model for detecting the face attribute in the image. .

在一个可选示例中,步骤S503可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第一卷积网络模型确定模块606执行。In an alternative example, step S503 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a first convolutional network model determination module 606 executed by the processor.

上述步骤S501~步骤S503的步骤内容与上述图2所示实施例中的步骤内容相同,在此不再赘述。The content of the steps in the above steps S501 to S503 is the same as that in the embodiment shown in FIG. 2, and details are not described herein again.

在步骤S504,获取上述训练样本的样本图像的特征向量。In step S504, a feature vector of the sample image of the above training sample is acquired.

其中,特征向量中包含有业务对象样本图像中的业务对象的位置信息和/或置信度信息,以及样本图像中人脸属性对应的人脸特征向量。The feature vector includes position information and/or confidence information of the business object in the sample image of the business object, and a face feature vector corresponding to the face attribute in the sample image.

其中,样本图像中人脸属性(即人脸的面部表情)可以在对第一卷积网络模型进行训练时确定。Wherein, the face attribute (ie, the facial expression of the face) in the sample image can be determined when training the first convolutional network model.

在本实施例中,样本图像中存在一些不符合第二卷积网络模型的训练标准的样本图像,可以通过对样本图像的预处理将这部分不符合第二卷积网络模型的训练标准的样本图像过滤掉。In this embodiment, there are some sample images in the sample image that do not meet the training standard of the second convolutional network model, and the samples that do not conform to the training standard of the second convolutional network model may be preprocessed by the sample image. The image is filtered out.

本实施例中,样本图像中包含有业务对象,每个业务对象标注有位置信息和置信度信息。一种可选的实施方案中,将业务对象的中心点的位置信息作为该业务对象的位置信息。本步骤中,示例性地根据业务对象的位置信息对样本图像进行过滤。获得位置信息指示的位置的坐标后,将该坐标与预设的该类型的业务对象的位置坐标进行比对,计算二者的位置方差。若该位置方差小于或等于设定的阈值,则该样本图像可以作为训练样本的样本图像;若该位置方差大于设定的阈值,则过滤掉该业务对象样本图像。其中,预设的位置坐标和设定的阈值均可以由本领域技术人员根据实际情况适当设置,例如,一般用于第二卷积网络模型训练的图像具有相同的大小,可以设定的阈值可以为图像长或宽的1/20~1/5,可选地,可以为图像长或宽的1/10。In this embodiment, the sample image includes a business object, and each business object is labeled with location information and confidence information. In an optional implementation, the location information of the central point of the business object is used as the location information of the business object. In this step, the sample image is exemplarily filtered according to the location information of the business object. After obtaining the coordinates of the location indicated by the location information, the coordinates are compared with the preset location coordinates of the business object of the type, and the position variance of the two is calculated. If the position variance is less than or equal to the set threshold, the sample image may be used as a sample image of the training sample; if the position variance is greater than the set threshold, the business object sample image is filtered out. The preset position coordinates and the set thresholds may be appropriately set by a person skilled in the art according to actual conditions. For example, the images generally used for the second convolutional network model training have the same size, and the threshold that can be set may be The length or width of the image is 1/20 to 1/5, and alternatively, it may be 1/10 of the length or width of the image.

此外,还可以对确定的训练样本的样本图像中的业务对象的位置和置信度进行平均,获取平均位置和平均置信度,该平均位置和平均置信度可以作为后续确定收敛条件的依据。In addition, the position and confidence of the business object in the sample image of the determined training sample may be averaged to obtain an average position and an average confidence, and the average position and the average confidence may be used as a basis for determining the convergence condition subsequently.

当以业务对象为广告贴纸为实例时,本实施例中用于训练的样本图像需要标注有广告位置的坐标和该广告位的置信度。置信度的大小表示了这个广告位是最优广告位的概率,例如,如果这个广告位是被遮挡多,则置信度低。其中,广告位置可以在人脸、前背景等地方标注,可以实现面部特征点、前背景等地方的广告位的联合训练,这相对于基于面部表情等某一项技术单独训练的方案,有利于节省计算资源。When the business object is an advertisement sticker as an example, the sample image used for training in this embodiment needs to be marked with the coordinates of the advertisement location and the confidence of the advertisement slot. The size of the confidence indicates the probability that this ad slot is the best ad slot. For example, if this ad slot is mostly occluded, the confidence is low. Among them, the advertisement position can be marked in the face, the front background and the like, and the joint training of the advertisement points of the facial feature point and the front background can be realized, which is advantageous for the separate training scheme based on a certain technique such as facial expression. Save computing resources.

在一个可选示例中,步骤S504可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的特征向量获取模块607执行。In an alternative example, step S504 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a feature vector acquisition module 607 executed by the processor.

在步骤S505,对特征向量进行卷积处理,获取特征向量卷积结果。In step S505, the feature vector is convoluted to obtain a feature vector convolution result.

需要说明的是,对该特征向量进行卷积处理时,既对样本图像中的业务对象的位置信息和/或置信度信息对应的特征向量进行卷积处理,还对每一张样本图像中人脸属性对应的人脸特征向量进行卷积处理,分别得到相应的特征向量卷积结果。It should be noted that, when performing convolution processing on the feature vector, convolution processing is performed on the feature information corresponding to the location information and/or the confidence information of the business object in the sample image, and also in each sample image. The face feature vector corresponding to the face attribute is convoluted, and the corresponding feature vector convolution result is obtained respectively.

在一个可选示例中,步骤S505可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的卷积模块608执行。In an alternative example, step S505 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a convolution module 608 executed by the processor.

在步骤S506,判断特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息是否满足业务对象收敛条件,并判断特征向量卷积结果中对应的人脸特征向量是否满足人脸收敛条件。In step S506, it is determined whether the location information and/or the confidence information of the corresponding service object in the feature vector convolution result satisfies the convergence condition of the service object, and determines whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence. condition.

在一个可选示例中,步骤S506可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的收敛条件判断模块609执行。In an alternative example, step S506 may be performed by the processor invoking a corresponding instruction stored in the memory, or may be performed by a convergence condition determination module 609 executed by the processor.

在步骤S507,若步骤S506中的收敛条件都满足,则完成对第二卷积网络模型的训练;否则,只要有一个收敛条件不满足,调整第二卷积网络模型的网络参数并根据调整后的第二卷积网络模型的网络 参数对第二卷积网络模型进行迭代训练,直至迭代训练后的业务对象的位置信息和/或置信度信息以及人脸特征向量均满足相应的收敛条件。In step S507, if the convergence conditions in step S506 are satisfied, the training of the second convolutional network model is completed; otherwise, as long as one convergence condition is not satisfied, the network parameters of the second convolutional network model are adjusted and adjusted according to the adjustment Second convolutional network model network The parameters are iteratively trained on the second convolutional network model until the position information and/or confidence information of the service object after the iterative training and the face feature vector satisfy the corresponding convergence conditions.

在一个可选示例中,步骤S507可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的模型训练模块610执行。In an alternative example, step S507 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a model training module 610 that is executed by the processor.

上述步骤S505~步骤S507的具体处理可以参见上述实施例三中的相关内容,在此不再赘述。For the specific processing of the foregoing steps S505 to S507, refer to related content in the foregoing Embodiment 3, and details are not described herein again.

通过上述步骤S504~步骤S507的处理可以得到训练完成的第二卷积网络模型。其中,第二卷积网络模型的结构可以参考上述实施例二中第一卷积网络模型的结构,在此不再赘述。Through the processing of steps S504 to S507 described above, the trained second convolutional network model can be obtained. For the structure of the second convolutional network model, reference may be made to the structure of the first convolutional network model in the second embodiment, and details are not described herein again.

通过上述训练得到的第一卷积网络模型和第二卷积网络模型可以对视频图像进行相应的处理,可以包括以下步骤S508~步骤S512。The first convolutional network model and the second convolutional network model obtained by the above training may perform corresponding processing on the video image, and may include the following steps S508 to S512.

在步骤S508,获取当前播放的包含人脸信息的视频图像。In step S508, the currently played video image containing the face information is acquired.

在步骤S509,基于视频图像中的人脸信息,使用预先训练好的、用于检测图像中人脸属性的第一卷积网络模型,对视频图像进行人脸的面部表情检测。In step S509, based on the face information in the video image, the pre-trained first convolutional network model for detecting the face attribute in the image is used to perform facial expression detection of the face on the video image.

在一个可选示例中,步骤S508~S509可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的视频图像检测模块601执行。In an alternative example, steps S508-S509 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a video image detection module 601 that is executed by the processor.

在步骤S510,当确定检测到的面部表情与对应的预定面部表情相匹配时,提取与检测到的面部表情相应的人脸区域内人脸属性的特征点。In step S510, when it is determined that the detected facial expression matches the corresponding predetermined facial expression, the feature point of the face attribute in the face region corresponding to the detected facial expression is extracted.

在一个可选示例中,步骤S510可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的展现位置确定模块602执行。In an alternative example, step S510 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a presentation location determining module 602 executed by the processor.

在步骤S511,根据人脸属性的特征点,使用预先训练好的、用于确定业务对象在视频图像中的展现位置的第二卷积网络模型,确定待展现的业务对象在视频图像中的展现位置。In step S511, according to the feature points of the face attribute, the second convolutional network model for determining the presentation position of the business object in the video image is used to determine the presentation of the business object to be presented in the video image. position.

在一个可选示例中,步骤S511可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的展现位置确定模块602或其中的展现位置确定单元执行。In an alternative example, step S511 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by a presentation location determining module 602 executed by the processor or a presentation location determining unit therein.

在步骤S512,在展现位置采用计算机绘图方式绘制业务对象。In step S512, the business object is drawn by computer drawing at the presentation position.

在一个可选示例中,步骤S512可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的业务对象绘制模块603执行。In an alternative example, step S512 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a business object rendering module 603 executed by the processor.

随着互联网直播和短视频分享的兴起,越来越多的视频以直播或者短视频的方式出现。这类视频常常以人物为主角(单一人物或少量人物),以人物加简单背景为主要场景,观众主要在手机等移动终端上观看。在此情况下,对于某些业务对象的投放(如广告投放)来说,通过本实施例提供的方案,可以实时对视频播放过程中的视频图像进行检测,给出效果较好的广告投放位置,以不影响用户的观看体验,提升投放效果;在确定的展现位置采用计算机绘图方式绘制业务对象,将业务对象与视频播放相结合,无须通过网络传输与视频无关的额外如广告等业务对象的视频数据,有利于节约网络资源和/或客户端的系统资源;另外,业务对象与视频图像中的面部表情紧密结合,既保留了视频图像中视频主体(如主播)的主要形象和动作,又为视频图像增加了趣味性,同时还不会打扰用户正常观看视频,可以减少用户对视频图像中展现的业务对象的反感,而且能够在一定程度上吸引观众的注意力,提高业务对象的影响力。可以理解,业务对象的投放除了广告之外,还可广泛应用到其他方面,例如教育、咨询、服务等行业,可通过投放娱乐性、赞赏性等业务信息来提高交互效果,改善用户体验。With the rise of Internet live broadcast and short video sharing, more and more videos appear as live or short video. Such videos are often dominated by characters (single characters or a small number of characters), with characters and simple backgrounds as the main scenes, and viewers mainly watch on mobile terminals such as mobile phones. In this case, for the delivery of certain business objects (such as advertisement delivery), the video image during the video playback process can be detected in real time through the solution provided in this embodiment, and the advertisement placement position with better effect is given. In order to improve the viewing experience without affecting the user's viewing experience, the business object is drawn by computer drawing in the determined presentation position, and the business object is combined with the video playing, and no additional business objects such as advertisements that are not related to the video are transmitted through the network. Video data is conducive to saving network resources and/or system resources of the client; in addition, the business object is closely combined with facial expressions in the video image, and retains the main image and motion of the video subject (such as the anchor) in the video image, and The video image adds interest, and does not disturb the user to watch the video normally, which can reduce the user's dislike of the business object displayed in the video image, and can attract the viewer's attention to a certain extent and improve the influence of the business object. It can be understood that, in addition to advertising, business objects can be widely applied to other aspects, such as education, consulting, services, etc., by providing entertainment, appreciation and other business information to improve interaction and improve user experience.

本申请实施例提供的任一种视频图像的处理方法可以由任意适当的具有数据处理能力的设备执行,包括但不限于:终端设备和服务器等。或者,本申请实施例提供的任一种视频图像的处理方法可以由处理器执行,如处理器通过调用存储器存储的相应指令来执行本申请实施例提及的任一种视频图像的处理方法。下文不再赘述。The processing method of any video image provided by the embodiment of the present application may be performed by any suitable device having data processing capability, including but not limited to: a terminal device, a server, and the like. Alternatively, the processing method of any video image provided by the embodiment of the present application may be executed by a processor, such as a processor, by executing a corresponding instruction stored in a memory to perform a processing method of any video image mentioned in the embodiment of the present application. This will not be repeated below.

本领域普通技术人员可以理解:实现上述视频图像的处理方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the foregoing video image processing method may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium. When executed, the steps including the above method embodiments are performed; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

图6是本申请视频图像的处理装置一实施例的结构示意图。本申请各实施例的视频图像的处理装置可用于实现本申请上述各视频图像的处理方法实施例。参照图6,该实施例视频图像的处理装置包括:视频图像检测模块601、展现位置确定模块602和业务对象绘制模块603。其中:FIG. 6 is a schematic structural diagram of an embodiment of a processing apparatus for video images of the present application. The video image processing apparatus of the embodiments of the present application can be used to implement the foregoing method for processing each video image of the present application. Referring to FIG. 6, the processing apparatus for the video image of this embodiment includes: a video image detecting module 601, a presentation position determining module 602, and a business object drawing module 603. among them:

视频图像检测模块601,用于对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测。The video image detecting module 601 is configured to perform facial expression detection of the face on the currently played video image including the face information.

展现位置确定模块602,用于当视频图像检测模块602检测到的面部表情与对应的预定面部表情相 匹配时,确定待展现的业务对象在视频图像中的展现位置。a presentation location determining module 602, configured to: when the facial expression detected by the video image detecting module 602 is associated with a corresponding predetermined facial expression When matching, the presentation position of the business object to be presented in the video image is determined.

业务对象绘制模块603,用于在展现位置采用计算机绘图方式绘制业务对象。The business object drawing module 603 is configured to draw a business object by using a computer drawing manner at the presentation position.

通过本实施例提供的视频图像的处理装置,通过对当前播放的包含人脸信息的视频图像进行面部表情检测,并将检测到的面部表情与对应的预定面部表情进行匹配,当两者相匹配时,确定待展现的业务对象在视频图像中的展现位置,进而在该展现位置采用计算机绘图的方式绘制业务对象,这样当业务对象用于展示广告时,一方面,在确定的展现位置采用计算机绘图方式绘制所述业务对象,该业务对象与视频播放相结合,无须通过网络传输与视频无关的额外如广告等业务对象的视频数据,有利于节约网络资源和/或客户端的系统资源;另一方面,业务对象与视频图像中的面部表情紧密结合,可以保留视频图像中视频主体(如主播)的主要形象和动作,为视频图像增加了趣味性,并且还不会打扰用户正常观看视频,可以减少用户对视频图像中展现的业务对象的反感,还可以在一定程度上吸引观众的注意力,提高业务对象的影响力。The processing apparatus for the video image provided by the embodiment performs facial expression detection on the currently played video image including the face information, and matches the detected facial expression with the corresponding predetermined facial expression, when the two match Determining the presentation position of the business object to be presented in the video image, and then drawing the business object by means of computer drawing at the presentation position, so that when the business object is used for displaying the advertisement, on the one hand, the computer is used at the determined display position. Drawing the business object, the business object is combined with video playing, and does not need to transmit video data of a business object such as an advertisement that is not related to the video through the network, thereby saving network resources and/or system resources of the client; Aspects, the business object is closely combined with the facial expressions in the video image, and can retain the main image and motion of the video subject (such as the anchor) in the video image, adding interest to the video image, and not disturbing the user to watch the video normally, Reduce the number of business pairs that users display on video images Resentment, but also to attract the audience's attention to a certain extent, increase the influence of business objects.

在本申请视频图像的处理装置实施例的一个可选示例中,视频图像检测模块601,用于基于当前播放的包含人脸信息的视频图像中的人脸信息,使用预先训练好的、用于检测图像中人脸属性的第一卷积网络模型,对视频图像进行人脸的面部表情检测。In an optional example of the processing device embodiment of the video image of the present application, the video image detecting module 601 is configured to use the pre-trained and used for the face information in the video image that includes the face information that is currently played. A first convolutional network model of the face attribute in the image is detected, and a facial expression of the face is detected on the video image.

图7是本申请视频图像的处理装置另一实施例的结构示意图。参见图7,与图6所示的实施例相比,该视频图像的处理装置还包括:训练样本获取模块604,用于获取至少一张包括人脸信息的样本图像作为训练样本,其中,样本图像标注有人脸属性的信息;编码模块605,用于对人脸属性中具有大小顺序特征的属性进行编码;第一卷积网络模型确定模块606,用于将编码后的属性作为训练第一卷积网络模型的监督信息,使用训练样本对第一卷积网络模型进行训练,得到用于检测图像中人脸属性的第一卷积网络模型。FIG. 7 is a schematic structural diagram of another embodiment of a processing apparatus for video images of the present application. Referring to FIG. 7, the processing apparatus of the video image further includes: a training sample obtaining module 604, configured to acquire at least one sample image including face information as a training sample, wherein the sample is compared with the embodiment shown in FIG. The image is labeled with the information of the face attribute; the encoding module 605 is configured to encode the attribute having the size order feature in the face attribute; the first convolutional network model determining module 606 is configured to use the coded attribute as the training first volume. The supervisory information of the product network model is trained on the first convolutional network model using training samples to obtain a first convolutional network model for detecting face attributes in the image.

可选地,训练样本获取模块604可以包括:样本图像获取单元,用于获取至少一张包括人脸信息的样本图像;人脸定位信息确定单元,用于对每张样本图像,检测样本图像中的人脸和人脸关键点,通过人脸关键点将样本图像中的人脸进行定位,得到人脸定位信息;训练样本确定单元,用于将包含人脸定位信息的样本图像作为训练样本。Optionally, the training sample obtaining module 604 may include: a sample image acquiring unit, configured to acquire at least one sample image including face information; and a face positioning information determining unit, configured to detect the sample image in each sample image The face and the face key point, the face in the sample image is positioned by the face key point to obtain the face location information; the training sample determination unit is configured to use the sample image containing the face location information as the training sample.

可选地,展现位置确定模块602可以包括:特征点提取单元,用于获取与检测到的面部表情相应的人脸区域内人脸属性的特征点;展现位置确定单元,用于根据人脸属性的特征点,确定待展现的业务对象在视频图像中的展现位置。Optionally, the presentation location determining module 602 may include: a feature point extraction unit, configured to acquire a feature point of a face attribute in a face region corresponding to the detected facial expression; a presentation position determining unit, configured to use the face attribute The feature point determines the presentation location of the business object to be presented in the video image.

可选地,展现位置确定单元,用于根据人脸属性的特征点,使用预先训练好的、用于确定业务对象在视频图像中的展现位置的第二卷积网络模型,确定待展现的业务对象在视频图像中的展现位置。Optionally, the presentation location determining unit is configured to determine, according to the feature point of the face attribute, a pre-trained second convolution network model for determining a presentation position of the service object in the video image, to determine the service to be presented. The position at which the object appears in the video image.

可选地,本申请实施例的视频图像的处理装置还可以包括:特征向量获取模块607,用于获取训练样本的样本图像的特征向量,其中,特征向量包括样本图像中的业务对象的位置信息和/或置信度信息,以及样本图像中人脸属性对应的人脸特征向量;卷积模块608,用于对特征向量进行卷积处理,获取特征向量卷积结果;收敛条件判断模块609,用于判断特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息是否满足业务对象收敛条件,并判断特征向量卷积结果中对应的人脸特征向量是否满足人脸收敛条件;模型训练模块610,用于在上述收敛条件都满足时,即:在特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息满足业务对象收敛条件,且特征向量卷积结果中对应的人脸特征向量满足人脸收敛条件时,完成对第二卷积网络模型的训练;否则,只要有一个收敛条件不满足,调整第二卷积网络模型的网络参数,并根据调整后的第二卷积网络模型的网络参数对第二卷积网络模型进行迭代训练,直至迭代训练后的业务对象的位置信息和/或置信度信息以及人脸特征向量均满足相应的收敛条件。Optionally, the processing apparatus for the video image of the embodiment of the present application may further include: a feature vector obtaining module 607, configured to acquire a feature vector of the sample image of the training sample, where the feature vector includes location information of the business object in the sample image. And/or confidence information, and a face feature vector corresponding to the face attribute in the sample image; the convolution module 608 is configured to perform convolution processing on the feature vector to obtain a feature vector convolution result; the convergence condition determination module 609 uses Determining whether the location information and/or the confidence information of the corresponding business object in the feature vector convolution result satisfies the convergence condition of the business object, and determining whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence condition; The training module 610 is configured to: when the convergence conditions are satisfied, that is, the location information and/or the confidence information of the corresponding service object in the feature vector convolution result satisfies the convergence condition of the service object, and the corresponding result in the feature vector convolution result When the face feature vector satisfies the face convergence condition, the training of the second convolutional network model is completed. Otherwise, as long as one convergence condition is not satisfied, the network parameters of the second convolutional network model are adjusted, and the second convolutional network model is iteratively trained according to the adjusted network parameters of the second convolutional network model until iterative training The location information and/or confidence information of the subsequent business object and the face feature vector satisfy the corresponding convergence conditions.

可选地,展现位置确定模块602,用于根据人脸属性的特征点和待展现的业务对象的类型,确定待展现的业务对象在视频图像中的展现位置。Optionally, the presentation location determining module 602 is configured to determine a presentation location of the business object to be presented in the video image according to the feature point of the facial attribute and the type of the business object to be presented.

可选地,展现位置确定模块602包括:展现位置获取单元,用于根据人脸属性的特征点和待展现的业务对象的类型,获得待展现的业务对象在视频图像中的多个展现位置;展现位置选择单元,用于从多个展现位置中选择至少一个展现位置作为待展现的业务对象在所述视频图像中的展现位置。Optionally, the presentation location determining module 602 includes: a presentation location obtaining unit, configured to obtain, according to the feature point of the facial attribute and the type of the business object to be presented, a plurality of presentation locations of the business object to be presented in the video image; And a presentation location selection unit, configured to select at least one presentation location from the plurality of presentation locations as a presentation location of the business object to be presented in the video image.

可选地,展现位置确定模块602,用于从预先存储的面部表情与展现位置的对应关系中,获取预定面部表情对应的目标展现位置作为待展现的业务对象在视频图像中的展现位置。Optionally, the presentation location determining module 602 is configured to obtain, from a correspondence between the pre-stored facial expression and the presentation location, a target presentation location corresponding to the predetermined facial expression as a presentation location of the business object to be presented in the video image.

可选地,业务对象可以包括:包含有语义信息的特效;视频图像可以包括直播类视频图像或其他任意视频图像。 Optionally, the business object may include: an effect containing semantic information; the video image may include a live video image or any other video image.

可选地,该包含有语义信息的特效可以包括包含广告信息的以下至少一种或任意多种形式的特效:二维贴纸特效、三维特效、粒子特效等。Optionally, the special effect including the semantic information may include at least one or any of the following special effects including the advertisement information: a two-dimensional sticker effect, a three-dimensional special effect, a particle special effect, and the like.

可选地,展现位置可以包括但不限于以下至少之一或任意多个:视频图像中人物的头发区域、额头区域、脸颊区域、下巴区域、头部以外的身体区域、视频图像中的背景区域、视频图像中以手部所在的区域为中心的设定范围内的区域、视频图像中预先设定的区域。Optionally, the presentation location may include, but is not limited to, at least one or any of the following: a hair area of the person in the video image, a forehead area, a cheek area, a chin area, a body area other than the head, a background area in the video image In the video image, the area within the setting range centering on the area where the hand is located, and the area preset in the video image.

可选地,业务对象的类型包括以下至少之一或任意多种类型:额头贴片类型、脸颊贴片类型、下巴贴片类型、虚拟帽子类型、虚拟服装类型、虚拟妆容类型、虚拟头饰类型、虚拟发饰类型、虚拟首饰类型、背景类型、虚拟宠物类型、虚拟容器类型。Optionally, the type of the business object includes at least one of the following or any of the following types: a forehead patch type, a cheek patch type, a chin patch type, a virtual hat type, a virtual clothing type, a virtual makeup type, a virtual headwear type, Virtual hair accessory type, virtual jewelry type, background type, virtual pet type, virtual container type.

可选地,面部表情包括以下至少之一或任意多个:开心、愤怒、痛苦、悲伤、沉思、疲惫等。Optionally, the facial expression includes at least one or any of the following: happy, angry, painful, sad, contemplative, exhausted, and the like.

参照图7,示出了根据本申请实施例七的一种电子设备的结构示意图,本申请具体实施例并不对电子设备的具体实现做限定。如图7所示,该电子设备可以包括:处理器(processor)802、通信接口(Communications Interface)804、存储器(memory)806、以及通信总线808。其中:Referring to FIG. 7, a schematic structural diagram of an electronic device according to Embodiment 7 of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the electronic device. As shown in FIG. 7, the electronic device can include a processor 802, a communications interface 804, a memory 806, and a communications bus 808. among them:

处理器802、通信接口804、以及存储器806通过通信总线808完成相互间的通信。Processor 802, communication interface 804, and memory 806 complete communication with one another via communication bus 808.

通信接口804,用于与其它设备比如其它客户端或服务器等的网元通信。The communication interface 804 is configured to communicate with network elements of other devices, such as other clients or servers.

处理器802可能是中央处理器(CPU),或者是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路,或者是图形处理器(Graphics Processing Unit,GPU)。终端设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU,或者,一个或多个GPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个GPU。The processor 802 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, or a graphics processor ( Graphics Processing Unit, GPU). The one or more processors included in the terminal device may be the same type of processor, such as one or more CPUs, or one or more GPUs; or may be different types of processors, such as one or more CPUs and One or more GPUs.

存储器806,用于至少一可执行指令,该可执行指令使处理器802执行如本申请上述任一实施例在视频图像中展示业务对象的方法对应的操作。存储器806可能包含高速随机存取存储器(random access memory,RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 806 is for at least one executable instruction that causes the processor 802 to perform operations corresponding to a method of presenting a business object in a video image as in any of the above-described embodiments of the present application. The memory 806 may include a high speed random access memory (RAM), and may also include a non-volatile memory such as at least one disk memory.

图9为本发明电子设备另一实施例的结构示意图。下面参考图9,其示出了适于用来实现本申请实施例的终端设备或服务器的电子设备的结构示意图。如图9所示,该电子设备包括一个或多个处理器、通信部等,所述一个或多个处理器例如:一个或多个中央处理单元(CPU)901,和/或一个或多个图像处理器(GPU)913等,处理器可以根据存储在只读存储器(ROM)902中的可执行指令或者从存储部分908加载到随机访问存储器(RAM)903中的可执行指令而执行各种适当的动作和处理。通信部912可包括但不限于网卡,所述网卡可包括但不限于IB(Infiniband)网卡,处理器可与只读存储器902和/或随机访问存储器903中通信以执行可执行指令,通过总线904与通信部912相连、并经通信部912与其他目标设备通信,从而完成本申请实施例提供的任一视频图像的处理方法对应的操作,例如,对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测;当检测到的面部表情与对应的预定面部表情相匹配时,确定待展现的业务对象在所述视频图像中的展现位置;在所述展现位置采用计算机绘图方式绘制所述业务对象。FIG. 9 is a schematic structural diagram of another embodiment of an electronic device according to the present invention. Referring to FIG. 9, there is shown a schematic structural diagram of an electronic device suitable for implementing a terminal device or a server of an embodiment of the present application. As shown in FIG. 9, the electronic device includes one or more processors, a communication unit, etc., such as one or more central processing units (CPUs) 901, and/or one or more A graphics processor (GPU) 913 or the like, the processor may execute various types according to executable instructions stored in read only memory (ROM) 902 or executable instructions loaded from random access memory (RAM) 903 from storage portion 908. Proper action and handling. Communication portion 912 can include, but is not limited to, a network card, which can include, but is not limited to, an IB (Infiniband) network card, and the processor can communicate with read only memory 902 and/or random access memory 903 to execute executable instructions over bus 904. The operation corresponding to the processing method of any video image provided by the embodiment of the present application is performed, for example, the currently played video image including the face information is connected to the communication unit 912 and communicates with other target devices via the communication unit 912. Facial expression detection of a face; determining a presentation position of a business object to be presented in the video image when the detected facial expression matches a corresponding predetermined facial expression; drawing a computer drawing manner at the presentation position The business object.

此外,在RAM 903中,还可存储有装置操作所需的各种程序和数据。CPU901、ROM902以及RAM903通过总线904彼此相连。在有RAM903的情况下,ROM902为可选模块。RAM903存储可执行指令,或在运行时向ROM902中写入可执行指令,可执行指令使处理器901执行上述视频图像的处理方法对应的操作。输入/输出(I/O)接口905也连接至总线904。通信部912可以集成设置,也可以设置为具有多个子模块(例如多个IB网卡),并在总线链接上。Further, in the RAM 903, various programs and data required for the operation of the device can be stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. In the case of RAM 903, ROM 902 is an optional module. The RAM 903 stores executable instructions or writes executable instructions to the ROM 902 at runtime, the executable instructions causing the processor 901 to perform operations corresponding to the processing methods of the video images described above. An input/output (I/O) interface 905 is also coupled to bus 904. The communication unit 912 may be integrated or may be provided with a plurality of sub-modules (for example, a plurality of IB network cards) and on the bus link.

以下部件连接至I/O接口905:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器911也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器911上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a storage portion 908 including a hard disk or the like. And a communication portion 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the Internet. The drive 911 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like is mounted on the drive 911 as needed so that a computer program read therefrom is installed into the storage portion 908 as needed.

需要说明的,如图9所示的架构仅为一种可选实现方式,在具体实践过程中,可根据实际需要对上述图9的部件数量和类型进行选择、删减、增加或替换;在不同功能部件设置上,也可采用分离设置或集成设置等实现方式,例如GPU和CPU可分离设置或者可将GPU集成在CPU上,通信部可分离设置,也可集成设置在CPU或GPU上,等等。这些可替换的实施方式均落入本发明公开的保护范围。 It should be noted that the architecture shown in FIG. 9 is only an optional implementation manner. In a specific implementation process, the number and type of components in FIG. 9 may be selected, deleted, added, or replaced according to actual needs; Different function components can also be implemented in separate settings or integrated settings, such as GPU and CPU detachable settings or GPU can be integrated on the CPU, the communication part can be separated, or integrated on the CPU or GPU. and many more. These alternative embodiments are all within the scope of the present disclosure.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行流程图所示的方法的程序代码,程序代码可包括对应执行本申请实施例提供的方法步骤对应的指令,例如,对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测;当检测到的面部表情与对应的预定面部表情相匹配时,确定待展现的业务对象在所述视频图像中的展现位置;在所述展现位置采用计算机绘图方式绘制所述业务对象。In particular, the processes described above with reference to the flowcharts may be implemented as a computer software program in accordance with an embodiment of the present disclosure. For example, an embodiment of the present disclosure includes a computer program product comprising a computer program tangibly embodied on a machine readable medium, the computer program comprising program code for executing the method illustrated in the flowchart, the program code comprising Executing instructions corresponding to the method steps provided in the embodiments of the present application, for example, performing facial expression detection on a face of a currently played video image containing face information; and when the detected facial expression matches a corresponding predetermined facial expression, Determining a presentation location of the business object to be presented in the video image; drawing the business object in a computer drawing manner at the presentation location.

另外,本申请实施例还提供了一种计算机程序,该计算机程序包括计算机可读代码,该程序代码包括计算机操作指令,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现本申请任一实施例视频图像的处理方法中各步骤的指令。In addition, the embodiment of the present application further provides a computer program, the computer program comprising computer readable code, the program code includes computer operating instructions, when the computer readable code is run on the device, the processor in the device executes An instruction for implementing each step in the processing method of the video image of any of the embodiments of the present application.

另外,本申请实施例还提供了一种计算机可读存储介质,用于存储计算机可读取的指令,该指令被执行时实现本申请任一实施例视频图像的处理方法中各步骤的操作。In addition, the embodiment of the present application further provides a computer readable storage medium for storing computer readable instructions, which are executed to implement the operations of the steps in the video image processing method of any embodiment of the present application.

本申请实施例中,计算机程序、计算机可读取的指令被执行时各步骤的具体实现可以参见上述实施例中的相应步骤和模块中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。For the specific implementation of the steps of the computer program and the computer readable command, the corresponding steps in the above-mentioned embodiments and corresponding descriptions in the modules are not described herein. A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the device and the module described above may be referred to the corresponding process description in the foregoing method embodiment, and details are not described herein again.

本说明书中各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似的部分相互参见即可。对于装置、电子设备、程序、存储介质等实施例而言,由于其与方法实施例基本对应,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. For a device, an electronic device, a program, a storage medium, and the like, the description is relatively simple because it basically corresponds to the method embodiment. For related parts, refer to the description of the method embodiment.

需要指出,根据实施的需要,可将本申请中描述的各个步骤/部件拆分为更多步骤/部件,也可将两个或多个步骤/部件或者步骤/部件的部分操作组合成新的步骤/部件,以实现本申请的目的。It should be pointed out that the various steps/components described in the present application can be split into more steps/components according to the needs of the implementation, and two or more steps/components or partial operations of the steps/components can be combined into new ones. Steps/components to achieve the objectives of the present application.

上述根据本申请的方法可在硬件、固件中实现,或者被实现为可存储在记录介质(诸如CD ROM、RAM、软盘、硬盘或磁光盘)中的软件或计算机代码,或者被实现通过网络下载的原始存储在远程记录介质或非暂时机器可读介质中并将被存储在本地记录介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件(诸如ASIC或FPGA)的记录介质上的这样的软件处理。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件(例如,RAM、ROM、闪存等),当所述软件或计算机代码被计算机、处理器或硬件访问且执行时,实现在此描述的处理方法。此外,当通用计算机访问用于实现在此示出的处理的代码时,代码的执行将通用计算机转换为用于执行在此示出的处理的专用计算机。The above method according to the present application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or can be downloaded through a network. The computer code originally stored in a remote recording medium or non-transitory machine readable medium and to be stored in a local recording medium, whereby the methods described herein can be stored using a general purpose computer, a dedicated processor, or programmable or dedicated Such software processing on a recording medium of hardware such as an ASIC or an FPGA. It will be understood that a computer, processor, microprocessor controller or programmable hardware includes storage components (eg, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, when the software or computer code is The processing methods described herein are implemented when the processor or hardware is accessed and executed. Moreover, when a general purpose computer accesses code for implementing the processing shown herein, the execution of the code converts the general purpose computer into a special purpose computer for performing the processing shown herein.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application. It should be covered by the scope of protection of this application. Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (34)

一种视频图像的处理方法,其特征在于,包括:A method for processing a video image, comprising: 对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测;Performing facial expression detection of a face on a currently played video image containing face information; 当检测到的面部表情与对应的预定面部表情相匹配时,确定待展现的业务对象在所述视频图像中的展现位置;Determining a presentation position of the business object to be presented in the video image when the detected facial expression matches the corresponding predetermined facial expression; 在所述展现位置采用计算机绘图方式绘制所述业务对象。The business object is drawn in a computer drawing manner at the presentation position. 根据权利要求1所述的方法,其特征在于,所述对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测,包括:The method according to claim 1, wherein the performing facial expression detection of the face on the currently played video image containing the face information comprises: 基于所述视频图像中的人脸信息,使用预先训练好的、用于检测图像中人脸属性的第一卷积网络模型,对所述视频图像进行人脸的面部表情检测。Based on the face information in the video image, a facial expression detection of the face is performed on the video image using a pre-trained first convolutional network model for detecting a face attribute in the image. 根据权利要求2所述的方法,其特征在于,对所述第一卷积网络模型进行预先训练,包括:The method of claim 2, wherein pre-training the first convolutional network model comprises: 获取至少一张包括人脸信息的样本图像作为训练样本,其中,所述样本图像标注有人脸属性的信息;Obtaining at least one sample image including face information, wherein the sample image is labeled with information of a face attribute; 对所述人脸属性中具有大小顺序特征的属性进行编码;Encoding an attribute having a size order feature in the face attribute; 将编码后的属性作为训练所述第一卷积网络模型的监督信息,使用所述训练样本对所述第一卷积网络模型进行训练,得到用于检测图像中人脸属性的第一卷积网络模型。Using the coded attribute as the supervision information for training the first convolutional network model, training the first convolutional network model using the training sample, and obtaining a first convolution for detecting a face attribute in the image Network model. 根据权利要求3所述的方法,其特征在于,获取至少一张包括人脸信息的样本图像作为训练样本,包括:The method according to claim 3, wherein acquiring at least one sample image including face information as a training sample comprises: 获取至少一张包括人脸信息的样本图像;Obtaining at least one sample image including face information; 对所述至少一张样本图像中的每张所述样本图像,检测样本图像中的人脸和人脸关键点,通过所述人脸关键点对样本图像中的人脸进行定位,得到人脸定位信息;Detecting a face and a face key point in the sample image for each of the at least one sample image, and positioning the face in the sample image by the face key point to obtain a face Positioning information; 以包含所述人脸定位信息的所述样本图像作为训练样本。The sample image including the face location information is used as a training sample. 根据权利要求1-4任一所述的方法,其特征在于,所述确定待展现的业务对象在所述视频图像中的展现位置,包括:The method according to any one of claims 1-4, wherein the determining a presentation location of the business object to be presented in the video image comprises: 获取与检测到的面部表情相应的人脸区域内人脸属性的特征点;Acquiring feature points of the face attribute in the face region corresponding to the detected facial expression; 根据所述人脸属性的特征点,确定所述待展现的业务对象在所述视频图像中的展现位置。Determining, according to a feature point of the face attribute, a presentation position of the business object to be presented in the video image. 根据权利要求5所述的方法,其特征在于,所述根据所述人脸属性的特征点,确定所述待展现的业务对象在所述视频图像中的展现位置,包括:The method according to claim 5, wherein the determining, according to the feature point of the face attribute, the presentation position of the business object to be presented in the video image comprises: 根据所述人脸属性的特征点,使用预先训练好的、用于确定业务对象在视频图像中的展现位置的第二卷积网络模型,确定所述待展现的业务对象在所述视频图像中的展现位置。Determining, according to the feature point of the face attribute, a pre-trained second convolution network model for determining a presentation position of the business object in the video image, determining that the business object to be presented is in the video image Show position. 根据权利要求6所述的方法,其特征在于,对所述第二卷积网络模型的预先训练,包括:The method of claim 6 wherein the pre-training of the second convolutional network model comprises: 获取训练样本的样本图像的特征向量,其中,所述特征向量中包括:所述样本图像中的业务对象的位置信息和/或置信度信息,以及样本图像中人脸属性对应的人脸特征向量;Obtaining a feature vector of the sample image of the training sample, where the feature vector includes: location information and/or confidence information of the business object in the sample image, and a face feature vector corresponding to the face attribute in the sample image ; 对所述特征向量进行卷积处理,获取特征向量卷积结果;Convoluting the feature vector to obtain a feature vector convolution result; 判断所述特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息是否满足业务对象收敛条件,并判断所述特征向量卷积结果中对应的人脸特征向量是否满足人脸收敛条件;Determining whether the location information and/or the confidence information of the corresponding service object in the feature vector convolution result satisfies the convergence condition of the service object, and determining whether the corresponding face feature vector in the feature vector convolution result satisfies the face convergence condition; 若都满足,则完成对所述第二卷积网络模型的训练;If all are satisfied, completing training on the second convolutional network model; 否则,调整第二卷积网络模型的网络参数,并根据调整后的第二卷积网络模型的网络参数对所述第二卷积网络模型进行迭代训练,直至迭代训练后的业务对象的位置信息和/或置信度信息以及所述人脸特征向量均满足相应的收敛条件。Otherwise, the network parameters of the second convolutional network model are adjusted, and the second convolutional network model is iteratively trained according to the adjusted network parameters of the second convolutional network model until the location information of the service object after the iterative training And/or the confidence information and the face feature vector both satisfy respective convergence conditions. 根据权利要求5-7任一所述的方法,其特征在于,所述根据所述人脸属性的特征点,确定所述待展现的业务对象在所述视频图像中的展现位置,包括:The method according to any one of claims 5-7, wherein the determining, according to the feature point of the face attribute, the presentation position of the business object to be presented in the video image comprises: 根据所述人脸属性的特征点和所述待展现的业务对象的类型,确定待展现的业务对象在所述视频图像中的展现位置。Determining a presentation location of the business object to be presented in the video image according to the feature point of the face attribute and the type of the business object to be presented. 根据权利要求8所述的方法,其特征在于,根据所述人脸属性的特征点和所述待展现的业务对象的类型,确定待展现的业务对象在所述视频图像中的展现位置,包括:The method according to claim 8, wherein the display location of the business object to be presented in the video image is determined according to the feature point of the face attribute and the type of the business object to be presented, including : 根据所述人脸属性的特征点和所述待展现的业务对象的类型,获得待展现的业务对象在所述视频 图像中的多个展现位置;Obtaining a business object to be presented in the video according to the feature point of the face attribute and the type of the business object to be presented Multiple presentation locations in the image; 从所述多个展现位置中选择至少一个展现位置作为所述待展现的业务对象在所述视频图像中的展现位置。Selecting at least one presentation location from the plurality of presentation locations as a presentation location of the business object to be presented in the video image. 根据权利要求1-4任一所述的方法,其特征在于,所述确定待展现的业务对象在所述视频图像中的展现位置,包括:The method according to any one of claims 1-4, wherein the determining a presentation location of the business object to be presented in the video image comprises: 从预先存储的面部表情与展现位置的对应关系中,获取所述预定面部表情对应的目标展现位置作为所述待展现的业务对象在所述视频图像中的展现位置。The target presentation position corresponding to the predetermined facial expression is obtained as a presentation position of the business object to be presented in the video image from a correspondence relationship between the pre-stored facial expression and the presentation position. 根据权利要求1-10中任一项所述的方法,其特征在于,所述业务对象包括:包含有语义信息的特效;所述视频图像包括:直播类视频图像。The method according to any one of claims 1 to 10, wherein the business object comprises: an effect comprising semantic information; the video image comprises: a live video type image. 根据权利要求11所述的方法,其特征在于,所述包含有语义信息的特效包括包含广告信息的以下一种或任意多种形式的特效:二维贴纸特效、三维特效、粒子特效。The method according to claim 11, wherein the special effect including the semantic information comprises one or any of a plurality of forms of special effects including the two-dimensional sticker effect, the three-dimensional special effect, and the particle special effect. 根据权利要求1-12任一所述的方法,其特征在于,所述展现位置包括以下一个或任意多个区域:视频图像中人物的头发区域、额头区域、脸颊区域、下巴区域、头部以外的身体区域、视频图像中的背景区域、视频图像中以手部所在的区域为中心的设定范围内的区域、视频图像中预先设定的区域。The method according to any one of claims 1 to 12, wherein the presentation position comprises one or any of a plurality of regions: a hair region of a person in a video image, a forehead region, a cheek region, a chin region, and a head portion. The body area, the background area in the video image, the area within the set range of the video image centered on the area where the hand is located, and the area preset in the video image. 根据权利要求1-13任一所述的方法,其特征在于,所述业务对象的类型包括以下一种或任意多种类型:额头贴片类型、脸颊贴片类型、下巴贴片类型、虚拟帽子类型、虚拟服装类型、虚拟妆容类型、虚拟头饰类型、虚拟发饰类型、虚拟首饰类型、背景类型、虚拟宠物类型、虚拟容器类型。The method according to any one of claims 1 to 13, wherein the type of the business object comprises one or any of the following types: a forehead patch type, a cheek patch type, a chin patch type, a virtual hat. Type, virtual clothing type, virtual makeup type, virtual headdress type, virtual hair accessory type, virtual jewelry type, background type, virtual pet type, virtual container type. 根据权利要求1-14任一所述的方法,其特征在于,所述面部表情包括以下一个或任意多个:开心、愤怒、痛苦、悲伤。A method according to any one of claims 1-14, wherein the facial expression comprises one or more of the following: happy, angry, painful, sad. 一种视频图像的处理装置,其特征在于,所述装置包括:A processing device for video images, characterized in that the device comprises: 视频图像检测模块,用于对当前播放的包含人脸信息的视频图像进行人脸的面部表情检测;a video image detecting module, configured to perform facial expression detection on a face of a currently played video image including face information; 展现位置确定模块,用于当所述视频图像检测模块检测到的面部表情与对应的预定面部表情相匹配时,确定待展现的业务对象在所述视频图像中的展现位置;a presentation location determining module, configured to determine a presentation location of the business object to be presented in the video image when the facial expression detected by the video image detection module matches a corresponding predetermined facial expression; 业务对象绘制模块,用于在所述展现位置采用计算机绘图方式绘制所述业务对象。A business object drawing module is configured to draw the business object by using a computer drawing manner at the presentation position. 根据权利要求16所述的装置,其特征在于,所述视频图像检测模块,用于基于所述视频图像中的人脸信息,使用预先训练好的、用于检测图像中人脸属性的第一卷积网络模型,对所述视频图像进行人脸的面部表情检测。The device according to claim 16, wherein the video image detecting module is configured to use a pre-trained first for detecting a face attribute in the image based on the face information in the video image. A convolutional network model performs facial expression detection of a face on the video image. 根据权利要求17所述的装置,其特征在于,还包括:The device according to claim 17, further comprising: 训练样本获取模块,用于获取至少一张包括人脸信息的样本图像作为训练样本,其中,所述样本图像标注有人脸属性的信息;a training sample obtaining module, configured to acquire at least one sample image including face information, wherein the sample image is labeled with information of a face attribute; 编码模块,用于对所述人脸属性中具有大小顺序特征的属性进行编码;An encoding module, configured to encode an attribute having a size order feature in the face attribute; 第一卷积网络模型确定模块,用于将编码后的属性作为训练所述第一卷积网络模型的监督信息,使用所述训练样本对所述第一卷积网络模型进行训练,得到用于检测图像中人脸属性的第一卷积网络模型。a first convolutional network model determining module, configured to use the encoded attribute as monitoring information for training the first convolutional network model, and use the training sample to train the first convolutional network model to obtain A first convolutional network model that detects the face attributes in the image. 根据权利要求18所述的装置,其特征在于,所述训练样本获取模块包括:The apparatus according to claim 18, wherein the training sample acquisition module comprises: 样本图像获取单元,用于获取至少一张包括人脸信息的样本图像;a sample image obtaining unit, configured to acquire at least one sample image including face information; 人脸定位信息确定单元,用于对所述至少一张样本图像中的每张所述样本图像,检测样本图像中的人脸和人脸关键点,通过所述人脸关键点对样本图像中的人脸进行定位,得到人脸定位信息;a face positioning information determining unit, configured to detect a face and a face key point in the sample image for each of the sample images in the at least one sample image, by using the face key point in the sample image The face is positioned to obtain face location information; 训练样本确定单元,用于将包含所述人脸定位信息的所述样本图像作为训练样本。A training sample determining unit is configured to use the sample image including the face positioning information as a training sample. 根据权利要求16-19任一项所述的装置,其特征在于,所述展现位置确定模块包括:The device according to any one of claims 16 to 19, wherein the presentation location determining module comprises: 特征点提取单元,用于获取与检测到的面部表情相应的人脸区域内人脸属性的特征点;a feature point extracting unit, configured to acquire a feature point of a face attribute in a face region corresponding to the detected facial expression; 展现位置确定单元,用于根据所述人脸属性的特征点,确定所述待展现的业务对象在所述视频图像中的展现位置。And a presentation location determining unit, configured to determine, according to the feature point of the face attribute, a presentation location of the business object to be presented in the video image. 根据权利要求20所述的装置,其特征在于,所述展现位置确定单元,用于根据所述人脸属性的特征点,使用预先训练好的、用于确定业务对象在视频图像中的展现位置的第二卷积网络模型,确定所述待展现的业务对象在所述视频图像中的展现位置。The device according to claim 20, wherein the presentation position determining unit is configured to use, according to the feature points of the face attribute, a pre-trained position for determining a presentation position of the business object in the video image. a second convolutional network model determining a presentation location of the business object to be presented in the video image. 根据权利要求21所述的装置,其特征在于,还包括:The device according to claim 21, further comprising: 特征向量获取模块,用于获取训练样本的样本图像的特征向量,其中,所述特征向量中包括:所 述样本图像中的业务对象的位置信息和/或置信度信息,以及样本图像中人脸属性对应的人脸特征向量;a feature vector obtaining module, configured to acquire a feature vector of a sample image of the training sample, where the feature vector includes: Position information and/or confidence information of the business object in the sample image, and a face feature vector corresponding to the face attribute in the sample image; 卷积模块,用于对所述特征向量进行卷积处理,获取特征向量卷积结果;a convolution module, configured to perform convolution processing on the feature vector to obtain a feature vector convolution result; 收敛条件判断模块,用于判断所述特征向量卷积结果中对应的业务对象的位置信息和/或置信度信息是否满足业务对象收敛条件,并判断所述特征向量卷积结果中对应的人脸特征向量是否满足人脸收敛条件;a convergence condition determining module, configured to determine whether location information and/or confidence information of a corresponding service object in the feature vector convolution result satisfies a service object convergence condition, and determine a corresponding face in the feature vector convolution result Whether the feature vector satisfies the face convergence condition; 模型训练模块,用于若都满足,则完成对所述第二卷积网络模型的训练;否则,调整第二卷积网络模型的网络参数,并根据调整后的第二卷积网络模型的网络参数对所述第二卷积网络模型进行迭代训练,直至迭代训练后的业务对象的位置信息和/或置信度信息以及所述人脸特征向量均满足相应的收敛条件。a model training module, configured to perform training on the second convolutional network model if satisfied; otherwise, adjusting network parameters of the second convolutional network model and according to the adjusted network of the second convolutional network model The parameter performs iterative training on the second convolutional network model until the position information and/or the confidence information of the service object after the iterative training and the face feature vector satisfy the corresponding convergence condition. 根据权利要求20-22任一项所述的装置,其特征在于,所述展现位置确定模块,用于根据所述人脸属性的特征点和所述待展现的业务对象的类型,确定待展现的业务对象在所述视频图像中的展现位置。The device according to any one of claims 20 to 22, wherein the presentation location determining module is configured to determine, according to a feature point of the face attribute and a type of the business object to be presented, The location of the business object in the video image. 根据权利要求23所述的装置,其特征在于,所述展现位置确定模块,包括:The device according to claim 23, wherein the presentation location determining module comprises: 展现位置获取单元,用于根据所述人脸属性的特征点和所述待展现的业务对象的类型,获得待展现的业务对象在所述视频图像中的多个展现位置;a presentation location obtaining unit, configured to obtain, according to the feature point of the face attribute and the type of the business object to be presented, a plurality of presentation positions of the business object to be presented in the video image; 展现位置选择单元,用于从所述多个展现位置中选择至少一个展现位置作为所述待展现的业务对象在所述视频图像中的展现位置。And a presentation location selection unit, configured to select at least one presentation location from the plurality of presentation locations as a presentation location of the business object to be presented in the video image. 根据权利要求16-19任一项所述的装置,其特征在于,所述展现位置确定模块,用于从预先存储的面部表情与展现位置的对应关系中,获取所述预定面部表情对应的目标展现位置作为所述待展现的业务对象在所述视频图像中的展现位置。The device according to any one of claims 16 to 19, wherein the presentation position determining module is configured to acquire a target corresponding to the predetermined facial expression from a correspondence between a pre-stored facial expression and a presentation position. The presentation location is used as a presentation location of the business object to be presented in the video image. 根据权利要求16-25中任一项所述的装置,其特征在于,所述业务对象包括包含有语义信息的特效;所述视频图像包括直播类视频图像。The apparatus according to any one of claims 16 to 25, wherein the business object comprises an effect comprising semantic information; the video image comprises a live video type image. 根据权利要求26所述的装置,其特征在于,所述包含有语义信息的特效包括包含广告信息的以下至少一种或任意多种形式的特效:二维贴纸特效、三维特效、粒子特效。The apparatus according to claim 26, wherein the special effect including the semantic information comprises at least one or any of the following special effects including the advertisement information: a two-dimensional sticker effect, a three-dimensional special effect, and a particle special effect. 根据权利要求16-27任一所述的装置,其特征在于,所述展现位置包括以下一个或任意多个区域:视频图像中人物的头发区域、额头区域、脸颊区域、下巴区域、头部以外的身体区域、视频图像中的背景区域、视频图像中以手部所在的区域为中心的设定范围内的区域、视频图像中预先设定的区域。The device according to any one of claims 16-27, wherein the presentation position comprises one or any of a plurality of regions: a hair region of a person in the video image, a forehead region, a cheek region, a chin region, and a head portion. The body area, the background area in the video image, the area within the set range of the video image centered on the area where the hand is located, and the area preset in the video image. 根据权利要求16-28任一所述的装置,其特征在于,所述业务对象的类型包括以下一个或任意多种类型:额头贴片类型、脸颊贴片类型、下巴贴片类型、虚拟帽子类型、虚拟服装类型、虚拟妆容类型、虚拟头饰类型、虚拟发饰类型、虚拟首饰类型、背景类型、虚拟宠物类型、虚拟容器类型。The device according to any one of claims 16-28, wherein the type of the business object comprises one or any of the following types: a forehead patch type, a cheek patch type, a chin patch type, a virtual hat type. , virtual clothing type, virtual makeup type, virtual headwear type, virtual hair accessory type, virtual jewelry type, background type, virtual pet type, virtual container type. 根据权利要求16-29任一所述的装置,其特征在于,所述面部表情包括以下一个或任意多个:开心、愤怒、痛苦、悲伤。The device according to any one of claims 16-29, wherein the facial expression comprises one or more of the following: happy, angry, painful, sad. 一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;An electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface complete communication with each other through the communication bus; 所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如权利要求1-15任一项所述的视频图像的处理方法对应的操作。The memory is configured to store at least one executable instruction that causes the processor to perform an operation corresponding to the method of processing a video image according to any one of claims 1-15. 一种电子设备,其特征在于,包括:An electronic device, comprising: 处理器和权利要求16-30任一所述的视频图像的处理装置;A processor and a processing apparatus for a video image according to any of claims 16-30; 在处理器运行所述结构化文本检测系统时,权利要求16-30任一所述的视频图像的处理装置中的单元被运行。The unit in the processing apparatus for the video image of any of claims 16-30 is operated while the processor is running the structured text detection system. 一种计算机程序,包括计算机可读代码,其特征在于,当所述计算机可读代码在设备上运行时,所述设备中的处理器执行用于实现权利要求1-15任一所述的视频图像的处理方法中各步骤的指令。A computer program comprising computer readable code, wherein a processor in the device executes a video for implementing any of claims 1-15 when the computer readable code is run on a device The instructions for each step in the image processing method. 一种计算机可读存储介质,用于存储计算机可读取的指令,其特征在于,所述指令被执行时实现权利要求1-15任一所述的视频图像的处理方法中各步骤的操作。 A computer readable storage medium for storing computer readable instructions, wherein the instructions are executed to perform the operations of the steps of the video image processing method of any of claims 1-15.
PCT/CN2017/098040 2016-08-19 2017-08-18 Video image processing method, apparatus and electronic device Ceased WO2018033143A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610697472.6 2016-08-19
CN201610697472.6A CN107341434A (en) 2016-08-19 2016-08-19 Processing method, device and the terminal device of video image

Publications (1)

Publication Number Publication Date
WO2018033143A1 true WO2018033143A1 (en) 2018-02-22

Family

ID=60222274

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098040 Ceased WO2018033143A1 (en) 2016-08-19 2017-08-18 Video image processing method, apparatus and electronic device

Country Status (2)

Country Link
CN (1) CN107341434A (en)
WO (1) WO2018033143A1 (en)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109635775A (en) * 2018-12-21 2019-04-16 上海创功通讯技术有限公司 A kind of face expands display methods, device and the storage medium of attribute
CN109858410A (en) * 2019-01-18 2019-06-07 深圳壹账通智能科技有限公司 Service evaluation method, apparatus, equipment and storage medium based on Expression analysis
CN110309691A (en) * 2018-03-27 2019-10-08 腾讯科技(深圳)有限公司 A face recognition method, device, server and storage medium
CN110517187A (en) * 2019-08-30 2019-11-29 王�琦 Advertisement generation method, apparatus and system
CN110991296A (en) * 2019-11-26 2020-04-10 腾讯科技(深圳)有限公司 Video annotation method and device, electronic equipment and computer-readable storage medium
CN110992276A (en) * 2019-11-18 2020-04-10 北京字节跳动网络技术有限公司 Image processing method, device, medium and electronic equipment
CN111274447A (en) * 2020-01-13 2020-06-12 深圳壹账通智能科技有限公司 Target expression generation method, device, medium and electronic equipment based on video
CN111291685A (en) * 2020-02-10 2020-06-16 支付宝实验室(新加坡)有限公司 Training method and device of face detection model
CN111666786A (en) * 2019-03-06 2020-09-15 杭州海康威视数字技术股份有限公司 Image processing method, device, electronic device and storage medium
CN111832379A (en) * 2019-10-15 2020-10-27 中国石油化工股份有限公司 Unmanned aerial vehicle real-time video detection system based on convolutional neural network
CN111881956A (en) * 2020-07-15 2020-11-03 北京市商汤科技开发有限公司 Network training method and device, target detection method and device and electronic equipment
CN112017141A (en) * 2020-09-14 2020-12-01 北京百度网讯科技有限公司 Video data processing method and device
CN112750186A (en) * 2021-01-19 2021-05-04 深圳追一科技有限公司 Virtual image switching method and device, electronic equipment and storage medium
CN112785667A (en) * 2021-01-25 2021-05-11 北京有竹居网络技术有限公司 Video generation method, device, medium and electronic equipment
CN113052064A (en) * 2021-03-23 2021-06-29 北京思图场景数据科技服务有限公司 Attention detection method based on face orientation, facial expression and pupil tracking
CN113065525A (en) * 2021-04-27 2021-07-02 深圳数联天下智能科技有限公司 Age recognition model training method, face age recognition method and related device
CN113076533A (en) * 2020-01-03 2021-07-06 中国移动通信集团广东有限公司 Service processing method and device
CN113518239A (en) * 2021-07-09 2021-10-19 珠海云迈网络科技有限公司 Live broadcast interaction method and system, computer equipment and storage medium thereof
CN114170220A (en) * 2021-12-20 2022-03-11 卓米私人有限公司 Image processing method and device, electronic equipment and storage medium
CN114419491A (en) * 2021-12-28 2022-04-29 云从科技集团股份有限公司 Video identification method and device and computer storage medium
CN114913568A (en) * 2021-02-10 2022-08-16 阿里巴巴集团控股有限公司 Image processing method, device and system
CN115880136A (en) * 2021-08-05 2023-03-31 北京旷视科技有限公司 Training image generation method, detection model training method, device and storage medium
CN115937430A (en) * 2022-12-21 2023-04-07 北京百度网讯科技有限公司 Method, device, device and medium for displaying virtual objects
CN116453173A (en) * 2022-12-16 2023-07-18 南京奥看信息科技有限公司 Picture processing method based on picture region segmentation technology

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470362A (en) * 2018-01-29 2018-08-31 北京奇虎科技有限公司 A kind of method and apparatus for realizing video toning
CN110147805B (en) 2018-07-23 2023-04-07 腾讯科技(深圳)有限公司 Image processing method, device, terminal and storage medium
CN110766502B (en) * 2018-07-27 2024-06-18 北京京东尚科信息技术有限公司 Product evaluation method and system
CN110189172B (en) * 2019-05-28 2021-10-15 广州华多网络科技有限公司 Shopping guide method and system for network live broadcast room
CN110321845B (en) * 2019-07-04 2021-06-18 北京奇艺世纪科技有限公司 Method and device for extracting emotion packets from video and electronic equipment
CN111182350B (en) * 2019-12-31 2022-07-26 广州方硅信息技术有限公司 Image processing method, device, terminal equipment and storage medium
CN113011277B (en) * 2021-02-25 2023-11-21 日立楼宇技术(广州)有限公司 Face recognition-based data processing method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645413A (en) * 2004-01-19 2005-07-27 日本电气株式会社 Image processing apparatus, method and program
CN102455898A (en) * 2010-10-29 2012-05-16 张明 Cartoon expression auxiliary entertainment system for video chat
CN102737331A (en) * 2010-12-02 2012-10-17 微软公司 Targeting advertisements based on emotion

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404845B (en) * 2014-09-15 2019-08-06 腾讯科技(深圳)有限公司 Image processing method and device
CN105426850B (en) * 2015-11-23 2021-08-31 深圳市商汤科技有限公司 Associated information pushing device and method based on face recognition

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645413A (en) * 2004-01-19 2005-07-27 日本电气株式会社 Image processing apparatus, method and program
CN102455898A (en) * 2010-10-29 2012-05-16 张明 Cartoon expression auxiliary entertainment system for video chat
CN102737331A (en) * 2010-12-02 2012-10-17 微软公司 Targeting advertisements based on emotion

Cited By (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309691A (en) * 2018-03-27 2019-10-08 腾讯科技(深圳)有限公司 A face recognition method, device, server and storage medium
CN110309691B (en) * 2018-03-27 2022-12-27 腾讯科技(深圳)有限公司 Face recognition method, face recognition device, server and storage medium
CN109635775B (en) * 2018-12-21 2023-05-16 上海创功通讯技术有限公司 Method, device and storage medium for displaying face expansion attribute
CN109635775A (en) * 2018-12-21 2019-04-16 上海创功通讯技术有限公司 A kind of face expands display methods, device and the storage medium of attribute
CN109858410A (en) * 2019-01-18 2019-06-07 深圳壹账通智能科技有限公司 Service evaluation method, apparatus, equipment and storage medium based on Expression analysis
CN111666786A (en) * 2019-03-06 2020-09-15 杭州海康威视数字技术股份有限公司 Image processing method, device, electronic device and storage medium
CN111666786B (en) * 2019-03-06 2024-05-03 杭州海康威视数字技术股份有限公司 Image processing method, device, electronic equipment and storage medium
CN110517187A (en) * 2019-08-30 2019-11-29 王�琦 Advertisement generation method, apparatus and system
CN111832379A (en) * 2019-10-15 2020-10-27 中国石油化工股份有限公司 Unmanned aerial vehicle real-time video detection system based on convolutional neural network
CN110992276A (en) * 2019-11-18 2020-04-10 北京字节跳动网络技术有限公司 Image processing method, device, medium and electronic equipment
CN110991296B (en) * 2019-11-26 2023-04-07 腾讯科技(深圳)有限公司 Video annotation method and device, electronic equipment and computer-readable storage medium
CN110991296A (en) * 2019-11-26 2020-04-10 腾讯科技(深圳)有限公司 Video annotation method and device, electronic equipment and computer-readable storage medium
CN113076533A (en) * 2020-01-03 2021-07-06 中国移动通信集团广东有限公司 Service processing method and device
CN113076533B (en) * 2020-01-03 2023-09-05 中国移动通信集团广东有限公司 Service processing method and device
CN111274447A (en) * 2020-01-13 2020-06-12 深圳壹账通智能科技有限公司 Target expression generation method, device, medium and electronic equipment based on video
CN111291685B (en) * 2020-02-10 2023-06-02 支付宝实验室(新加坡)有限公司 Training method and device for face detection model
CN111291685A (en) * 2020-02-10 2020-06-16 支付宝实验室(新加坡)有限公司 Training method and device of face detection model
CN111881956B (en) * 2020-07-15 2023-05-12 北京市商汤科技开发有限公司 Network training method and device, target detection method and device, and electronic equipment
CN111881956A (en) * 2020-07-15 2020-11-03 北京市商汤科技开发有限公司 Network training method and device, target detection method and device and electronic equipment
CN112017141B (en) * 2020-09-14 2024-06-04 北京百度网讯科技有限公司 Video data processing method and device
CN112017141A (en) * 2020-09-14 2020-12-01 北京百度网讯科技有限公司 Video data processing method and device
CN112750186B (en) * 2021-01-19 2024-02-23 深圳追一科技有限公司 Virtual image switching method, device, electronic equipment and storage medium
CN112750186A (en) * 2021-01-19 2021-05-04 深圳追一科技有限公司 Virtual image switching method and device, electronic equipment and storage medium
CN112785667A (en) * 2021-01-25 2021-05-11 北京有竹居网络技术有限公司 Video generation method, device, medium and electronic equipment
CN114913568A (en) * 2021-02-10 2022-08-16 阿里巴巴集团控股有限公司 Image processing method, device and system
CN113052064A (en) * 2021-03-23 2021-06-29 北京思图场景数据科技服务有限公司 Attention detection method based on face orientation, facial expression and pupil tracking
CN113052064B (en) * 2021-03-23 2024-04-02 北京思图场景数据科技服务有限公司 Attention detection method based on face orientation, facial expression and pupil tracking
CN113065525A (en) * 2021-04-27 2021-07-02 深圳数联天下智能科技有限公司 Age recognition model training method, face age recognition method and related device
CN113065525B (en) * 2021-04-27 2023-12-12 深圳数联天下智能科技有限公司 Age recognition model training method, face age recognition method and related devices
CN113518239A (en) * 2021-07-09 2021-10-19 珠海云迈网络科技有限公司 Live broadcast interaction method and system, computer equipment and storage medium thereof
CN115880136A (en) * 2021-08-05 2023-03-31 北京旷视科技有限公司 Training image generation method, detection model training method, device and storage medium
CN114170220A (en) * 2021-12-20 2022-03-11 卓米私人有限公司 Image processing method and device, electronic equipment and storage medium
CN114419491A (en) * 2021-12-28 2022-04-29 云从科技集团股份有限公司 Video identification method and device and computer storage medium
CN116453173A (en) * 2022-12-16 2023-07-18 南京奥看信息科技有限公司 Picture processing method based on picture region segmentation technology
CN116453173B (en) * 2022-12-16 2023-09-08 南京奥看信息科技有限公司 Picture processing method based on picture region segmentation technology
CN115937430A (en) * 2022-12-21 2023-04-07 北京百度网讯科技有限公司 Method, device, device and medium for displaying virtual objects
CN115937430B (en) * 2022-12-21 2023-10-10 北京百度网讯科技有限公司 Methods, devices, equipment and media for displaying virtual objects

Also Published As

Publication number Publication date
CN107341434A (en) 2017-11-10

Similar Documents

Publication Publication Date Title
WO2018033143A1 (en) Video image processing method, apparatus and electronic device
US10776970B2 (en) Method and apparatus for processing video image and computer readable medium
WO2018033155A1 (en) Video image processing method, apparatus and electronic device
WO2018033154A1 (en) Gesture control method, device, and electronic apparatus
US11037348B2 (en) Method and apparatus for displaying business object in video image and electronic device
US12073524B2 (en) Generating augmented reality content based on third-party content
US11521334B2 (en) Augmented reality experiences of color palettes in a messaging system
US12450648B2 (en) Identification of physical products for augmented reality experiences in a messaging system
US11044295B2 (en) Data processing method, apparatus and electronic device
KR102668172B1 (en) Identification of physical products for augmented reality experiences in messaging systems
US12118601B2 (en) Method, system, and non-transitory computer-readable medium for analyzing facial features for augmented reality experiences of physical products in a messaging system
US12165242B2 (en) Generating augmented reality experiences with physical products using profile information
US11475666B2 (en) Method of obtaining mask frame data, computing device, and readable storage medium
WO2018121777A1 (en) Face detection method and apparatus, and electronic device
US11871086B2 (en) Method of displaying comment information, computing device, and readable storage medium
CN107578017A (en) Method and apparatus for generating image
JP2019530041A (en) Combining the face of the source image with the target image based on the search query
CN113642481A (en) Identification method, training method, device, electronic device and storage medium
CN107770602A (en) Video image processing method and device
US12530748B2 (en) Automated radial blurring based on saliency and co-saliency
JP2025540007A (en) Video processing method, device, electronic device and storage medium
CN107770603B (en) Video image processing method and device and terminal equipment

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: 17841115

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17841115

Country of ref document: EP

Kind code of ref document: A1