WO2021098572A1 - Image processing method, apparatus and device, and computer-readable storage medium - Google Patents

Image processing method, apparatus and device, and computer-readable storage medium Download PDF

Info

Publication number
WO2021098572A1
WO2021098572A1 PCT/CN2020/128189 CN2020128189W WO2021098572A1 WO 2021098572 A1 WO2021098572 A1 WO 2021098572A1 CN 2020128189 W CN2020128189 W CN 2020128189W WO 2021098572 A1 WO2021098572 A1 WO 2021098572A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
object area
target
preset
image
Prior art date
Application number
PCT/CN2020/128189
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广东移动通信有限公司
Priority to CN202080080807.4A priority Critical patent/CN114730360A/en
Publication of WO2021098572A1 publication Critical patent/WO2021098572A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • This application relates to image processing technology in the field of artificial intelligence, and in particular to an image processing method, device, device, and computer-readable storage medium.
  • Face detection has always been one of the important topics in computer vision research, and it plays an important role in daily applications such as face unlocking and video surveillance.
  • the face image contained in the image can be detected by the face detection technology, and then face verification and face unlocking are performed based on the detected face image.
  • the images actually captured by the image acquisition device may randomly contain images of background faces that do not belong to the target person, the current face detection methods will detect both the target face and the background face as the face detection results. , And performing face unlock on the face detection result that contains the background face will cause the face unlock failure, thereby reducing the accuracy of target detection and image processing.
  • the embodiments of the present application provide an image processing method, device, and computer-readable storage medium, which can improve the accuracy of target detection and image processing.
  • An embodiment of the application provides an image processing method, including:
  • the at least one detection object is screened, and the target detection object is determined from the at least one detection object; the object area information of the target detection object meets the preset standard required by image processing Area information
  • Image processing is performed on the target detection object.
  • An embodiment of the application provides an image processing device, including:
  • the target detection module is configured to perform target detection according to the to-be-processed image of the preset object category to obtain at least one object area of at least one detection object of the preset object category;
  • a screening module configured to screen the at least one detection object according to the at least one object area, and determine a target detection object from the at least one detection object;
  • the determining module is used to perform image processing on the target detection object.
  • An embodiment of the application provides an image processing device, including:
  • Memory used to store executable instructions
  • the processor is configured to implement the image processing method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
  • the embodiment of the present application provides a computer-readable storage medium that stores executable instructions for causing a processor to execute to implement the image processing method provided by the embodiment of the present application.
  • At least one object area information corresponding to the at least one detection object can be used to exclude detection objects that do not meet the preset standard area information from the at least one detection object, so that the final target detection object is determined It can be matched with the requirements of image processing, thereby improving the accuracy of target detection, and further improving the accuracy of image processing based on target detection.
  • FIG. 1 is an optional structural schematic diagram of the image processing system architecture provided by an embodiment of the present application
  • Fig. 2 is a schematic diagram of a face unlocking process provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of an optional structure of an image processing apparatus provided by an embodiment of the present application.
  • Fig. 4 is an optional flowchart of the image processing method provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of a face detection result provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an optional flow chart of the target detection process provided by an embodiment of the present application.
  • Fig. 7 is an optional flowchart of the image processing method provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an object area detected from an image to be processed according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a process of filtering out one of the two bounding boxes according to an embodiment of the present application.
  • FIG. 10 is an optional flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 11 is an optional flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 12 is an optional flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 13 is an optional flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 14 is an optional flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of a flow of unlocking a face according to face input provided by an embodiment of the present application.
  • FIG. 16 is an optional flowchart of an image processing method provided by an embodiment of the present application.
  • first ⁇ second ⁇ third is only used to distinguish similar objects, and does not represent a specific order of objects. Understandably, “first ⁇ second ⁇ third” Where permitted, the specific order or sequence can be interchanged, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein.
  • Target detection Image classification, target detection, and image segmentation are three major tasks in the field of computer vision. Among them, the image classification task is concerned with the whole, while the target detection is concerned with the specific object target, and it is required to obtain the category information and position information of this target at the same time.
  • Target detection is to isolate the target object of interest from the background as the target object through the recognition and analysis of the foreground and background of the picture, and output the confidence, position and size information of the target object as the boundary information of the target object; among them, the position The sum size is usually expressed by the coordinates of the rectangular bounding box.
  • SSD is a target detector based on a neural network model, which can be applied to multiple target object categories.
  • a key feature of the SSD model is to use multi-scale convolutional bounding boxes connected to multiple feature maps for output at the high level of the network. This network expression method can effectively simulate different bounding box aspect ratios.
  • YOLO You Only Look Once (YOLO): Object recognition and localization algorithm based on deep neural network, only one convolutional neural network operation can locate the target object and the location of the target object in the image. YOLO is characterized by its fast running speed and can be used in real-time systems.
  • Face image detection is also referred to as face detection (Face Detection), which refers to the process of judging whether there is a face image in the input image and determining the specific location of all face image regions.
  • face image detection usually uses target detection based on convolutional networks, which is mainly composed of two major components: a front-end feature extractor and a back-end detector.
  • the front-end feature extractor is used to extract image features from the image to be processed
  • the back-end detector is used to predict the image corresponding to the detection target from the image to be processed based on the image features extracted by the front-end
  • a bounding box is generated around the area where the image is located to calibrate the detection target.
  • the embodiments of the present application provide an image processing method, device, equipment, and computer-readable storage medium, which can improve the accuracy of target recognition.
  • the following describes exemplary applications of the image processing equipment provided in the embodiments of the present application.
  • the embodiments of the present application provide
  • the devices can be implemented as notebook computers with image capture devices, tablet computers, desktop computers, set-top boxes, mobile devices (for example, mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable game devices), etc. Type of user terminal.
  • an exemplary application when the device is implemented as a terminal will be explained.
  • FIG. 1 is a schematic diagram of an optional architecture of an image processing system 100 provided by an embodiment of the present application.
  • a terminal 400 is connected to a server 200 through a network 300.
  • the network 300 may be a wide area network or a local area network. Or a combination of the two.
  • the terminal 400 is used to collect the face image of the target person through the image acquisition device, and perform image decoding, face detection, and face verification processing on the face image according to the process shown in FIG. 2, and then according to the verification of the face verification As a result, it is determined whether to unlock the face.
  • face detection and face verification process shown in FIG. 1 In the face detection and face verification process shown in FIG.
  • the terminal 400 is used to set the face category as the preset object category, the decoded image as the image to be processed, and perform target detection on the image to be processed according to the preset object category , Obtain at least one object area information corresponding to at least one detection object; filter at least one detection object according to the at least one object area information, and determine the target detection object from the at least one detection object; the object area information of the target detection object conforms to image processing The required standard area information; image processing is performed on the target detection object; and the image processing result is displayed on the graphical interface 401.
  • the server 200 is used to obtain pre-stored standard face images from the database 500, and provide the standard face images to the terminal through the network 300 when the terminal 400 performs face verification, so that the terminal can complete face verification and face unlocking and other images deal with.
  • the terminal 400 may first prompt on the graphical interface 401 that the face is to be unlocked, and the terminal 400 obtains the image to be processed through the image acquisition device, and The image to be processed may be subject to face category target detection, at least one face image is detected as at least one detection object from the image to be processed, and at least one object region information corresponding to the at least one face image is obtained; wherein, at least one object
  • Each object area information in the area information may be the confidence level predicted by the target detection network for the face image, as well as the size and position of the rectangular area occupied by the face image; the terminal 400 may determine at least one object area information according to at least one object area.
  • One face image is screened, the background face image is excluded from at least one face image, and the target face image is determined; the terminal 400 obtains the pre-stored standard face image from the database 500 through the server 200, and according to the standard face image Perform face verification on the target face image, and if the verification passes, it is determined that the face unlock is successful; if the verification fails, it is determined that the face unlock has failed, and a failure message is displayed on the graphical interface 401 of the terminal 400.
  • the server 200 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or it may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, Cloud servers for basic cloud computing services such as network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
  • the terminal 400 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this.
  • the terminal and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a terminal 400 provided by an embodiment of the present application.
  • the terminal 400 shown in FIG. 3 includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430.
  • the various components in the terminal 400 are coupled together through the bus system 440.
  • the bus system 440 is used to implement connection and communication between these components.
  • the bus system 440 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the bus system 440 in FIG. 3.
  • the processor 410 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware Components, etc., where the general-purpose processor may be a microprocessor or any conventional processor.
  • DSP Digital Signal Processor
  • the user interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and/or one or more visual display screens.
  • the user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, and other input buttons and controls.
  • the memory 450 may be removable, non-removable, or a combination thereof.
  • Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and so on.
  • the memory 450 optionally includes one or more storage devices that are physically remote from the processor 410.
  • the memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory.
  • the non-volatile memory may be a read only memory (ROM, Read Only Memory), and the volatile memory may be a random access memory (RAM, Random Access Memory).
  • ROM read only memory
  • RAM random access memory
  • the memory 450 described in the embodiment of the present application is intended to include any suitable type of memory.
  • the memory 450 can store data to support various operations. Examples of these data include programs, modules, and data structures, or a subset or superset thereof, as illustrated below.
  • Operating system 451 including system programs used to process various basic system services and perform hardware-related tasks, such as framework layer, core library layer, driver layer, etc., used to implement various basic services and process hardware-based tasks;
  • the network communication module 452 is used to reach other computing devices via one or more (wired or wireless) network interfaces 420.
  • Exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus ( USB, Universal Serial Bus), etc.;
  • the presentation module 453 is used to enable the presentation of information via one or more output devices 431 (for example, a display screen, a speaker, etc.) associated with the user interface 430 (for example, a user interface for operating peripheral devices and displaying content and information) );
  • output devices 431 for example, a display screen, a speaker, etc.
  • user interface 430 for example, a user interface for operating peripheral devices and displaying content and information
  • the input processing module 454 is configured to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
  • the image processing device provided by the embodiments of the present application can be implemented in software.
  • FIG. 3 shows the image processing device 455 stored in the memory 450, which can be software in the form of programs and plug-ins, including the following Software modules: target detection module 4551, screening module 4552, and image processing module 4553. These modules are logical, so they can be combined or further split arbitrarily according to the realized functions.
  • the image processing apparatus provided in the embodiments of the present application may be implemented in hardware.
  • the image processing apparatus provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed To execute the image processing method provided by the embodiments of the present application, for example, a processor in the form of a hardware decoding processor may adopt one or more application specific integrated circuits (ASIC, Application Specific Integrated Circuit), DSP, and programmable logic device (PLD). , Programmable Logic Device, Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), Field-Programmable Gate Array (FPGA, Field-Programmable Gate Array) or other electronic components.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processing System for Microwave Access Memory
  • PLD programmable logic device
  • Programmable Logic Device Complex Programmable Logic Device
  • CPLD Complex Programmable Logic Device
  • FPGA Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • FIG. 4 is an optional flowchart of the image processing method provided by an embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 4.
  • S101 Perform target detection on an image to be processed according to a preset object category, and obtain at least one object area information corresponding to at least one detected object.
  • the image processing device may perform target detection on the image to be processed according to the preset object category by using the target detection method, detect at least one detection object belonging to the preset object category from the image to be processed, and obtain at least one correspondingly. At least one object area information corresponding to the detected object.
  • the preset object category is a preset specific object target.
  • the preset object category may be a human face.
  • the preset object category may be a road marking or an obstacle, etc., and the specific selection is made according to the actual situation.
  • the implementation of this application The examples are not limited.
  • At least one piece of object area information is a detection result of the image processing apparatus performing target detection on the image to be processed according to a preset object category.
  • the image processing device can analyze the foreground and background of the image to be processed through the target detection method, predict from the background at least one detection object corresponding to the preset object category, and perform boundary calibration on the image area where each detection object is located, and Obtain the object area information of the detection object according to the position of the boundary in the image, the included range, and the confidence of the detection object in the boundary, so as to obtain at least one object area information.
  • the image processing apparatus may use the size and position of the boundary corresponding to each detection object and the confidence level corresponding to the detection object as at least one object area information.
  • the confidence level represents the probability that the detected object inferred by the image processing device through the target detection method belongs to the preset object category.
  • the object area information may be visually displayed as a two-dimensional bounding box in the graphical interface of the terminal.
  • Figure 5 shows two bounding boxes, bounding box 1 and bounding box 2, obtained by the image processing device for face detection on the image to be processed when the image to be processed contains two faces, wherein bounding box 1 is based on The object area information corresponding to the detection target face 1 is visualized, and the bounding box 2 is obtained by visualizing the object area information corresponding to the detection target face 2.
  • the bounding box 1 and the bounding box 2 respectively surround the face 1 and the face 2 to display.
  • the image processing device can implement target detection of the image to be processed through the SSD network model, or through the YOLO or YOLO2 model, and the specific selection is based on actual conditions, which is not limited in the embodiment of the present application.
  • the image processing device uses the YOLO model to perform target detection and obtains at least one object area information as shown in FIG. 6.
  • the image processing device can divide the picture into For multiple small squares, the feature map 1 corresponding to the picture is obtained, and the image processing device uses the YOLO model to perform target detection on the image content in each small square in the feature map 1 to generate at least one corresponding to each small square Prediction box, finally filter out incorrect prediction boxes from at least one prediction box, and finally determine the bounding box A corresponding to the detection target dog, the bounding box B corresponding to the detection target bicycle, and the bounding box C corresponding to the detection target car, and the image processing device
  • the respective information of the bounding box A, the bounding box B, and the bounding box C are used as at least one object area information.
  • S102 Filter at least one detection object according to the at least one object area information, and determine the target detection object from the at least one detection object; the object area information of the target detection object meets the preset standard area information required by image processing.
  • the image processing apparatus After the image processing apparatus obtains at least one object area information, it will exclude the object area that does not meet the prior knowledge from the at least one object area information based on the prior knowledge of the target detection object based on the at least one object area information Information to determine the target detection object for further image processing.
  • the image in the at least one object region information is at least one detection object of a preset object category predicted by the image processing device from the image to be processed, but not all the at least one detection object requires further image processing.
  • the front camera may capture the facial images of other people near the owner.
  • at least one detection object detected by the image processing device through the target detection method includes the owner's face Images, including facial images of non-hosts.
  • face unlocking only the face image of the owner is the object that needs to be identified and verified, and other face images identified will cause misjudgment and cause unlocking failure. Therefore, the image processing device needs to screen the identified at least one detection object according to the at least one object area information, and determine the target object area information that meets the image recognition target.
  • the image processing device may gradually exclude differences from the preset standard area information from at least one object area information based on the preset standard area information obtained according to the prior knowledge and based on multiple parameter types in the preset standard area information. The corresponding object area information until the finally retained object area information is used as the target object area information.
  • the image based on the face unlocking Prior knowledge set preset standard area information.
  • the usual image characteristics of the face unlock image are: the image to be processed contains an image of a target person, and the target person image has a higher confidence level, for example, the confidence level is higher than 0.4; the target person image Located at the center of the image to be processed; the target person image occupies a larger image area, for example, the target person image occupies 0.3 to 0.9 of the total area of the image to be processed.
  • the preset standard area information may be: the confidence of the detection object should be greater than 0.4, the distance from the area occupied by the detection object to the center of the image to be processed is less than the preset distance threshold; the area occupied by the detection object is at least Should be 0.3 to 0.9 of the total area of the image to be processed.
  • the preset standard area information and the at least one object area information are area information containing the same parameter type.
  • each object area information in the at least one object area information includes one of size, position, and confidence.
  • At least one item, S102 shown in FIG. 4 can be implemented through S1021 to S1022 as shown in FIG. 7, as follows:
  • At least one object area information exclude from the at least one object area object areas whose confidence, size, or position does not meet the preset standard area information, so as to determine the target object area; at least one object area is at least one object area information The range of the area represented.
  • At least one object area is an area range characterized by at least one object area information.
  • the at least one object area information may be in the form of a data list, each item in the list represents one object area information, and each object area information gives the confidence of the detected object in the form of an array; and the detected object The size of the occupied object area and the position of the center point of the object area.
  • the information of each object area can be expressed as (cx, cy, ⁇ , h, conf), where conf is the confidence level, ( cx, cy) is the position in the object area information, that is, the coordinates of the center point of the object area, and ( ⁇ , h) is the size in the object area information, that is, the width and height of the object area.
  • conf the confidence level
  • (cx, cy) is the position in the object area information, that is, the coordinates of the center point of the object area
  • ( ⁇ , h) is the size in the object area information, that is, the width and height of the object area.
  • the image processing device performs target detection on the image to be processed 70 to obtain an image in which the detection object is a dog, and the object region information corresponding to the detection object is (cx, cy, ⁇ , h, conf), the object area corresponding to the detection object is the object area 71.
  • the image processing apparatus may compare the confidence level of the at least one object area information with the confidence level of the preset standard area information, and exclude the information that is different from the preset standard area information. Object areas with large differences in confidence; the image processing device may also compare the size of at least one object area information with the size of the preset standard area information, and exclude object areas with a large difference from the size of the preset standard area information; The image processing device may also compare the position of the at least one object area information with the position of the preset standard area information, and exclude the object area that is significantly different from the position of the preset standard area information. The image processing device uses the object area finally remaining after the above-mentioned screening as the target object area.
  • At least one object area information can be directly compared with preset standard area information to determine whether the at least one object area information meets the preset standard information, or according to actual application needs, First, perform a reasonable mathematical transformation on at least one object area information, and then compare it with the preset standard area information. The specific selection is made according to actual conditions, which is not limited in the embodiment of the present application.
  • the image processing device regards the detection object in the target object area as the target detection object, and performs the next image processing on the target detection object.
  • the image processing device can filter the two bounding boxes according to their respective size, position, and confidence information, and exclude the non-compliance with the preset standard.
  • the bounding box 2 of the region information, the bounding box 1 is determined from the two bounding boxes as the target bounding box, and the face 1 in the target bounding box is used as the target detection object for the next face unlocking process, such as Shown in Figure 9.
  • the target detection object is the target face image
  • the image processing device can start the face verification process on the target face image, extract the image features from the target face image, and combine The image features of the target face image are compared with the pre-entered main face image, and it is determined whether it can be successfully unlocked according to the comparison result, thereby completing the face unlocking process.
  • the image processing apparatus when at least one detection object is obtained through target detection, can exclude at least one detection object from at least one detection object that does not conform to the preset by using at least one object region information corresponding to the at least one detection object
  • the detection object of the standard area information enables the final target detection object to match the requirements of image processing, thereby improving the accuracy of target detection, and further improving the accuracy of image processing based on target detection.
  • FIG. 10 is an optional flowchart of the method provided in the embodiment of the present application.
  • S1021 shown in FIG. 7 can be implemented through S201-S202, which will be described in combination with each step.
  • At least one object area exclude object areas whose confidence is less than a preset confidence threshold, so as to obtain N remaining object areas.
  • the preset standard area information includes a preset reliability threshold.
  • the confidence of the object area is less than the preset confidence threshold, it means that the detection object in the object area has a low probability of belonging to the preset object category, that is, the detection object may not be the target to be processed in the image processing process. Therefore, the image processing apparatus excludes the object areas whose confidence is less than the preset confidence threshold in at least one object area, so as to obtain N remaining bounding boxes.
  • the preset reliability threshold may be 0.4.
  • the preset number threshold is a non-zero positive integer .
  • the image processing device may continue to filter the N remaining object areas, and compare the object area information of the N remaining object areas with the preset standard area information from the dimensions of size or position. Contrast, exclude the object area whose size or position does not meet the expectations, until the target object area is finally determined.
  • the preset number threshold is a non-zero positive integer.
  • the preset number threshold may be 1.
  • N is greater than 1, it means that there are still multiple object regions in the image to be processed after confidence filtering, and the image processing device needs to filter again until the final result is determined.
  • Target area is a non-zero positive integer.
  • the size of each remaining object area may be the width and height of the remaining object area.
  • the image processing device may perform screening again according to the width and height of the N remaining bounding boxes, and further exclude bounding boxes that do not meet the preset standard area information in the size dimension.
  • the preset standard area information may include a standard aspect ratio
  • the image processing device may obtain the aspect ratio of each remaining object area according to the width and height of each remaining object area in the N remaining object areas , Which can then exclude the remaining object areas whose aspect ratio and standard aspect ratio difference exceeds the preset aspect ratio range, and retain the remaining objects whose aspect ratio and standard aspect ratio difference is within the preset difference range area.
  • the preset standard area information includes a preset area threshold
  • the image processing device may also obtain the area of each remaining object area according to the width and height of each remaining object area, and then may exclude the area less than the preset area from it. Set the remaining object area with an area threshold, and reserve the remaining object area with an area greater than the preset area threshold.
  • the specific screening method can be selected according to the actual situation, which is not limited in the embodiment of the present application.
  • the image processing device may first exclude the object areas whose confidence is lower than the preset confidence threshold from the at least one object area information based on the confidence of the at least one object area information, thereby reducing The object area with too low confidence interferes with the image processing process, and the accuracy of image processing is improved; in addition, the image processing device can further filter the N remaining object areas filtered based on the confidence level until the target is obtained. The bounding box thus further improves the accuracy of the obtained target object area, and further improves the accuracy of image processing based on the target object area.
  • FIG. 11 is an optional flowchart diagram of the method provided in an embodiment of the present application.
  • S202 shown in FIG. 10 can be implemented through S2021-S2023, which will be described in combination with each step.
  • the image processing device may calculate the area of the N remaining object regions based on the size of the N remaining object regions, for example, the width and height of the remaining object regions.
  • the image processing device may sort the N remaining object areas according to the areas of the N remaining object areas, so as to determine the first object area with the largest area and the second object area with the second largest area.
  • S2022 exclude an object area with an area smaller than the second object area from the N remaining object areas.
  • the image processing device may exclude the object area whose area is smaller than the second object area from the N remaining object areas, and only retain the first object area and the second object area, and then remove the object area from the first object area and the second object area. Determine the bounding box of the target.
  • S2023 Exclude object areas whose areas or positions do not meet preset standard area information from the first object area and the second object area, so as to determine the target object area.
  • FIG. 12 is an optional flowchart of the method provided by the embodiment of the present application.
  • S2023 shown in FIG. 11 can be implemented through S301-S303, which will be described in combination with each step.
  • the preset standard area information includes a preset area threshold.
  • the preset area threshold When the area in the second object area is less than the preset area threshold, it means that the area of the second object area is too small and the possibility of becoming the target object area is low.
  • the image processing device excludes the second object area and determines the first object area as Target area.
  • the preset area threshold may be determined according to the preset minimum area ratio of the image to be processed. Exemplarily, if the size of the image to be processed is 640*400, the preset minimum area ratio is 25%. Therefore, the image processing device may set the preset area threshold to 640*400*25%, that is, 640.
  • S302 When the area of the first object area and the area of the second object area are both greater than the preset area threshold, determine whether the area ratio of the second object area to the first object area is greater than the preset proportion threshold.
  • the preset standard area information includes a preset proportion threshold.
  • the image processing device may compare the areas of the first object area and the second object area with each other, based on the area ratio and the preset proportion threshold. Continue to filter until the target area is determined.
  • the image processing device can be based on the first object area. Re-screening is performed with the position of the second object area, and the object area whose position does not meet the preset standard area information is excluded from the first object area and the second object area, thereby determining the target object area.
  • the preset proportion threshold may be 0.36.
  • S304 may be executed, which will be described in combination with each step.
  • the image processing device can exclude the second object area and determine the first object area as the target object area.
  • S2024 may be executed as follows:
  • the image processing device can filter the N remaining object areas based on the area information corresponding to the size, and exclude the object areas that are too small, leaving only the first and second largest areas. There are two object areas, thereby reducing the interference of small object areas on the image processing process and improving the accuracy of image processing.
  • the image processing device may further filter the first large object area and the second large object area based on their positions, and finally determine the target object area, thereby further ensuring the accuracy of image processing.
  • FIG. 13 is an optional flowchart of the method provided in an embodiment of the present application.
  • S303 shown in FIG. 12 can be implemented through S3031-S3033, which will be described in combination with each step.
  • S3031 according to the location of the first object area and the location of the second object area, respectively calculate the first distance from the first object area to the image center of the image to be processed and the second distance from the second object area to the image center.
  • the position of the first object area is the coordinates of the center point of the first object area
  • the position of the second object area is the coordinates of the center point of the second object area
  • the image processing device calculates the coordinates of the center point of the first object area.
  • the first distance is obtained by calculating the distance from the coordinates to the center of the image to be processed
  • the image processing device calculates the distance between the coordinates of the center point of the second object area and the coordinates of the center point of the image to be processed to obtain the second distance.
  • the process of calculating the first distance and the second distance by the image processing apparatus may be implemented through S401-S404, which will be described in conjunction with each step.
  • S401 Determine the first abscissa of the first object area according to the location of the first object area; the location of the first object area is the coordinate of the center point of the first object area.
  • the location of the first object area is the center point coordinates of the first object area on the terminal screen, and the image processing device may determine the first abscissa corresponding to the first object area through the center point coordinates of the first object area .
  • S402 Determine the second abscissa corresponding to the second object area according to the location of the second object area.
  • the location of the second object area is the center point coordinates of the second object area on the terminal screen, and the image processing device may determine the second abscissa corresponding to the second object area through the center point coordinates of the second object area .
  • S403 Calculate the first lateral distance between the first abscissa and the abscissa of the image center point of the image to be processed, and use the ratio of the first lateral distance to the width of the first object area as the first distance.
  • S404 Calculate the second intermediate distance between the second abscissa and the vertical center line, and use the ratio of the second intermediate distance to the width of the second object area as the second distance.
  • the image processing device calculates the difference between the first abscissa and the abscissa of the image center point as the first lateral distance; in S404, the image processing device calculates the difference between the first abscissa and the abscissa of the image center point. The difference between, as the second lateral distance. Since the size of the first object area and the second object area may be different, in order to reduce the influence of the size of the object area on the distance calculation, the image processing device may normalize the first lateral distance and the second lateral distance, and The first lateral distance is divided by the width of the first object area as the first distance; the second lateral distance is divided by the width of the second object area as the second distance.
  • the abscissa of the center point of the first object area is x and the size of the image to be processed is 640*400
  • the abscissa of the image center point of the image to be processed is 320.
  • the image processing device may use the absolute value of x-320 as the first distance.
  • the preset standard area information includes a preset distance threshold.
  • the preset distance threshold When any one of the first distance and the second distance is greater than the preset distance threshold, it means that the object area corresponding to the distance is farther from the image center and is less likely to be the target object area, and the image processing device will be less than the preset distance
  • the object area corresponding to the threshold distance is regarded as the target object area.
  • the preset distance threshold can be flexibly set according to the width of the first object area and the second object area.
  • the preset distance threshold is set to be less than the width of the first object area. 1.5 times, for the second object area, the preset distance threshold is set to 1.5 times the width of the second object area. In this way, the first object area and the second object area of different widths can be compared according to the preset distance thresholds corresponding to the respective widths.
  • the image processing device may determine that the first distance is greater than Corresponding to the preset distance threshold, the first object area is far from the center of the image, so that the first object area is excluded from the first object area and the second object area.
  • the image processing device may further The one distance is compared with the second distance, and the smallest distance between the first distance and the second distance, that is, the object area closer to the center point of the image is taken as the object area.
  • S3034 may be included after S3031, as follows:
  • the image processing device when the first distance and the second distance are both greater than the preset distance threshold, it means that the first object area and the second object area are both far from the center of the image to be processed, and the image processing device ends the image processing flow and prompts No valid target was detected.
  • the image processing device can filter at least one object region information layer by layer through the three dimensions of confidence, size, and position, and finally retain high confidence, large area, and high reliability.
  • the object area closer to the center of the image to be processed is used as the target object area, thereby improving the accuracy of locating the target object area, and further improving the accuracy of image processing based on the target object area.
  • FIG. 14 is an optional flowchart of the method provided by an embodiment of the present application.
  • the preset object category is a face category
  • the target detection object is the target face, as shown in FIG. 4
  • the out S103 can be implemented through S1031-S1032, which will be described in combination with each step.
  • the image processing device can determine the target detection object from the at least one face through the above-mentioned S101-S102 process, that is, the target person face.
  • the image processing device can perform image matching such as face comparison according to the pre-entered standard face and the target face, so as to realize the face verification process of the recognition target, and obtain the verification result of the face verification according to the matching result.
  • the image processing device when the matching degree between the recognition target and the standard face image is higher than the preset matching degree threshold, for example, when the matching degree is higher than 80%, the image processing device obtains the verification result that the face is verified, otherwise The image processing device obtains the face based on the verification result to unlock the face, thereby completing the verification result that the image processing verification fails.
  • the image processing apparatus may determine whether the device can be unlocked based on the obtained verification result of the face verification, so as to complete the image processing.
  • the face unlocking process may be as shown in FIG. 15.
  • the terminal may perform image quality control on the captured image to be recorded that contains the owner's face, so as to avoid over-captured images.
  • the terminal may perform the above image quality control process in the collected images to be unlocked, and then use the method in the embodiment of this application to extract from the image to be unlocked during the face detection process through the image processing device Extract the target face and align the target face; and perform the line of sight/gaze detection process according to the key feature points of the target face obtained by the face alignment to ensure that the target person is currently looking at the screen;
  • the same vitality detection and feature extraction process is carried out through the key features of the target face detected by the gaze/gaze detection, and finally the corresponding target facial features of the target face are obtained.
  • the image processing device can perform face comparison based on the target facial features and standard facial features to determine whether the target face is the owner himself, if it is the owner, it can unlock according to the target face, if not the owner You can refuse to use the target face to unlock the face, indicating that the unlocking fails.
  • S001 Perform face detection on the collected 640*400 image to obtain at least one face bounding box.
  • the image to be processed is a 640*400 image
  • the at least one detection object is at least one predicted face detected from the 640*400 image
  • the at least one object area information is the confidence of the rectangular area occupied by the at least one predicted face
  • the at least one face bounding box is a rectangular bounding box corresponding to the at least one graphically predicted face obtained according to the at least one object area information.
  • S002 Eliminate face bounding boxes with a confidence level of less than 0.4, and obtain N remaining bounding boxes.
  • S002 0.4 is a preset reliability threshold, and the N remaining bounding boxes are N remaining object regions.
  • the process of S002 is consistent with the description of S201, and will not be repeated here.
  • the first bounding box is the first object area
  • the second bounding box is the second object area.
  • S004 Determine whether the area of the second bounding box is less than 640, if yes, execute S005, otherwise, execute S006.
  • 640 is a preset area threshold.
  • S005 Exclude the second bounding box, and use the first bounding box as the target bounding box.
  • the target bounding box is the target object area
  • the process of S005 is consistent with the description of S301, and will not be repeated here.
  • S006 Determine whether the area ratio of the second bounding box to the first bounding box is less than 0.36, if yes, execute S007; otherwise, execute S008.
  • 0.36 is the preset proportion threshold.
  • S007 Exclude the second bounding box, and use the first bounding box as the target bounding box.
  • x1 is the abscissa of the center point of the first bounding box
  • x2 is the abscissa of the center point of the second bounding box
  • L1 is the first distance
  • L2 is the second distance.
  • w1 is the or width of the first bounding box
  • w2 is the width of the second bounding box
  • 1.5*w1 is the preset distance threshold corresponding to the first bounding box
  • 1.5*w2 is the preset distance corresponding to the second bounding box Threshold.
  • the image processing device may successively filter at least one face bounding box through the three dimensions of confidence, size, and position, and finally retain the confidence.
  • the face bounding box that is tall, large in area, and closer to the center of the image to be processed is used as the target bounding box, thereby improving the accuracy of locating the target bounding box, thereby improving face recognition and face unlocking based on the target bounding box And so on the accuracy of image processing.
  • the software module stored in the image processing device 455 of the memory 450 may include :
  • the target detection module 4551 is configured to perform target detection on the image to be processed according to a preset object category to obtain at least one object area information corresponding to at least one detection object;
  • the screening module 4552 is configured to screen the at least one detection object according to the at least one object area information, and determine the target detection object from the at least one detection object; the object area information of the target detection object conforms to image processing The required preset standard area information;
  • the image processing module 4553 is used to perform image processing on the target detection object.
  • each object area information in the at least one object area information includes at least one of size, position, and confidence; the filtering module 4552 is further configured to determine from at least one of the at least one object area information Exclude object areas whose confidence, size, or position does not meet the preset standard area information in one object area, thereby determining the target object area; the at least one object area is an area range characterized by the at least one object area information; The detection object in the target object area is used as the target detection object.
  • the preset standard area information includes a preset confidence threshold
  • the screening module 4552 is further configured to exclude the confidence level from being less than the preset confidence level in the at least one object area Threshold object areas, thereby obtaining N remaining object areas; when N is greater than the preset number threshold, exclude object areas whose size or position does not meet the preset standard area information from the N remaining object areas, thereby determining Out of the target object area; the preset number threshold is a non-zero positive integer.
  • the screening module 4552 is further configured to calculate the area of each remaining object area in the N remaining object areas according to the size of the N remaining object areas, so as to determine the N remaining object areas.
  • the preset standard area information includes a preset area threshold and a preset proportion threshold.
  • the filtering module 4552 is further configured to: when the area of the second object area is less than the preset area threshold When the first object area is determined as the target object area; when the area of the first object area and the area of the second object area are both greater than the preset area threshold, the second object area is determined Whether the area ratio of the object area to the first object area is greater than a preset proportion threshold; when the area ratio is greater than the preset proportion threshold, the first object area and the second object area The object area whose position does not meet the preset standard area information is excluded from the data, so as to determine the target object area.
  • the screening module 4552 is further configured to determine whether the area ratio of the second object area to the first object area is greater than a preset proportion threshold, and when the area ratio is less than When the proportion threshold is preset, the first object area is determined as the target object area.
  • the preset standard area information includes a preset distance threshold
  • the filtering module 4552 is further configured to determine the location of the first object area and the location of the second object area respectively according to the location where the first object area is located and the location where the second object area is located.
  • the screening module 4552 further includes a calculation sub-module configured to determine the first abscissa corresponding to the first object area through the location of the first object area; The position where the first object area is located is the coordinate of the center point of the first object area; the second abscissa corresponding to the second object area is determined by the position of the second object area; and the first object area is calculated.
  • a first lateral distance from an abscissa to the abscissa of the image center point of the image to be processed, and the ratio of the first lateral distance to the width of the first object area is used as the first distance;
  • a second lateral distance from the second abscissa to the abscissa of the image center point is calculated, and the ratio of the second lateral distance to the width of the second object area is used as the second distance.
  • the image processing device 455 further includes a prompting module configured to calculate each remaining object area in the N remaining object areas according to the size of the N remaining object areas. After the area of the object area, when the area of each of the remaining object areas is less than the preset area threshold, the image processing flow is ended, prompting that no valid target is detected.
  • the prompt module is further configured to calculate the images from the first object area to the to-be-processed image according to the positions of the first object area and the second object area. After the first distance from the center and the second distance from the second object area to the center of the image, when the first distance and the second distance are both greater than the preset distance threshold, the image processing flow is ended, prompting no A valid target was detected.
  • the target detection object is a target human face
  • the image processing module 4553 is further configured to detect the target face according to a pre-entered standard human face. Perform face verification on the face to obtain a verification result; unlock the face based on the verification result, thereby completing image processing.
  • the embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the image processing method described in the embodiment of the present application.
  • the embodiment of the present application provides a computer-readable storage medium storing executable instructions, and the executable instructions are stored therein.
  • the processor will cause the processor to execute the method provided in the embodiments of the present application, for example, , As shown in Figures 4, 7, 10, 11, 12, 13, 14, and 16.
  • the computer-readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; it may also include one or any combination of the foregoing memories.
  • Various equipment may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; it may also include one or any combination of the foregoing memories.
  • Various equipment may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; it may also include one or any combination of the foregoing memories.
  • Various equipment may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; it may also include one or any combination of the foregoing memories.
  • the executable instructions may be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and their It can be deployed in any form, including being deployed as an independent program or as a module, component, subroutine or other unit suitable for use in a computing environment.
  • executable instructions may but do not necessarily correspond to files in the file system, and may be stored as part of files that store other programs or data, for example, in a HyperText Markup Language (HTML, HyperText Markup Language) document
  • HTML HyperText Markup Language
  • One or more scripts in are stored in a single file dedicated to the program in question, or in multiple coordinated files (for example, a file storing one or more modules, subroutines, or code parts).
  • executable instructions can be deployed to be executed on one computing device, or on multiple computing devices located in one location, or on multiple computing devices that are distributed in multiple locations and interconnected by a communication network Executed on.
  • the image processing device can filter at least one object region information layer by layer through the three dimensions of confidence, size, and position, and finally retain high confidence, large area, and high reliability.
  • the object area closer to the center of the image to be processed is used as the target object area, thereby improving the accuracy of locating the target object area, and further improving the accuracy of image processing based on the target object area.
  • the image processing device may successively filter the information of at least one object area through the three dimensions of confidence, size, and position, and finally retain high confidence, large area, and more distance from the center of the image to be processed.
  • the near object area is used as the target object area, thereby improving the accuracy of locating the target object area, and further improving the accuracy of image processing based on the target object area.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)

