WO2022052889A1 - 图像识别方法、装置、电子设备和计算机可读介质 - Google Patents

图像识别方法、装置、电子设备和计算机可读介质 Download PDF

Info

Publication number
WO2022052889A1
WO2022052889A1 PCT/CN2021/116717 CN2021116717W WO2022052889A1 WO 2022052889 A1 WO2022052889 A1 WO 2022052889A1 CN 2021116717 W CN2021116717 W CN 2021116717W WO 2022052889 A1 WO2022052889 A1 WO 2022052889A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
probability
pixel
image
target image
Prior art date
Application number
PCT/CN2021/116717
Other languages
English (en)
French (fr)
Inventor
邓启力
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Priority to US18/019,050 priority Critical patent/US20230281983A1/en
Publication of WO2022052889A1 publication Critical patent/WO2022052889A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/84Arrangements for image or video recognition or understanding using pattern recognition or machine learning using probabilistic graphical models from image or video features, e.g. Markov models or Bayesian 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/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/758Involving statistics of pixels or of feature values, e.g. histogram matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations

Definitions

  • Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an image recognition method, apparatus, electronic device, and computer-readable medium.
  • the mouth in the target image can be recognized by image recognition technology, so as to process the above-mentioned target image. For example, perform color transformation on the mouth region in the above target image.
  • the existing image recognition technology cannot accurately recognize the edge of the mouth displayed in the above target image. This in turn results in poor results for subsequent processing of the mouth region shown in the image.
  • Some embodiments of the present disclosure propose image recognition methods, apparatuses, electronic devices, and computer-readable media to solve the technical problems mentioned in the above background section.
  • some embodiments of the present disclosure provide an image recognition method, the method includes: acquiring a target image showing a mouth; for each target category in at least three preset target categories, determining the above The probability that each pixel in the target image is the target category, and at least three probability maps are obtained; based on the at least three probability maps, the category of each pixel in the target image is determined.
  • some embodiments of the present disclosure provide an image recognition apparatus, the apparatus includes: an acquisition unit configured to acquire a target image showing a mouth; a first determination unit configured to For each target category in the three target categories, determine the probability that each pixel in the target image is the target category, and obtain at least three probability maps; the second determining unit is configured to be based on the at least three probability maps, Determine the class of each pixel in the above target image.
  • some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, when one or more programs are stored by one or more The processor executes such that the one or more processors implement a method as described in any implementation of the first aspect.
  • some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any implementation manner of the first aspect.
  • the edge of the mouth displayed in the above-mentioned target image can be more accurately identified.
  • the relevant image recognition technology only classifies the target image into two categories (for example, the area pixels and non-mouth area pixels). Since the edge of the mouth is at the junction of the mouth area and the non-mouth area, the probability of belonging to the mouth area is low, and the above-mentioned two-class image recognition technology can easily identify it incorrectly.
  • the image recognition method of some embodiments of the present disclosure classifies the target image showing the mouth at least three target categories, so that the pixel points have more accurate categories. For example, for an example image, pixels belonging to non-mouth pixels in the binary classification will be more accurately classified as face area pixels and non-face area pixels. On this basis, when a certain pixel has a low probability of belonging to a pixel in the target area, it may still be determined as a pixel in the target area. For example, for an example image, in the binary classification, the classification result indicates that the probability of a pixel belonging to a mouth pixel is 0.4, and the probability of belonging to a non-mouth pixel is 0.6, then the pixel will be determined to belong to a non-mouth pixel. pixel.
  • the classification result indicates that the probability of the pixel belonging to the mouth pixel is 0.4, the probability of belonging to the pixel in the face area is 0.3, and the probability of belonging to the pixel in the non-face area is 0.3, then the The pixels will be determined to belong to the mouth pixels. It can be seen that classifying the target image into at least three target categories can more accurately identify the edge of the target area in the image.
  • FIG. 1 is a schematic diagram of an application scenario of an image recognition method according to some embodiments of the present disclosure
  • FIG. 2 is a flowchart of some embodiments of an image recognition method according to the present disclosure
  • FIG. 3 is a flowchart of other embodiments of the image recognition method according to the present disclosure.
  • FIG. 4 is a schematic structural diagram of some embodiments of an image recognition apparatus according to the present disclosure.
  • FIG. 5 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure.
  • FIG. 1 shows a schematic diagram of an application scenario to which the image recognition method according to some embodiments of the present disclosure can be applied.
  • the computing device 101 may acquire the target image 102 displaying the mouth.
  • the target image 102 includes 16 pixels. Specifically, each row includes four pixels, and there are four rows in total. Then, the computing device 101 may determine the probability that each pixel in the target image is the target category for each of the at least three preset target categories, and obtain at least three probability maps.
  • there are three target categories including: face pixels, mouth pixels, and background pixels. Corresponding to probability map 103, probability map 104 and probability map 105, respectively. Finally, the computing device 101 may determine the category of each pixel in the target image based on the above three probability maps, as indicated by reference numeral 106 . Among them, the pixels marked 1 are face pixels, the pixels marked 2 are mouth pixels, and the pixels marked 3 are background pixels.
  • the above computing device 101 may be hardware or software.
  • the computing device When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or electronic devices, or can be implemented as a single server or a single electronic device.
  • a computing device When a computing device is embodied in software, it can be implemented as multiple software or software modules, for example, to provide distributed services, or as a single software or software module. There is no specific limitation here.
  • computing devices 101 in FIG. 1 is merely illustrative. There may be any number of computing devices 101 depending on implementation needs.
  • the image recognition method includes the following steps:
  • Step 201 acquiring a target image showing a mouth.
  • the execution body of the image recognition method may acquire the target image with the mouth displayed through wired connection or wireless connection.
  • the above wireless connection methods may include but are not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future .
  • the above-mentioned target image may be any image showing a mouth.
  • an image showing a mouth currently captured by the user an image showing a mouth selected by the user in a local historical image.
  • Step 202 for each target category of the at least three preset target categories, determine the probability that each pixel in the target image is the target category, and obtain at least three probability maps.
  • the execution subject may determine the probability that each pixel in the target image is the target category by using existing image recognition software or online image recognition tools to obtain at least three probability maps. Specifically, for each target category, the execution body may replace the pixel value of each pixel in the target image with the probability that the pixel is the target category, and obtain a probability map corresponding to the category.
  • the above-mentioned execution body may also input the above-mentioned target image into a pre-trained image recognition network to obtain the probability that each pixel in the above-mentioned target image is the above-mentioned target category, and obtain At least three probability maps.
  • the above-mentioned at least three target categories may include: face area pixels, non-face area pixels, and mouth pixels.
  • the above-mentioned at least three target categories may further include: mouth pixels, internal pixels of the mouth, face area pixels, and non-face area pixels.
  • Step 203 Determine the category of each pixel in the target image based on the at least three probability maps.
  • the execution subject may, for each pixel in the target image, determine the target category corresponding to the largest of at least three probability values corresponding to the pixel as the category of the pixel.
  • the above-mentioned execution body may further determine the category of each pixel point in the above-mentioned target image through the following steps:
  • Step 1 for each pixel in the target image, determine at least three probability values of the pixel in the at least three probability maps.
  • Step 2 Determine a first number of probability values from the above at least three probability values in descending order.
  • Step 3 Determine the target category corresponding to the first number of probability values as the category of the pixel point.
  • the methods provided by some embodiments of the present disclosure enable pixel points to have more precise categories by classifying at least three target categories on a target image showing a mouth. In turn, the recognition of the edge of the target area in the image is more accurate.
  • the process 300 of the image recognition method includes the following steps:
  • Step 301 acquiring a target image showing a mouth.
  • step 301 for the specific implementation of step 301 and the technical effects brought about by it, reference may be made to step 201 in the embodiment corresponding to FIG. 2 , and details are not repeated here.
  • Step 302 for each target category in the preset at least three target categories, input the above-mentioned target image into the pre-trained image recognition network to obtain the probability that each pixel in the above-mentioned target image is the above-mentioned target category , to obtain at least three probability maps.
  • Step 303 for each pixel in the target image, determine at least three probability values of the pixel in the at least three probability maps.
  • Step 304 Determine a first number of probability values from the above at least three probability values in descending order.
  • the above-mentioned first number may be any numerical value according to actual needs.
  • the first number may be one.
  • Step 305 Determine the target category corresponding to the first number of probability values as the category of the pixel point.
  • Step 306 Based on the category of each pixel in the target image, determine the image area in the target image where the mouth is displayed.
  • the above-mentioned execution body may determine an area composed of pixels whose categories are mouth pixels as the above-mentioned image area.
  • the above-mentioned execution body may further determine an area composed of pixels whose categories are mouth pixels or pixels inside the mouth as the above-mentioned image area.
  • Step 307 Perform image processing on the above-mentioned image area.
  • the processing of the image area by the execution subject may include: performing color transformation on the image area, cropping the image area, and the like.
  • the process 300 of the image recognition method in some embodiments corresponding to FIG. 3 embodies that by inputting the target image into the image recognition network, obtaining Probability map and steps to process the target image.
  • the solutions described in these embodiments can more accurately determine the category of the target image.
  • the target picture is enriched, and the experience of the user viewing the above-mentioned target image is improved.
  • FIG. 4 as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an image recognition apparatus, these apparatus embodiments correspond to those method embodiments shown in FIG. 2 , the apparatus specifically Can be used in various electronic devices.
  • the image recognition apparatus 400 in some embodiments includes: an acquisition unit 401 , a first determination unit 402 , and a second determination unit 403 .
  • the obtaining unit 401 is configured to obtain a target image showing a mouth;
  • the first determining unit 402 is configured to, for each target category in the at least three preset target categories, determine each target image in the above target image The probability that the pixel points are the above-mentioned target category, and at least three probability maps are obtained;
  • the second determining unit 403 is configured to determine the category of each pixel point in the above-mentioned target image based on the above-mentioned at least three probability maps.
  • the above-mentioned at least three target categories include: mouth pixels, internal pixels of the mouth, face area pixels, and non-face area pixels.
  • the first determining unit 402 is further configured to: input the above-mentioned target image into a pre-trained image recognition network, and obtain that each pixel in the above-mentioned target image is of the above-mentioned target category probability, and get at least three probability maps.
  • the second determining unit 403 is further configured to: for each pixel point in the above-mentioned target image, determine at least three probability values of the above-mentioned pixel point in the above-mentioned at least three probability maps ; Determine a first number of probability values from the at least three probability values in descending order; determine the target category corresponding to the first number of probability values as the category of the pixel point.
  • the apparatus 400 further includes: a processing unit configured to determine, based on the category of each pixel in the target image, an image area in which the mouth is displayed in the target image; area for image processing.
  • the units recorded in the apparatus 400 correspond to the respective steps in the method described with reference to FIG. 2 . Therefore, the operations, features, and beneficial effects described above with respect to the method are also applicable to the apparatus 400 and the units included therein, and details are not described herein again.
  • FIG. 5 it shows a schematic structural diagram of an electronic device (eg, the server or terminal device in FIG. 1 ) 500 suitable for implementing some embodiments of the present disclosure.
  • Electronic devices in some embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals Mobile terminals such as in-vehicle navigation terminals, etc., and stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 5 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • an electronic device 500 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 501 that may be loaded into random access according to a program stored in a read only memory (ROM) 502 or from a storage device 508 Various appropriate actions and processes are executed by the programs in the memory (RAM) 503 . In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored.
  • the processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
  • An input/output (I/O) interface 505 is also connected to bus 504 .
  • I/O interface 505 input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration
  • An output device 507 such as a computer
  • a storage device 508 including, for example, a magnetic tape, a hard disk, etc.
  • Communication means 509 may allow electronic device 500 to communicate wirelessly or by wire with other devices to exchange data. While Figure 5 illustrates electronic device 500 having various means, it should be understood that not all of the illustrated means are required to be implemented or available. More or fewer devices may alternatively be implemented or provided. Each block shown in FIG. 5 can represent one device, and can also represent multiple devices as required.
  • the processes described above with reference to the flowcharts may be implemented as computer software programs.
  • some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from a network via communication device 509, or from storage device 508, or from ROM 502.
  • the processing device 501 When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are performed.
  • the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires a target image showing a mouth; for at least three preset targets For each target category in the category, determine the probability that each pixel in the target image is the target category, and obtain at least three probability maps; based on the at least three probability maps, determine the category of each pixel in the target image. .
  • Computer program code for carrying out operations of some embodiments of the present disclosure may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, or a combination thereof , as well as conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider to via Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units described in some embodiments of the present disclosure may be implemented by means of software, and may also be implemented by means of hardware.
  • the described unit may also be provided in the processor, for example, it may be described as: a processor includes an acquisition unit, a first determination unit, and a second determination unit. Wherein, the names of these units do not constitute a limitation of the unit itself in some cases, for example, the acquisition unit may also be described as a "unit for acquiring a target image".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • an image recognition method comprising: acquiring a target image showing a mouth; for each target category in at least three preset target categories, determining the target The probability that each pixel in the image is the target category, and at least three probability maps are obtained; based on the at least three probability maps, the category of each pixel in the target image is determined.
  • the above-mentioned at least three target categories include: mouth pixels, internal pixels of the mouth, face area pixels, and non-face area pixels.
  • determining the probability that each pixel in the target image is the target category, and obtaining at least three probability maps includes: inputting the target image into a pre-trained image recognition network , obtain the probability that each pixel in the target image is the target category, and obtain at least three probability maps.
  • determining the category of each pixel in the target image based on the at least three probability maps includes: for each pixel in the target image, determining the category of each pixel in the target image in the at least three Determine at least three probability values of the above-mentioned pixel points in the probability map; in descending order, determine a first number of probability values from the above-mentioned at least three probability values; assign the target category corresponding to the above-mentioned first number of probability values Determined as the category of the above pixel points.
  • the method further includes: determining, based on the category of each pixel in the target image, an image area in which the mouth is displayed in the target image; and performing image processing on the image area.
  • an image recognition apparatus comprising: an acquisition unit configured to acquire a target image showing a mouth; a first determination unit configured to For each target category in the three target categories, determine the probability that each pixel in the target image is the target category, and obtain at least three probability maps; the second determining unit is configured to be based on the at least three probability maps, Determine the class of each pixel in the above target image.
  • the above-mentioned at least three target categories include: mouth pixels, internal pixels of the mouth, face area pixels, and non-face area pixels.
  • the above-mentioned first determining unit is further configured to: input the above-mentioned target image into a pre-trained image recognition network, and obtain that each pixel in the above-mentioned target image is of the above-mentioned target category probability, and get at least three probability maps.
  • the second determining unit is further configured to: for each pixel in the target image, determine at least three probability values of the pixel in the at least three probability maps; In descending order, a first number of probability values are determined from the at least three probability values; the target category corresponding to the first number of probability values is determined as the category of the pixel point.
  • the above-mentioned apparatus further includes: a processing unit configured to determine, based on the category of each pixel in the above-mentioned target image, an image area in which the mouth is displayed in the above-mentioned target image; area for image processing.
  • an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, when the one or more programs are stored by one or more The processors execute such that one or more processors implement a method as in any of the above.
  • a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements any of the methods described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)

