WO2021169668A1 - Image processing method and related device - Google Patents

Image processing method and related device Download PDF

Info

Publication number
WO2021169668A1
WO2021169668A1 PCT/CN2021/072461 CN2021072461W WO2021169668A1 WO 2021169668 A1 WO2021169668 A1 WO 2021169668A1 CN 2021072461 W CN2021072461 W CN 2021072461W WO 2021169668 A1 WO2021169668 A1 WO 2021169668A1
Authority
WO
WIPO (PCT)
Prior art keywords
bounding box
face
area
standard
face image
Prior art date
Application number
PCT/CN2021/072461
Other languages
French (fr)
Chinese (zh)
Inventor
颜波
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021169668A1 publication Critical patent/WO2021169668A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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/18Eye characteristics, e.g. of the iris
    • G06V40/19Sensors therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the technical field of mobile terminals, and in particular to an image processing method and related devices.
  • the application field of face key point detection is very wide.
  • the facial features of the face can be accurately located, so that the facial features of the face can be located or adjusted.
  • the face recognition function of mobile devices such as smartphones and tablet computers, and the beauty and makeup functions of the camera when taking pictures require accurate face key detection.
  • Face key point detection based on deep learning. First, the face area is identified from the face image through the face detection network, and then the face area is input to the face key point detection network to obtain the face key points.
  • the diversity of face areas detected by different face images is inconsistent in size and shape, resulting in the inability to obtain more accurate face key points.
  • the embodiments of the present application provide an image processing method and related devices, which are beneficial to improve the accuracy of detecting key points of a human face.
  • an embodiment of the present application provides an image processing method, which is characterized in that it is applied to an electronic device, and the method includes:
  • the bounding box of the reference face area is adjusted to obtain the bounding box of the standard face area, and the standard face area is determined according to the bounding box of the standard face area, and the adjustment of the bounding box is used to use the rectangle Adjust the bounding box to a square bounding box;
  • the sample data including the coordinates of the key points of the face is input to a second neural network model to train the second neural network model, wherein the trained second neural network model is a high-precision face key point Check the model.
  • an embodiment of the present application provides an image processing device, which is applied to an electronic device, the electronic device includes an eye tracking component; the image processing device includes a processing unit and a communication unit, wherein:
  • the processing unit is configured to obtain a first face image set through the eye tracking component during the eye tracking calibration process; and to identify the human eyes of the M face images included in the first face image set Area, wherein the M face images are face images captured continuously within a preset time period, and M is a positive integer; Multi-frame fusion of M face images in a face image set is performed to obtain a second face image set including superpixel face images, wherein the second face image set includes N face images, and N Less than M; and used to obtain an eye tracking calculation equation according to the second face image set, and the calculation equation is used to calculate the gaze point of the user during the eye tracking process.
  • an embodiment of the present application provides an electronic device, including a controller, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be controlled by the above
  • the above program includes instructions for executing the steps in any method in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute On the one hand, part or all of the steps described in any method.
  • the embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as implemented in this application.
  • the computer program product may be a software installation package.
  • the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area.
  • the adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
  • FIG. 1A is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 1B is a schematic diagram of a reference face area provided by an embodiment of the present application.
  • FIG. 1C is a schematic diagram of a standard face area provided by an embodiment of the present application.
  • FIG. 1D is a schematic diagram of a bounding box to be adjusted according to an embodiment of the present application.
  • FIG. 1E is a schematic diagram of another bounding box to be adjusted according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of another image processing method provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Fig. 4 is a block diagram of functional units of an image processing device provided by an embodiment of the present application.
  • Electronic devices may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices (such as smart watches, smart bracelets, pedometers, etc.), computing devices, or other processing accuracy connected to a wireless modem.
  • User equipment User Equipment, UE
  • mobile station Mobile Station, MS
  • terminal device terminal device
  • the devices mentioned above are collectively referred to as electronic devices.
  • the key point detection algorithm is mainly based on the deep learning method based on convolutional neural network.
  • the general step of face key point detection based on deep learning is to first detect the face area from a given image through the face detection network, and then input the detected face area into the face key point detection network for face Key point detection. Due to the diversity of faces, the size and shape of the face regions detected from different images are inconsistent, so they need to be adjusted to a uniform size, and then input into the face key point detection network for face key point detection.
  • the face area directly detected by the face detection model is called the reference face area
  • the face area that is ready to be input into the face key point detection model after adjusting the size is called the standard face area.
  • the shape of the face image is a square.
  • converting the reference face area into a standard face area generally uses a method of forcibly changing the size of the picture to a preset size.
  • the forced transformation has little effect on the image where the reference face area is close to a square. , But for the reference face region that is not a square image, the forced change will cause face deformation and distortion, which will greatly affect the accuracy of the subsequent face key point detection.
  • this application proposes a unified method for converting a standard face image into a reference face image, which ensures that the transformation process of all face images is consistent, and reduces the occurrence of face deformation and distortion. , It is helpful to improve the accuracy of face key point detection.
  • This application proposes an image processing method, where the image processing method is used to improve the accuracy of detecting key points of a human face.
  • the standard face area obtained in this application satisfies the following conditions: the standard face area is a square; the standard face area includes most of the key points of the face; the size of the standard face area is appropriate, and the bounding box of the standard face area The distance to the key points of the face is appropriate; there is a correlation between the bounding box of the standard face area and the bounding box of the reference face area.
  • the face key point detection method provided in this application for realizing the above four conditions can ensure that the face key points obtained by all face images are more accurate, and the transformation process in this application does not use the face key points Related prior information, and the transformed face area is a square, there will be no face deformation and distortion caused by forced transformation, and it has a significant effect on improving the accuracy of face key detection.
  • FIG. 1A is a schematic flowchart of an image processing method provided in an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the image processing method includes:
  • the electronic device obtains a reference face area of a face image, and determines a bounding box of the reference face area.
  • the trained face detection model can be used to perform face detection on the face image, so as to determine the reference face area and the bounding box of the reference face area.
  • 100 is a face image that includes face key points annotation
  • 101 is a bounding box of the reference face image
  • inside the bounding box is the reference face image
  • the position of face key point annotation 102 corresponds to the face key point.
  • the trained face detection model can detect most faces, including side faces and occluded parts
  • the reference face area detected by the face detection model has the following problems: Part of the face The key point is not located in the rectangular area corresponding to the bounding box of the reference face area, and the bounding box of the reference face area has a rectangular shape instead of a square, and the position is biased toward the forehead.
  • the electronic device adjusts the bounding box of the reference face area to obtain the bounding box of the standard face area, and determines the standard face area according to the bounding box of the standard face area, and is directed to the bounding box The adjustment of is used to adjust the rectangular bounding box to a square bounding box.
  • the shape of the bounding box of the reference face area is generally rectangular, so the bounding box needs to be added. Adjust from holding to square to get the bounding box of the standard face area. By observing the bounding box of a large number of reference face images, it is found that the height of the bounding box of the reference face image is generally greater than the width. Therefore, when the bounding box of the reference face area is adjusted, the width of the bounding box can be adjusted. After expansion, the expanded margin box can include more key points of the face. In addition, it is found that the general position of the bounding box of the reference face area is higher than that of the face.
  • 101 is With reference to the bounding box of the face area, 103 is the bounding box of the standard face area. It can be seen that compared to the bounding box 101, the bounding box 103 includes more face detection key points.
  • S103 The electronic device inputs the standard face area into the first neural network model to obtain face key point coordinates of the face image.
  • the face image corresponding to the standard face area is a square face image, and the square face image does not appear to be deformed and distorted, and more people are included at the same time.
  • Face key points input the square face image to the first neural network model to obtain the key point coordinates of the face, and use the obtained key point coordinates of the face as sample data, which can be used to train the second neural network model.
  • the first neural network model is used to locate the key points of the face in the face image
  • the second neural network model is used to detect the key points of the face with high precision.
  • the electronic device inputs the sample data including the coordinates of the key points of the human face into a second neural network model to train the second neural network model, wherein the trained second neural network model is High-precision face key point detection model.
  • the second neural network model is a convolutional neural network model.
  • the second neural network model is iteratively trained and optimized through sample data to obtain a high-precision face key point detection model, and the sample data includes the face image The coordinates of the key points of the face.
  • the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area.
  • the adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
  • the adjusting the bounding box of the reference face area to obtain the bounding box of the standard face area includes: determining the height and width of the bounding box of the reference face area; When the width is less than the height, calculate the absolute value of the difference between the width and the height; adjust the width of the bounding box of the reference face area to be consistent with the height, and set the bounding box Move down to obtain the bounding box of the standard face area, wherein the distance of the downward movement is a quarter of the absolute value of the difference.
  • the height and width of the bounding box of the reference face area determine the height and width of the bounding box of the reference face area.
  • the shape of the bounding box of the reference face area is rectangular and the width is smaller than the height. Therefore, when the width is smaller than the height, the width and height are calculated.
  • the absolute value of the difference At this time, you can adjust the border of the reference face area and then adjust the width of the frame to be the same as the height, and move the bounding box down to get the bounding box of the standard face area.
  • the distance of the downward movement is A quarter of the absolute value of the difference.
  • the width of the bounding box of the reference face area is less than the height, after adjusting the width to be consistent with the height, a square bounding box can be obtained, and the square bounding box can make the face more critical Points are included. Since the position of the bounding box of the reference face area is usually higher relative to the face, moving the square bounding box down can include more face key points in the lower part of the face, which is beneficial to improve the face key The accuracy of point detection.
  • the moving the bounding box down to obtain the bounding box of the standard face area includes: determining whether the bounding box moved down is located in the display area of the face image; If not, adjusting the bounding box moved down to obtain the bounding box of the standard face area, and the adjustment is used to make the bounding box located in the display area of the face image.
  • the bounding box after moving down needs to be adjusted again.
  • the bounding box is completely located at all.
  • the bounding box 103 obtained after moving down exceeds the display area of the face image. Therefore, the bounding box in FIG. 1D needs to be adjusted again so that the bounding box 103 is completely located in the display area of the face image.
  • the adjusting the bounding box after moving down to obtain the bounding box of the standard face area includes: detecting that the area of the bounding box after moving down is smaller than the face of the face When calculating the image area, calculate the offset distance and offset direction of the bounding box relative to the face image after moving down; move the bounding box in the opposite direction of the offset direction, so that the moving distance is equal to the The shifted and moved bounding box is located in the display area of the face image.
  • the strategy of moving the bounding box is first adopted.
  • the bounding box By moving the bounding box, the bounding box can be completely translated into the display area of the face image, and the area of the bounding box after moving down is first detected. Whether it is smaller than the face image area, if yes, calculate the offset distance and offset direction of the downward bounding box relative to the face image.
  • the offset distance is d and the offset direction is downward.
  • the bounding box can be moved in the opposite direction of the offset direction, and the moving distance is equal to the offset distance, that is, the bounding box 103 is moved upward, and the moving distance is d.
  • the bounding box 103 can be located in the display area 100.
  • the adjusting the bounding box moved down to obtain the bounding box of the standard face area includes: determining the bounding box moved down and the face image display area The intersection area, wherein the intersection area is a rectangular area; determine the longer side and the shorter side of the intersection area, and use the shorter side as a reference to crop a square area from the intersection area to determine the The bounding box of the square area is the bounding box of the standard face area.
  • the intersection area between the bounding box moved down and the face image display area can be determined at this time. It can be seen that the intersection area must be a rectangular area.
  • the side length of the square area is equal to the shorter side length. At this time, a square in the intersecting area is obtained. Area, the square area can be used as a standard face area.
  • the cutting a square area from the intersecting area based on the shorter side includes: detecting whether the intersecting area exists and the boundary of the face image display area, and moving down If the bounding box overlaps at the same time; if yes, cut the square area with the overlapped side as the side length, so that the side length of the cut square area is equal to the length of the shorter side of the intersecting area; if not, start from the In the intersection area, a square area is symmetrically cut out, so that the center of the cut out square area coincides with the center of the intersection area.
  • the coincident The side is taken as the side length, and a square area is cut out.
  • the side length of the cut square area is equal to the length of the shorter side of the intersecting area. If there are no overlapping sides, a square area is symmetrically cut out from the intersecting area and cut out The center of the square area coincides with the center of the intersecting area.
  • a square area is cut out from the intersection area as the standard face area.
  • it is detected whether there is an edge in the intersection area that coincides with the boundary of the face image display area and the bounding box after moving down.
  • You can crop a square area based on the coincident edge, so as to ensure that the bounding box of the cropped square area overlaps with the following bounding boxes as much as possible, which helps to ensure that the square area includes more face detection keys. point.
  • the method further includes: when it is detected that the face image includes multiple faces, dividing the face image into multiple face image regions according to the number of faces; The priority of the personal face is to determine the reference face area of the multiple face image areas in sequence.
  • the face image when it is detected that the face image includes multiple faces, the face image can be divided into multiple face image regions according to the number of faces, and face key points are performed on each of the multiple face regions in turn.
  • the reference face regions of the multiple face image regions can be sequentially determined according to the priority of the multiple faces, and then the face key points of the multiple face image regions can be determined.
  • the face image when the face image is a group photo of multiple people, the face image will include multiple faces.
  • the face image can be divided into multiple face image areas, and each face image area Face key point detection is performed on the face image in, so that the key point of each face can be obtained.
  • FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the image processing method includes:
  • S201 The electronic device obtains a reference face area of a face image, and determines a bounding box of the reference face area.
  • S202 The electronic device determines the height and width of the bounding box of the reference face area.
  • S204 The electronic device adjusts the width of the bounding box of the reference face area to be consistent with the height, and moves the bounding box downward to obtain the bounding box of the standard face area, wherein The distance moved downward is a quarter of the absolute value of the difference.
  • S205 The electronic device determines a standard face area according to the bounding box of the standard face area.
  • S206 The electronic device inputs the standard face area into the first neural network model to obtain face key point coordinates of the face image.
  • the electronic device inputs the sample data including the coordinates of the key points of the human face into a second neural network model to train the second neural network model, wherein the trained second neural network model is High-precision face key point detection model.
  • the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area.
  • the adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
  • the width of the bounding box of the reference face area is smaller than the height, after adjusting the width to be consistent with the height, a square bounding box can be obtained, and the square bounding box can include more key points of the face. Since the position of the bounding box of the reference face area is usually higher relative to the face, moving the square bounding box down can include more face key points under the face, which is beneficial to improve the accuracy of face key point detection Spend.
  • FIG. 3 is a schematic structural diagram of an electronic device 300 provided by an embodiment of the present application.
  • the electronic device 300 runs one or more applications Programs and operating systems, as shown in the figure, the electronic device 300 includes a processor 310, a memory 320, a communication interface 330, and one or more programs 321, wherein the one or more programs 321 are stored in the memory 320 And is configured to be executed by the processor 310, and the one or more programs 321 include instructions for executing the following steps;
  • the bounding box of the reference face area is adjusted to obtain the bounding box of the standard face area, and the standard face area is determined according to the bounding box of the standard face area, and the adjustment of the bounding box is used to use the rectangle Adjust the bounding box to a square bounding box;
  • the sample data including the coordinates of the key points of the face is input to a second neural network model to train the second neural network model, wherein the trained second neural network model is a high-precision face key point Check the model.
  • the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area.
  • the adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
  • the instructions in the program are specifically used to perform the following operations: determining the reference face area The height and width of the bounding box of the face area; when it is detected that the width is smaller than the height, the absolute value of the difference between the width and the height is calculated; the width of the bounding box of the reference face area is adjusted In order to be consistent with the height, the bounding box is moved downward to obtain the bounding box of the standard face area, wherein the distance of the downward movement is a quarter of the absolute value of the difference.
  • the instructions in the program are specifically used to perform the following operations: judging the moving down Whether the bounding box is located in the display area of the face image; if not, adjust the bounding box after moving down to obtain the bounding box of the standard face area, and the adjustment is used to make the bounding box be located at the In the display area of the face image.
  • the instructions in the program are specifically used to perform the following operations: When the area of the moved bounding box is smaller than the area of the face image, calculate the offset distance and direction of the moved down bounding box relative to the face image; according to the opposite of the offset direction Move the bounding box in a direction such that the moving distance is equal to the offset distance and the moved bounding box is located in the display area of the face image.
  • the instructions in the program are specifically used to perform the following operations:
  • a square area is cropped from the intersection area, and the bounding box of the square area is determined to be the bounding box of the standard face area.
  • the instructions in the program are specifically used to perform the following operations: detecting whether the intersecting area exists The edge that coincides with the boundary of the face image display area and the bounding box moved down at the same time; if it is, the square area is cropped with the overlapping edge as the side length, so that the length of the side of the cropped square area is equal to the intersection The length of the shorter side of the area; if not, a square area is symmetrically cut out from the intersection area, so that the center of the cut out square area coincides with the center of the intersection area.
  • the instructions in the program are specifically used to perform the following operations: when it is detected that the face image includes multiple faces, the face image is divided into multiple faces according to the number of faces Image area; according to the priority of the multiple faces, sequentially determine the reference face area of the multiple face image areas.
  • the first neural network model is used to locate the key points of the face in the face image
  • the second neural network model is used to detect the key points of the face with high precision.
  • the number of face detection key points included in the square bounding box obtained after adjustment is greater than the number of face detection key points included in the rectangular bounding box.
  • an electronic device includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiment of the present application may divide the electronic device into functional units according to the foregoing method examples.
  • each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one control unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 4 is a block diagram of the functional unit composition of a device 400 involved in an embodiment of the present application.
  • the image processing device 400 is applied to electronic equipment.
  • the image processing device 400 includes a processing unit 401 and a communication unit 402, wherein:
  • the processing unit 401 is configured to obtain a reference face area of a face image through the communication unit 402, and determine a bounding box of the reference face area; and to perform processing on the bounding box of the reference face area Adjust to obtain a bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area, the adjustment to the bounding box is used to adjust the rectangular bounding box to a square bounding box; and Inputting the standard face area into the first neural network model to obtain the face key point coordinates of the face image; and for inputting sample data including the face key point coordinates to the second neural network
  • the network model is used to train the second neural network model, wherein the trained second neural network model is a high-precision face key point detection model.
  • the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area.
  • the adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
  • the processing unit 401 is specifically configured to: determine the bounding box of the reference face area The height and width of the bounding box; and when it is detected that the width is smaller than the height, calculating the absolute value of the difference between the width and the height; The width is adjusted to be consistent with the height, and the bounding box is moved downward to obtain the bounding box of the standard face area, wherein the distance of the downward movement is a quarter of the absolute value of the difference .
  • the processing unit 401 is specifically configured to: determine whether the bounding box after moving down is located in The display area of the face image; if not, adjust the bounding box after moving down to obtain the bounding box of the standard face area, and the adjustment is used to make the bounding box located in the face image Within the display area.
  • the processing unit 401 is specifically configured to: When the area of the bounding box is smaller than the area of the face image, calculating the offset distance and the offset direction of the bounding box moved down relative to the face image; and used to calculate the offset direction according to the opposite direction of the offset direction Move the bounding box so that the moving distance is equal to the offset distance and the moved bounding box is located in the display area of the face image.
  • the processing unit 401 is specifically configured to: determine the bounding box after moving down The intersection area between the frame and the face image display area, wherein the intersection area is a rectangular area; A square area is cropped in the intersection area, and the bounding box of the square area is determined to be the bounding box of the standard face area.
  • the processing unit 401 is specifically configured to: detect whether the intersecting area exists and the person The boundary of the face image display area and the edge that coincides with the lower bounding box at the same time; if so, the square area is cropped with the overlapped side as the side length, so that the side length of the cropped square area is equal to the shorter side of the intersecting area If not, cut out a square area symmetrically from the intersection area, so that the center of the cut out square area coincides with the center of the intersection area.
  • the processing unit 401 is specifically configured to: when detecting that the face image includes multiple faces, divide the face image into multiple face image regions according to the number of faces; The priority of the multiple human faces is determined in turn from the reference face regions of the multiple human face image regions.
  • the first neural network model is used to locate the key points of the face in the face image
  • the second neural network model is used to detect the key points of the face with high precision.
  • the number of face detection key points included in the square bounding box obtained after adjustment is greater than the number of face detection key points included in the rectangular bounding box.
  • the electronic device may further include a storage unit 403, the processing unit 401 and the communication unit 402 may be a controller or a processor, and the storage unit 403 may be a memory.
  • An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment ,
  • the above-mentioned computer includes a mobile terminal.
  • the embodiments of the present application also provide a computer program product.
  • the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program. Part or all of the steps of the method.
  • the computer program product may be a software installation package, and the above-mentioned computer includes a mobile terminal.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one control unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
  • a number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application.
  • the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
  • the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disc, etc.