Abstract

An image processing method, apparatus and device, and a computer-readable storage medium. The method comprises: performing, according to a preset object category, target detection on an image to be processed to obtain at least one piece of object region information corresponding to at least one detection object (S101); screening the at least one detection object according to the at least one piece of object region information, and determining a target detection object from the at least one detection object, wherein object region information of the target detection object conforms to preset standard region information required by image processing (S102); and performing image processing on the target detection object (S103).

Description

图像处理方法、装置、设备及计算机可读存储介质Image processing method, device, equipment and computer readable storage medium 技术领域Technical field
本申请涉及人工智能领域中的图像处理技术,尤其涉及一种图像处理方法、装置、设备及计算机可读存储介质。This application relates to image processing technology in the field of artificial intelligence, and in particular to an image processing method, device, device, and computer-readable storage medium.
背景技术Background technique
人脸检测一直是计算机视觉研究的重要课题之一,在人脸解锁、视频监控等日常应用中发挥着重要作用。Face detection has always been one of the important topics in computer vision research, and it plays an important role in daily applications such as face unlocking and video surveillance.
在人脸解锁场景中,可以通过人脸检测技术检测出对图像中包含的人脸图像,进而基于检测到的人脸图像进行人脸验证和人脸解锁。然而,由于图像采集设备实际捕捉到的图像可能会随机包含不属于目标人的背景人脸的图像,使得目前的人脸检测方法会一并检测到目标人脸和背景人脸作为人脸检测结果,而对包含背景人脸的人脸检测结果进行人脸解锁会引起人脸解锁失败,从而降低了目标检测与图像处理的准确性。In the face unlocking scene, the face image contained in the image can be detected by the face detection technology, and then face verification and face unlocking are performed based on the detected face image. However, since the images actually captured by the image acquisition device may randomly contain images of background faces that do not belong to the target person, the current face detection methods will detect both the target face and the background face as the face detection results. , And performing face unlock on the face detection result that contains the background face will cause the face unlock failure, thereby reducing the accuracy of target detection and image processing.
发明内容Summary of the invention
本申请实施例提供一种图像处理方法、装置及计算机可读存储介质,能够提高目标检测与图像处理的准确性。The embodiments of the present application provide an image processing method, device, and computer-readable storage medium, which can improve the accuracy of target detection and image processing.
本申请实施例的技术方案是这样实现的:The technical solutions of the embodiments of the present application are implemented as follows:
本申请实施例提供一种图像处理方法,包括:An embodiment of the application provides an image processing method, including:
根据预设对象类别对待处理图像进行目标检测,得到至少一个检测对象对应的至少一个对象区域信息;Performing target detection on the image to be processed according to the preset object category, to obtain at least one object region information corresponding to the at least one detection object;
根据所述至少一个对象区域信息,对所述至少一个检测对象进行筛选,从所述至少一个检测对象中确定目标检测对象;所述目标检测对象的对象区域信息符合图像处理所要求的预设标准区域信息;According to the at least one object area information, the at least one detection object is screened, and the target detection object is determined from the at least one detection object; the object area information of the target detection object meets the preset standard required by image processing Area information
对所述目标检测对象进行图像处理。Image processing is performed on the target detection object.
本申请实施例提供一种图像处理装置,包括:An embodiment of the application provides an image processing device, including:
目标检测模块,用于根据预设对象类别待处理图像进行目标检测,得到所述预设对象类别的至少一个检测对象的至少一个对象区域;The target detection module is configured to perform target detection according to the to-be-processed image of the preset object category to obtain at least one object area of at least one detection object of the preset object category;
筛选模块,用于根据所述至少一个对象区域,对所述至少一个检测对象进行筛选,从所述至少一个检测对象中确定目标检测对象;A screening module, configured to screen the at least one detection object according to the at least one object area, and determine a target detection object from the at least one detection object;
确定模块,用于对所述目标检测对象进行图像处理。The determining module is used to perform image processing on the target detection object.
本申请实施例提供一种图像处理设备,包括:An embodiment of the application provides an image processing device, including:
存储器,用于存储可执行指令;Memory, used to store executable instructions;
处理器,用于执行所述存储器中存储的可执行指令时,实现本申请实施例提供的图像处理方法。The processor is configured to implement the image processing method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
本申请实施例提供一种计算机可读存储介质,存储有可执行指令,用于引起处理器执行时,实现本申请实施例提供的图像处理方法。The embodiment of the present application provides a computer-readable storage medium that stores executable instructions for causing a processor to execute to implement the image processing method provided by the embodiment of the present application.
本申请实施例具有以下有益效果:The embodiments of this application have the following beneficial effects:
在通过目标检测得到至少一个检测对象时,可以通过至少一个检测对象对应的至少一个对象区域信息,从至少一个检测对象中排除不符合预设标准区域信息的检测对象,使得最终确定的目标检测对象可以与图像处理的要求相匹配,从而提高了目标检测的准确性,进而提高了基于目标检测进行图像处理的准确性。When at least one detection object is obtained through target detection, at least one object area information corresponding to the at least one detection object can be used to exclude detection objects that do not meet the preset standard area information from the at least one detection object, so that the final target detection object is determined It can be matched with the requirements of image processing, thereby improving the accuracy of target detection, and further improving the accuracy of image processing based on target detection.
附图说明Description of the drawings
图1是本申请实施例提供的图像处理系统架构的一个可选的结构示意图;FIG. 1 is an optional structural schematic diagram of the image processing system architecture provided by an embodiment of the present application;
图2是本申请实施例提供的人脸解锁的过程示意图;Fig. 2 is a schematic diagram of a face unlocking process provided by an embodiment of the present application;
图3是本申请实施例提供的图像处理装置的一个可选的结构示意图;FIG. 3 is a schematic diagram of an optional structure of an image processing apparatus provided by an embodiment of the present application;
图4是本申请实施例提供的图像处理方法的一个可选的流程示意图。Fig. 4 is an optional flowchart of the image processing method provided by an embodiment of the present application.
图5是本申请实施例提供的人脸检测结果示意图。Fig. 5 is a schematic diagram of a face detection result provided by an embodiment of the present application.
图6是本申请实施例提供的目标检测过程一个可选的流程示意图。FIG. 6 is a schematic diagram of an optional flow chart of the target detection process provided by an embodiment of the present application.
图7是本申请实施例提供的图像处理方法的一个可选的流程示意图。Fig. 7 is an optional flowchart of the image processing method provided by an embodiment of the present application.
图8是本申请实施例提供的从待处理图像中检测出的对象区域的示意图。FIG. 8 is a schematic diagram of an object area detected from an image to be processed according to an embodiment of the present application.
图9是本申请实施例提供的从两个边界框中筛选出其中一个边界框的过程示意图。FIG. 9 is a schematic diagram of a process of filtering out one of the two bounding boxes according to an embodiment of the present application.
图10是本申请实施例提供的图像处理方法的一个可选的流程示意图。FIG. 10 is an optional flowchart of an image processing method provided by an embodiment of the present application.
图11是本申请实施例提供的图像处理方法的一个可选的流程示意图。FIG. 11 is an optional flowchart of an image processing method provided by an embodiment of the present application.
图12是本申请实施例提供的图像处理方法的一个可选的流程示意图。FIG. 12 is an optional flowchart of an image processing method provided by an embodiment of the present application.
图13是本申请实施例提供的图像处理方法的一个可选的流程示意图。FIG. 13 is an optional flowchart of an image processing method provided by an embodiment of the present application.
图14是本申请实施例提供的图像处理方法的一个可选的流程示意图;FIG. 14 is an optional flowchart of an image processing method provided by an embodiment of the present application;
图15是本申请实施例提供的根据人脸录入进行人脸解锁的流程示意图;FIG. 15 is a schematic diagram of a flow of unlocking a face according to face input provided by an embodiment of the present application;
图16是本申请实施例提供的图像处理方法的一个可选的流程示意图。FIG. 16 is an optional flowchart of an image processing method provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions, and advantages of this application clearer, the application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the application. Those of ordinary skill in the art have not made any suggestions. All other embodiments obtained under the premise of creative labor belong to the scope of protection of this application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, “some embodiments” are referred to, which describe a subset of all possible embodiments, but it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and Can be combined with each other without conflict.
在以下的描述中,所涉及的术语“第一\第二\第三”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。In the following description, the term "first\second\third" is only used to distinguish similar objects, and does not represent a specific order of objects. Understandably, "first\second\third" Where permitted, the specific order or sequence can be interchanged, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of this application. The terminology used herein is only for the purpose of describing the embodiments of the application, and is not intended to limit the application.
对本申请实施例进行进一步详细说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释。Before describing the embodiments of the present application in further detail, the terms and terms involved in the embodiments of the present application will be described. The terms and terms involved in the embodiments of the present application are applicable to the following interpretations.
1)目标检测:图像分类、目标检测、图像分割是计算机视觉领域的三大任务。其中,图像分类任务关心整体,而目标检测则关注特定的物体目标,要求同时获得这一目 标的类别信息和位置信息。目标检测是通过对图片前景和背景的识别分析,从背景中分离出感兴趣的目标对象作为目标对象,并且将目标对象的置信度、位置和大小信息作为目标对象的边界信息输出;其中,位置和大小通常用矩形边界框的坐标表示。1) Target detection: Image classification, target detection, and image segmentation are three major tasks in the field of computer vision. Among them, the image classification task is concerned with the whole, while the target detection is concerned with the specific object target, and it is required to obtain the category information and position information of this target at the same time. Target detection is to isolate the target object of interest from the background as the target object through the recognition and analysis of the foreground and background of the picture, and output the confidence, position and size information of the target object as the boundary information of the target object; among them, the position The sum size is usually expressed by the coordinates of the rectangular bounding box.
2)快速的单次目标检测器(Single Shot MultiBox Detector,SSD):SSD是一种基于神经网络模型的目标检测器,可以应用于多个目标对象类别。SSD模型的一个关键特性是在网络高层使用连接到多个特征图的多尺度卷积边界框进行输出,这种网络表达方式可以有效的模拟不同的边界框宽高比。2) Fast Single Shot MultiBox Detector (SSD): SSD is a target detector based on a neural network model, which can be applied to multiple target object categories. A key feature of the SSD model is to use multi-scale convolutional bounding boxes connected to multiple feature maps for output at the high level of the network. This network expression method can effectively simulate different bounding box aspect ratios.
3)只看一次算法(You Only Look Once,YOLO):基于深度神经网络的对象识别和定位算法,只通过一次卷积神经网络运算即可定位出图像中的目标对象以及目标对象的位置。YOLO的特点是运行速度很快,可以用于实时系统。3) You Only Look Once (YOLO): Object recognition and localization algorithm based on deep neural network, only one convolutional neural network operation can locate the target object and the location of the target object in the image. YOLO is characterized by its fast running speed and can be used in real-time systems.
人脸图像检测也简称人脸检测(Face Detection),是指判断输入图像中是否存在人脸图像并确定所有人脸图像区域具体位置的过程。目前,人脸图像检测通常使用基于卷积网络的目标检测,主要由两大组件构成:前端特征提取器和后端检测器。其中,前端特征提取器用于从待处理图像中提取图像特征,后端检测器用于基于前端特征提取器提取的图像特征,从待处理图像中预测出检测目标对应的图像,并在检测目标对应的图像所在的区域周围生成边界框,用以对检测目标进行标定。Face image detection is also referred to as face detection (Face Detection), which refers to the process of judging whether there is a face image in the input image and determining the specific location of all face image regions. At present, face image detection usually uses target detection based on convolutional networks, which is mainly composed of two major components: a front-end feature extractor and a back-end detector. Among them, the front-end feature extractor is used to extract image features from the image to be processed, and the back-end detector is used to predict the image corresponding to the detection target from the image to be processed based on the image features extracted by the front-end A bounding box is generated around the area where the image is located to calibrate the detection target.
本申请实施例提供一种图像处理方法、装置、设备和计算机可读存储介质,能够提高目标识别的准确性,下面说明本申请实施例提供的图像处理设备的示例性应用,本申请实施例提供的设备可以实施为带有图像采集设备的笔记本电脑,平板电脑,台式计算机,机顶盒,移动设备(例如,移动电话,便携式音乐播放器,个人数字助理,专用消息设备,便携式游戏设备)等各种类型的用户终端。下面,将说明设备实施为终端时示例性应用。The embodiments of the present application provide an image processing method, device, equipment, and computer-readable storage medium, which can improve the accuracy of target recognition. The following describes exemplary applications of the image processing equipment provided in the embodiments of the present application. The embodiments of the present application provide The devices can be implemented as notebook computers with image capture devices, tablet computers, desktop computers, set-top boxes, mobile devices (for example, mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable game devices), etc. Type of user terminal. In the following, an exemplary application when the device is implemented as a terminal will be explained.
参见图1,图1是本申请实施例提供的图像处理系统100的一个可选的架构示意图,为实现支撑一个图像处理应用,终端400通过网络300连接服务器200,网络300可以是广域网或者局域网,又或者是二者的组合。Referring to FIG. 1, FIG. 1 is a schematic diagram of an optional architecture of an image processing system 100 provided by an embodiment of the present application. In order to support an image processing application, a terminal 400 is connected to a server 200 through a network 300. The network 300 may be a wide area network or a local area network. Or a combination of the two.
终端400用于通过图像采集设备采集目标人的人脸图像,并根据如图2所示的过程,对人脸图像进行图像解码、人脸检测、人脸验证处理,进而根据人脸验证的验证结果确定是否进行人脸解锁。在图2所示人脸检测与人脸验证过程中,终端400用于将人脸类别作为预设对象类别,将解码后的图像作为待处理图像,根据预设对象类别对待处理图像进行目标检测,得到至少一个检测对象对应的至少一个对象区域信息;根据至少一个对象区域信息,对至少一个检测对象进行筛选,从至少一个检测对象中确定目标检测对象;目标检测对象的对象区域信息符合图像处理要求的标准区域信息;对目标检测对象进行图像处理;并将图像处理结果在图形界面401显示。服务器200用于从数据库500中获取预先存储的标准人脸图像,在终端400进行人脸验证时将标准人脸图像通过网络300提供给终端,以使终端完成人脸验证和人脸解锁等图像处理。The terminal 400 is used to collect the face image of the target person through the image acquisition device, and perform image decoding, face detection, and face verification processing on the face image according to the process shown in FIG. 2, and then according to the verification of the face verification As a result, it is determined whether to unlock the face. In the face detection and face verification process shown in FIG. 2, the terminal 400 is used to set the face category as the preset object category, the decoded image as the image to be processed, and perform target detection on the image to be processed according to the preset object category , Obtain at least one object area information corresponding to at least one detection object; filter at least one detection object according to the at least one object area information, and determine the target detection object from the at least one detection object; the object area information of the target detection object conforms to image processing The required standard area information; image processing is performed on the target detection object; and the image processing result is displayed on the graphical interface 401. The server 200 is used to obtain pre-stored standard face images from the database 500, and provide the standard face images to the terminal through the network 300 when the terminal 400 performs face verification, so that the terminal can complete face verification and face unlocking and other images deal with.
示例性的,当预设对象类别为人脸类别时,在人脸解锁场景中,终端400可以先在图形界面401上提示需要进行人脸解锁,终端400通过图像采集设备获取待处理图像,并对可以对待处理图像进行人脸类别的目标检测,从待处理图像中检测到至少一个人脸图像作为至少一个检测对象,并且得到至少一个人脸图像对应的至少一个对象区域信息;其中,至少一个对象区域信息中的每个对象区域信息可以是目标检测网络对该人脸图像预测出的置信度,以及该人脸图像占据的矩形区域的尺寸和位置;终端400可以根据至少一个对象区域信息对至少一个人脸图像进行筛选,从至少一个人脸图像中排除掉背景人脸图像,确定出目标人脸图像;终端400通过服务器200从数据库500中获取预存的标准人脸图像,根据标准人脸图像对目标人脸图像进行人脸验证,如果验证通过, 则确定人脸解锁成功;如果验证不通过,则确定人脸解锁失败,在终端400的图形界面401上提示失败信息。Exemplarily, when the preset object category is a face category, in the face unlocking scene, the terminal 400 may first prompt on the graphical interface 401 that the face is to be unlocked, and the terminal 400 obtains the image to be processed through the image acquisition device, and The image to be processed may be subject to face category target detection, at least one face image is detected as at least one detection object from the image to be processed, and at least one object region information corresponding to the at least one face image is obtained; wherein, at least one object Each object area information in the area information may be the confidence level predicted by the target detection network for the face image, as well as the size and position of the rectangular area occupied by the face image; the terminal 400 may determine at least one object area information according to at least one object area. One face image is screened, the background face image is excluded from at least one face image, and the target face image is determined; the terminal 400 obtains the pre-stored standard face image from the database 500 through the server 200, and according to the standard face image Perform face verification on the target face image, and if the verification passes, it is determined that the face unlock is successful; if the verification fails, it is determined that the face unlock has failed, and a failure message is displayed on the graphical interface 401 of the terminal 400.
在一些实施例中,服务器200可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。终端400可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表等,但并不局限于此。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本发明实施例中不做限制。In some embodiments, the server 200 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or it may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, Cloud servers for basic cloud computing services such as network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present invention.
参见图3,图3是本申请实施例提供的终端400的结构示意图,图3所示的终端400包括:至少一个处理器410、存储器450、至少一个网络接口420和用户接口430。终端400中的各个组件通过总线系统440耦合在一起。可理解,总线系统440用于实现这些组件之间的连接通信。总线系统440除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图3中将各种总线都标为总线系统440。Referring to FIG. 3, FIG. 3 is a schematic structural diagram of a terminal 400 provided by an embodiment of the present application. The terminal 400 shown in FIG. 3 includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together through the bus system 440. It can be understood that the bus system 440 is used to implement connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clear description, various buses are marked as the bus system 440 in FIG. 3.
处理器410可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。The processor 410 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware Components, etc., where the general-purpose processor may be a microprocessor or any conventional processor.
用户接口430包括使得能够呈现媒体内容的一个或多个输出装置431,包括一个或多个扬声器和/或一个或多个视觉显示屏。用户接口430还包括一个或多个输入装置432,包括有助于用户输入的用户接口部件,比如键盘、鼠标、麦克风、触屏显示屏、摄像头、其他输入按钮和控件。The user interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and/or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, and other input buttons and controls.
存储器450可以是可移除的,不可移除的或其组合。示例性的硬件设备包括固态存储器,硬盘驱动器,光盘驱动器等。存储器450可选地包括在物理位置上远离处理器410的一个或多个存储设备。The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and so on. The memory 450 optionally includes one or more storage devices that are physically remote from the processor 410.
存储器450包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(ROM,Read Only Memory),易失性存储器可以是随机存取存储器(RAM,Random Access Memory)。本申请实施例描述的存储器450旨在包括任意适合类型的存储器。The memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The non-volatile memory may be a read only memory (ROM, Read Only Memory), and the volatile memory may be a random access memory (RAM, Random Access Memory). The memory 450 described in the embodiment of the present application is intended to include any suitable type of memory.
在一些实施例中,存储器450能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。In some embodiments, the memory 450 can store data to support various operations. Examples of these data include programs, modules, and data structures, or a subset or superset thereof, as illustrated below.
操作系统451,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;Operating system 451, including system programs used to process various basic system services and perform hardware-related tasks, such as framework layer, core library layer, driver layer, etc., used to implement various basic services and process hardware-based tasks;
网络通信模块452,用于经由一个或多个(有线或无线)网络接口420到达其他计算设备,示例性的网络接口420包括:蓝牙、无线相容性认证(WiFi)、和通用串行总线(USB,Universal Serial Bus)等;The network communication module 452 is used to reach other computing devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus ( USB, Universal Serial Bus), etc.;
呈现模块453,用于经由一个或多个与用户接口430相关联的输出装置431(例如,显示屏、扬声器等)使得能够呈现信息(例如,用于操作外围设备和显示内容和信息的用户接口);The presentation module 453 is used to enable the presentation of information via one or more output devices 431 (for example, a display screen, a speaker, etc.) associated with the user interface 430 (for example, a user interface for operating peripheral devices and displaying content and information) );
输入处理模块454,用于对一个或多个来自一个或多个输入装置432之一的一个或多个用户输入或互动进行检测以及翻译所检测的输入或互动。The input processing module 454 is configured to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
在一些实施例中,本申请实施例提供的图像处理装置可以采用软件方式实现,图3示出了存储在存储器450中的图像处理装置455,其可以是程序和插件等形式的软件,包括以下软件模块:目标检测模块4551、筛选模块4552和图像处理模块4553,这些模块是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分。In some embodiments, the image processing device provided by the embodiments of the present application can be implemented in software. FIG. 3 shows the image processing device 455 stored in the memory 450, which can be software in the form of programs and plug-ins, including the following Software modules: target detection module 4551, screening module 4552, and image processing module 4553. These modules are logical, so they can be combined or further split arbitrarily according to the realized functions.
将在下文中说明各个模块的功能。The function of each module will be explained below.
在另一些实施例中,本申请实施例提供的图像处理装置可以采用硬件方式实现,作为示例,本申请实施例提供的图像处理装置可以是采用硬件译码处理器形式的处理器,其被编程以执行本申请实施例提供的图像处理方法,例如,硬件译码处理器形式的处理器可以采用一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、DSP、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)或其他电子元件。In other embodiments, the image processing apparatus provided in the embodiments of the present application may be implemented in hardware. As an example, the image processing apparatus provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed To execute the image processing method provided by the embodiments of the present application, for example, a processor in the form of a hardware decoding processor may adopt one or more application specific integrated circuits (ASIC, Application Specific Integrated Circuit), DSP, and programmable logic device (PLD). , Programmable Logic Device, Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), Field-Programmable Gate Array (FPGA, Field-Programmable Gate Array) or other electronic components.
将结合本申请实施例提供的终端的示例性应用和实施,说明本申请实施例提供的图像处理方法。The image processing method provided in the embodiment of the present application will be described in conjunction with the exemplary application and implementation of the terminal provided in the embodiment of the present application.
参见图4,图4是本申请实施例提供的图像处理方法的一个可选的流程示意图,将结合图4示出的步骤进行说明。Referring to FIG. 4, FIG. 4 is an optional flowchart of the image processing method provided by an embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 4.
S101、根据预设对象类别对待处理图像进行目标检测,得到至少一个检测对象对应的至少一个对象区域信息。S101: Perform target detection on an image to be processed according to a preset object category, and obtain at least one object area information corresponding to at least one detected object.
本申请实施例中,图像处理装置可以通过目标检测方法,根据预设对象类别对待处理图像进行目标检测,从待处理图像中检测到属于预设对象类别的至少一个检测对象,并对应得到至少一个检测对象对应的至少一个对象区域信息。In the embodiment of the present application, the image processing device may perform target detection on the image to be processed according to the preset object category by using the target detection method, detect at least one detection object belonging to the preset object category from the image to be processed, and obtain at least one correspondingly. At least one object area information corresponding to the detected object.
在S101中,预设对象类别为预先设置的特定物体目标。示例性的,在人脸解锁场景中,预设对象类别可以为人脸,在自动驾驶场景中,预设对象类别可以是道路标记或障碍物等等,具体的根据实际情况进行选择,本申请实施例不作限定。In S101, the preset object category is a preset specific object target. Exemplarily, in a face unlocking scene, the preset object category may be a human face. In an autonomous driving scene, the preset object category may be a road marking or an obstacle, etc., and the specific selection is made according to the actual situation. The implementation of this application The examples are not limited.
在S101中,至少一个对象区域信息是图像处理装置根据预设对象类别对待处理图像进行目标检测的检测结果。图像处理装置可以通过目标检测方法,对待处理图像的前景和背景进行分析,从背景中预测出预设对象类别对应的至少一个检测对象,并对每个检测对象所在的图像区域进行边界标定,并根据边界在图像中的位置、包括范围,以及边界中检测对象的置信度等得到该检测对象的对象区域信息,从而得到至少一个对象区域信息。示例性的,图像处理装置可以将每个检测对象对应的边界的尺寸、位置以及该检测对象对应的置信度作为至少一个对象区域信息。In S101, at least one piece of object area information is a detection result of the image processing apparatus performing target detection on the image to be processed according to a preset object category. The image processing device can analyze the foreground and background of the image to be processed through the target detection method, predict from the background at least one detection object corresponding to the preset object category, and perform boundary calibration on the image area where each detection object is located, and Obtain the object area information of the detection object according to the position of the boundary in the image, the included range, and the confidence of the detection object in the boundary, so as to obtain at least one object area information. Exemplarily, the image processing apparatus may use the size and position of the boundary corresponding to each detection object and the confidence level corresponding to the detection object as at least one object area information.
在S101中,置信度表示图像处理装置通过目标检测方法,所推理出的检测对象属于预设对象类别的概率。In S101, the confidence level represents the probability that the detected object inferred by the image processing device through the target detection method belongs to the preset object category.
在一些实施例中,对象区域信息可以在终端的图形界面中可视化的显示为二维形式的边界框。图5示出了当待处理图像中包含两张人脸时,图像处理装置对待处理图像进行人脸检测所得到的两个边界框,边界框1和边界框2,其中,边界框1为根据检测对象人脸1对应的对象区域信息进行可视化得到的,边界框2为根据检测对象人脸2对应的对象区域信息进行可视化得到的,边界框1和边界框2分别围绕人脸1与人脸2进行显示。In some embodiments, the object area information may be visually displayed as a two-dimensional bounding box in the graphical interface of the terminal. Figure 5 shows two bounding boxes, bounding box 1 and bounding box 2, obtained by the image processing device for face detection on the image to be processed when the image to be processed contains two faces, wherein bounding box 1 is based on The object area information corresponding to the detection target face 1 is visualized, and the bounding box 2 is obtained by visualizing the object area information corresponding to the detection target face 2. The bounding box 1 and the bounding box 2 respectively surround the face 1 and the face 2 to display.
在一些实施例中,图像处理装置可以通过SSD网络模型实现对待处理图像的目标检测,也可以通过YOLO或YOLO2模型实现,具体的根据实际情况进行选择,本申请实施例不作限定。In some embodiments, the image processing device can implement target detection of the image to be processed through the SSD network model, or through the YOLO or YOLO2 model, and the specific selection is based on actual conditions, which is not limited in the embodiment of the present application.
在一些实施例中,图像处理装置通过YOLO模型进行目标检测得到至少一个对象区域信息的过程如图6所示,对于一张带有狗、自行车和汽车的图片,图像处理装置可以将该图片分为多个小方格,得到该图片对应的特征地图1,图像处理装置通过YOLO模型对特征地图1中每个小方格中的图像内容进行目标检测,生成每个小方格对应的至少一个预测框,最终从至少一个预测框中筛选掉不正确的预测框,最终确定检测对象狗对应的边界框A、检测对象自行车对应的边界框B和检测对象汽车对应的边界框C,图像 处理装置将边界框A、边界框B和边界框C各自的信息,如尺寸、位置以及置信度作为至少一个对象区域信息。In some embodiments, the image processing device uses the YOLO model to perform target detection and obtains at least one object area information as shown in FIG. 6. For a picture with a dog, a bicycle, and a car, the image processing device can divide the picture into For multiple small squares, the feature map 1 corresponding to the picture is obtained, and the image processing device uses the YOLO model to perform target detection on the image content in each small square in the feature map 1 to generate at least one corresponding to each small square Prediction box, finally filter out incorrect prediction boxes from at least one prediction box, and finally determine the bounding box A corresponding to the detection target dog, the bounding box B corresponding to the detection target bicycle, and the bounding box C corresponding to the detection target car, and the image processing device The respective information of the bounding box A, the bounding box B, and the bounding box C, such as size, position, and confidence, are used as at least one object area information.
S102、根据至少一个对象区域信息,对至少一个检测对象进行筛选,从至少一个检测对象中确定目标检测对象;目标检测对象的对象区域信息符合图像处理所要求的预设标准区域信息。S102. Filter at least one detection object according to the at least one object area information, and determine the target detection object from the at least one detection object; the object area information of the target detection object meets the preset standard area information required by image processing.
在S102中,图像处理装置得到至少一个对象区域信息之后,会根据至少一个对象区域信息,基于对目标检测对象的先验知识,从至少一个对象区域信息中排除掉不符合先验知识的对象区域信息,以确定用于进一步图像处理的目标检测对象。In S102, after the image processing apparatus obtains at least one object area information, it will exclude the object area that does not meet the prior knowledge from the at least one object area information based on the prior knowledge of the target detection object based on the at least one object area information Information to determine the target detection object for further image processing.
在S102中,至少一个对象区域信息中的图像为图像处理装置从待处理图像中预测出的、预设对象类别的至少一个检测对象,但至少一个检测对象并非都是需要进一步图像处理的对象。示例性的,人脸解锁场景中,前置摄像头可能拍摄到了机主附近其他人的面部图像,这样,图像处理装置通过目标检测方法所检测到的至少一个检测对象中,即包含机主的面部图像,也包含非机主的面部图像。但对于人脸解锁来说,只有机主的面部图像是需要进行识别和验证的对象,而所识别出的其他人脸图像反而会引起误判,导致解锁失败。因此,图像处理装置需要根据至少一个对象区域信息对识别出的至少一个检测对象进行筛选,从中确定出符合图像识别目标的目标对象区域信息。In S102, the image in the at least one object region information is at least one detection object of a preset object category predicted by the image processing device from the image to be processed, but not all the at least one detection object requires further image processing. Exemplarily, in the face unlocking scene, the front camera may capture the facial images of other people near the owner. In this way, at least one detection object detected by the image processing device through the target detection method includes the owner's face Images, including facial images of non-hosts. However, for face unlocking, only the face image of the owner is the object that needs to be identified and verified, and other face images identified will cause misjudgment and cause unlocking failure. Therefore, the image processing device needs to screen the identified at least one detection object according to the at least one object area information, and determine the target object area information that meets the image recognition target.
在S102中,图像处理装置可以通过根据先验知识得到的预设标准区域信息,基于预设标准区域信息中的多种参数类型,从至少一个对象区域信息中逐步排除与预设标准区域信息不相符的对象区域信息,直至将最终保留的对象区域信息作为目标对象区域信息。In S102, the image processing device may gradually exclude differences from the preset standard area information from at least one object area information based on the preset standard area information obtained according to the prior knowledge and based on multiple parameter types in the preset standard area information. The corresponding object area information until the finally retained object area information is used as the target object area information.
在一些实施例中,在人脸解锁场景下,由于用于人脸解锁的图像通常是在距离人脸较近的范围内,如手臂长度范围内拍摄的,因此基于对人脸解锁的图像的先验知识,设定预设标准区域信息。示例性的:人脸解锁图像通常的图像特点是:待处理图像中包含一个目标人物图像,该目标人物图像对应有较高的置信度,示例性的,置信度高于0.4;该目标人物图像处于待处理图像的中心位置;该目标人物图像占据较大的图像区域,示例性的,该目标人物图像占据待处理图像总面积的0.3至0.9。根据上述图像特点,预设标准区域信息可以是:该检测对象的置信度应大于0.4,该检测对象占据的区域到待处理图像的中心的距离小于预设距离阈值;该检测对象占据的区域至少应待处理图像总面积的0.3至0.9。In some embodiments, in the face unlocking scene, since the image used for face unlocking is usually taken within a range close to the face, such as the arm length range, the image based on the face unlocking Prior knowledge, set preset standard area information. Exemplary: The usual image characteristics of the face unlock image are: the image to be processed contains an image of a target person, and the target person image has a higher confidence level, for example, the confidence level is higher than 0.4; the target person image Located at the center of the image to be processed; the target person image occupies a larger image area, for example, the target person image occupies 0.3 to 0.9 of the total area of the image to be processed. According to the above image characteristics, the preset standard area information may be: the confidence of the detection object should be greater than 0.4, the distance from the area occupied by the detection object to the center of the image to be processed is less than the preset distance threshold; the area occupied by the detection object is at least Should be 0.3 to 0.9 of the total area of the image to be processed.
在S102中,预设标准区域信息与至少一个对象区域信息为包含相同参数类型的区域信息,在一些实施例中,至少一个对象区域信息中每个对象区域信息包括尺寸、位置以及置信度中的至少一项,则图4示出的S102可以如图7所示,通过S1021至S1022实现,如下:In S102, the preset standard area information and the at least one object area information are area information containing the same parameter type. In some embodiments, each object area information in the at least one object area information includes one of size, position, and confidence. At least one item, S102 shown in FIG. 4 can be implemented through S1021 to S1022 as shown in FIG. 7, as follows:
S1021、根据至少一个对象区域信息,从至少一个对象区域中排除置信度、尺寸或位置不符合预设标准区域信息的对象区域,从而确定出目标对象区域;至少一个对象区域为至少一个对象区域信息所表征区域范围。S1021, according to the at least one object area information, exclude from the at least one object area object areas whose confidence, size, or position does not meet the preset standard area information, so as to determine the target object area; at least one object area is at least one object area information The range of the area represented.
在S1021中,至少一个对象区域为至少一个对象区域信息所表征区域范围。在一些实施例中,至少一个对象区域信息可以是数据列表的形式,列表的每一项代表一个对象区域信息,每个对象区域信息通过数组的形式给出该检测对象置信度;以及该检测对象所占据对象区域的尺寸以及对象区域的中心点位置。示例性的,若将每个检测对象占据区域归一化为矩形的对象区域,则每个对象区域信息则可以表示为(cx,cy,ω,h,conf),其中conf为置信度,(cx,cy)为对象区域信息中的位置,即对象区域中心点的坐标,(ω,h)为对象区域信息中的尺寸,即对象区域的宽度和高度。示例性的,如图8所示,当预设对象类别为狗时,图像处理装置对待处理图像70进行目标检测,得到检测对象为狗的 图像,该检测对象对应的对象区域信息为(cx,cy,ω,h,conf)时,该检测对象对应的对象区域为对象区域71。In S1021, at least one object area is an area range characterized by at least one object area information. In some embodiments, the at least one object area information may be in the form of a data list, each item in the list represents one object area information, and each object area information gives the confidence of the detected object in the form of an array; and the detected object The size of the occupied object area and the position of the center point of the object area. Exemplarily, if the area occupied by each detection object is normalized to a rectangular object area, the information of each object area can be expressed as (cx, cy, ω, h, conf), where conf is the confidence level, ( cx, cy) is the position in the object area information, that is, the coordinates of the center point of the object area, and (ω, h) is the size in the object area information, that is, the width and height of the object area. Exemplarily, as shown in FIG. 8, when the preset object category is a dog, the image processing device performs target detection on the image to be processed 70 to obtain an image in which the detection object is a dog, and the object region information corresponding to the detection object is (cx, cy, ω, h, conf), the object area corresponding to the detection object is the object area 71.
在S1021中,根据至少一个对象区域信息中包含的参数类型,图像处理装置可以将至少一个对象区域信息的置信度与预设标准区域信息的置信度相对比,从中排除与预设标准区域信息的置信度相差较大的对象区域;图像处理装置也可以将至少一个对象区域信息的尺寸与预设标准区域信息的尺寸相对比,从中排除与预设标准区域信息的尺寸相差较大的对象区域;图像处理装置还可以将至少一个对象区域信息的位置与预设标准区域信息的位置相对比,从中排除与预设标准区域信息的位置相差较大的对象区域。图像处理装置将经过上述筛选后最终剩余的对象区域作为目标对象区域。In S1021, according to the parameter type included in the at least one object area information, the image processing apparatus may compare the confidence level of the at least one object area information with the confidence level of the preset standard area information, and exclude the information that is different from the preset standard area information. Object areas with large differences in confidence; the image processing device may also compare the size of at least one object area information with the size of the preset standard area information, and exclude object areas with a large difference from the size of the preset standard area information; The image processing device may also compare the position of the at least one object area information with the position of the preset standard area information, and exclude the object area that is significantly different from the position of the preset standard area information. The image processing device uses the object area finally remaining after the above-mentioned screening as the target object area.
需要说明的是,本申请实施例中,在对至少一个对象区域进行不同维度的筛选时,可以根据实际应用的需要,对不同维度的筛选方法设置不同的优先级次序,或者也可以从不同维度的筛选方法中选择一种或几种进行结合,来实现对至少一个对象区域进行筛选,具体的根据实际情况进行选择,本申请实施例不做限定。It should be noted that, in the embodiment of the present application, when screening at least one object area in different dimensions, according to actual application needs, different priority orders can be set for the screening methods of different dimensions, or different dimensions can also be selected. One or more of the screening methods are selected and combined to achieve screening of at least one target area, which is specifically selected according to actual conditions, which is not limited in the embodiment of the present application.
需要说明的是,本申请实施例中,可以将至少一个对象区域信息直接与预设标准区域信息进行对比,以确定至少一个对象区域信息是否符合预设标准信息,也可以根据实际应用的需要,先对至少一个对象区域信息进行合理的数学变换,再与预设标准区域信息进行对比,具体的根据实际情况进行选择,本申请实施例不做限定。It should be noted that in this embodiment of the application, at least one object area information can be directly compared with preset standard area information to determine whether the at least one object area information meets the preset standard information, or according to actual application needs, First, perform a reasonable mathematical transformation on at least one object area information, and then compare it with the preset standard area information. The specific selection is made according to actual conditions, which is not limited in the embodiment of the present application.
S1022、将目标对象区域中的检测对象作为目标检测对象。S1022, using the detection object in the target object area as the target detection object.
在S1022中,图像处理装置将目标对象区域中的检测对象作为目标检测对象,针对目标检测对象进行下一步的图像处理。In S1022, the image processing device regards the detection object in the target object area as the target detection object, and performs the next image processing on the target detection object.
在一些实施例中,基于图5示出的两个边界框,图像处理装置可以根据两个边界框各自的尺寸、位置和置信度信息,对两个边界框进行筛选,排除不符合预设标准区域信息的边界框2,从两个边界框中确定出边界框1作为目标边界框,并将目标边界框中的人脸1作为目标检测对象,以用于下一步的人脸解锁处理,如图9所示。In some embodiments, based on the two bounding boxes shown in FIG. 5, the image processing device can filter the two bounding boxes according to their respective size, position, and confidence information, and exclude the non-compliance with the preset standard. The bounding box 2 of the region information, the bounding box 1 is determined from the two bounding boxes as the target bounding box, and the face 1 in the target bounding box is used as the target detection object for the next face unlocking process, such as Shown in Figure 9.
S103、对目标检测对象进行图像处理。S103: Perform image processing on the target detection object.
在S103中,图像处理装置得到目标检测对象时,可以针对目标检测对象进行下一步的图像处理。In S103, when the image processing apparatus obtains the target detection object, the next image processing can be performed on the target detection object.
在一些实施例中,在人脸解锁场景中,目标检测对象为目标人脸图像,当图像处理装置可以启动对目标人脸图像的人脸验证过程,针对目标人脸图像提取图像特征,并将目标人脸图像的图像特征与预先录入的机主面部图像进行比对,根据比对结果确定是否能够成功解锁,从而完成人脸解锁过程。In some embodiments, in the face unlocking scene, the target detection object is the target face image, when the image processing device can start the face verification process on the target face image, extract the image features from the target face image, and combine The image features of the target face image are compared with the pre-entered main face image, and it is determined whether it can be successfully unlocked according to the comparison result, thereby completing the face unlocking process.
可以理解的是,本申请实施例中,在通过目标检测得到至少一个检测对象时,图像处理装置可以通过至少一个检测对象对应的至少一个对象区域信息,从至少一个检测对象中排除不符合预设标准区域信息的检测对象,使得最终确定的目标检测对象可以与图像处理的要求相匹配,从而提高了目标检测的准确性,进而提高了基于目标检测进行图像处理的准确性。It can be understood that, in the embodiment of the present application, when at least one detection object is obtained through target detection, the image processing apparatus can exclude at least one detection object from at least one detection object that does not conform to the preset by using at least one object region information corresponding to the at least one detection object The detection object of the standard area information enables the final target detection object to match the requirements of image processing, thereby improving the accuracy of target detection, and further improving the accuracy of image processing based on target detection.
在一些实施例中,参见图10,图10是本申请实施例提供的方法的一个可选的流程示意图,图7中示出的S1021可以通过S201-S202实现,将结合各步骤进行说明。In some embodiments, refer to FIG. 10, which is an optional flowchart of the method provided in the embodiment of the present application. S1021 shown in FIG. 7 can be implemented through S201-S202, which will be described in combination with each step.
S201、在至少一个对象区域中,排除置信度小于预设置信度阈值的对象区域,从而得到N个剩余对象区域。S201. In at least one object area, exclude object areas whose confidence is less than a preset confidence threshold, so as to obtain N remaining object areas.
在S201中,预设标准区域信息包括预设置信度阈值。当对象区域的置信度小于预设置信度阈值时,说明该对象区域内的检测对象属于预设对象类别的概率较低,即该检测对象可能并非是图像处理过程要处理的目标。因此,图像处理装置在至少一个对象区域中,排除置信度小于预设置信度阈值的对象区域,从而得到N个剩余边界框。In S201, the preset standard area information includes a preset reliability threshold. When the confidence of the object area is less than the preset confidence threshold, it means that the detection object in the object area has a low probability of belonging to the preset object category, that is, the detection object may not be the target to be processed in the image processing process. Therefore, the image processing apparatus excludes the object areas whose confidence is less than the preset confidence threshold in at least one object area, so as to obtain N remaining bounding boxes.
在一些实施例中,预设置信度阈值可以是0.4。In some embodiments, the preset reliability threshold may be 0.4.
S202、当N大于预设数量阈值时,从N个剩余对象区域中排除尺寸或位置不符合预设标准区域信息的对象区域,从而确定出目标对象区域;预设数量阈值为非零的正整数。S202. When N is greater than the preset number threshold, exclude from the N remaining object areas the object areas whose size or position does not meet the preset standard area information, so as to determine the target object area; the preset number threshold is a non-zero positive integer .
在S202中,当N大于预设数量阈值时,图像处理装置可以对N个剩余对象区域继续进行筛选,从尺寸或位置的维度将N个剩余对象区域的对象区域信息与预设标准区域信息进行对比,排除尺寸或位置不符合预期的对象区域,直至最终确定出目标对象区域。In S202, when N is greater than the preset number threshold, the image processing device may continue to filter the N remaining object areas, and compare the object area information of the N remaining object areas with the preset standard area information from the dimensions of size or position. Contrast, exclude the object area whose size or position does not meet the expectations, until the target object area is finally determined.
在S202中,预设数量阈值为非零的正整数。示例性的,预设数量阈值可以为1,当N大于1时,说明经过置信度的筛选后,待处理图像中仍然存在多个对象区域,图像处理装置需要进行再次筛选,直至确定出最终的目标对象区域。In S202, the preset number threshold is a non-zero positive integer. Exemplarily, the preset number threshold may be 1. When N is greater than 1, it means that there are still multiple object regions in the image to be processed after confidence filtering, and the image processing device needs to filter again until the final result is determined. Target area.
在S202中,每个剩余对象区域的尺寸可以是剩余对象区域的宽度和高度。图像处理装置可以根据N个剩余边界框的宽度和高度进行再次筛选,进一步排除在尺寸维度上不符合预设标准区域信息的边界框。In S202, the size of each remaining object area may be the width and height of the remaining object area. The image processing device may perform screening again according to the width and height of the N remaining bounding boxes, and further exclude bounding boxes that do not meet the preset standard area information in the size dimension.
在一些实施例中,预设标准区域信息中可以包含标准宽高比,图像处理装置可以根据N个剩余对象区域中每个剩余对象区域的宽度和高度,得到每个剩余对象区域的宽高比,进而可以从中排除宽高比与标准宽高比的差值超出预设宽高比范围的剩余对象区域,保留宽高比与标准宽高比的差值在预设差值范围内的剩余对象区域。In some embodiments, the preset standard area information may include a standard aspect ratio, and the image processing device may obtain the aspect ratio of each remaining object area according to the width and height of each remaining object area in the N remaining object areas , Which can then exclude the remaining object areas whose aspect ratio and standard aspect ratio difference exceeds the preset aspect ratio range, and retain the remaining objects whose aspect ratio and standard aspect ratio difference is within the preset difference range area.
在一些实施例中,预设标准区域信息中包含预设面积阈值,图像处理装置也可以根据每个剩余对象区域的宽度和高度,得到每个剩余对象区域的面积,进而可以从中排除面积小于预设面积阈值的剩余对象区域,保留面积大于预设面积阈值的剩余对象区域。。具体的筛选方法可以根据实际情况进行选择,本申请实施例不作限定。In some embodiments, the preset standard area information includes a preset area threshold, and the image processing device may also obtain the area of each remaining object area according to the width and height of each remaining object area, and then may exclude the area less than the preset area from it. Set the remaining object area with an area threshold, and reserve the remaining object area with an area greater than the preset area threshold. . The specific screening method can be selected according to the actual situation, which is not limited in the embodiment of the present application.
可以理解的是,本申请实施例中,图像处理装置可以先基于至少一个对象区域信息的置信度,从至少一个对象区域信息中排除掉置信度低于预设置信度阈值的对象区域,从而减少了置信度过低的对象区域对图像处理过程的干扰,提高了图像图像处理的准确性;并且,图像处理装置还可以对基于置信度筛选后的N个剩余对象区域进行进一步筛选,直至得到目标边界框,从而进一步提高了得到的目标对象区域的准确性,进而提高了基于目标对象区域进行图像处理的准确性。It is understandable that, in this embodiment of the application, the image processing device may first exclude the object areas whose confidence is lower than the preset confidence threshold from the at least one object area information based on the confidence of the at least one object area information, thereby reducing The object area with too low confidence interferes with the image processing process, and the accuracy of image processing is improved; in addition, the image processing device can further filter the N remaining object areas filtered based on the confidence level until the target is obtained. The bounding box thus further improves the accuracy of the obtained target object area, and further improves the accuracy of image processing based on the target object area.
在一些实施例中,参见图11,图11是本申请实施例提供的方法的一个可选的流程示意图,图10中示出的S202可以通过S2021-S2023实现,将结合各步骤进行说明。In some embodiments, refer to FIG. 11, which is an optional flowchart diagram of the method provided in an embodiment of the present application. S202 shown in FIG. 10 can be implemented through S2021-S2023, which will be described in combination with each step.
S2021、根据N个剩余对象区域的尺寸,计算N个剩余对象区域中每个剩余对象区域的面积,从而确定出N个剩余对象中第一大面积的第一对象区域与第二大面积的第二对象区域。S2021. Calculate the area of each remaining object area in the N remaining object areas according to the size of the N remaining object areas, so as to determine the first object area with the first large area and the second object area with the second large area among the N remaining objects. 2. Object area.
在S2021中,图像处理装置可以根据N个剩余对象区域的尺寸,示例性的,剩余对象区域的宽和高,计算出N个剩余对象区域的面积。In S2021, the image processing device may calculate the area of the N remaining object regions based on the size of the N remaining object regions, for example, the width and height of the remaining object regions.
在S2021中,图像处理装置可以根据N个剩余对象区域的面积,对N个剩余对象区域进行排序,从而确定出面积最大的第一对象区域,以及面积第二大的第二对象区域。In S2021, the image processing device may sort the N remaining object areas according to the areas of the N remaining object areas, so as to determine the first object area with the largest area and the second object area with the second largest area.
S2022、从N个剩余对象区域中排除面积小于第二对象区域的对象区域。S2022, exclude an object area with an area smaller than the second object area from the N remaining object areas.
在S2022中,图像处理装置可以从N个剩余对象区域中排除面积小于第二对象区域的对象区域,仅保留第一对象区域与第二对象区域,进而从第一对象区域与第二对象区域中确定出目标边界框。In S2022, the image processing device may exclude the object area whose area is smaller than the second object area from the N remaining object areas, and only retain the first object area and the second object area, and then remove the object area from the first object area and the second object area. Determine the bounding box of the target.
S2023、从第一对象区域与第二对象区域中排除面积或位置不符合预设标准区域信息的对象区域,从而确定出目标对象区域。S2023: Exclude object areas whose areas or positions do not meet preset standard area information from the first object area and the second object area, so as to determine the target object area.
在S2023中,图像处理装置排除面积小于第二对象区域的对象区域之后,基于保 留的第一对象区域与第二对象区域的面积和位置进行继续筛选,直至确定出目标对象区域。In S2023, after the image processing device excludes the object area whose area is smaller than the second object area, it continues to filter based on the reserved area and position of the first object area and the second object area until the target object area is determined.
在一些实施例中,参见图12,图12是本申请实施例提供的方法的一个可选的流程示意图,图11中示出的S2023可以通过S301-S303实现,将结合各步骤进行说明。In some embodiments, refer to FIG. 12, which is an optional flowchart of the method provided by the embodiment of the present application. S2023 shown in FIG. 11 can be implemented through S301-S303, which will be described in combination with each step.
S301、当第二对象区域的面积小于预设面积阈值时,将第一对象区域确定为目标对象区域。S301: When the area of the second object area is less than a preset area threshold, determine the first object area as the target object area.
在S301中,预设标准区域信息包括预设面积阈值。当第二对象区域中的面积小于预设面积阈值时,说明第二对象区域面积过小,成为目标对象区域的可能性较低,图像处理装置排除第二对象区域,将第一对象区域确定为目标对象区域。In S301, the preset standard area information includes a preset area threshold. When the area in the second object area is less than the preset area threshold, it means that the area of the second object area is too small and the possibility of becoming the target object area is low. The image processing device excludes the second object area and determines the first object area as Target area.
在一些实施例中,预设面积阈值可以根据待处理图像的尺寸预设最小面积占比确定。示例性的,若待处理图像的尺寸为640*400,预设最小面积占比为25%,因此,图像处理装置可以将预设面积阈值设置为640*400*25%,即640。In some embodiments, the preset area threshold may be determined according to the preset minimum area ratio of the image to be processed. Exemplarily, if the size of the image to be processed is 640*400, the preset minimum area ratio is 25%. Therefore, the image processing device may set the preset area threshold to 640*400*25%, that is, 640.
S302、当第一对象区域的面积与第二对象区域的面积均大于预设面积阈值时,判断第二对象区域相对于第一对象区域的面积比值是否大于预设占比阈值。S302: When the area of the first object area and the area of the second object area are both greater than the preset area threshold, determine whether the area ratio of the second object area to the first object area is greater than the preset proportion threshold.
在S302中,预设标准区域信息包括预设占比阈值。当第一对象区域与第二对象区域的面积均大于预设面积阈值时,图像处理装置可以对第一对象区域与第二对象区域的面积进行互相对比,基于面积比值与预设占比阈值进行继续筛选,直至确定对象区域。In S302, the preset standard area information includes a preset proportion threshold. When the areas of the first object area and the second object area are both greater than the preset area threshold, the image processing device may compare the areas of the first object area and the second object area with each other, based on the area ratio and the preset proportion threshold. Continue to filter until the target area is determined.
S303、当面积比值大于预设占比阈值时,从第一对象区域与第二对象区域中排除位置不符合预设标准区域信息的对象区域,从而确定出目标对象区域。S303: When the area ratio is greater than the preset proportion threshold, exclude the object areas whose positions do not meet the preset standard area information from the first object area and the second object area, thereby determining the target object area.
在S303中,当第二对象区域对第一对象区域的面积比值大于预设占比阈值时,说明第一对象区域与第二对象区域的面积相差不大,图像处理装置可以基于第一对象区域与第二对象区域的位置进行再次筛选,从第一对象区域与第二对象区域中排除位置不符合预设标准区域信息的对象区域,从而确定出目标对象区域。In S303, when the area ratio of the second object area to the first object area is greater than the preset proportion threshold, it means that the area of the first object area is not much different from the area of the second object area, and the image processing device can be based on the first object area. Re-screening is performed with the position of the second object area, and the object area whose position does not meet the preset standard area information is excluded from the first object area and the second object area, thereby determining the target object area.
在一些实施例中,预设占比阈值可以是0.36。In some embodiments, the preset proportion threshold may be 0.36.
在一些实施例中,S302之后,还可以执行S304,将结合各步骤进行说明。In some embodiments, after S302, S304 may be executed, which will be described in combination with each step.
S304、当面积比值小于预设占比阈值时,将第一对象区域确定为目标对象区域。S304: When the area ratio is less than the preset proportion threshold, the first object area is determined as the target object area.
在S304中,当面积比值小于预设占比阈值时,说明第二对象区域的面积远小于第一对象区域,第一对象区域作为目标对象区域的可能性更大。因此图像处理装置可以排除第二对象区域,将第一对象区域确定为目标对象区域。In S304, when the area ratio is less than the preset proportion threshold, it means that the area of the second object area is much smaller than the first object area, and the first object area is more likely to be the target object area. Therefore, the image processing device can exclude the second object area and determine the first object area as the target object area.
在一些实施例中,S2021之后,还可以执行S2024,如下:In some embodiments, after S2021, S2024 may be executed as follows:
S2024、当每个剩余对象区域的面积均小于预设面积阈值时,结束图像处理流程,提示未检测到有效目标。S2024: When the area of each remaining object area is less than the preset area threshold, end the image processing flow, and prompt that no valid target is detected.
S2024中,当每个剩余对象区域的面积均小于预设面积阈值时,说明目标检测所识别出的每个剩余对象区域的面积都过小,无法基于其中任何一个进行进一步的图像处理,因此图像处理装置可以结束图像处理流程,提示未检测到有效目标。In S2024, when the area of each remaining object area is less than the preset area threshold, it means that the area of each remaining object area identified by the target detection is too small to perform further image processing based on any one of them, so the image The processing device can end the image processing flow, prompting that no valid target has been detected.
可以理解的是,本申请实施例中,图像处理装置可以基于尺寸对应的面积信息,对N个剩余对象区域进行筛选,从中排除掉面积过小的对象区域,只留面积第一大和第二大的两个对象区域,从而减少了小面积对象区域对图像处理过程的干扰,提高了图像处理的准确性。并且,图像处理装置还可以进一步在第一大对象区域和第二大对象区域中,基于两者的位置进行进一步筛选,最终确定出目标对象区域,从而进一步保证了图像处理的准确性。It is understandable that, in this embodiment of the application, the image processing device can filter the N remaining object areas based on the area information corresponding to the size, and exclude the object areas that are too small, leaving only the first and second largest areas. There are two object areas, thereby reducing the interference of small object areas on the image processing process and improving the accuracy of image processing. In addition, the image processing device may further filter the first large object area and the second large object area based on their positions, and finally determine the target object area, thereby further ensuring the accuracy of image processing.
在一些实施例中,参见图13,图13是本申请实施例提供的方法的一个可选的流程示意图,图12中示出的S303可以通过S3031-S3033实现,将结合各步骤进行说明。In some embodiments, referring to FIG. 13, FIG. 13 is an optional flowchart of the method provided in an embodiment of the present application. S303 shown in FIG. 12 can be implemented through S3031-S3033, which will be described in combination with each step.
S3031、根据第一对象区域所在的位置与第二对象区域所在的位置,分别计算第一 对象区域到待处理图像的图像中心的第一距离以及第二对象区域到图像中心的第二距离。S3031, according to the location of the first object area and the location of the second object area, respectively calculate the first distance from the first object area to the image center of the image to be processed and the second distance from the second object area to the image center.
在S3031中,第一对象区域的位置为第一对象区域的中心点的坐标,第二对象区域的位置为第二对象区域的中心点的坐标,图像处理装置计算第一对象区域的中心点的坐标到待处理图像中心的距离,得到第一距离,图像处理装置计算第二对象区域的中心点的坐标到待处理图像中心点的坐标之间的距离,得到第二距离。In S3031, the position of the first object area is the coordinates of the center point of the first object area, the position of the second object area is the coordinates of the center point of the second object area, and the image processing device calculates the coordinates of the center point of the first object area. The first distance is obtained by calculating the distance from the coordinates to the center of the image to be processed, and the image processing device calculates the distance between the coordinates of the center point of the second object area and the coordinates of the center point of the image to be processed to obtain the second distance.
在一些实施例中,图像处理装置计算第一距离和第二距离的过程可以通过S401-S404来实现,将结合各步骤进行说明。In some embodiments, the process of calculating the first distance and the second distance by the image processing apparatus may be implemented through S401-S404, which will be described in conjunction with each step.
S401、通过第一对象区域所在的位置,确定第一对象区域的第一横坐标;第一对象区域所在的位置为第一对象区域的中心点坐标。S401: Determine the first abscissa of the first object area according to the location of the first object area; the location of the first object area is the coordinate of the center point of the first object area.
在S401中,第一对象区域所在的位置为第一对象区域在终端屏幕上的中心点坐标,图像处理装置可以通过第一对象区域的中心点坐标,确定第一对象区域对应的第一横坐标。In S401, the location of the first object area is the center point coordinates of the first object area on the terminal screen, and the image processing device may determine the first abscissa corresponding to the first object area through the center point coordinates of the first object area .
S402、通过第二对象区域所在的位置,确定第二对象区域对应的第二横坐标。S402: Determine the second abscissa corresponding to the second object area according to the location of the second object area.
在S402中,第二对象区域所在的位置为第二对象区域在终端屏幕上的中心点坐标,图像处理装置可以通过第二对象区域的中心点坐标,确定第二对象区域对应的第二横坐标。In S402, the location of the second object area is the center point coordinates of the second object area on the terminal screen, and the image processing device may determine the second abscissa corresponding to the second object area through the center point coordinates of the second object area .
S403、计算第一横坐标到待处理图像的图像中心点横坐标之间的第一横向距离,并将第一横向距离与第一对象区域的宽度的比值,作为第一距离。S403: Calculate the first lateral distance between the first abscissa and the abscissa of the image center point of the image to be processed, and use the ratio of the first lateral distance to the width of the first object area as the first distance.
S404、计算第二横坐标到垂直中心线之间的第二中间距离,并将第二中间距离与第二对象区域的宽度的比值,作为第二距离。S404: Calculate the second intermediate distance between the second abscissa and the vertical center line, and use the ratio of the second intermediate distance to the width of the second object area as the second distance.
在S403中,图像处理装置计算第一横坐标到图像中心点横坐标之间的差值,作为第一横向距离;在S404中,图像处理装置计算第一横坐标到图像中心点横坐标之间的差值,作为第二横向距离。由于第一对象区域与第二对象区域的尺寸可能不同,为了减小对象区域的尺寸对距离计算的影响,图像处理装置可以在对第一横向距离与第二横向距离进行归一化处理,将第一横向距离除以第一对象区域的宽度,作为第一距离;将第二横向距离除以第二对象区域的宽度,作为第二距离。In S403, the image processing device calculates the difference between the first abscissa and the abscissa of the image center point as the first lateral distance; in S404, the image processing device calculates the difference between the first abscissa and the abscissa of the image center point. The difference between, as the second lateral distance. Since the size of the first object area and the second object area may be different, in order to reduce the influence of the size of the object area on the distance calculation, the image processing device may normalize the first lateral distance and the second lateral distance, and The first lateral distance is divided by the width of the first object area as the first distance; the second lateral distance is divided by the width of the second object area as the second distance.
在一些实施例中,当第一对象区域的中心点的横坐标为x,待处理图像尺寸为640*400时,待处理图像的图像中心点横坐标为320。图像处理装置可以将x-320的绝对值作为第一距离。In some embodiments, when the abscissa of the center point of the first object area is x and the size of the image to be processed is 640*400, the abscissa of the image center point of the image to be processed is 320. The image processing device may use the absolute value of x-320 as the first distance.
S3032、当第一距离与第二距离中的任意一个大于预设距离阈值时,将距离图像中心小于预设距离阈值的对象区域作为目标对象区域。S3032. When any one of the first distance and the second distance is greater than the preset distance threshold, use an object area that is less than the preset distance threshold from the center of the image as the target object area.
S3032中,预设标准区域信息包括预设距离阈值。当第一距离与第二距离中的任意一个大于预设距离阈值时,说明该距离对应的对象区域距离图像中心较远,作为目标对象区域的可能性较低,图像处理装置将小于预设距离阈值的距离对应的对象区域作为目标对象区域。In S3032, the preset standard area information includes a preset distance threshold. When any one of the first distance and the second distance is greater than the preset distance threshold, it means that the object area corresponding to the distance is farther from the image center and is less likely to be the target object area, and the image processing device will be less than the preset distance The object area corresponding to the threshold distance is regarded as the target object area.
在一些实施例中,预设距离阈值可以根据第一对象区域和第二对象区域的宽度进行灵活设置,示例性的,对于第一对象区域,将预设距离阈值设置为第一对象区域宽度的1.5倍,对于第二对象区域,将预设距离阈值设置为第二对象区域宽度的1.5倍。这样,对于不同宽度的第一对象区域与第二对象区域,可以各自按照各自宽度对应的预设距离阈值进行比对。In some embodiments, the preset distance threshold can be flexibly set according to the width of the first object area and the second object area. Illustratively, for the first object area, the preset distance threshold is set to be less than the width of the first object area. 1.5 times, for the second object area, the preset distance threshold is set to 1.5 times the width of the second object area. In this way, the first object area and the second object area of different widths can be compared according to the preset distance thresholds corresponding to the respective widths.
在一些实施例中,当第一距离为|x-640/2|,第一对象区域的宽度为w时,若|x-640/2|小于1.5w,图像处理装置可以确定第一距离大于对应的预设距离阈值,第一对象区域距离图像中心较远,从而从第一对象区域与第二对象区域中排除第一对象区域。In some embodiments, when the first distance is |x-640/2| and the width of the first object area is w, if |x-640/2| is less than 1.5w, the image processing device may determine that the first distance is greater than Corresponding to the preset distance threshold, the first object area is far from the center of the image, so that the first object area is excluded from the first object area and the second object area.
S3033、当第一距离与第二距离均小于预设距离阈值时,确定第一距离与第二距离中的最小距离对应的对象区域为目标对象区域。S3033: When both the first distance and the second distance are less than the preset distance threshold, determine that the object area corresponding to the smallest distance in the first distance and the second distance is the target object area.
S3033中,当第一距离与第二距离均小于预设距离阈值时,说明第一对象区域与第二对象区域与图像中心点之间的距离均在合理范围内,图像处理装置可以进一步对第一距离与第二距离进行比较,将第一距离与第二距离中的最小距离,也就是距离图像中心点更近的对象区域作为目对象区域。In S3033, when the first distance and the second distance are both less than the preset distance threshold, it indicates that the distances between the first object area and the second object area and the image center point are all within a reasonable range, and the image processing device may further The one distance is compared with the second distance, and the smallest distance between the first distance and the second distance, that is, the object area closer to the center point of the image is taken as the object area.
在一些实施例中,S3031之后,还可以包括S3034,如下:In some embodiments, S3034 may be included after S3031, as follows:
S3034、当第一距离与第二距离均大于预设距离阈值时,结束图像处理流程,提示未检测到有效目标。S3034: When both the first distance and the second distance are greater than the preset distance threshold, the image processing procedure is ended, and a prompt is not detected that a valid target is detected.
本申请实施例中,当第一距离与第二距离均大于预设距离阈值时,说明第一对象区域与第二对象区域距离待处理图像中心都较远,图像处理装置结束图像处理流程,提示未检测到有效目标。In the embodiment of the present application, when the first distance and the second distance are both greater than the preset distance threshold, it means that the first object area and the second object area are both far from the center of the image to be processed, and the image processing device ends the image processing flow and prompts No valid target was detected.
可以理解的是,本申请实施例中,图像处理装置可以先后通过置信度、尺寸和位置三个维度,对至少一个对象区域信息进行层层筛选,最后保留出置信度高、面积大,并且离待处理图像中心更近的对象区域作为目标对象区域,从而提高了定位目标对象区域的准确度,进而提高了基于目标对象区域进行图像处理的准确度。It is understandable that, in the embodiment of the present application, the image processing device can filter at least one object region information layer by layer through the three dimensions of confidence, size, and position, and finally retain high confidence, large area, and high reliability. The object area closer to the center of the image to be processed is used as the target object area, thereby improving the accuracy of locating the target object area, and further improving the accuracy of image processing based on the target object area.
在一些实施例中,参见图14,图14是本申请实施例提供的方法的一个可选的流程示意图,当预设对象类别为人脸类别时,目标检测对象为目标人脸,图4中示出的S103可以通过S1031-S1032实现,将结合各步骤进行说明。In some embodiments, refer to FIG. 14, which is an optional flowchart of the method provided by an embodiment of the present application. When the preset object category is a face category, the target detection object is the target face, as shown in FIG. 4 The out S103 can be implemented through S1031-S1032, which will be described in combination with each step.
S1031、根据预先录入的标准人脸,对目标人脸进行人脸验证,得到验证结果。S1031. Perform face verification on the target face according to the pre-entered standard face, and obtain a verification result.
在S1031中,当预设对象类别为人脸类别时,至少一个检测对象为至少一个人脸,图像处理装置通过上述S101-S102的过程可以从至少一个人脸中确定出目标检测对象,即目标人脸。图像处理装置可以根据预先录入的标准人脸与目标人脸进行人脸比对等图像匹配,以实现对识别目标的人脸验证过程,并根据匹配结果得到人脸验证的验证结果。In S1031, when the preset object category is a face category, at least one detection object is at least one face, and the image processing device can determine the target detection object from the at least one face through the above-mentioned S101-S102 process, that is, the target person face. The image processing device can perform image matching such as face comparison according to the pre-entered standard face and the target face, so as to realize the face verification process of the recognition target, and obtain the verification result of the face verification according to the matching result.
在一些实施例中,当识别目标与标准人脸图像的匹配度高于预设匹配度阈值,示例性的,匹配度高于80%时,图像处理装置得到人脸验证通过的验证结果,否则,图像处理装置得到人脸基于验证结果实现人脸解锁,从而完成图像处理验证失败的验证结果。In some embodiments, when the matching degree between the recognition target and the standard face image is higher than the preset matching degree threshold, for example, when the matching degree is higher than 80%, the image processing device obtains the verification result that the face is verified, otherwise The image processing device obtains the face based on the verification result to unlock the face, thereby completing the verification result that the image processing verification fails.
S1032、基于验证结果实现设备解锁,从而完成图像处理。S1032. Realize the unlocking of the device based on the verification result, thereby completing image processing.
在S1032中,图像处理装置可以基于得到的人脸验证的验证结果判断是否可以对设备进行解锁,从而完成图像处理。In S1032, the image processing apparatus may determine whether the device can be unlocked based on the obtained verification result of the face verification, so as to complete the image processing.
在一些实施例中,人脸解锁过程可以如图15所示,在图15的人脸录入过程中,终端可以对采集到的包含机主人脸的待录入图像进行图像质量控制,避免采集到过暗、过亮或者包含不清晰不完整的人脸的图像;然后在人脸检测过程中,通过图像处理装置,使用本申请实施例中的方法从待录入图像中提取出机主的面部作为标准面部图像,然后通过人脸对齐过程,从标准面部图像中自动定位出面部关键特征点,如眼睛、鼻尖、嘴角点、眉毛以及人脸各部位轮廓点等,对面部关键特征点进行活体检测,确保为真人录入,防止面具攻击;最后从通过活体检测的面部关键特征点中进行特征提取,将提取到的特征作为标准人脸特征预存在终端或者服务器上。对于人脸解锁过程,终端可以在采集到的待解锁图像中,执行上述图像质量控制过程,然后通过图像处理装置,在人脸检测过程中使用本申请实施例中的方法从待解锁图像中提取出目标人脸,对目标人脸进行人脸对齐;并根据人脸对齐的得到的目标人脸的目标面部关键特征点执行视线/注视检测过程,以确保目标人当前正在注视屏幕;之后再将通过视线/注视检测的目标面部关键特征进行同样的活体检测和特征提取过程,最终得到目标人脸的对应的目标面部特征。最 后,图像处理装置可以根据目标面部特征与标准人脸特征进行人脸比对,确定目标人脸是否是机主本人,如果是机主本人,则可以根据目标人脸进行解锁,若不是机主本人,则可拒绝通过该目标人脸进行面部解锁,提示解锁失败。In some embodiments, the face unlocking process may be as shown in FIG. 15. In the face input process of FIG. 15, the terminal may perform image quality control on the captured image to be recorded that contains the owner's face, so as to avoid over-captured images. An image that is dark, too bright, or contains an unclear and incomplete face; then in the face detection process, the image processing device uses the method in the embodiment of the application to extract the host’s face from the image to be entered as a standard Face image, and then through the face alignment process, automatically locate the key facial feature points from the standard facial image, such as eyes, nose tip, mouth corner points, eyebrows, and contour points of various parts of the face, and perform live detection of the key facial feature points. Make sure to enter a real person to prevent mask attacks; finally, extract features from the key facial feature points that have passed live detection, and pre-store the extracted features as standard facial features on the terminal or server. For the face unlocking process, the terminal may perform the above image quality control process in the collected images to be unlocked, and then use the method in the embodiment of this application to extract from the image to be unlocked during the face detection process through the image processing device Extract the target face and align the target face; and perform the line of sight/gaze detection process according to the key feature points of the target face obtained by the face alignment to ensure that the target person is currently looking at the screen; The same vitality detection and feature extraction process is carried out through the key features of the target face detected by the gaze/gaze detection, and finally the corresponding target facial features of the target face are obtained. Finally, the image processing device can perform face comparison based on the target facial features and standard facial features to determine whether the target face is the owner himself, if it is the owner, it can unlock according to the target face, if not the owner You can refuse to use the target face to unlock the face, indicating that the unlocking fails.
下面,将结合图16,说明本申请实施例在人脸解锁场景中的人脸检测过程的示例性应用。Hereinafter, an exemplary application of the face detection process in the face unlocking scene of the embodiment of the present application will be described with reference to FIG. 16.
S001、对采集的640*400的图像进行人脸检测,得到至少一个人脸边界框。S001: Perform face detection on the collected 640*400 image to obtain at least one face bounding box.
S001中,待处理图像为640*400的图像,至少一个检测对象为从640*400的图像检测出的至少一个预测人脸,至少一个对象区域信息为至少一个预测人脸占据的矩形区域的置信度、宽度、高度以及矩形区域的中心点坐标,至少一个人脸边界框为根据至少一个对象区域信息得到的图形化的至少一个预测人脸对应的矩形边界框。In S001, the image to be processed is a 640*400 image, the at least one detection object is at least one predicted face detected from the 640*400 image, and the at least one object area information is the confidence of the rectangular area occupied by the at least one predicted face The at least one face bounding box is a rectangular bounding box corresponding to the at least one graphically predicted face obtained according to the at least one object area information.
S001的过程与S101描述一致,此处不再赘述。The process of S001 is consistent with the description of S101, and will not be repeated here.
S002、排除置信度小于0.4的人脸边界框,得到N个剩余边界框。S002: Eliminate face bounding boxes with a confidence level of less than 0.4, and obtain N remaining bounding boxes.
S002中,0.4为预设置信度阈值,N个剩余边界框为N个剩余对象区域。S002的过程与S201描述一致,此处不再赘述。In S002, 0.4 is a preset reliability threshold, and the N remaining bounding boxes are N remaining object regions. The process of S002 is consistent with the description of S201, and will not be repeated here.
S003、当N大于2时,在N个剩余边界框中保留面积最大的第一边界框与面积第二大的第二边界框。S003. When N is greater than 2, reserve the first bounding box with the largest area and the second bounding box with the second largest area in the N remaining bounding boxes.
S003中,第一边界框为第一对象区域,第二边界框为第二对象区域,S003的过程与S2021描述一致,此处不再赘述。In S003, the first bounding box is the first object area, and the second bounding box is the second object area. The process of S003 is consistent with the description of S2021, and will not be repeated here.
S004、判断第二边界框的面积是否小于640,若是,执行S005,否则,执行S006。S004: Determine whether the area of the second bounding box is less than 640, if yes, execute S005, otherwise, execute S006.
S004中,640为预设面积阈值。In S004, 640 is a preset area threshold.
S005、排除第二边界框,将第一边界框作为目标边界框。S005: Exclude the second bounding box, and use the first bounding box as the target bounding box.
S005中,目标边界框为目标对象区域,S005的过程与S301描述一致,此处不再赘述。In S005, the target bounding box is the target object area, and the process of S005 is consistent with the description of S301, and will not be repeated here.
S006、判断第二边界框与第一边界框的面积比值是否小于0.36,若是,执行S007,否则,执行S008。S006: Determine whether the area ratio of the second bounding box to the first bounding box is less than 0.36, if yes, execute S007; otherwise, execute S008.
S006中,0.36为预设占比阈值.In S006, 0.36 is the preset proportion threshold.
S007、排除第二边界框,将第一边界框作为目标边界框。S007: Exclude the second bounding box, and use the first bounding box as the target bounding box.
S007的过程与S304描述一致,此处不再赘述。The process of S007 is consistent with the description of S304, and will not be repeated here.
S008、计算L1与L2,其中,L1=|x1-320|,L2=|x2-320|。S008. Calculate L1 and L2, where L1=|x1-320| and L2=|x2-320|.
S008中,x1为第一边界框中心点的横坐标,x2为第二边界框中心点的横坐标,L1为第一距离,L2为第二距离,S008的过程与S3031描述一致,此处不再赘述。In S008, x1 is the abscissa of the center point of the first bounding box, x2 is the abscissa of the center point of the second bounding box, L1 is the first distance, and L2 is the second distance. The process of S008 is consistent with the description of S3031. Go into details again.
S009、判断L1大于1.5*w1与L2大于1.5*w2中是否有任意一个成立,若是,执行S010,否则,执行S011。S009: Determine whether any of L1 is greater than 1.5*w1 and L2 is greater than 1.5*w2 is true, if yes, execute S010, otherwise, execute S011.
S009中,w1为第一边界框的或宽度,w2为第二边界框的宽度,1.5*w1为第一边界框对应的预设距离阈值,1.5*w2为第二边界框对应的预设距离阈值。In S009, w1 is the or width of the first bounding box, w2 is the width of the second bounding box, 1.5*w1 is the preset distance threshold corresponding to the first bounding box, and 1.5*w2 is the preset distance corresponding to the second bounding box Threshold.
S010、当当L1大于1.5*w1时,排除第一边界框,将第二边界框作为目标边界框;当L2大于1.5*w2时,排除第二边界框,将第一边界框作为目标边界框。S010: When L1 is greater than 1.5*w1, exclude the first bounding box and use the second bounding box as the target bounding box; when L2 is greater than 1.5*w2, exclude the second bounding box and use the first bounding box as the target bounding box.
S010的过程与S3032描述一致,此处不再赘述。The process of S010 is consistent with the description of S3032, and will not be repeated here.
S011、当L1小于1.5*w1且L2小于1.5*w2时,若L1大于L2,排除第一边界框,将第二边界框作为目标边界框;若L2大于L1,排除第二边界框,将第一边界框作为目标边界框。S011. When L1 is less than 1.5*w1 and L2 is less than 1.5*w2, if L1 is greater than L2, the first bounding box is excluded and the second bounding box is taken as the target bounding box; if L2 is greater than L1, the second bounding box is excluded, and the first A bounding box serves as the target bounding box.
S011的过程与S3033描述一致,此处不再赘述。The process of S011 is consistent with the description of S3033, and will not be repeated here.
可以理解的是,本申请实施例中,本申请实施例中,图像处理装置可以先后通过置信度、尺寸和位置三个维度,对至少一个人脸边界框进行层层筛选,最后保留出置信 度高、面积大,并且离待处理图像中心更近的人脸边界框作为目标边界框,从而提高了定位出目标边界框的准确度,进而提高了基于目标边界框进行人脸识别、人脸解锁等图像处理的准确度。It is understandable that, in the embodiments of the present application, in the embodiments of the present application, the image processing device may successively filter at least one face bounding box through the three dimensions of confidence, size, and position, and finally retain the confidence. The face bounding box that is tall, large in area, and closer to the center of the image to be processed is used as the target bounding box, thereby improving the accuracy of locating the target bounding box, thereby improving face recognition and face unlocking based on the target bounding box And so on the accuracy of image processing.
下面继续说明本申请实施例提供的图像处理装置455的实施为软件模块的示例性结构,在一些实施例中,如图3所示,存储在存储器450的图像处理装置455中的软件模块可以包括:The following will continue to describe the exemplary structure of the image processing device 455 implemented as a software module provided by the embodiments of the present application. In some embodiments, as shown in FIG. 3, the software module stored in the image processing device 455 of the memory 450 may include :
目标检测模块4551,用于根据预设对象类别对待处理图像进行目标检测,得到至少一个检测对象对应的至少一个对象区域信息;The target detection module 4551 is configured to perform target detection on the image to be processed according to a preset object category to obtain at least one object area information corresponding to at least one detection object;
筛选模块4552,用于根据所述至少一个对象区域信息,对所述至少一个检测对象进行筛选,从所述至少一个检测对象中确定目标检测对象;所述目标检测对象的对象区域信息符合图像处理所要求的预设标准区域信息;The screening module 4552 is configured to screen the at least one detection object according to the at least one object area information, and determine the target detection object from the at least one detection object; the object area information of the target detection object conforms to image processing The required preset standard area information;
图像处理模块4553,用于对所述目标检测对象进行图像处理。The image processing module 4553 is used to perform image processing on the target detection object.
在一些实施例中,所述至少一个对象区域信息中每个对象区域信息包括尺寸、位置以及置信度中的至少一项;筛选模块4552,还用于根据所述至少一个对象区域信息,从至少一个对象区域中排除置信度、尺寸或位置不符合所述预设标准区域信息的对象区域,从而确定出目标对象区域;所述至少一个对象区域为所述至少一个对象区域信息所表征区域范围;将所述目标对象区域中的检测对象作为所述目标检测对象。In some embodiments, each object area information in the at least one object area information includes at least one of size, position, and confidence; the filtering module 4552 is further configured to determine from at least one of the at least one object area information Exclude object areas whose confidence, size, or position does not meet the preset standard area information in one object area, thereby determining the target object area; the at least one object area is an area range characterized by the at least one object area information; The detection object in the target object area is used as the target detection object.
在一些实施例中,所述预设标准区域信息包括预设置信度阈值,所述筛选模块4552,还用于在所述至少一个对象区域中,排除所述置信度小于所述预设置信度阈值的对象区域,从而得到N个剩余对象区域;当N大于预设数量阈值时,从所述N个剩余对象区域中排除尺寸或位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区域;所述预设数量阈值为非零的正整数。In some embodiments, the preset standard area information includes a preset confidence threshold, and the screening module 4552 is further configured to exclude the confidence level from being less than the preset confidence level in the at least one object area Threshold object areas, thereby obtaining N remaining object areas; when N is greater than the preset number threshold, exclude object areas whose size or position does not meet the preset standard area information from the N remaining object areas, thereby determining Out of the target object area; the preset number threshold is a non-zero positive integer.
在一些实施例中,所述筛选模块4552,还用于根据所述N个剩余对象区域的尺寸,计算所述N个剩余对象区域中每个剩余对象区域的面积,从而确定出所述N个剩余对象中第一大面积的第一对象区域与第二大面积的第二对象区域;从所述N个剩余对象区域中排除面积小于所述第二对象区域的对象区域;从所述第一对象区域与所述第二对象区域中排除面积或位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区域。In some embodiments, the screening module 4552 is further configured to calculate the area of each remaining object area in the N remaining object areas according to the size of the N remaining object areas, so as to determine the N remaining object areas. A first object area with a first large area and a second object area with a second large area in the remaining objects; object areas with an area smaller than the second object area are excluded from the N remaining object areas; from the first object area The object area and the second object area are excluded from the object area whose area or position does not meet the preset standard area information, so as to determine the target object area.
在一些实施例中,所述预设标准区域信息包括预设面积阈值与预设占比阈值,所述筛选模块4552,还用于当所述第二对象区域的面积小于所述预设面积阈值时,将所述第一对象区域确定为所述目标对象区域;当所述第一对象区域的面积与所述第二对象区域的面积均大于所述预设面积阈值时,判断所述第二对象区域相对于所述第一对象区域的面积比值是否大于预设占比阈值;当所述面积比值大于所述预设占比阈值时,从所述第一对象区域与所述第二对象区域中排除位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区域。In some embodiments, the preset standard area information includes a preset area threshold and a preset proportion threshold. The filtering module 4552 is further configured to: when the area of the second object area is less than the preset area threshold When the first object area is determined as the target object area; when the area of the first object area and the area of the second object area are both greater than the preset area threshold, the second object area is determined Whether the area ratio of the object area to the first object area is greater than a preset proportion threshold; when the area ratio is greater than the preset proportion threshold, the first object area and the second object area The object area whose position does not meet the preset standard area information is excluded from the data, so as to determine the target object area.
在一些实施例中,所述筛选模块4552,还用于所述判断所述第二对象区域相对于所述第一对象区域的面积比值是否大于预设占比阈值之后,当所述面积比值小于预设占比阈值时,将所述第一对象区域确定为所述目标对象区域。In some embodiments, the screening module 4552 is further configured to determine whether the area ratio of the second object area to the first object area is greater than a preset proportion threshold, and when the area ratio is less than When the proportion threshold is preset, the first object area is determined as the target object area.
在一些实施例中,所述预设标准区域信息包括预设距离阈值,所述筛选模块4552,还用于根据所述第一对象区域所在的位置与所述第二对象区域所在的位置,分别计算所述第一对象区域到所述待处理图像的图像中心的第一距离以及所述第二对象区域到所述图像中心的第二距离;当所述第一距离与所述第二距离中的任意一个大于所述预设距离阈值时,将距离所述图像中心小于所述预设距离阈值的对象区域作为所述目标对象区域;当所述第一距离与所述第二距离均小于预设距离阈值时,确定所述第一距离与所述 第二距离中的最小距离对应的对象区域为所述目标对象区域。In some embodiments, the preset standard area information includes a preset distance threshold, and the filtering module 4552 is further configured to determine the location of the first object area and the location of the second object area respectively according to the location where the first object area is located and the location where the second object area is located. Calculate the first distance from the first object area to the image center of the image to be processed and the second distance from the second object area to the image center; when the first distance is in the second distance When any one of is greater than the preset distance threshold, an object area that is less than the preset distance threshold from the center of the image is taken as the target object area; when the first distance and the second distance are both less than the preset distance threshold When the distance threshold is set, it is determined that the object area corresponding to the smallest distance in the first distance and the second distance is the target object area.
在一些实施例中,所述筛选模块4552还包括计算子模块,所述计算子模块,用于通过所述第一对象区域所在的位置,确定所述第一对象区域对应的第一横坐标;所述第一对象区域所在的位置为所述第一对象区域的中心点坐标;通过所述第二对象区域所在的位置,确定所述第二对象区域对应的第二横坐标;计算所述第一横坐标到所述待处理图像的图像中心点横坐标之间的第一横向距离,并将所述第一横向距离与所述第一对象区域的宽度的比值,作为所述第一距离;计算所述第二横坐标到所述图像中心点横坐标之间的第二横向距离,并将所述第二横向距离与所述第二对象区域的宽度的比值,作为所述第二距离。In some embodiments, the screening module 4552 further includes a calculation sub-module configured to determine the first abscissa corresponding to the first object area through the location of the first object area; The position where the first object area is located is the coordinate of the center point of the first object area; the second abscissa corresponding to the second object area is determined by the position of the second object area; and the first object area is calculated. A first lateral distance from an abscissa to the abscissa of the image center point of the image to be processed, and the ratio of the first lateral distance to the width of the first object area is used as the first distance; A second lateral distance from the second abscissa to the abscissa of the image center point is calculated, and the ratio of the second lateral distance to the width of the second object area is used as the second distance.
在一些实施例中,所述图像处理装置455还包括提示模块,所述提示模块,用于在所述根据所述N个剩余对象区域的尺寸,计算所述N个剩余对象区域中每个剩余对象区域的面积之后,当所述每个剩余对象区域的面积均小于预设面积阈值时,结束图像处理流程,提示未检测到有效目标。In some embodiments, the image processing device 455 further includes a prompting module configured to calculate each remaining object area in the N remaining object areas according to the size of the N remaining object areas. After the area of the object area, when the area of each of the remaining object areas is less than the preset area threshold, the image processing flow is ended, prompting that no valid target is detected.
在一些实施例中,所述提示模块,还用于在所述根据所述第一对象区域与所述第二对象区域的位置,分别计算所述第一对象区域到所述待处理图像的图像中心的第一距离以及所述第二对象区域到所述图像中心的第二距离之后,当所述第一距离与所述第二距离均大于预设距离阈值时,结束图像处理流程,提示未检测到有效目标。In some embodiments, the prompt module is further configured to calculate the images from the first object area to the to-be-processed image according to the positions of the first object area and the second object area. After the first distance from the center and the second distance from the second object area to the center of the image, when the first distance and the second distance are both greater than the preset distance threshold, the image processing flow is ended, prompting no A valid target was detected.
在一些实施例中,当所述预设对象类别为人脸类别时,所述目标检测对象为目标人脸,所述图像处理模块4553,还用于根据预先录入的标准人脸,对所述目标人脸进行人脸验证,得到验证结果;基于所述验证结果进行人脸解锁,从而完成图像处理。In some embodiments, when the preset object category is a human face category, the target detection object is a target human face, and the image processing module 4553 is further configured to detect the target face according to a pre-entered standard human face. Perform face verification on the face to obtain a verification result; unlock the face based on the verification result, thereby completing image processing.
需要说明的是,以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present invention, please refer to the description of the method embodiment of the present invention for understanding.
本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行本申请实施例上述的图像处理方法。The embodiments of the present application provide a computer program product or computer program. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the image processing method described in the embodiment of the present application.
本申请实施例提供一种存储有可执行指令的计算机可读存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的方法,例如,如图4、7、10、11、12、13、14、16中示出的方法。The embodiment of the present application provides a computer-readable storage medium storing executable instructions, and the executable instructions are stored therein. When the executable instructions are executed by a processor, the processor will cause the processor to execute the method provided in the embodiments of the present application, for example, , As shown in Figures 4, 7, 10, 11, 12, 13, 14, and 16.
在一些实施例中,计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、闪存、磁表面存储器、光盘、或CD-ROM等存储器;也可以是包括上述存储器之一或任意组合的各种设备。In some embodiments, the computer-readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; it may also include one or any combination of the foregoing memories. Various equipment.
在一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。In some embodiments, the executable instructions may be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and their It can be deployed in any form, including being deployed as an independent program or as a module, component, subroutine or other unit suitable for use in a computing environment.
作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(HTML,Hyper Text Markup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。As an example, executable instructions may but do not necessarily correspond to files in the file system, and may be stored as part of files that store other programs or data, for example, in a HyperText Markup Language (HTML, HyperText Markup Language) document One or more scripts in are stored in a single file dedicated to the program in question, or in multiple coordinated files (for example, a file storing one or more modules, subroutines, or code parts).
作为示例,可执行指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设 备上执行。As an example, executable instructions can be deployed to be executed on one computing device, or on multiple computing devices located in one location, or on multiple computing devices that are distributed in multiple locations and interconnected by a communication network Executed on.
综上所述,通过本申请实施例,图像处理装置可以先后通过置信度、尺寸和位置三个维度,对至少一个对象区域信息进行层层筛选,最后保留出置信度高、面积大,并且离待处理图像中心更近的对象区域作为目标对象区域,从而提高了定位目标对象区域的准确度,进而提高了基于目标对象区域进行图像处理的准确度。In summary, through the embodiments of the present application, the image processing device can filter at least one object region information layer by layer through the three dimensions of confidence, size, and position, and finally retain high confidence, large area, and high reliability. The object area closer to the center of the image to be processed is used as the target object area, thereby improving the accuracy of locating the target object area, and further improving the accuracy of image processing based on the target object area.
以上所述,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。The above are only examples of the present application, and are not used to limit the protection scope of the present application. Any modification, equivalent replacement and improvement made within the spirit and scope of this application are all included in the protection scope of this application.
工业实用性Industrial applicability
本申请实施例中,图像处理装置可以先后通过置信度、尺寸和位置三个维度,对至少一个对象区域信息进行层层筛选,最后保留出置信度高、面积大,并且距离待处理图像中心更近的对象区域作为目标对象区域,从而提高了定位目标对象区域的准确度,进而提高了基于目标对象区域进行图像处理的准确度。In the embodiment of the present application, the image processing device may successively filter the information of at least one object area through the three dimensions of confidence, size, and position, and finally retain high confidence, large area, and more distance from the center of the image to be processed. The near object area is used as the target object area, thereby improving the accuracy of locating the target object area, and further improving the accuracy of image processing based on the target object area.

Claims (14)

  1. 一种图像处理方法,包括:An image processing method, including:
    根据预设对象类别对待处理图像进行目标检测,得到至少一个检测对象对应的至少一个对象区域信息;Performing target detection on the image to be processed according to the preset object category, to obtain at least one object region information corresponding to the at least one detection object;
    根据所述至少一个对象区域信息,对所述至少一个检测对象进行筛选,从所述至少一个检测对象中确定目标检测对象;所述目标检测对象的对象区域信息符合图像处理所要求的预设标准区域信息;According to the at least one object area information, the at least one detection object is screened, and the target detection object is determined from the at least one detection object; the object area information of the target detection object meets the preset standard required by image processing Area information
    对所述目标检测对象进行图像处理。Image processing is performed on the target detection object.
  2. 根据权利要求1所述的方法,其中,所述至少一个对象区域信息中每个对象区域信息包括尺寸、位置以及置信度中的至少一项;The method according to claim 1, wherein each object area information in the at least one object area information includes at least one of size, position, and confidence;
    所述根据所述至少一个对象区域信息,对所述至少一个检测对象进行筛选,从所述至少一个检测对象中确定目标检测对象,包括:The screening the at least one detection object according to the at least one object region information, and determining the target detection object from the at least one detection object includes:
    根据所述至少一个对象区域信息,从至少一个对象区域中排除置信度、尺寸或位置不符合所述预设标准区域信息的对象区域,从而确定出目标对象区域;所述至少一个对象区域为所述至少一个对象区域信息所表征区域范围;According to the at least one object area information, exclude from the at least one object area an object area whose confidence, size, or position does not meet the preset standard area information, so as to determine the target object area; the at least one object area is all The area range represented by the at least one object area information;
    将所述目标对象区域中的检测对象作为所述目标检测对象。The detection object in the target object area is used as the target detection object.
  3. 根据权利要求2所述的方法,其中,所述预设标准区域信息包括预设置信度阈值,所述根据所述至少一个对象区域信息,从至少一个对象区域中排除置信度、尺寸或位置不符合预设标准区域信息的对象区域,从而确定出目标对象区域,包括:2. The method according to claim 2, wherein the preset standard area information includes a preset confidence threshold, and the at least one object area is excluded from the at least one object area in terms of confidence, size, or location according to the at least one object area information. The object area that meets the preset standard area information to determine the target object area includes:
    在所述至少一个对象区域中,排除所述置信度小于所述预设置信度阈值的对象区域,从而得到N个剩余对象区域;In the at least one object area, exclude object areas whose confidence is less than the preset confidence threshold, so as to obtain N remaining object areas;
    当N大于预设数量阈值时,从所述N个剩余对象区域中排除尺寸或位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区域;所述预设数量阈值为非零的正整数。When N is greater than the preset number threshold, exclude the object areas whose size or position does not meet the preset standard area information from the N remaining object areas, so as to determine the target object area; the preset number threshold Is a non-zero positive integer.
  4. 根据权利要求3所述的方法,其中,所述从所述N个剩余对象区域中排除尺寸或位置不满足所述预设标准区域信息的对象区域,从而确定出所述目标对象区域,包括:The method according to claim 3, wherein the excluding from the N remaining object areas an object area whose size or position does not meet the preset standard area information, so as to determine the target object area, comprises:
    根据所述N个剩余对象区域的尺寸,计算所述N个剩余对象区域中每个剩余对象区域的面积,从而确定出所述N个剩余对象中第一大面积的第一对象区域与第二大面积的第二对象区域;According to the size of the N remaining object areas, the area of each remaining object area in the N remaining object areas is calculated, so as to determine the first object area and the second object area with the first large area among the N remaining objects. Large area of the second object area;
    从所述N个剩余对象区域中排除面积小于所述第二对象区域的对象区域;Excluding from the N remaining object areas an object area with an area smaller than the second object area;
    从所述第一对象区域与所述第二对象区域中排除面积或位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区域。Excluding from the first object area and the second object area an object area whose area or position does not meet the preset standard area information, thereby determining the target object area.
  5. 根据权利要求4所述的方法,其中,所述预设标准区域信息包括预设面积阈值与预设占比阈值,所述从所述第一对象区域与所述第二对象区域中排除面积或位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区域,包括:The method according to claim 4, wherein the preset standard area information includes a preset area threshold value and a preset proportion threshold value, and the excluding area from the first object area and the second object area or The object area whose position does not conform to the preset standard area information to determine the target object area includes:
    当所述第二对象区域的面积小于所述预设面积阈值时,将所述第一对象区域确定为所述目标对象区域;When the area of the second object area is smaller than the preset area threshold, determining the first object area as the target object area;
    当所述第一对象区域的面积与所述第二对象区域的面积均大于所述预设面积阈值时,判断所述第二对象区域相对于所述第一对象区域的面积比值是否大于预设占比阈值;When the area of the first object area and the area of the second object area are both greater than the preset area threshold, it is determined whether the area ratio of the second object area to the first object area is greater than a preset value Percentage threshold;
    当所述面积比值大于所述预设占比阈值时,从所述第一对象区域与所述第二对象区域中排除位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区 域。When the area ratio is greater than the preset proportion threshold, the object area whose position does not meet the preset standard area information is excluded from the first object area and the second object area, thereby determining the Target area.
  6. 根据权利要求5所述的方法,其中,所述判断所述第二对象区域相对于所述第一对象区域的面积比值是否大于预设占比阈值之后,所述方法还包括:5. The method according to claim 5, wherein after determining whether the area ratio of the second object area to the first object area is greater than a preset proportion threshold, the method further comprises:
    当所述面积比值小于预设占比阈值时,将所述第一对象区域确定为所述目标对象区域。When the area ratio is less than a preset proportion threshold, the first object area is determined as the target object area.
  7. 根据权利要求5所述的方法,其中,所述预设标准区域信息包括预设距离阈值,所述从所述第一对象区域与所述第二对象区域中排除位置不符合所述预设标准区域信息的对象区域,从而确定出所述目标对象区域,包括:The method according to claim 5, wherein the preset standard area information includes a preset distance threshold, and the excluded position from the first object area and the second object area does not meet the preset standard The object area of the area information to determine the target object area includes:
    根据所述第一对象区域所在的位置与所述第二对象区域所在的位置,分别计算所述第一对象区域到所述待处理图像的图像中心的第一距离以及所述第二对象区域到所述图像中心的第二距离;According to the location of the first object area and the location of the second object area, the first distance from the first object area to the image center of the image to be processed and the distance from the second object area to the The second distance from the center of the image;
    当所述第一距离与所述第二距离中的任意一个大于所述预设距离阈值时,将距离所述图像中心小于所述预设距离阈值的对象区域作为所述目标对象区域;When any one of the first distance and the second distance is greater than the preset distance threshold, use an object area that is less than the preset distance threshold from the center of the image as the target object area;
    当所述第一距离与所述第二距离均小于预设距离阈值时,确定所述第一距离与所述第二距离中的最小距离对应的对象区域为所述目标对象区域。When the first distance and the second distance are both less than a preset distance threshold, it is determined that the object area corresponding to the smallest distance in the first distance and the second distance is the target object area.
  8. 根据权利要求7所述的方法,其中,所述根据所述第一对象区域所在的位置与所述第二对象区域所在的位置,分别计算所述第一对象区域到所述待处理图像的图像中心的第一距离以及所述第二对象区域到所述图像中心的第二距离,包括:8. The method according to claim 7, wherein the image from the first object area to the to-be-processed image is respectively calculated according to the location of the first object area and the location of the second object area The first distance from the center and the second distance from the second object area to the image center include:
    通过所述第一对象区域所在的位置,确定所述第一对象区域对应的第一横坐标;所述第一对象区域所在的位置为所述第一对象区域的中心点坐标;Determine the first abscissa corresponding to the first object area by the location of the first object area; the location of the first object area is the coordinate of the center point of the first object area;
    通过所述第二对象区域所在的位置,确定所述第二对象区域对应的第二横坐标;Determine the second abscissa corresponding to the second object area by using the position where the second object area is located;
    计算所述第一横坐标到所述待处理图像的图像中心点横坐标之间的第一横向距离,并将所述第一横向距离与所述第一对象区域的宽度的比值,作为所述第一距离;Calculate the first lateral distance between the first abscissa and the abscissa of the image center point of the image to be processed, and use the ratio of the first lateral distance to the width of the first object area as the First distance
    计算所述第二横坐标到所述图像中心点横坐标之间的第二横向距离,并将所述第二横向距离与所述第二对象区域的宽度的比值,作为所述第二距离。A second lateral distance from the second abscissa to the abscissa of the image center point is calculated, and the ratio of the second lateral distance to the width of the second object area is used as the second distance.
  9. 根据权利要求4所述的方法,其中,所述根据所述N个剩余对象区域的尺寸,计算所述N个剩余对象区域中每个剩余对象区域的面积之后,所述方法还包括:The method according to claim 4, wherein after the calculating the area of each of the N remaining object areas according to the size of the N remaining object areas, the method further comprises:
    当所述每个剩余对象区域的面积均小于预设面积阈值时,结束图像处理流程,提示未检测到有效目标。When the area of each remaining object area is less than the preset area threshold, the image processing flow is ended, and it is prompted that no valid target is detected.
  10. 根据权利要求7所述的方法,其中,所述根据所述第一对象区域与所述第二对象区域的位置,分别计算所述第一对象区域到所述待处理图像的图像中心的第一距离以及所述第二对象区域到所述图像中心的第二距离之后,所述方法还包括:8. The method according to claim 7, wherein the first object area from the first object area to the image center of the image to be processed is calculated according to the positions of the first object area and the second object area. After the distance and the second distance from the second object area to the center of the image, the method further includes:
    当所述第一距离与所述第二距离均大于预设距离阈值时,结束图像处理流程,提示未检测到有效目标。When the first distance and the second distance are both greater than the preset distance threshold, the image processing flow is ended, and a prompt is not detected for a valid target.
  11. 根据权利要求1-8任一项所述的方法,其中,当所述预设对象类别为人脸类别时,所述目标检测对象为目标人脸,所述对所述目标检测对象进行图像处理,包括:The method according to any one of claims 1-8, wherein when the preset object category is a face category, the target detection object is a target human face, and the image processing is performed on the target detection object, include:
    根据预先录入的标准人脸,对所述目标人脸进行人脸验证,得到验证结果;Perform face verification on the target face according to the pre-entered standard face, and obtain a verification result;
    基于所述验证结果进行人脸解锁,从而完成图像处理。The face is unlocked based on the verification result, thereby completing image processing.
  12. 一种图像处理装置,包括:An image processing device, including:
    目标检测模块,用于根据预设对象类别对待处理图像进行目标检测,得到至少一个检测对象对应的至少一个对象区域信息;The target detection module is configured to perform target detection on the image to be processed according to a preset object category to obtain at least one object area information corresponding to at least one detection object;
    筛选模块,用于根据所述至少一个对象区域信息,对所述至少一个检测对象进行筛选,从所述至少一个检测对象中确定目标检测对象;所述目标检测对象的对象区域信息符合图像处理所要求的预设标准区域信息;The screening module is configured to screen the at least one detection object according to the at least one object area information, and determine the target detection object from the at least one detection object; the object area information of the target detection object conforms to the image processing institute The required preset standard area information;
    确定模块,用于对所述目标检测对象进行图像处理。The determining module is used to perform image processing on the target detection object.
  13. 一种图像处理设备,包括:An image processing device, including:
    存储器,用于存储可执行指令;Memory, used to store executable instructions;
    处理器,用于执行所述存储器中存储的可执行指令时,实现权利要求1至11任一项所述的方法。The processor is configured to implement the method according to any one of claims 1 to 11 when executing the executable instructions stored in the memory.
  14. 一种计算机可读存储介质,存储有可执行指令,用于被处理器执行时,实现权利要求1至11任一项所述的方法。A computer-readable storage medium storing executable instructions for implementing the method according to any one of claims 1 to 11 when executed by a processor.
PCT/CN2020/128189 2019-11-20 2020-11-11 Image processing method, apparatus and device, and computer-readable storage medium WO2021098572A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202080080807.4A CN114730360A (en) 2019-11-20 2020-11-11 Image processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201962938236P 2019-11-20 2019-11-20
US62/938,236 2019-11-20

Publications (1)

Publication Number Publication Date
WO2021098572A1 true WO2021098572A1 (en) 2021-05-27

Family

ID=75980769

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/128189 WO2021098572A1 (en) 2019-11-20 2020-11-11 Image processing method, apparatus and device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN114730360A (en)
WO (1) WO2021098572A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344899A (en) * 2018-09-30 2019-02-15 百度在线网络技术(北京)有限公司 Multi-target detection method, device and electronic equipment
US20190258878A1 (en) * 2018-02-18 2019-08-22 Nvidia Corporation Object detection and detection confidence suitable for autonomous driving
CN110321450A (en) * 2019-05-05 2019-10-11 苏宁易购集团股份有限公司 A kind of data auxiliary mask method, apparatus and system for target detection
CN110443366A (en) * 2019-07-30 2019-11-12 上海商汤智能科技有限公司 Optimization method and device, object detection method and the device of neural network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190258878A1 (en) * 2018-02-18 2019-08-22 Nvidia Corporation Object detection and detection confidence suitable for autonomous driving
CN109344899A (en) * 2018-09-30 2019-02-15 百度在线网络技术(北京)有限公司 Multi-target detection method, device and electronic equipment
CN110321450A (en) * 2019-05-05 2019-10-11 苏宁易购集团股份有限公司 A kind of data auxiliary mask method, apparatus and system for target detection
CN110443366A (en) * 2019-07-30 2019-11-12 上海商汤智能科技有限公司 Optimization method and device, object detection method and the device of neural network

Also Published As

Publication number Publication date
CN114730360A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
WO2021098796A1 (en) Image processing method and apparatus, device, and computer readable storage medium
WO2021017998A1 (en) Method and system for positioning text position, and method and system for training model
US20220172518A1 (en) Image recognition method and apparatus, computer-readable storage medium, and electronic device
US20180211104A1 (en) Method and device for target tracking
CN108038176B (en) Method and device for establishing passerby library, electronic equipment and medium
KR20200118076A (en) Biometric detection method and device, electronic device and storage medium
CN110706261A (en) Vehicle violation detection method and device, computer equipment and storage medium
US11017253B2 (en) Liveness detection method and apparatus, and storage medium
CN112200081A (en) Abnormal behavior identification method and device, electronic equipment and storage medium
JP6941966B2 (en) Person authentication device
KR20220076398A (en) Object recognition processing apparatus and method for ar device
CN111813997A (en) Intrusion analysis method, device, equipment and storage medium
CN110795714A (en) Identity authentication method and device, computer equipment and storage medium
CN112418167A (en) Image clustering method, device, equipment and storage medium
CN110910445A (en) Object size detection method and device, detection equipment and storage medium
CN112560683A (en) Method and device for identifying copied image, computer equipment and storage medium
CN113591758A (en) Human behavior recognition model training method and device and computer equipment
CN114581998A (en) Deployment and control method, system, equipment and medium based on target object association feature fusion
CN113696849B (en) Gesture-based vehicle control method, device and storage medium
WO2021098572A1 (en) Image processing method, apparatus and device, and computer-readable storage medium
CN116189063A (en) Key frame optimization method and device for intelligent video monitoring
CN110427241B (en) Target elimination method and device
CN115147818A (en) Method and device for identifying mobile phone playing behaviors
CN111259832B (en) Method, device, machine-readable medium and system for identifying dogs
CN114038045A (en) Cross-modal face recognition model construction method and device and electronic equipment

Legal Events

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

Ref document number: 20891172

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

Country of ref document: EP

Kind code of ref document: A1