Abstract

本公开的实施例公开了图像识别方法、装置、电子设备和计算机可读介质。该方法的一具体实施方式包括:获取显示有嘴部的目标图像;对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图;基于上述至少三个概率图,确定上述目标图像中每个像素点的类别。该实施方式通过对显示有嘴部的目标图像进行至少三个目标类别的分类,使像素点有了更精确的类别,进而使对图像中目标区域的边缘的识别更加准确。

Description

图像识别方法、装置、电子设备和计算机可读介质
相关申请的交叉引用
本申请基于申请号为202010946640.7、申请日为2020年09月10日,名称为“图像识别方法、装置、电子设备和计算机可读介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开的实施例涉及计算机技术领域,具体涉及图像识别方法、装置、电子设备和计算机可读介质。
背景技术
随着人工智能技术的发展,可以通过图像识别技术来识别目标图像中的嘴部,从而对上述目标图像进行处理。例如,对上述目标图像中的嘴部区域进行颜色变换。
现有的图像识别技术不能准确地识别上述目标图像中显示的嘴部的边缘。进而会导致后续对图像中显示的嘴部区域进行处理时效果不佳。
发明内容
本公开的内容部分用于以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。本公开的内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
本公开的一些实施例提出了图像识别方法、装置、电子设备和计算机可读介质,来解决以上背景技术部分提到的技术问题。
第一方面,本公开的一些实施例提供了一种图像识别方法,该方法包括:获取显示有嘴部的目标图像;对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图;基于上述至少三个概率图,确定上述目标图像中每 个像素点的类别。
第二方面,本公开的一些实施例提供了一种图像识别装置,装置包括:获取单元,被配置成获取显示有嘴部的目标图像;第一确定单元,被配置成对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图;第二确定单元,被配置成基于上述至少三个概率图,确定上述目标图像中每个像素点的类别。
第三方面,本公开的一些实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。
第四方面,本公开的一些实施例提供了一种计算机可读介质,其上存储有计算机程序,其中,程序被处理器执行时实现如第一方面中任一实现方式描述的方法。
本公开的上述各个实施例中的一个实施例具有如下有益效果:通过使用本公开的一些实施例的图像识别方法,能够更准确地识别上述目标图像中显示的嘴部的边缘。具体来说,发明人发现,造成相关的图像识别技术对上述目标图像中显示的嘴部的边缘的识别不够准确的原因在于:相关的图像识别技术仅对目标图像进行二分类(例如分为嘴巴区域像素点和非嘴巴区域像素点)。而嘴部的边缘由于处于嘴巴区域和非嘴巴区域的交界处,属于嘴巴区域的概率较低,上述二分类图像识别技术很容易对其识别错误。基于此,本公开的一些实施例的图像识别方法对显示有嘴部的目标图像进行至少三个目标类别的分类,使像素点有了更精确的类别。例如,对一示例图像,在二分类中属于非嘴部像素点的像素点将会被更精确地分类为人脸区域像素点和非人脸区域像素点。在此基础上,当某像素点属于目标区域像素点的概率较低时,仍有可能被确定为目标区域的像素点。例如,对一示例图像,在二分类中分类结果表示某像素点属于嘴部像素点的概率为0.4,属于非嘴部像素点的概率为0.6,则该像素点将被确定为属于非嘴部像素点。在与之对应的三分类中,分类结果表示该像素点属于嘴部像素点的概率为0.4,属于人脸区域像素点的概率为0.3,属于非人脸区域像素 点的概率为0.3,则该像素点将被确定为属于嘴部像素点。可见,对目标图像进行至少三个目标类别的分类,能够对图像中目标区域的边缘进行更加准确地识别。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。
图1是本公开的一些实施例的图像识别方法的一个应用场景的示意图;
图2是根据本公开的图像识别方法的一些实施例的流程图;
图3是根据本公开的图像识别方法的另一些实施例的流程图;
图4是根据本公开的图像识别装置的一些实施例的结构示意图;
图5是适于用来实现本公开的一些实施例的电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例。相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应 该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
下面将参考附图并结合实施例来详细说明本公开。
图1示出了可以应用本公开的一些实施例的图像识别方法的一个应用场景的示意图。
在图1所示的应用场景中,首先,计算设备101可以获取显示有嘴部的目标图像102。在本应用场景中,目标图像102包括16个像素点。具体的,每行包括四个像素点,共四行。然后,计算设备101可以对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。在本应用场景中,为三个目标类别,包括:人脸像素点、嘴部像素点、背景像素点。分别对应着概率图103、概率图104和概率图105。最后,计算设备101可以基于上述三个概率图,确定上述目标图像中每个像素点的类别,如附图标记106所示。其中,标记为1的像素点为人脸像素点,标记为2的像素点为嘴部像素点,标记为3的像素点为背景像素点。
需要说明的是,上述计算设备101可以是硬件,也可以是软件。当计算设备为硬件时,可以实现成多个服务器或电子设备组成的分布式集群,也可以实现成单个服务器或单个电子设备。当计算设备体现为软件时,可以实现成例如用来提供分布式服务的多个软件或软件模块,也可以实现成单个软件或软件模块。在此不做具体限定。
应该理解,图1中的计算设备101的数目仅仅是示意性的。根据实现需要,可以具有任意数目的计算设备101。
继续参考图2,示出了根据本公开的图像识别方法的一些实施例的流程200。该图像识别方法,包括以下步骤:
步骤201,获取显示有嘴部的目标图像。
在一些实施例中,图像识别方法的执行主体(例如图1所示的计算设备)可以通过有线连接方式或者无线连接方式获取显示有嘴部的目标图像。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、 WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。
在一些实施例中,上述目标图像可以是任意显示有嘴部的图像。例如,用户当前拍摄的显示有嘴部的图像、用户在本地历史图像中选择的显示有嘴部的图像。
步骤202,对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。
在一些实施例中,上述执行主体可以通过使用现有的图像识别软件或者线上图像识别工具,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。具体的,对每个目标类别,上述执行主体可以将上述目标图像中的每个像素点的像素值替换为该像素点为该目标类别的概率,得到该类别对应的概率图。
在一些实施例的一些可选的实现方式中,上述执行主体还可以将上述目标图像输入到预先训练好的图像识别网络中,得到上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。
在一些实施例中,上述至少三个目标类别可以包括:人脸区域像素点、非人脸区域像素点、嘴部像素点。
在一些实施例的一些可选的实现方式中,上述至少三个目标类别还可以包括:嘴部像素点、嘴巴内部像素点、人脸区域像素点、非人脸区域像素点。采用本实现方式的这些实施例通过识别人脸区域像素点和非人脸区域像素点,能够识别出在显示有人脸的区域中存在的非人脸区域,即被遮挡区域,从而在上述目标图像中存在被遮挡区域时也能对上述目标图像中显示的嘴部进行准确的识别。另外,通过识别嘴巴内部区域,可以将嘴部区域和嘴巴内部区域区分开来,从而为后续单独对其中一项进行图像处理提供了便利。
步骤203,基于上述至少三个概率图,确定上述目标图像中每个像素点的类别。
在一些实施例中,上述执行主体可以对于上述目标图像中的每个像素点,将与上述像素点对应的至少三个概率值中的最大者对应的目标类别确 定为上述像素点的类别。
在一些实施例的一些可选的实现方式中,上述执行主体还可以通过以下步骤确定上述目标图像中每个像素点的类别:
步骤一,对于上述目标图像中的每个像素点,在上述至少三个概率图中确定上述像素点的至少三个概率值。
步骤二,按照从大到小的顺序,从上述至少三个概率值中确定第一数目个概率值。
步骤三,将上述第一数目个概率值对应的目标类别确定为上述像素点的类别。
本公开的一些实施例提供的方法通过对显示有嘴部的目标图像进行至少三个目标类别的分类,使像素点有了更精确的类别。进而使对图像中目标区域的边缘的识别更加准确。
进一步参考图3,其示出了图像识别方法的另一些实施例的流程300。该图像识别方法的流程300,包括以下步骤:
步骤301,获取显示有嘴部的目标图像。
在一些实施例中,步骤301的具体实现及其所带来的技术效果,可以参考图2对应的实施例中的步骤201,在此不再赘述。
步骤302,对于预先设定的至少三个目标类别中的每个目标类别,将上述目标图像输入到预先训练好的图像识别网络中,得到上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。
步骤303,对于上述目标图像中的每个像素点,在上述至少三个概率图中确定上述像素点的至少三个概率值。
步骤304,按照从大到小的顺序,从上述至少三个概率值中确定第一数目个概率值。
在一些实施例中,根据实际需要,上述第一数目可以是任意数值。例如,第一数目个可以是一个。
步骤305,将上述第一数目个概率值对应的目标类别确定为上述像素点的类别。
步骤306,基于上述目标图像中每个像素点的类别,确定上述目标图 像中显示有嘴部的图像区域。
在一些实施例中,上述执行主体可以将类别为嘴部像素点的像素点构成的区域确定为上述图像区域。
在一些实施例中,上述执行主体还可以将类别为嘴部像素点或嘴巴内部像素点的像素点构成的区域确定为上述图像区域。
步骤307,对上述图像区域进行图像处理。
在一些实施例中,上述执行主体对上述图像区域进行处理可以包括:对上述图像区域进行颜色变换、对上述图像区域进行裁剪等。
从图3中可以看出,与图2对应的一些实施例的描述相比,图3对应的一些实施例中的图像识别方法的流程300体现了通过将目标图像输入到图像识别网络中,得到概率图和对目标图像进行处理的步骤。由此,这些实施例描述的方案可以更加准确地确定目标图像的类别。以及,通过对目标图像进行处理,使目标图片更丰富,提高了观看上述目标图像的用户的体验。
进一步参考图4,作为对上述各图所示方法的实现,本公开提供了一种图像识别装置的一些实施例,这些装置实施例与图2所示的那些方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图4所示,一些实施例的图像识别装置400包括:获取单元401、第一确定单元402、第二确定单元403。其中,获取单元401,被配置成获取显示有嘴部的目标图像;第一确定单元402,被配置成对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图;第二确定单元403,被配置成基于上述至少三个概率图,确定上述目标图像中每个像素点的类别。
在一些实施例的可选实现方式中,上述至少三个目标类别,包括:嘴部像素点、嘴巴内部像素点、人脸区域像素点、非人脸区域像素点。
在一些实施例的可选实现方式中,第一确定单元402进一步被配置成:将上述目标图像输入到预先训练好的图像识别网络中,得到上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。
在一些实施例的可选实现方式中,第二确定单元403进一步被配置成: 对于上述目标图像中的每个像素点,在上述至少三个概率图中确定上述像素点的至少三个概率值;按照从大到小的顺序,从上述至少三个概率值中确定第一数目个概率值;将上述第一数目个概率值对应的目标类别确定为上述像素点的类别。
在一些实施例的可选实现方式中,装置400还包括:处理单元,被配置成基于上述目标图像中每个像素点的类别,确定上述目标图像中显示有嘴部的图像区域;对上述图像区域进行图像处理。
可以理解的是,该装置400中记载的诸单元与参考图2描述的方法中的各个步骤相对应。由此,上文针对方法描述的操作、特征以及产生的有益效果同样适用于装置400及其中包含的单元,在此不再赘述。
下面参考图5,其示出了适于用来实现本公开的一些实施例的电子设备(例如图1中的服务器或终端设备)500的结构示意图。本公开的一些实施例中的电子设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。
如图5所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具 备所有示出的装置。可以替代地实施或具备更多或更少的装置。图5中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。
特别地,根据本公开的一些实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的一些实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的一些实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开的一些实施例的方法中限定的上述功能。
需要说明的是,本公开的一些实施例所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的一些实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的一些实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网 络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取显示有嘴部的目标图像;对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图;基于上述至少三个概率图,确定上述目标图像中每个像素点的类别。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的一些实施例的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以 及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开的一些实施例中的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括获取单元、第一确定单元、第二确定单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“获取目标图像的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
根据本公开的一个或多个实施例,提供了一种图像识别方法,包括:获取显示有嘴部的目标图像;对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图;基于上述至少三个概率图,确定上述目标图像中每个像素点的类别。
根据本公开的一个或多个实施例,上述至少三个目标类别,包括:嘴部像素点、嘴巴内部像素点、人脸区域像素点、非人脸区域像素点。
根据本公开的一个或多个实施例,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图,包括:将上述目标图像输入到预先训练好的图像识别网络中,得到上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。
根据本公开的一个或多个实施例,上述基于上述至少三个概率图,确定上述目标图像中每个像素点的类别,包括:对于上述目标图像中的每个像素点,在上述至少三个概率图中确定上述像素点的至少三个概率值;按照从大到小的顺序,从上述至少三个概率值中确定第一数目个概率值;将上述第一数目个概率值对应的目标类别确定为上述像素点的类别。
根据本公开的一个或多个实施例,方法还包括:基于上述目标图像中每个像素点的类别,确定上述目标图像中显示有嘴部的图像区域;对上述 图像区域进行图像处理。
根据本公开的一个或多个实施例,提供了一种图像识别装置,包括:获取单元,被配置成获取显示有嘴部的目标图像;第一确定单元,被配置成对于预先设定的至少三个目标类别中的每个目标类别,确定上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图;第二确定单元,被配置成基于上述至少三个概率图,确定上述目标图像中每个像素点的类别。
根据本公开的一个或多个实施例,上述至少三个目标类别,包括:嘴部像素点、嘴巴内部像素点、人脸区域像素点、非人脸区域像素点。
根据本公开的一个或多个实施例,上述第一确定单元进一步被配置成:将上述目标图像输入到预先训练好的图像识别网络中,得到上述目标图像中每个像素点为上述目标类别的概率,得到至少三个概率图。
根据本公开的一个或多个实施例,第二确定单元进一步被配置成:对于上述目标图像中的每个像素点,在上述至少三个概率图中确定上述像素点的至少三个概率值;按照从大到小的顺序,从上述至少三个概率值中确定第一数目个概率值;将上述第一数目个概率值对应的目标类别确定为上述像素点的类别。
根据本公开的一个或多个实施例,上述装置还包括:处理单元,被配置成基于上述目标图像中每个像素点的类别,确定上述目标图像中显示有嘴部的图像区域;对上述图像区域进行图像处理。
根据本公开的一个或多个实施例,提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如上述任一的方法。
根据本公开的一个或多个实施例,提供了一种计算机可读介质,其上存储有计算机程序,其中,程序被处理器执行时实现如上述任一的方法。
以上描述仅为本公开的一些较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形 成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (10)

  1. 一种图像识别方法,包括:
    获取显示有嘴部的目标图像;
    对于预先设定的至少三个目标类别中的每个目标类别,确定所述目标图像中每个像素点为所述目标类别的概率,得到至少三个概率图;
    基于所述至少三个概率图,确定所述目标图像中每个像素点的类别。
  2. 根据权利要求1所述的方法,其中,所述至少三个目标类别,包括:
    嘴部像素点、嘴巴内部像素点、人脸区域像素点、非人脸区域像素点。
  3. 根据权利要求1所述的方法,其中,所述确定所述目标图像中每个像素点为所述目标类别的概率,得到至少三个概率图,包括:
    将所述目标图像输入到预先训练好的图像识别网络中,得到所述目标图像中每个像素点为所述目标类别的概率,得到至少三个概率图。
  4. 根据权利要求1-3任一项所述的方法,其中,所述基于所述至少三个概率图,确定所述目标图像中每个像素点的类别,包括:
    对于所述目标图像中的每个像素点,在所述至少三个概率图中确定所述像素点的至少三个概率值;
    按照从大到小的顺序,从所述至少三个概率值中确定第一数目个概率值;
    将所述第一数目个概率值对应的目标类别确定为所述像素点的类别。
  5. 根据权利要求1-3任一项所述的方法,其中,所述方法还包括:
    基于所述目标图像中每个像素点的类别,确定所述目标图像中显示有嘴部的图像区域;
    对所述图像区域进行图像处理。
  6. 一种图像识别装置,包括:
    获取单元,被配置成获取显示有嘴部的目标图像;
    第一确定单元,被配置成对于预先设定的至少三个目标类别中的每个目标类别,确定所述目标图像中每个像素点为所述目标类别的概率,得到至少三个概率图;
    第二确定单元,被配置成基于所述至少三个概率图,确定所述目标图像中每个像素点的类别。
  7. 根据权利要求6所述的装置,其中,所述至少三个目标类别包括:
    嘴部像素点、嘴巴内部像素点、人脸区域像素点、非人脸区域像素点。
  8. 根据权利要求6所述的装置,其中,所述第一确定单元进一步被配置成:
    将所述目标图像输入到预先训练好的图像识别网络中,得到所述目标图像中每个像素点为所述目标类别的概率,得到至少三个概率图。
  9. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的方法。
  10. 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-5中任一所述的方法。