Landscapes

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

Abstract

Disclosed in the embodiments of the present application are an image processing method and a related device, which are applied to an electronic device. Said method comprises: acquiring a reference face area of a face image, and determining a bounding box of the reference face area; adjusting the bounding box of the reference face area to obtain a bounding box of a standard face area, and determining the standard face area according to the bounding box of the standard face area, the adjustment for the bounding box being used to adjust a rectangular bounding box to a square bounding box; inputting the standard face area into a first neural network model to obtain face key point coordinates of the face image; and inputting sample data comprising the face key point coordinates to a second neural network model to train the second neural network model, the trained second neural network model being a high-precision face key point detection model. The embodiments of the present application help to improve the precision of face key point detection.

Description

图像处理方法及相关装置Image processing method and related device 技术领域Technical field
本申请涉及移动终端技术领域,具体涉及一种图像处理方法及相关装置。This application relates to the technical field of mobile terminals, and in particular to an image processing method and related devices.
背景技术Background technique
人脸关键点检测应用领域十分广泛,通过人脸关键点检测能够精准定位到人脸的五官,从而可以对人脸的五官进行定位或调整。例如,智能手机和平板电脑等移动设备的人脸识别功能、相机拍照时的美颜和美妆功能,都需要精准的人脸关键点检测。基于深度学习的人脸关键点检测,首先通过人脸检测网络从人脸图像中识别出人脸区域,再将人脸区域输入到人脸关键点检测网络以获取人脸关键点,由于人脸的多样性,不同人脸图像检测出来的人脸区域在大小和形状上不一致,从而导致无法获取到更精准的人脸关键点。The application field of face key point detection is very wide. Through the face key point detection, the facial features of the face can be accurately located, so that the facial features of the face can be located or adjusted. For example, the face recognition function of mobile devices such as smartphones and tablet computers, and the beauty and makeup functions of the camera when taking pictures require accurate face key detection. Face key point detection based on deep learning. First, the face area is identified from the face image through the face detection network, and then the face area is input to the face key point detection network to obtain the face key points. The diversity of face areas detected by different face images is inconsistent in size and shape, resulting in the inability to obtain more accurate face key points.
发明内容Summary of the invention
本申请实施例提供了一种图像处理方法及相关装置,有利于提高人脸关键点检测精度。The embodiments of the present application provide an image processing method and related devices, which are beneficial to improve the accuracy of detecting key points of a human face.
第一方面,本申请实施例提供一种图像处理方法,其特征在于,应用于电子设备,所述方法包括:In a first aspect, an embodiment of the present application provides an image processing method, which is characterized in that it is applied to an electronic device, and the method includes:
获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框;Acquiring a reference face region of a face image, and determining a bounding box of the reference face region;
对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框;The bounding box of the reference face area is adjusted to obtain the bounding box of the standard face area, and the standard face area is determined according to the bounding box of the standard face area, and the adjustment of the bounding box is used to use the rectangle Adjust the bounding box to a square bounding box;
将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标;Inputting the standard face region into the first neural network model to obtain face key point coordinates of the face image;
将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。The sample data including the coordinates of the key points of the face is input to a second neural network model to train the second neural network model, wherein the trained second neural network model is a high-precision face key point Check the model.
第二方面,本申请实施例提供一种图像处理装置,应用于电子设备,所述电子设备包括眼球追踪组件;所述图像处理装置包括处理单元和通信单元,其中,In a second aspect, an embodiment of the present application provides an image processing device, which is applied to an electronic device, the electronic device includes an eye tracking component; the image processing device includes a processing unit and a communication unit, wherein:
所述处理单元,用于在眼球追踪校准过程中,通过所述眼球追踪组件获取第一人脸图像集合;以及用于识别所述第一人脸图像集合包括的M张人脸图像的人眼区域,其中,所述M张人脸图像为在预设时长内连续拍摄到的人脸图像,M为正整数;以及用于根据所述M张人脸图像的人眼区域,对所述第一人脸图像集合中的M张人脸图像进行多帧融合,得到包括超像素人脸图像的第二人脸图像集合,其中,所述第二人脸图像集合包括N张人脸图像,N小于M;以及用于根据所述第二人脸图像集合得到眼球追踪计算方程,所述计算方程用于在眼球追踪过程中计算用户的注视点。The processing unit is configured to obtain a first face image set through the eye tracking component during the eye tracking calibration process; and to identify the human eyes of the M face images included in the first face image set Area, wherein the M face images are face images captured continuously within a preset time period, and M is a positive integer; Multi-frame fusion of M face images in a face image set is performed to obtain a second face image set including superpixel face images, wherein the second face image set includes N face images, and N Less than M; and used to obtain an eye tracking calculation equation according to the second face image set, and the calculation equation is used to calculate the gaze point of the user during the eye tracking process.
第三方面,本申请实施例提供一种电子设备,包括控制器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述控制器执行,上述程序包括用于执行本申请实施例第一方面任一方法中的步骤的指令。In a third aspect, an embodiment of the present application provides an electronic device, including a controller, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be controlled by the above The above program includes instructions for executing the steps in any method in the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute On the one hand, part or all of the steps described in any method.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a fifth aspect, the embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as implemented in this application. For example, part or all of the steps described in any method of the first aspect. The computer program product may be a software installation package.
可以看出,本申请实施例中,电子设备首先获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框,其次,对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框,然后,将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标,最后,将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。由于在将参考人脸区域的边界框调整为标准人脸区域的边界框得到过程中,将矩形边界框调整为了正方形边界框,且避免了人脸图像的变形和/或扭曲,从而,有利于提高人脸关键点检测的精度。It can be seen that, in this embodiment of the application, the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area. Obtain the bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area. The adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1A是本申请实施例提供的一种图像处理方法的流程示意图;FIG. 1A is a schematic flowchart of an image processing method provided by an embodiment of the present application;
图1B是本申请实施例提供的一种参考人脸区域的示意图;FIG. 1B is a schematic diagram of a reference face area provided by an embodiment of the present application;
图1C是本申请实施例提供的一种标准人脸区域的示意图;FIG. 1C is a schematic diagram of a standard face area provided by an embodiment of the present application;
图1D是本申请实施例提供的一种待调整边界框的示意图;FIG. 1D is a schematic diagram of a bounding box to be adjusted according to an embodiment of the present application;
图1E是本申请实施例提供的另一种待调整边界框的示意图;FIG. 1E is a schematic diagram of another bounding box to be adjusted according to an embodiment of the present application;
图2是本申请实施例提供的另一种图像处理方法的流程示意图;FIG. 2 is a schematic flowchart of another image processing method provided by an embodiment of the present application;
图3是本申请实施例提供的一种电子设备的结构示意图;FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图4是本申请实施例提供的一种图像处理装置的功能单元组成框图。Fig. 4 is a block diagram of functional units of an image processing device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to enable those skilled in the art to better understand the solutions of the application, the technical solutions in the embodiments of the application will be clearly and completely described below in conjunction with the drawings in the embodiments of the application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific sequence. In addition, the terms "including" and "having" and any variations of them are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes unlisted steps or units, or optionally also includes Other steps or units inherent to these processes, methods, products or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。The reference to "embodiments" herein means that a specific feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art clearly and implicitly understand that the embodiments described herein can be combined with other embodiments.
电子设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备(例如智能手表、智能手环、计步器等)、计算设备或连接到无线调制解调器的其他处理的精度。用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为电子设备。Electronic devices may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices (such as smart watches, smart bracelets, pedometers, etc.), computing devices, or other processing accuracy connected to a wireless modem. User equipment (User Equipment, UE), mobile station (Mobile Station, MS), terminal equipment (terminal device), and so on. For ease of description, the devices mentioned above are collectively referred to as electronic devices.
下面对本申请实施例进行详细介绍。The following describes the embodiments of the application in detail.
传统的人脸关键点检测算法主要分为坐标回归方法和基于神经网络的深度学习方法。由于基于神经网络的深度学习方法,尤其是基于卷积神经网络的方法在许多计算机视觉任务中都取得了非常好的效果,对人脸关键点检测的性能提升也有显著帮助,因此目前的人脸关键点检测算法主要以基于卷积神经网络的深度学习方法为主。基于深度学习的人脸关键点检测的一般步骤是,首先通过人脸检测网络从给定图像中检测出人脸区域,然后再将检测出的人脸区域输入人脸关键点检测网络进行人脸关键点检测。由于人脸的多样性,不同图像检测出来的人脸区域在大小和形状上存在不一致,因此需要将其调整到统一尺寸,再输入人脸关键点检测网络中进行人脸关键点检测。Traditional face key point detection algorithms are mainly divided into coordinate regression methods and deep learning methods based on neural networks. Since deep learning methods based on neural networks, especially methods based on convolutional neural networks, have achieved very good results in many computer vision tasks, they have also significantly helped improve the performance of face key point detection. Therefore, the current face The key point detection algorithm is mainly based on the deep learning method based on convolutional neural network. The general step of face key point detection based on deep learning is to first detect the face area from a given image through the face detection network, and then input the detected face area into the face key point detection network for face Key point detection. Due to the diversity of faces, the size and shape of the face regions detected from different images are inconsistent, so they need to be adjusted to a uniform size, and then input into the face key point detection network for face key point detection.
本申请中将人脸检测模型直接检测出的人脸区域称为参考人脸区域,将调整尺寸后准备输入到人脸关键点检测模型的人脸区域称为标准人脸区域,其中,标准人脸图像的形状为正方形。在现有技术中,将参考人脸区域转换成标准人脸区域,一般是使用强制将图片的尺寸变为预设尺寸的方法,强制变换对于参考人脸区域接近正方形的图像来说影响不大,但是对于不是正方形图像的参考人脸区域来说,通过强制变化会造成人脸变形和扭曲,从而对接下来的人脸关键点检测的精度造成很大的影响。因此,本申请提出一种统一的、用于将标准人脸图像转换为参考人脸图像的方法,保证了所有人脸图像的变换过程都是一致的,减少了人脸变形和扭曲情况的发生,有利于提高人脸关键点检测的精度。In this application, the face area directly detected by the face detection model is called the reference face area, and the face area that is ready to be input into the face key point detection model after adjusting the size is called the standard face area. The shape of the face image is a square. In the prior art, converting the reference face area into a standard face area generally uses a method of forcibly changing the size of the picture to a preset size. The forced transformation has little effect on the image where the reference face area is close to a square. , But for the reference face region that is not a square image, the forced change will cause face deformation and distortion, which will greatly affect the accuracy of the subsequent face key point detection. Therefore, this application proposes a unified method for converting a standard face image into a reference face image, which ensures that the transformation process of all face images is consistent, and reduces the occurrence of face deformation and distortion. , It is helpful to improve the accuracy of face key point detection.
本申请提出一种图像处理方法,该处图像处理方法用于提高人脸关键点检测的精度。本申请中获取到的标准人脸区域满足以下条件:标准人脸区域为正方形;标准人脸区域中包括大部分的人脸关键点;标准人脸区域尺寸合适,且标准人脸区域的边界框与人脸关键点之间的距离合适;标准人脸区域的边界框与参考人脸区域的边界框之间存在相关性。通过本申请提供的用于实现上述四个条件的人脸关键点检测方法,可以保证所有人脸图像获取到的人脸关键点更为准确,且本申请中的变换过程不利用人脸关键点相关的先验信息,并且变换后的人脸区域为正方形,不会出现强制变换带来的人脸变形和扭曲问题,对人脸关键点检测精度的提高有显著效果。This application proposes an image processing method, where the image processing method is used to improve the accuracy of detecting key points of a human face. The standard face area obtained in this application satisfies the following conditions: the standard face area is a square; the standard face area includes most of the key points of the face; the size of the standard face area is appropriate, and the bounding box of the standard face area The distance to the key points of the face is appropriate; there is a correlation between the bounding box of the standard face area and the bounding box of the reference face area. The face key point detection method provided in this application for realizing the above four conditions can ensure that the face key points obtained by all face images are more accurate, and the transformation process in this application does not use the face key points Related prior information, and the transformed face area is a square, there will be no face deformation and distortion caused by forced transformation, and it has a significant effect on improving the accuracy of face key detection.
请参阅图1A,图1A是本申请实施例提供了一种图像处理方法的流程示意图,应用于电子设备。如图所示,本图像处理方法包括:Please refer to FIG. 1A. FIG. 1A is a schematic flowchart of an image processing method provided in an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the image processing method includes:
S101,所述电子设备获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框。S101: The electronic device obtains a reference face area of a face image, and determines a bounding box of the reference face area.
其中,可使用训练好的人脸检测模型对人脸图像进行人脸检测,从而确定参考人脸区域和参考人脸区域的边界框。如图1B所示,100为包含人脸关键点标注的人脸图像,101为参考人脸图像的边界框,边界框内为参考人脸图像,人脸关键点标注102的位置对应人脸关键点。通过大量的实验证明发现,虽训练好的人脸检测模型可以检测到大部分的人脸,包括侧脸与遮挡部分,但是人脸检测模型检测出的参考人脸区域存在以下问题:部分人脸关键点没有位于参考人脸区域的边界框对应的矩形区域内,参考人练区域的边界框形状为矩形而不是正方形,且位置偏向额头方向。Among them, the trained face detection model can be used to perform face detection on the face image, so as to determine the reference face area and the bounding box of the reference face area. As shown in Figure 1B, 100 is a face image that includes face key points annotation, 101 is a bounding box of the reference face image, inside the bounding box is the reference face image, the position of face key point annotation 102 corresponds to the face key point. A large number of experiments have proved that although the trained face detection model can detect most faces, including side faces and occluded parts, the reference face area detected by the face detection model has the following problems: Part of the face The key point is not located in the rectangular area corresponding to the bounding box of the reference face area, and the bounding box of the reference face area has a rectangular shape instead of a square, and the position is biased toward the forehead.
S102,所述电子设备对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框。S102. The electronic device adjusts the bounding box of the reference face area to obtain the bounding box of the standard face area, and determines the standard face area according to the bounding box of the standard face area, and is directed to the bounding box The adjustment of is used to adjust the rectangular bounding box to a square bounding box.
其中,参考人脸区域的边界框形状一般为矩形,因此需要将边界框。从举行调整为正方形,从而得到标准人脸区域的边界框。通过对大量参考人脸图像的边界框进行观察,发现参考人脸图像的边界框的高度一般总是大于宽度,因此在对参考人脸区域的边界框进行调整时,可以对边界框的宽度进行扩展,扩展后的边距框可以包括更多的人脸关键点,此 外还发现,参考人脸区域的边界框一般位置相对于人脸偏上,经过调整后,如图1C所示,101为参考人脸区域的边界框,103为标准人脸区域的边界框,可见,相较于边界框101,边界框103包括了更多的人脸检测关键点。Among them, the shape of the bounding box of the reference face area is generally rectangular, so the bounding box needs to be added. Adjust from holding to square to get the bounding box of the standard face area. By observing the bounding box of a large number of reference face images, it is found that the height of the bounding box of the reference face image is generally greater than the width. Therefore, when the bounding box of the reference face area is adjusted, the width of the bounding box can be adjusted. After expansion, the expanded margin box can include more key points of the face. In addition, it is found that the general position of the bounding box of the reference face area is higher than that of the face. After adjustment, as shown in Figure 1C, 101 is With reference to the bounding box of the face area, 103 is the bounding box of the standard face area. It can be seen that compared to the bounding box 101, the bounding box 103 includes more face detection key points.
S103,所述电子设备将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标。S103: The electronic device inputs the standard face area into the first neural network model to obtain face key point coordinates of the face image.
其中,通过本申请提供的图像处理方法,标准人脸区域对应的人脸图像为正方形人脸图像,且该正方形人脸图像中没有出现人脸变形和扭曲的情况,同时包括了更多的人脸关键点,将该正方形人脸图像输入到第一神经网络模型,可得到人脸关键点坐标,将得到的人脸关键点坐标作为样本数据,可用于对第二神经网络模型进行训练,其中,第一神经网络模型用于对人脸图像中的人脸关键点进行定位,第二神经网络模型用于高精度检测人脸关键点。Among them, through the image processing method provided in this application, the face image corresponding to the standard face area is a square face image, and the square face image does not appear to be deformed and distorted, and more people are included at the same time. Face key points, input the square face image to the first neural network model to obtain the key point coordinates of the face, and use the obtained key point coordinates of the face as sample data, which can be used to train the second neural network model. , The first neural network model is used to locate the key points of the face in the face image, and the second neural network model is used to detect the key points of the face with high precision.
S104,所述电子设备将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。S104. The electronic device inputs the sample data including the coordinates of the key points of the human face into a second neural network model to train the second neural network model, wherein the trained second neural network model is High-precision face key point detection model.
其中,第二神经网络模型为卷积神经网络模型,通过样本数据对第二神经网络模型进行迭代训练和优化,可得到一个高精度的人脸关键点检测模型,样本数据包括所述人脸图像的人脸关键点坐标。Among them, the second neural network model is a convolutional neural network model. The second neural network model is iteratively trained and optimized through sample data to obtain a high-precision face key point detection model, and the sample data includes the face image The coordinates of the key points of the face.
可以看出,本申请实施例中,电子设备首先获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框,其次,对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框,然后,将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标,最后,将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。由于在将参考人脸区域的边界框调整为标准人脸区域的边界框得到过程中,将矩形边界框调整为了正方形边界框,且避免了人脸图像的变形和/或扭曲,从而,有利于提高人脸关键点检测的精度。It can be seen that, in this embodiment of the application, the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area. Obtain the bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area. The adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
在一个可能的示例中,所述对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,包括:确定所述参考人脸区域的边界框的高度和宽度;在检测到所述宽度小于所述高度时,计算所述宽度和所述高度的差值绝对值;将所述参考人脸区域的边界框的宽度调整为和所述高度一致,并将所述边界框向下移动得到所述标准人脸区域的边界框,其中,所述向下移动的距离为所述差值绝对值的四分之一。In a possible example, the adjusting the bounding box of the reference face area to obtain the bounding box of the standard face area includes: determining the height and width of the bounding box of the reference face area; When the width is less than the height, calculate the absolute value of the difference between the width and the height; adjust the width of the bounding box of the reference face area to be consistent with the height, and set the bounding box Move down to obtain the bounding box of the standard face area, wherein the distance of the downward movement is a quarter of the absolute value of the difference.
其中,确定参考人脸区域的边界框的高度和宽度,一般情况下,参考人脸区域的边界框形状为矩形,且宽度小于高度,因此,在检测到宽度小于高度时,计算宽度和高度的差值绝对值,此时,可以将参考人脸区域的边界然后对呀框的宽度调整为和高度一致,并且将边界框向下移动得到标准人脸区域的边界框,向下移动的距离为差值绝对值的四分之一。通过对大量人脸图像的参考人脸区域的边界框和参考人脸区域内的人脸图像进行比较和位置调整,发现向下移动距离为差值绝对值的四分之一时,可以使更多的人脸检测关键点包含在边界框内。Among them, determine the height and width of the bounding box of the reference face area. In general, the shape of the bounding box of the reference face area is rectangular and the width is smaller than the height. Therefore, when the width is smaller than the height, the width and height are calculated. The absolute value of the difference. At this time, you can adjust the border of the reference face area and then adjust the width of the frame to be the same as the height, and move the bounding box down to get the bounding box of the standard face area. The distance of the downward movement is A quarter of the absolute value of the difference. By comparing and adjusting the position of the bounding box of the reference face area of a large number of face images and the face image in the reference face area, it is found that when the downward movement distance is one-fourth of the absolute value of the difference, it can be changed. Many face detection key points are contained in the bounding box.
可见,本示例中,由于参考人脸区域的边界框的宽度小于高度,因此将宽度调整为和高度一致后,可得到形状为正方形的边界框,且该正方形的边界框可以将更人脸关键点包含进来,由于参考人脸区域的边界框位置通常相对于人脸偏上,因此向下移动正方形边界框可以将更多人脸下部位的人脸关键点包含进来,有利于提高人脸关键点检测的准确度。It can be seen that in this example, since the width of the bounding box of the reference face area is less than the height, after adjusting the width to be consistent with the height, a square bounding box can be obtained, and the square bounding box can make the face more critical Points are included. Since the position of the bounding box of the reference face area is usually higher relative to the face, moving the square bounding box down can include more face key points in the lower part of the face, which is beneficial to improve the face key The accuracy of point detection.
在一个可能的示例中,所述将所述边界框向下移动得到所述标准人脸区域的边界框, 包括:判断下移后的所述边界框是否位于所述人脸图像的显示区域;若否,对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,所述调整用于使所述边界框位于所述人脸图像的显示区域内。In a possible example, the moving the bounding box down to obtain the bounding box of the standard face area includes: determining whether the bounding box moved down is located in the display area of the face image; If not, adjusting the bounding box moved down to obtain the bounding box of the standard face area, and the adjustment is used to make the bounding box located in the display area of the face image.
其中,若将所述边界框向下移动后,边界框被移出所述人脸图像的显示区域,则需要对下移后的所述边界框再次进行调整,其实所述边圈框完全位于所述人脸图像的显示区域内。如图1D所示,向下移动后得到的边界框103超出了人脸图像的显示区域,因此,需要对图1D中的边界框再次进行调整,使边界框103完全位于人脸图像的显示区域内。Wherein, if the bounding box is moved out of the display area of the face image after the bounding box is moved down, the bounding box after moving down needs to be adjusted again. In fact, the bounding box is completely located at all. In the display area of the face image. As shown in FIG. 1D, the bounding box 103 obtained after moving down exceeds the display area of the face image. Therefore, the bounding box in FIG. 1D needs to be adjusted again so that the bounding box 103 is completely located in the display area of the face image. Inside.
可见,本示例中,在人脸图像位于显示区域边缘时,将边界框向下移动可能会导致边界框超出人脸显示区域,因此,在将所述边界框向下移动后,还需要判断下以后的边界框是否完全位于人脸图像的显示区域内,从而在检测到下移后的边界框没有完全位于显示区域内时,需要再次对边界框进行调整。It can be seen that in this example, when the face image is at the edge of the display area, moving the bounding box down may cause the bounding box to exceed the face display area. Therefore, after moving the bounding box down, it is necessary to determine the next step. Whether the subsequent bounding box is completely located in the display area of the face image, so when it is detected that the bounding box moved down is not completely located in the display area, the bounding box needs to be adjusted again.
在一个可能的示例中,所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,包括:在检测到下移后的所述边界框面积小于所述人脸图像面积时,计算下移后的所述边界框相对于所述人脸图像的偏移距离和偏移方向;按照所述偏移方向的相反方向移动所述边界框,使移动距离等于所述偏移距离且移动后的所述边界框位于所述人脸图像的显示区域内。In a possible example, the adjusting the bounding box after moving down to obtain the bounding box of the standard face area includes: detecting that the area of the bounding box after moving down is smaller than the face of the face When calculating the image area, calculate the offset distance and offset direction of the bounding box relative to the face image after moving down; move the bounding box in the opposite direction of the offset direction, so that the moving distance is equal to the The shifted and moved bounding box is located in the display area of the face image.
其中,在对下移后的边界框进行调整时,首先采取移动边界框的策略,通过移动边界框使边界框可以完全平移到人脸图像的显示区域内,首先检测下移后的边界框面积是否小于人脸图像面积,若是,则计算下移后的边界框相对于人脸图像的偏移距离和偏移方向,如图1E所示,偏移距离为d,偏移方向向下,此时则可以按照偏移方向的相反方向移动边界框,且移动距离等于偏移距离,即向上移动边界框103,移动距离为d,此时,可使边界框103位于显示区域100内。Among them, when adjusting the bounding box after moving down, the strategy of moving the bounding box is first adopted. By moving the bounding box, the bounding box can be completely translated into the display area of the face image, and the area of the bounding box after moving down is first detected. Whether it is smaller than the face image area, if yes, calculate the offset distance and offset direction of the downward bounding box relative to the face image. As shown in Figure 1E, the offset distance is d and the offset direction is downward. In this case, the bounding box can be moved in the opposite direction of the offset direction, and the moving distance is equal to the offset distance, that is, the bounding box 103 is moved upward, and the moving distance is d. At this time, the bounding box 103 can be located in the display area 100.
可见,本示例中,当下移后的边界框没有完全位于人脸图像的显示区域内时,首先检测边界框的面积是否小于人脸图像的面积,若是,则可以通过移动边界框的方式使边界框完全位于显示区域内,确定边界框相对于人脸图像显示区域的偏移方向和偏移距离,并按照偏移方向的反方向移动所述偏移距离,就可以得到位于人脸图像显示区域内的边界框。It can be seen that in this example, when the bounding box after moving down is not completely within the display area of the face image, first check whether the area of the bounding box is smaller than the area of the face image. If so, you can make the boundary by moving the bounding box. The frame is completely located in the display area, determine the offset direction and offset distance of the bounding box relative to the face image display area, and move the offset distance in the opposite direction of the offset direction to get the face image display area Bounding box inside.
在一个可能的示例中,所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,包括:确定下移后的所述边界框与所述人脸图像显示区域的相交区域,其中,所述相交区域为矩形区域;确定所述相交区域的较长边和较短边,并以所述较短边为基准从所述相交区域中裁剪一个正方形区域,确定所述正方形区域的边界框为所述标准人脸区域的边界框。In a possible example, the adjusting the bounding box moved down to obtain the bounding box of the standard face area includes: determining the bounding box moved down and the face image display area The intersection area, wherein the intersection area is a rectangular area; determine the longer side and the shorter side of the intersection area, and use the shorter side as a reference to crop a square area from the intersection area to determine the The bounding box of the square area is the bounding box of the standard face area.
其中,若下移后的边界框没有完全位于人脸图像的显示区域,此时可以确定下移后的边界框与人脸图像显示区域的相交区域,可知,此相交区域一定为矩形区域,确定相交区域的较长边和较短边,并以较短边为基准,从相交区域中裁剪一个正方形区域,正方形区域的边长等于较短边长度,此时,得到一个位于相交区域内的正方形区域,该正方形区域可作为标准人脸区域。Among them, if the bounding box moved down is not completely located in the display area of the face image, the intersection area between the bounding box moved down and the face image display area can be determined at this time. It can be seen that the intersection area must be a rectangular area. The longer side and shorter side of the intersecting area, and using the shorter side as the benchmark, crop a square area from the intersecting area. The side length of the square area is equal to the shorter side length. At this time, a square in the intersecting area is obtained. Area, the square area can be used as a standard face area.
可见,本示例中,若下移后的边界框没有完全位于人脸图像的显示区域内,为得到一个正方形的标准人脸区域的边界框,此时可以选择在相交区域中裁剪一个正方形区域,并将该正方形区域作为标准人脸区域。通过这种裁剪方式可以使得到的标准人脸图像区域的边界框内包括更多的人脸检测关键点。It can be seen that in this example, if the bounding box after moving down is not completely within the display area of the face image, in order to obtain a square bounding box of the standard face area, you can choose to crop a square area in the intersection area at this time. And use the square area as the standard face area. Through this cropping method, more key points of face detection can be included in the bounding box of the obtained standard face image area.
在一个可能的示例中,所述以所述较短边为基准从所述相交区域中裁剪一个正方形区域,包括:检测所述相交区域是否存在和所述人脸图像显示区域边界、下移后的所述边界框同时重合的边;若是,则以重合边作为边长裁剪正方形区域,使裁剪出的正方形区域的 边长长度等于所述相交区域较短边的长度;若否,从所述相交区域中对称裁剪出正方形区域,使裁剪出的正方形区域的中心和所述相交区域的中心重合。In a possible example, the cutting a square area from the intersecting area based on the shorter side includes: detecting whether the intersecting area exists and the boundary of the face image display area, and moving down If the bounding box overlaps at the same time; if yes, cut the square area with the overlapped side as the side length, so that the side length of the cut square area is equal to the length of the shorter side of the intersecting area; if not, start from the In the intersection area, a square area is symmetrically cut out, so that the center of the cut out square area coincides with the center of the intersection area.
其中,在检测到下移后的边界框和人脸区域显示区域之间的相交区域中,存在和人脸图像显示区域边界,以及下以后的边界框同时重合的边时,则以该重合的边作为边长,裁剪出一个正方形区域,裁剪出的正方形区域的边长长度等于相交区域较短边的长度,若没有重合的边时,则从相交区域中对称裁剪出一个正方形区域,裁剪出的正方形区域的中心和相交区域的中心重合。Among them, when it is detected that the intersecting area between the lower bounding box and the face area display area, there is the boundary of the face image display area and the edges that coincide with the lower bounding box at the same time, then the coincident The side is taken as the side length, and a square area is cut out. The side length of the cut square area is equal to the length of the shorter side of the intersecting area. If there are no overlapping sides, a square area is symmetrically cut out from the intersecting area and cut out The center of the square area coincides with the center of the intersecting area.
可见,本示例中,从相交区域中裁剪出一个正方形区域作为标准人脸区域,首先检测相交区域中是否存在和人脸图像显示区域边界、以及下移后的边界框同时重合的边,若存在,则可以以该重合边为基准裁剪出一个正方形区域,从而保证裁剪出的正方形区域的边界框和下以后的边界框尽量重合,从而有利于保证该正方形区域内包括更多的人脸检测关键点。It can be seen that in this example, a square area is cut out from the intersection area as the standard face area. First, it is detected whether there is an edge in the intersection area that coincides with the boundary of the face image display area and the bounding box after moving down. , You can crop a square area based on the coincident edge, so as to ensure that the bounding box of the cropped square area overlaps with the following bounding boxes as much as possible, which helps to ensure that the square area includes more face detection keys. point.
在一个可能的示例中,所述方法还包括:在检测到所述人脸图像中包括多个人脸时,根据人脸数目将所述人脸图像划分为多个人脸图像区域;按照所述多个人脸的优先级,依次确定所述多个人脸图像区域的参考人脸区域。In a possible example, the method further includes: when it is detected that the face image includes multiple faces, dividing the face image into multiple face image regions according to the number of faces; The priority of the personal face is to determine the reference face area of the multiple face image areas in sequence.
其中,在检测到人脸图像中包括多个人脸时,可以根据人脸数目将人脸图像拆划分为多个人脸图像区域,依次对多个人脸区域中的每个人脸区域进行人脸关键点检测,如可以按照多个人脸的优先级依次确定多个人脸图像区域的参考人脸区域,进而确定多个人脸图像区域的人脸关键点。Among them, when it is detected that the face image includes multiple faces, the face image can be divided into multiple face image regions according to the number of faces, and face key points are performed on each of the multiple face regions in turn. For detection, for example, the reference face regions of the multiple face image regions can be sequentially determined according to the priority of the multiple faces, and then the face key points of the multiple face image regions can be determined.
可见,本示例中,在人脸图像为多人合照的情况下,人脸图像中会包括多个人脸,此时可以将人脸图像划分为多个人脸图像区域,依次对每个人脸图像区域中的人脸图像进行人脸关键点检测,从而可获取到每个人脸的人脸关键点。It can be seen that in this example, when the face image is a group photo of multiple people, the face image will include multiple faces. At this time, the face image can be divided into multiple face image areas, and each face image area Face key point detection is performed on the face image in, so that the key point of each face can be obtained.
与所述图1A所示的实施例一致的,请参阅图2,图2是本申请实施例提供的一种图像处理方法的流程示意图,应用于电子设备。如图所示,本图像处理方法包括:Consistent with the embodiment shown in FIG. 1A, please refer to FIG. 2. FIG. 2 is a schematic flowchart of an image processing method provided by an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the image processing method includes:
S201,所述电子设备获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框。S201: The electronic device obtains a reference face area of a face image, and determines a bounding box of the reference face area.
S202,所述电子设备确定所述参考人脸区域的边界框的高度和宽度。S202: The electronic device determines the height and width of the bounding box of the reference face area.
S203,所述电子设备在检测到所述宽度小于所述高度时,计算所述宽度和所述高度的差值绝对值。S203: When detecting that the width is less than the height, the electronic device calculates the absolute value of the difference between the width and the height.
S204,所述电子设备将所述参考人脸区域的边界框的宽度调整为和所述高度一致,并将所述边界框向下移动得到所述标准人脸区域的边界框,其中,所述向下移动的距离为所述差值绝对值的四分之一。S204: The electronic device adjusts the width of the bounding box of the reference face area to be consistent with the height, and moves the bounding box downward to obtain the bounding box of the standard face area, wherein The distance moved downward is a quarter of the absolute value of the difference.
S205,所述电子设备根据所述标准人脸区域的边界框确定标准人脸区域。S205: The electronic device determines a standard face area according to the bounding box of the standard face area.
S206,所述电子设备将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标。S206: The electronic device inputs the standard face area into the first neural network model to obtain face key point coordinates of the face image.
S207,所述电子设备将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。S207. The electronic device inputs the sample data including the coordinates of the key points of the human face into a second neural network model to train the second neural network model, wherein the trained second neural network model is High-precision face key point detection model.
可以看出,本申请实施例中,电子设备首先获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框,其次,对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框,然后,将所述标准人脸区域输入到所述第一 神经网络模型以得到所述人脸图像的人脸关键点坐标,最后,将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。由于在将参考人脸区域的边界框调整为标准人脸区域的边界框得到过程中,将矩形边界框调整为了正方形边界框,且避免了人脸图像的变形和/或扭曲,从而,有利于提高人脸关键点检测的精度。It can be seen that, in this embodiment of the application, the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area. Obtain the bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area. The adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
此外,由于参考人脸区域的边界框的宽度小于高度,因此将宽度调整为和高度一致后,可得到形状为正方形的边界框,且该正方形的边界框可以将更人脸关键点包含进来,由于参考人脸区域的边界框位置通常相对于人脸偏上,因此向下移动正方形边界框可以将更多人脸下部位的人脸关键点包含进来,有利于提高人脸关键点检测的准确度。In addition, since the width of the bounding box of the reference face area is smaller than the height, after adjusting the width to be consistent with the height, a square bounding box can be obtained, and the square bounding box can include more key points of the face. Since the position of the bounding box of the reference face area is usually higher relative to the face, moving the square bounding box down can include more face key points under the face, which is beneficial to improve the accuracy of face key point detection Spend.
与所述图1A、图2所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种电子设备300的结构示意图,该电子设备300运行有一个或多个应用程序和操作系统,如图所示,该电子设备300包括处理器310、存储器320、通信接口330以及一个或多个程序321,其中,所述一个或多个程序321被存储在所述存储器320中,并且被配置由所述处理器310执行,所述一个或多个程序321包括用于执行以下步骤的指令;Consistent with the embodiment shown in FIG. 1A and FIG. 2, please refer to FIG. 3. FIG. 3 is a schematic structural diagram of an electronic device 300 provided by an embodiment of the present application. The electronic device 300 runs one or more applications Programs and operating systems, as shown in the figure, the electronic device 300 includes a processor 310, a memory 320, a communication interface 330, and one or more programs 321, wherein the one or more programs 321 are stored in the memory 320 And is configured to be executed by the processor 310, and the one or more programs 321 include instructions for executing the following steps;
获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框;Acquiring a reference face region of a face image, and determining a bounding box of the reference face region;
对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框;The bounding box of the reference face area is adjusted to obtain the bounding box of the standard face area, and the standard face area is determined according to the bounding box of the standard face area, and the adjustment of the bounding box is used to use the rectangle Adjust the bounding box to a square bounding box;
将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标;Inputting the standard face region into the first neural network model to obtain face key point coordinates of the face image;
将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。The sample data including the coordinates of the key points of the face is input to a second neural network model to train the second neural network model, wherein the trained second neural network model is a high-precision face key point Check the model.
可以看出,本申请实施例中,电子设备首先获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框,其次,对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框,然后,将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标,最后,将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。由于在将参考人脸区域的边界框调整为标准人脸区域的边界框得到过程中,将矩形边界框调整为了正方形边界框,且避免了人脸图像的变形和/或扭曲,从而,有利于提高人脸关键点检测的精度。It can be seen that, in this embodiment of the application, the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area. Obtain the bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area. The adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
在一个可能的示例中,在所述对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框方面,所述程序中的指令具体用于执行以下操作:确定所述参考人脸区域的边界框的高度和宽度;在检测到所述宽度小于所述高度时,计算所述宽度和所述高度的差值绝对值;将所述参考人脸区域的边界框的宽度调整为和所述高度一致,并将所述边界框向下移动得到所述标准人脸区域的边界框,其中,所述向下移动的距离为所述差值绝对值的四分之一。In a possible example, in terms of adjusting the bounding box of the reference face area to obtain the bounding box of the standard face area, the instructions in the program are specifically used to perform the following operations: determining the reference face area The height and width of the bounding box of the face area; when it is detected that the width is smaller than the height, the absolute value of the difference between the width and the height is calculated; the width of the bounding box of the reference face area is adjusted In order to be consistent with the height, the bounding box is moved downward to obtain the bounding box of the standard face area, wherein the distance of the downward movement is a quarter of the absolute value of the difference.
在一个可能的示例中,在所述将所述边界框向下移动得到所述标准人脸区域的边界框方面,所述程序中的指令具体用于执行以下操作:判断下移后的所述边界框是否位于所述人脸图像的显示区域;若否,对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,所述调整用于使所述边界框位于所述人脸图像的显示区域内。In a possible example, in terms of moving the bounding box down to obtain the bounding box of the standard face area, the instructions in the program are specifically used to perform the following operations: judging the moving down Whether the bounding box is located in the display area of the face image; if not, adjust the bounding box after moving down to obtain the bounding box of the standard face area, and the adjustment is used to make the bounding box be located at the In the display area of the face image.
在一个可能的示例中,在所述对下移后的所述边界框进行调整得到所述标准人脸区域 的边界框方面,所述程序中的指令具体用于执行以下操作:在检测到下移后的所述边界框面积小于所述人脸图像面积时,计算下移后的所述边界框相对于所述人脸图像的偏移距离和偏移方向;按照所述偏移方向的相反方向移动所述边界框,使移动距离等于所述偏移距离且移动后的所述边界框位于所述人脸图像的显示区域内。In a possible example, in terms of adjusting the bounding box after moving down to obtain the bounding box of the standard face area, the instructions in the program are specifically used to perform the following operations: When the area of the moved bounding box is smaller than the area of the face image, calculate the offset distance and direction of the moved down bounding box relative to the face image; according to the opposite of the offset direction Move the bounding box in a direction such that the moving distance is equal to the offset distance and the moved bounding box is located in the display area of the face image.
在一个可能的示例中,在所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框方面,所述程序中的指令具体用于执行以下操作:确定下移后的所述边界框与所述人脸图像显示区域的相交区域,其中,所述相交区域为矩形区域;确定所述相交区域的较长边和较短边,并以所述较短边为基准从所述相交区域中裁剪一个正方形区域,确定所述正方形区域的边界框为所述标准人脸区域的边界框。In a possible example, in terms of adjusting the bounding box after moving down to obtain the bounding box of the standard face region, the instructions in the program are specifically used to perform the following operations: The intersection area between the bounding box and the face image display area, wherein the intersection area is a rectangular area; the longer side and the shorter side of the intersection area are determined, and the shorter side is used as a reference A square area is cropped from the intersection area, and the bounding box of the square area is determined to be the bounding box of the standard face area.
在一个可能的示例中,在所述以所述较短边为基准从所述相交区域中裁剪一个正方形区域方面,所述程序中的指令具体用于执行以下操作:检测所述相交区域是否存在和所述人脸图像显示区域边界、下移后的所述边界框同时重合的边;若是,则以重合边作为边长裁剪正方形区域,使裁剪出的正方形区域的边长长度等于所述相交区域较短边的长度;若否,从所述相交区域中对称裁剪出正方形区域,使裁剪出的正方形区域的中心和所述相交区域的中心重合。In a possible example, in terms of cropping a square area from the intersecting area based on the shorter side, the instructions in the program are specifically used to perform the following operations: detecting whether the intersecting area exists The edge that coincides with the boundary of the face image display area and the bounding box moved down at the same time; if it is, the square area is cropped with the overlapping edge as the side length, so that the length of the side of the cropped square area is equal to the intersection The length of the shorter side of the area; if not, a square area is symmetrically cut out from the intersection area, so that the center of the cut out square area coincides with the center of the intersection area.
在一个可能的示例中,所述程序中的指令具体用于执行以下操作:在检测到所述人脸图像中包括多个人脸时,根据人脸数目将所述人脸图像划分为多个人脸图像区域;按照所述多个人脸的优先级,依次确定所述多个人脸图像区域的参考人脸区域。In a possible example, the instructions in the program are specifically used to perform the following operations: when it is detected that the face image includes multiple faces, the face image is divided into multiple faces according to the number of faces Image area; according to the priority of the multiple faces, sequentially determine the reference face area of the multiple face image areas.
在一个可能的示例中,所述第一神经网络模型用于对人脸图像中的人脸关键点进行定位,第二神经网络模型用于高精度检测人脸关键点。In a possible example, the first neural network model is used to locate the key points of the face in the face image, and the second neural network model is used to detect the key points of the face with high precision.
在一个可能的示例中,所述调整后得到的正方形边界框包括的人脸检测关键点的数目大于矩形边界框包括的人脸检测关键点的数目。In a possible example, the number of face detection key points included in the square bounding box obtained after adjustment is greater than the number of face detection key points included in the rectangular bounding box.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solution of the embodiment of the present application from the perspective of the execution process on the method side. It can be understood that, in order to implement the above-mentioned functions, an electronic device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个控制单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the electronic device into functional units according to the foregoing method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one control unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
图4是本申请实施例中所涉及的装置400的功能单元组成框图。该图像处理装置400应用于电子设备,图像处理装置400包括处理单元401和通信单元402,其中:FIG. 4 is a block diagram of the functional unit composition of a device 400 involved in an embodiment of the present application. The image processing device 400 is applied to electronic equipment. The image processing device 400 includes a processing unit 401 and a communication unit 402, wherein:
所述处理单元401,用于通过所述通信单元402获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框;以及用于对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框;以及用于将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标;以及用于将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其 中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。The processing unit 401 is configured to obtain a reference face area of a face image through the communication unit 402, and determine a bounding box of the reference face area; and to perform processing on the bounding box of the reference face area Adjust to obtain a bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area, the adjustment to the bounding box is used to adjust the rectangular bounding box to a square bounding box; and Inputting the standard face area into the first neural network model to obtain the face key point coordinates of the face image; and for inputting sample data including the face key point coordinates to the second neural network The network model is used to train the second neural network model, wherein the trained second neural network model is a high-precision face key point detection model.
可以看出,本申请实施例中,电子设备首先获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框,其次,对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框,然后,将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标,最后,将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。由于在将参考人脸区域的边界框调整为标准人脸区域的边界框得到过程中,将矩形边界框调整为了正方形边界框,且避免了人脸图像的变形和/或扭曲,从而,有利于提高人脸关键点检测的精度。It can be seen that, in this embodiment of the application, the electronic device first obtains the reference face area of the face image, and determines the bounding box of the reference face area, and secondly, adjusts the bounding box of the reference face area. Obtain the bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area. The adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box, and then, the The standard face area is input to the first neural network model to obtain the face key point coordinates of the face image, and finally, the sample data containing the face key point coordinates is input to the second neural network model to compare The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model. Because in the process of adjusting the bounding box of the reference face area to the bounding box of the standard face area, the rectangular bounding box is adjusted to a square bounding box, and the deformation and/or distortion of the face image is avoided, which is beneficial Improve the accuracy of face key point detection.
在一个可能的示例中,在所述对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框方面,所述处理单元401具体用于:确定所述参考人脸区域的边界框的高度和宽度;以及用于在检测到所述宽度小于所述高度时,计算所述宽度和所述高度的差值绝对值;以及用于将所述参考人脸区域的边界框的宽度调整为和所述高度一致,并将所述边界框向下移动得到所述标准人脸区域的边界框,其中,所述向下移动的距离为所述差值绝对值的四分之一。In a possible example, in terms of adjusting the bounding box of the reference face area to obtain the bounding box of the standard face area, the processing unit 401 is specifically configured to: determine the bounding box of the reference face area The height and width of the bounding box; and when it is detected that the width is smaller than the height, calculating the absolute value of the difference between the width and the height; The width is adjusted to be consistent with the height, and the bounding box is moved downward to obtain the bounding box of the standard face area, wherein the distance of the downward movement is a quarter of the absolute value of the difference .
在一个可能的示例中,在所述将所述边界框向下移动得到所述标准人脸区域的边界框方面,所述处理单元401具体用于:判断下移后的所述边界框是否位于所述人脸图像的显示区域;若否,对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,所述调整用于使所述边界框位于所述人脸图像的显示区域内。In a possible example, in the aspect of moving the bounding box down to obtain the bounding box of the standard face area, the processing unit 401 is specifically configured to: determine whether the bounding box after moving down is located in The display area of the face image; if not, adjust the bounding box after moving down to obtain the bounding box of the standard face area, and the adjustment is used to make the bounding box located in the face image Within the display area.
在一个可能的示例中,在所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框方面,所述处理单元401具体用于:在检测到下移后的所述边界框面积小于所述人脸图像面积时,计算下移后的所述边界框相对于所述人脸图像的偏移距离和偏移方向;以及用于按照所述偏移方向的相反方向移动所述边界框,使移动距离等于所述偏移距离且移动后的所述边界框位于所述人脸图像的显示区域内。In a possible example, in terms of adjusting the bounding box after moving down to obtain the bounding box of the standard face area, the processing unit 401 is specifically configured to: When the area of the bounding box is smaller than the area of the face image, calculating the offset distance and the offset direction of the bounding box moved down relative to the face image; and used to calculate the offset direction according to the opposite direction of the offset direction Move the bounding box so that the moving distance is equal to the offset distance and the moved bounding box is located in the display area of the face image.
在一个可能的示例中,在所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框方面,所述处理单元401具体用于:确定下移后的所述边界框与所述人脸图像显示区域的相交区域,其中,所述相交区域为矩形区域;以及用于确定所述相交区域的较长边和较短边,并以所述较短边为基准从所述相交区域中裁剪一个正方形区域,确定所述正方形区域的边界框为所述标准人脸区域的边界框。In a possible example, in terms of adjusting the bounding box after moving down to obtain the bounding box of the standard face region, the processing unit 401 is specifically configured to: determine the bounding box after moving down The intersection area between the frame and the face image display area, wherein the intersection area is a rectangular area; A square area is cropped in the intersection area, and the bounding box of the square area is determined to be the bounding box of the standard face area.
在一个可能的示例中,在所述以所述较短边为基准从所述相交区域中裁剪一个正方形区域方面,所述处理单元401具体用于:检测所述相交区域是否存在和所述人脸图像显示区域边界、下移后的所述边界框同时重合的边;若是,则以重合边作为边长裁剪正方形区域,使裁剪出的正方形区域的边长长度等于所述相交区域较短边的长度;若否,从所述相交区域中对称裁剪出正方形区域,使裁剪出的正方形区域的中心和所述相交区域的中心重合。In a possible example, in the aspect of cropping a square area from the intersecting area based on the shorter side, the processing unit 401 is specifically configured to: detect whether the intersecting area exists and the person The boundary of the face image display area and the edge that coincides with the lower bounding box at the same time; if so, the square area is cropped with the overlapped side as the side length, so that the side length of the cropped square area is equal to the shorter side of the intersecting area If not, cut out a square area symmetrically from the intersection area, so that the center of the cut out square area coincides with the center of the intersection area.
在一个可能的示例中,所述处理单元401具体用于:在检测到所述人脸图像中包括多个人脸时,根据人脸数目将所述人脸图像划分为多个人脸图像区域;按照所述多个人脸的优先级,依次确定所述多个人脸图像区域的参考人脸区域。In a possible example, the processing unit 401 is specifically configured to: when detecting that the face image includes multiple faces, divide the face image into multiple face image regions according to the number of faces; The priority of the multiple human faces is determined in turn from the reference face regions of the multiple human face image regions.
在一个可能的示例中,所述第一神经网络模型用于对人脸图像中的人脸关键点进行定位,第二神经网络模型用于高精度检测人脸关键点。In a possible example, the first neural network model is used to locate the key points of the face in the face image, and the second neural network model is used to detect the key points of the face with high precision.
在一个可能的示例中,所述调整后得到的正方形边界框包括的人脸检测关键点的数目大于矩形边界框包括的人脸检测关键点的数目。In a possible example, the number of face detection key points included in the square bounding box obtained after adjustment is greater than the number of face detection key points included in the rectangular bounding box.
其中,所述电子设备还可包括存储单元403,处理单元401和通信单元402可以是控制器或处理器,存储单元403可以是存储器。The electronic device may further include a storage unit 403, the processing unit 401 and the communication unit 402 may be a controller or a processor, and the storage unit 403 may be a memory.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括移动终端。An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment , The above-mentioned computer includes a mobile terminal.
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。The embodiments of the present application also provide a computer program product. The above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program. Part or all of the steps of the method. The computer program product may be a software installation package, and the above-mentioned computer includes a mobile terminal.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited by the described sequence of actions. Because according to this application, some steps can be performed in other order or at the same time. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in an embodiment, reference may be made to related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device may be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个控制单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one control unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory. A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disc, etc.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时, 对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the application are described in detail above, and specific examples are used in this article to illustrate the principles and implementation of the application. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the application; at the same time, for Those of ordinary skill in the art, based on the idea of the application, will have changes in the specific implementation and the scope of application. In summary, the content of this specification should not be construed as a limitation to the application.