PCT/CN2021/116717 2020-09-10 2021-09-06 图像识别方法、装置、电子设备和计算机可读介质 WO2022052889A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/019,050 US20230281983A1 (en) 2020-09-10 2021-09-06 Image recognition method and apparatus, electronic device, and computer-readable medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010946640.7A CN112070034A (zh) 2020-09-10 2020-09-10 图像识别方法、装置、电子设备和计算机可读介质
CN202010946640.7 2020-09-10

Publications (1)

Publication Number Publication Date
WO2022052889A1 true WO2022052889A1 (zh) 2022-03-17

Family

ID=73663623

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116717 WO2022052889A1 (zh) 2020-09-10 2021-09-06 图像识别方法、装置、电子设备和计算机可读介质

Country Status (3)

Country Link
US (1) US20230281983A1 (zh)
CN (1) CN112070034A (zh)
WO (1) WO2022052889A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070034A (zh) * 2020-09-10 2020-12-11 北京字节跳动网络技术有限公司 图像识别方法、装置、电子设备和计算机可读介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914699A (zh) * 2014-04-17 2014-07-09 厦门美图网科技有限公司 一种基于色彩空间的自动唇彩的图像增强的方法
US20150234942A1 (en) * 2014-02-14 2015-08-20 Possibility Place, Llc Method of making a mask with customized facial features
CN109344752A (zh) * 2018-09-20 2019-02-15 北京字节跳动网络技术有限公司 用于处理嘴部图像的方法和装置
CN112070034A (zh) * 2020-09-10 2020-12-11 北京字节跳动网络技术有限公司 图像识别方法、装置、电子设备和计算机可读介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991423B (zh) * 2016-01-21 2019-06-07 腾讯科技(深圳)有限公司 识别规格图片中是否包含水印的方法及装置
CN108446659A (zh) * 2018-03-28 2018-08-24 百度在线网络技术(北京)有限公司 用于检测人脸图像的方法和装置
CN109598304B (zh) * 2018-12-04 2019-11-08 北京字节跳动网络技术有限公司 分类模型校准方法、装置、设备及可读介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150234942A1 (en) * 2014-02-14 2015-08-20 Possibility Place, Llc Method of making a mask with customized facial features
CN103914699A (zh) * 2014-04-17 2014-07-09 厦门美图网科技有限公司 一种基于色彩空间的自动唇彩的图像增强的方法
CN109344752A (zh) * 2018-09-20 2019-02-15 北京字节跳动网络技术有限公司 用于处理嘴部图像的方法和装置
CN112070034A (zh) * 2020-09-10 2020-12-11 北京字节跳动网络技术有限公司 图像识别方法、装置、电子设备和计算机可读介质