Claims (20)

  1. 一种图像处理方法,其特征在于,应用于电子设备,所述方法包括:An image processing method, characterized in that it is applied to an electronic device, and the method includes:
    获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框;Acquiring a reference face region of a face image, and determining a bounding box of the reference face region;
    对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框;The bounding box of the reference face area is adjusted to obtain the bounding box of the standard face area, and the standard face area is determined according to the bounding box of the standard face area, and the adjustment of the bounding box is used to use the rectangle Adjust the bounding box to a square bounding box;
    将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标;Inputting the standard face region into the first neural network model to obtain face key point coordinates of the face image;
    将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。The sample data including the coordinates of the key points of the face is input to a second neural network model to train the second neural network model, wherein the trained second neural network model is a high-precision face key point Check the model.
  2. 根据权利要求1所述的方法,其特征在于,所述对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,包括:The method according to claim 1, wherein the adjusting the bounding box of the reference face area to obtain the bounding box of the standard face area comprises:
    确定所述参考人脸区域的边界框的高度和宽度;Determining the height and width of the bounding box of the reference face region;
    在检测到所述宽度小于所述高度时,计算所述宽度和所述高度的差值绝对值;When it is detected that the width is smaller than the height, calculating the absolute value of the difference between the width and the height;
    将所述参考人脸区域的边界框的宽度调整为和所述高度一致,并将所述边界框向下移动得到所述标准人脸区域的边界框,其中,所述向下移动的距离为所述差值绝对值的四分之一。The width of the bounding box of the reference face area is adjusted to be consistent with the height, and the bounding box is moved downward to obtain the bounding box of the standard face area, wherein the distance of the downward movement is A quarter of the absolute value of the difference.
  3. 根据权利要求2所述的方法,其特征在于,所述将所述边界框向下移动得到所述标准人脸区域的边界框,包括:The method according to claim 2, wherein the moving the bounding box downward to obtain the bounding box of the standard face area comprises:
    判断下移后的所述边界框是否位于所述人脸图像的显示区域;Judging whether the bounding box moved down is located in the display area of the face image;
    若否,对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,所述调整用于使所述边界框位于所述人脸图像的显示区域内。If not, adjusting the bounding box moved down to obtain the bounding box of the standard face area, and the adjustment is used to make the bounding box located in the display area of the face image.
  4. 根据权利要求3所述的方法,其特征在于,所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,包括:The method according to claim 3, wherein the adjusting the bounding box moved down to obtain the bounding box of the standard face region comprises:
    在检测到下移后的所述边界框面积小于所述人脸图像面积时,计算下移后的所述边界框相对于所述人脸图像的偏移距离和偏移方向;When it is detected that the area of the bounding box after moving down is smaller than the area of the face image, calculating the offset distance and the offset direction of the bounding box after moving down relative to the face image;
    按照所述偏移方向的相反方向移动所述边界框,使移动距离等于所述偏移距离且移动后的所述边界框位于所述人脸图像的显示区域内。Move the bounding box in a direction opposite to the offset direction, so that the moving distance is equal to the offset distance and the moved bounding box is located in the display area of the face image.
  5. 根据权利要求3所述的方法,其特征在于,所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,包括:The method according to claim 3, wherein the adjusting the bounding box moved down to obtain the bounding box of the standard face region comprises:
    确定下移后的所述边界框与所述人脸图像显示区域的相交区域,其中,所述相交区域为矩形区域;Determining the intersection area between the downwardly shifted bounding box and the face image display area, wherein the intersection area is a rectangular area;
    确定所述相交区域的较长边和较短边,并以所述较短边为基准从所述相交区域中裁剪一个正方形区域,确定所述正方形区域的边界框为所述标准人脸区域的边界框。Determine the longer side and the shorter side of the intersecting area, and crop a square area from the intersecting area based on the shorter side, and determine that the bounding box of the square area is that of the standard face area Bounding box.
  6. 根据权利要求5所述的方法,其特征在于,所述以所述较短边为基准从所述相交区域中裁剪一个正方形区域,包括:The method according to claim 5, wherein the cropping a square area from the intersecting area based on the shorter side comprises:
    检测所述相交区域是否存在和所述人脸图像显示区域边界、下移后的所述边界框同时重合的边;Detecting whether the intersection area has an edge that coincides with the boundary of the face image display area and the bounding box after being moved down at the same time;
    若是,则以重合边作为边长裁剪正方形区域,使裁剪出的正方形区域的边长长度等于所述相交区域较短边的长度;If yes, cut the square area with the coincident side as the side length, so that the side length of the cut square area is equal to the length of the shorter side of the intersecting area;
    若否,从所述相交区域中对称裁剪出正方形区域,使裁剪出的正方形区域的中心和所述相交区域的中心重合。If not, a square area is symmetrically cut out from the intersection area, so that the center of the cut out square area coincides with the center of the intersection area.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-6, wherein the method further comprises:
    在检测到所述人脸图像中包括多个人脸时,根据人脸数目将所述人脸图像划分为多个人脸图像区域;When it is detected that the face image includes multiple faces, dividing the face image into multiple face image regions according to the number of faces;
    按照所述多个人脸的优先级,依次确定所述多个人脸图像区域的参考人脸区域。According to the priority of the multiple faces, the reference face regions of the multiple face image regions are sequentially determined.
  8. 根据权利要求1任一项所述的方法,其特征在于,所述第一神经网络模型用于对人脸图像中的人脸关键点进行定位,第二神经网络模型用于高精度检测人脸关键点。The method according to any one of claims 1, wherein the first neural network model is used for locating key points of the face in the face image, and the second neural network model is used for high-precision detection of the face key point.
  9. 根据权利要求1任一项所述的方法,其特征在于,所述调整后得到的正方形边界框包括的人脸检测关键点的数目大于矩形边界框包括的人脸检测关键点的数目。The method according to any one of claims 1, wherein the number of face detection key points included in the square bounding box obtained after adjustment is greater than the number of face detection key points included in the rectangular bounding box.
  10. 一种图像处理装置,其特征在于,应用于电子设备,所述图像处理装置包括处理单元和通信单元,其中,An image processing device, characterized in that it is applied to electronic equipment, the image processing device includes a processing unit and a communication unit, wherein:
    所述处理单元,用于通过所述通信单元获取人脸图像的参考人脸区域,并确定所述参考人脸区域的边界框;以及用于对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框,并根据所述标准人脸区域的边界框确定标准人脸区域,针对所述边界框的调整用于将矩形边界框调整为正方形边界框;以及用于将所述标准人脸区域输入到所述第一神经网络模型以得到所述人脸图像的人脸关键点坐标;以及用于将包含所述人脸关键点坐标的样本数据输入到第二神经网络模型以对所述第二神经网络模型进行训练,其中,所述训练后的第二神经网络模型为高精度人脸关键点检测模型。The processing unit is configured to obtain a reference face area of a face image through the communication unit, and determine a bounding box of the reference face area; and to adjust the bounding box of the reference face area, Obtain the bounding box of the standard face area, and determine the standard face area according to the bounding box of the standard face area, the adjustment of the bounding box is used to adjust the rectangular bounding box to a square bounding box; and Inputting the standard face area to the first neural network model to obtain the face key point coordinates of the face image; and inputting sample data including the face key point coordinates to the second neural network model The second neural network model is trained, wherein the trained second neural network model is a high-precision face key point detection model.
  11. 根据权利要求10所述的图像处理装置,其特征在于,在所述对所述参考人脸区域的边界框进行调整,得到标准人脸区域的边界框方面,所述处理单元具体用于:确定所述参考人脸区域的边界框的高度和宽度;在检测到所述宽度小于所述高度时,计算所述宽度和所述高度的差值绝对值;将所述参考人脸区域的边界框的宽度调整为和所述高度一致,并将所述边界框向下移动得到所述标准人脸区域的边界框,其中,所述向下移动的距离为所述差值绝对值的四分之一。The image processing device according to claim 10, wherein in the aspect of adjusting the bounding box of the reference face area to obtain the bounding box of the standard face area, the processing unit is specifically configured to: determine The height and width of the bounding box of the reference face area; when it is detected that the width is smaller than the height, the absolute value of the difference between the width and the height is calculated; and the bounding box of the reference face area The width of is adjusted to be consistent with the height, and the bounding box is moved downward to obtain the bounding box of the standard face region, wherein the distance of the downward movement is a quarter of the absolute value of the difference one.
  12. 根据权利要求11所述的图像处理装置,其特征在于,在所述将所述边界框向下移动得到所述标准人脸区域的边界框方面,所述处理单元具体用于:判断下移后的所述边界框是否位于所述人脸图像的显示区域;若否,对下移后的所述边界框进行调整得到所述标准人脸区域的边界框,所述调整用于使所述边界框位于所述人脸图像的显示区域内。The image processing device according to claim 11, wherein, in terms of moving the bounding box down to obtain the bounding box of the standard face area, the processing unit is specifically configured to: determine that the bounding box is moved down Whether the bounding box is located in the display area of the face image; if not, adjusting the bounding box after moving down to obtain the bounding box of the standard face area, and the adjustment is used to make the boundary The frame is located in the display area of the face image.
  13. 根据权利要求12所述的图像处理装置,其特征在于,在所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框方面,所述处理单元具体用于:在检测到下移后的所述边界框面积小于所述人脸图像面积时,计算下移后的所述边界框相对于所述人脸图像的偏移距离和偏移方向;按照所述偏移方向的相反方向移动所述边界框,使移动距离等于所述偏移距离且移动后的所述边界框位于所述人脸图像的显示区域内。The image processing device according to claim 12, wherein, in terms of adjusting the bounding box moved down to obtain the bounding box of the standard face region, the processing unit is specifically configured to: When it is detected that the area of the bounding box after moving down is smaller than the area of the face image, calculate the offset distance and direction of the bounding box after moving down relative to the face image; according to the offset The bounding box is moved in the opposite direction of the direction, so that the moving distance is equal to the offset distance and the moved bounding box is located in the display area of the face image.
  14. 根据权利要求12所述的图像处理装置,其特征在于,在所述对下移后的所述边界框进行调整得到所述标准人脸区域的边界框方面,所述处理单元具体用于:确定下移后的所述边界框与所述人脸图像显示区域的相交区域,其中,所述相交区域为矩形区域;确定所述相交区域的较长边和较短边,并以所述较短边为基准从所述相交区域中裁剪一个正方形区域,确定所述正方形区域的边界框为所述标准人脸区域的边界框。The image processing device according to claim 12, wherein, in terms of adjusting the bounding box moved down to obtain the bounding box of the standard face region, the processing unit is specifically configured to: determine The intersection area between the lowered bounding box and the face image display area, wherein the intersection area is a rectangular area; the longer side and the shorter side of the intersection area are determined, and the shorter side A square area is cropped from the intersection area based on the edge, and the bounding box of the square area is determined to be the bounding box of the standard face area.
  15. 根据权利要求14所述的图像处理装置,其特征在于,在所述以所述较短边为基准从所述相交区域中裁剪一个正方形区域方面,所述处理单元具体用于:检测所述相交区域是否存在和所述人脸图像显示区域边界、下移后的所述边界框同时重合的边;若是,则以重合边作为边长裁剪正方形区域,使裁剪出的正方形区域的边长长度等于所述相交区域较短边的长度;若否,从所述相交区域中对称裁剪出正方形区域,使裁剪出的正方形区域的中心和所述相交区域的中心重合。The image processing device according to claim 14, wherein in the aspect of cropping a square area from the intersection area based on the shorter side, the processing unit is specifically configured to: detect the intersection Whether the area has an edge that coincides with the boundary of the face image display area and the bounding box after moving down at the same time; if so, the square area is cropped with the overlapped edge as the side length, so that the side length of the cropped square area is equal to The length of the shorter side of the intersection area; if not, a square area is symmetrically cut out from the intersection area, so that the center of the cut out square area coincides with the center of the intersection area.
  16. 根据权利要求10-15任一项所述的图像处理装置,其特征在于,所述处理单元具体用于:在检测到所述人脸图像中包括多个人脸时,根据人脸数目将所述人脸图像划分为多个人脸图像区域;按照所述多个人脸的优先级,依次确定所述多个人脸图像区域的参考人脸区域。The image processing device according to any one of claims 10-15, wherein the processing unit is specifically configured to: when it is detected that the face image includes multiple faces, calculate the number of faces according to the number of faces. The face image is divided into multiple face image regions; and the reference face regions of the multiple face image regions are sequentially determined according to the priority of the multiple face images.
  17. 根据权利要求10所述的图像处理装置,其特征在于,所述第一神经网络模型用于对人脸图像中的人脸关键点进行定位,第二神经网络模型用于高精度检测人脸关键点。The image processing device according to claim 10, wherein the first neural network model is used to locate the key points of the face in the face image, and the second neural network model is used to detect the key points of the face with high precision. point.
  18. 根据权利要求10所述的图像处理装置,其特征在于,所述调整后得到的正方形边界框包括的人脸检测关键点的数目大于矩形边界框包括的人脸检测关键点的数目。The image processing device according to claim 10, wherein the number of face detection key points included in the square bounding box obtained after adjustment is greater than the number of face detection key points included in the rectangular bounding box.
  19. 一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的图像处理方法中的步骤的指令。An electronic device, characterized by comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, The program includes instructions for executing the steps in the image processing method according to any one of claims 1-9.
  20. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的图像处理方法。A computer-readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the image processing method according to any one of claims 1-9.
PCT/CN2021/072461 2020-02-26 2021-01-18 Image processing method and related device WO2021169668A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010120444.4A CN111368678B (en) 2020-02-26 2020-02-26 Image processing method and related device
CN202010120444.4 2020-02-26

Publications (1)

Publication Number Publication Date
WO2021169668A1 true WO2021169668A1 (en) 2021-09-02

Family

ID=71208133

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/072461 WO2021169668A1 (en) 2020-02-26 2021-01-18 Image processing method and related device

Country Status (2)

Country Link
CN (1) CN111368678B (en)
WO (1) WO2021169668A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657357A (en) * 2021-10-20 2021-11-16 北京市商汤科技开发有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN114116182A (en) * 2022-01-28 2022-03-01 南昌协达科技发展有限公司 Disinfection task allocation method and device, storage medium and equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368678B (en) * 2020-02-26 2023-08-25 Oppo广东移动通信有限公司 Image processing method and related device
CN112866773B (en) * 2020-08-21 2023-09-26 海信视像科技股份有限公司 Display equipment and camera tracking method in multi-person scene
CN112464740A (en) * 2020-11-05 2021-03-09 北京科技大学 Image processing method and system for top-down gesture recognition process
CN112818908B (en) * 2021-02-22 2024-07-02 Oppo广东移动通信有限公司 Key point detection method, device, terminal and storage medium
CN115908260B (en) * 2022-10-20 2023-10-20 北京的卢铭视科技有限公司 Model training method, face image quality evaluation method, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295678A (en) * 2016-07-27 2017-01-04 北京旷视科技有限公司 Neural metwork training and construction method and device and object detection method and device
US20190384291A1 (en) * 2018-06-19 2019-12-19 Toyota Research Institute, Inc. Debugging an autonomous driving machine learning model
CN110674874A (en) * 2019-09-24 2020-01-10 武汉理工大学 Fine-grained image identification method based on target fine component detection
CN110807448A (en) * 2020-01-07 2020-02-18 南京甄视智能科技有限公司 Human face key point data enhancement method, device and system and model training method
CN111368678A (en) * 2020-02-26 2020-07-03 Oppo广东移动通信有限公司 Image processing method and related device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4947018B2 (en) * 2008-09-12 2012-06-06 大日本印刷株式会社 Automatic image trimming device
CN107871098B (en) * 2016-09-23 2021-04-13 北京眼神科技有限公司 Method and device for acquiring human face characteristic points
US10825157B2 (en) * 2017-09-29 2020-11-03 Apple Inc. Glare reduction in captured images
US10936913B2 (en) * 2018-03-20 2021-03-02 The Regents Of The University Of Michigan Automatic filter pruning technique for convolutional neural networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295678A (en) * 2016-07-27 2017-01-04 北京旷视科技有限公司 Neural metwork training and construction method and device and object detection method and device
US20190384291A1 (en) * 2018-06-19 2019-12-19 Toyota Research Institute, Inc. Debugging an autonomous driving machine learning model
CN110674874A (en) * 2019-09-24 2020-01-10 武汉理工大学 Fine-grained image identification method based on target fine component detection
CN110807448A (en) * 2020-01-07 2020-02-18 南京甄视智能科技有限公司 Human face key point data enhancement method, device and system and model training method
CN111368678A (en) * 2020-02-26 2020-07-03 Oppo广东移动通信有限公司 Image processing method and related device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657357A (en) * 2021-10-20 2021-11-16 北京市商汤科技开发有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN114116182A (en) * 2022-01-28 2022-03-01 南昌协达科技发展有限公司 Disinfection task allocation method and device, storage medium and equipment
CN114116182B (en) * 2022-01-28 2022-07-08 南昌协达科技发展有限公司 Disinfection task allocation method and device, storage medium and equipment