Also Published As

Publication number Publication date
CN112070034A (zh) 2020-12-11
US20230281983A1 (en) 2023-09-07

Similar Documents

Publication Publication Date Title
CN111476309B (zh) 图像处理方法、模型训练方法、装置、设备及可读介质
CN112184738B (zh) 一种图像分割方法、装置、设备及存储介质
CN111784712B (zh) 图像处理方法、装置、设备和计算机可读介质
WO2023143178A1 (zh) 对象分割方法、装置、设备及存储介质
WO2022105622A1 (zh) 图像分割方法、装置、可读介质及电子设备
CN110211195B (zh) 生成图像集合的方法、装置、电子设备和计算机可读存储介质
WO2022171036A1 (zh) 视频目标追踪方法、视频目标追踪装置、存储介质及电子设备
WO2022233223A1 (zh) 图像拼接方法、装置、设备及介质
WO2023179310A1 (zh) 图像修复方法、装置、设备、介质及产品
WO2023185516A1 (zh) 图像识别模型的训练方法、识别方法、装置、介质和设备
WO2022052889A1 (zh) 图像识别方法、装置、电子设备和计算机可读介质
WO2022012178A1 (zh) 用于生成目标函数的方法、装置、电子设备和计算机可读介质
CN110866524A (zh) 车牌检测方法、装置、设备及存储介质
CN112257598B (zh) 图像中四边形的识别方法、装置、可读介质和电子设备
CN111311609B (zh) 一种图像分割方法、装置、电子设备及存储介质
WO2023130925A1 (zh) 字体识别方法、装置、可读介质及电子设备
WO2023065895A1 (zh) 文本识别方法、装置、可读介质及电子设备
CN110852242A (zh) 基于多尺度网络的水印识别方法、装置、设备及存储介质
CN111784709B (zh) 图像处理方法、装置、电子设备和计算机可读介质
CN110334763B (zh) 模型数据文件生成、图像识别方法、装置、设备及介质
CN116560552A (zh) 一种信息处理方法、装置、电子设备及介质
CN110348374B (zh) 车辆检测方法、装置、电子设备及存储介质
CN112488204A (zh) 训练样本生成方法、图像分割方法、装置、设备和介质
CN112418233A (zh) 图像处理方法、装置、可读介质及电子设备
CN111797932B (zh) 图像分类方法、装置、设备和计算机可读介质

Legal Events

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

Ref document number: 21865943

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

Country of ref document: EP

Kind code of ref document: A1