Also Published As

Publication number Publication date
CN111368678A (en) 2020-07-03
CN111368678B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
WO2021169668A1 (en) Image processing method and related device
TWI785258B (en) Method, device, and storage medium for processing human face image
US10438329B2 (en) Image processing method and image processing apparatus
US10616475B2 (en) Photo-taking prompting method and apparatus, an apparatus and non-volatile computer storage medium
US20200065561A1 (en) Method for detecting skin region and apparatus for detecting skin region
EP3454250A1 (en) Facial image processing method and apparatus and storage medium
US9589333B2 (en) Image correction apparatus for correcting distortion of an image
JP5746937B2 (en) Object tracking device
US20190385285A1 (en) Image Processing Method and Device
US10317777B2 (en) Automatic zooming method and apparatus
US11120535B2 (en) Image processing method, apparatus, terminal, and storage medium
CN111626166B (en) Image processing method, device, electronic equipment and storage medium
CN107566742B (en) Shooting method, shooting device, storage medium and electronic equipment
CN112508773B (en) Image processing method and device, electronic equipment and storage medium
JP7429307B2 (en) Character string recognition method, device, equipment and medium based on computer vision
CN112416206A (en) Display window adjusting method, device, electronic device and storage medium
CN109543534B (en) Method and device for re-detecting lost target in target tracking
JP2006133941A (en) Image processing device, image processing method, image processing program, and portable terminal
CN113610864B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN114049670A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113658233A (en) Non-rigid registration method, device and equipment of three-dimensional face model and storage medium
CN113192127A (en) Image processing method and device, electronic equipment and storage medium
US20200320761A1 (en) Structural facial modifications in images
CN112286430A (en) Image processing method, apparatus, device and medium
KR20140112919A (en) Apparatus and method for processing an image

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

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

Country of ref document: EP

Kind code of ref document: A1