WO2023040480A1 - 用于图像检测的方法、装置、电子设备以及存储介质 - Google Patents

用于图像检测的方法、装置、电子设备以及存储介质 Download PDF

Info

Publication number
WO2023040480A1
WO2023040480A1 PCT/CN2022/108681 CN2022108681W WO2023040480A1 WO 2023040480 A1 WO2023040480 A1 WO 2023040480A1 CN 2022108681 W CN2022108681 W CN 2022108681W WO 2023040480 A1 WO2023040480 A1 WO 2023040480A1
Authority
WO
WIPO (PCT)
Prior art keywords
detection
image
detected
type
condition
Prior art date
Application number
PCT/CN2022/108681
Other languages
English (en)
French (fr)
Inventor
曹金荣
周全
张弼坤
赖利锋
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023040480A1 publication Critical patent/WO2023040480A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present disclosure relates to the technical field of computer vision, and in particular to a method, device, electronic equipment and storage medium for image detection.
  • Image quality detection is one of the important research directions in the field of face recognition.
  • Image quality detection standardizes the storage standards of face images and can provide more accurate reference images for subsequent face recognition services.
  • the quality detection model in related technologies has low deployment efficiency and poor robustness for differentiated scenarios with different storage standards.
  • the embodiment of the present disclosure provides an image detection method, including: determining the target preset condition corresponding to the current detection level based on the pre-established correspondence between the detection level and the preset condition; performing image detection on the image to be detected , in response to the image to be detected meeting the target preset condition, performing storage processing on the image to be detected.
  • the obtaining at least one detection type for detecting the image to be detected and at least one detection condition corresponding to each detection type includes: obtaining at least two preset image detection standards, each The preset image detection standards include at least one detection type and at least one detection condition corresponding to the detection type; according to the detection type and detection condition included in the at least two preset image detection standards, determine the At least one detection type and detection condition for which the image is to be detected.
  • an embodiment of the present disclosure provides an image detection device, including: a determination module configured to determine a target preset condition corresponding to a current detection level based on a pre-established correspondence between a detection level and a preset condition; The detection module is configured to perform image detection on the image to be detected, and store the image to be detected in response to the image to be detected meeting the target preset condition.
  • the relationship establishment module is further configured to: acquire the detection type and the detection condition included in each of the preset image detection standards; The detection type of the detection type is fused to obtain the detection type of the quality detection of the image to be detected; for any detection type of the quality detection of the image to be detected, according to the detection type in the at least two preset
  • the detection conditions corresponding to the detection type can be obtained by taking the intersection of the corresponding detection conditions in the image detection standard.
  • the preset image detection criteria include criteria for storing photos in different regions.
  • the detection module is specifically configured to: perform feature extraction on the image to be detected to obtain image features corresponding to each detection type included in the target preset condition; It is determined that the detection of each of the detection types in the target preset condition passes, and it is determined that the image to be detected meets the target preset condition.
  • the image to be detected is a face image; the detection type includes at least one of the following: image size; face proportion; face position; face angle; face brightness; face sharpness; The degree of opening and closing of the mouth; the outline of facial features.
  • the detection module is further configured to: generate corresponding prompt information in response to the image to be detected not satisfying the target preset condition, and output the prompt information through the display interface.
  • the detection module is specifically configured to: in response to the image to be detected not satisfying the preset target condition, acquire the detection type of the image to be detected that fails to pass the detection in the preset target condition; according to The type of the test that fails the test determines the prompt information.
  • the detection module is specifically configured to: determine user data according to the image to be detected and user information corresponding to the image to be detected; and save the user data in a database.
  • an embodiment of the present disclosure provides an electronic device, including: a processor; and a memory storing computer instructions that can be read by the processor.
  • the processing The device executes the method described in any one of the implementation manners of the first aspect.
  • embodiments of the present disclosure provide a storage medium for storing computer-readable instructions, and the computer-readable instructions are used to cause a computer to execute the method described in any one of the embodiments of the first aspect.
  • an embodiment of the present disclosure provides a computer program product, including a computer executable program, and when the computer executable program is executed by a processor, the method described in any one of the embodiments of the first aspect is executed.
  • the image detection method includes determining the target preset condition corresponding to the current detection level based on the pre-established correspondence between the detection level and the preset condition, performing image detection on the image to be detected, and responding to the fact that the image to be detected satisfies the target
  • the preset conditions are used to store the images to be detected.
  • different detection levels are established based on different scene requirements, so as to improve the accuracy of identifying services.
  • the quality inspection model can be applied to a variety of scene requirements and is more robust.
  • the quality inspection model can be applied to multiple scenarios after only one training, and only needs to switch the corresponding preset conditions during scene migration, without re-training the model, improving the efficiency of model deployment.
  • Fig. 1 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 2 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 3 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 4 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 5 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 6 is a schematic structural diagram of an image detection system according to some embodiments of the present disclosure.
  • Fig. 7 is a schematic diagram of a client display interface according to some implementations of the present disclosure.
  • Fig. 8 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 9 is a schematic diagram of a client display interface according to some implementations of the present disclosure.
  • Fig. 10 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 11 is a flowchart of an image detection method according to some embodiments of the present disclosure.
  • Fig. 12 is a structural block diagram of an image detection device according to some embodiments of the present disclosure.
  • Fig. 13 is a structural block diagram of an image detection device according to some embodiments of the present disclosure.
  • Fig. 14 is a structural block diagram of an electronic device suitable for implementing the image detection method of the present disclosure.
  • Image quality detection is one of the important research directions in the field of computer vision (CV) and face recognition.
  • CV computer vision
  • face recognition the warehousing standard of the incoming image is strongly related to the accuracy of the subsequent recognition business. Therefore, the face quality detection of the incoming image standardizes the warehousing standard, which can effectively improve the accuracy of the subsequent face recognition business .
  • detection accuracy requirements In actual face recognition application scenarios, different scenarios have different detection accuracy requirements. Different detection levels can be divided into image quality detection according to different scene requirements. Taking conventional security scenarios as an example, detection and recognition are generally based on data in the form of video streams. The recognition accuracy requirements are relatively low, but high-speed processing is required. Therefore, the quality inspection requirements for the images in the library are relatively low, as long as the images in the library meet the size requirements and ensure that the face is on the image.
  • the accuracy requirements for the face recognition system are relatively higher, so the requirements for the quality inspection of the stored images are also relatively higher.
  • the incoming images also need to further limit factors such as face angle, face sharpness, face proportion, face occlusion, and face integrity.
  • the incoming images need to further limit comprehensive factors such as face and mouth opening and closing, facial features, etc.
  • the standards for passing the detection will be improved for each detection type.
  • an embodiment of the present disclosure provides an image detection method, which can be applied to an electronic device.
  • an electronic device which may be any device suitable for implementation such as a computer, a server, a mobile terminal, a wearable device, and the like.
  • the image detection method of the present disclosure example includes:
  • the current detection level indicates the corresponding detection level in the current scene.
  • the current detection level can be set in advance by the background staff, for example, when deploying the image quality detection model, the staff can set the current detection level based on the current scene requirements.
  • the image to be detected After the image to be detected is stored in the database, it can be stored in the database as a reference image in the subsequent business.
  • the follow-up business as face recognition as an example
  • after user A's image to be detected is stored in the database, it can be used as a reference image for user A, so that in the subsequent face recognition scene, based on the collected face image of user A and the database
  • the reference image of user A is compared to perform face recognition on user A.
  • the quality inspection model can be applied to a variety of scene requirements and is more robust.
  • the quality inspection model can be applied to multiple scenarios after only one training, and only needs to switch the corresponding preset conditions during scene migration, without re-training the model, which can improve the deployment efficiency of the quality inspection model.
  • the process of establishing the correspondence between the detection level and the preset condition includes:
  • the detection type represents multiple detection dimensions for detecting the image to be detected.
  • the detection dimension can include the following aspects: whether there is a human face in the image, the proportion of the human face range, the occlusion of the human face, the rotation angle of the human face, the contour of facial features, etc. , by integrating these detection dimensions, multiple corresponding detection types can be constructed.
  • each detection type has a corresponding detection condition
  • the detection condition indicates a judgment condition of whether the detection type passes the detection.
  • the corresponding detection condition may be "proportion of human face is not less than 35%", when the proportion of human face in the image to be detected is less than 35% , indicating that the proportion of human faces in the image to be detected fails to pass the detection, and on the contrary, that is, when the proportion of human faces in the image to be detected is not less than 35%, it means that the proportion of human faces in the image to be detected passes the detection.
  • the corresponding detection condition may be "face deflection angle does not exceed 15°", when the face deflection angle in the image to be detected exceeds 15°, it means The detection of the angle of the face in the image to be detected fails, otherwise, that is, when the deflection angle of the face in the image to be detected does not exceed 15°, it means that the angle of the face in the image to be detected passes the detection.
  • the process of acquiring the detection type and detection conditions may refer to the implementation shown in FIG. 3 , which will be described below in conjunction with FIG. 3 .
  • the process of obtaining multiple detection types and detection conditions includes:
  • each preset image detection standard includes at least one detection type and at least one detection condition corresponding to the detection type.
  • S212 Determine a plurality of detection types and detection conditions for detecting the image to be detected according to the detection types and detection conditions included in at least two preset image detection standards.
  • the preset image detection standard means a preset detection standard for image quality detection. It can be understood that the preset image detection standard may be a detection standard for image quality detection in different fields based on prior knowledge or obtained through channels such as the Internet. In some implementations, the preset image detection standard may be the photo storage standard of different geographical ranges.
  • multiple detection types and detection conditions for quality detection of the image to be detected can be determined according to the detection types and detection conditions included in the multiple preset image detection standards.
  • S420 Perform fusion processing on the detection types included in at least two preset image detection standards to obtain a detection type for quality detection of the image to be detected.
  • the storage standard of passport photos in different regions can be used as the preset image detection standard, and can be based on The commonalities and differences among the different detection conditions included in the preset image detection standards establish multiple detection types of the present disclosure for the images to be detected.
  • the detection type may also include other detection dimensions, such as face brightness, face sharpness, mouth opening and closing degree, etc.
  • face brightness e.g., face brightness
  • face sharpness e.g., face sharpness
  • mouth opening and closing degree e.g., face brightness, face sharpness, mouth opening and closing degree
  • the detection condition corresponding to the detection type can be obtained.
  • multiple preset image detection standards may have the same detection type, but the same detection type may have different detection conditions corresponding to different preset image detection standards. For example, taking the detection type as the image size as an example, the corresponding detection condition in the detection standard 1 is "the image size does not exceed 3.5cm*3.5cm", while the corresponding detection condition in the detection standard 2 is "the image size does not exceed Less than 2cm*2cm, and no more than 5cm*5cm”.
  • the detection conditions in these two detection standards can be integrated, for example, take the intersection of these two detection conditions, and determine the detection condition corresponding to the image size as "the image size is not less than 2cm*2cm, and not more than 3.5cm*3.5cm" , so that it can meet two different detection criteria at the same time.
  • the detection conditions in these two detection standards can be integrated, for example, take the intersection of these two detection conditions, and determine the detection condition corresponding to the image size as "the image size is not less than 2cm*2cm, and not more than 3.5cm*3.5cm" , so that it can meet two different detection criteria at the same time.
  • corresponding detection types and preset conditions can be set for different detection levels. It can be understood that different detection levels correspond to different scene requirements, and therefore detection types included in different detection levels are also different. Since the preset conditions are composed of detection conditions corresponding to the detection types included in the detection levels, the preset conditions corresponding to each detection level are also different.
  • the established correspondence between detection levels and preset conditions may be shown in Table 2 below:
  • the detection type may include at least one of the following detection dimensions:
  • Image size indicating the size of the image, for example, 2.5cm*3.5cm.
  • Face proportion which means the ratio of the range of faces in the image to the entire image, such as 35%, 50%, 80%, etc.
  • the position of the face which indicates the position of the range of the face in the image in the entire image, such as center, left, right, etc.
  • Face angle indicating the deflection of the face in the image, including the pitch angle, deflection angle, and deflection angle of the heading angle.
  • Facial brightness indicating the brightness value of the human face in the image.
  • the above detection types and corresponding relationships are only exemplary implementations of the present disclosure.
  • the detection type may also include other detection dimensions, and the correspondence between detection levels and detection types is not limited to the above examples.
  • Those skilled in the art can make selections according to specific scenario requirements, and this disclosure does not need to exhaustively list them.
  • the quality inspection of the image to be inspected can be performed at the current inspection level.
  • the size of the image to be detected is obtained by processing the image to be detected, and the size is the image feature corresponding to the size of the image.
  • the image feature refers to the relevant parameters corresponding to the detection type in the image to be detected, which can be understood and fully implemented by those skilled in the art, and the present disclosure will not repeat the enumeration.
  • each detection type After obtaining the corresponding image feature, it can be determined whether the detection type of the image to be detected passes the detection according to the image feature and the detection condition corresponding to the detection type.
  • the image to be detected in the disclosed example may be an image uploaded by the client 200 .
  • the client 200 may be a device such as a computer or a mobile terminal, and the client 200 has a display screen, so that a display interface can be output on the display screen.
  • the display interface is as shown in Figure 7, the user of the client 200 can add the image to be detected through the "upload image" button on the display interface, after the user's addition is completed, the client 200 can send the image to be detected added by the user to the server 100 .
  • the process of generating prompt information includes:
  • S1010 Determine user data according to the image to be detected and user information corresponding to the image to be detected.
  • the user information corresponding to the image to be detected can be obtained.
  • the user information represents the user identification of the uploaded image to be detected, such as a user ID (Identity document, identity identification number) and the like.
  • the user information and the image to be detected can be packaged as the user data of the user, and the user data is stored in the database as the reference image data of the downstream recognition task.
  • multiple detection types and corresponding detection conditions of the image to be detected can be determined based on the commonality and difference of the detection conditions included therein according to the storage standards of passport photos of multiple countries. Those skilled in the art can understand and fully implement it with reference to the foregoing, and will not repeat it here.
  • step S1160 it can be determined whether each detection type has passed the detection. If each detection type has passed the detection, it is determined that the image to be detected meets the target preset condition, and step S1160 is executed.
  • the images to be detected are stored in the database, and details are not repeated here.
  • step S1180 it can be determined whether each detection type has passed the detection. If there is a detection type that fails the detection, it is determined that the image to be detected does not meet the target preset condition, and step S1180 is executed.
  • the prompt information may be generated based on the aforementioned embodiment shown in FIG. 8 , and the prompt information may be output on the display interface of the client 200 to prompt the user to modify the image to be detected and upload it again.
  • the quality inspection model can be applied to a variety of scene requirements and is more robust. Moreover, the quality inspection model can be applied to multiple scenarios only after one training, and only needs to switch the corresponding inspection level when the scene is transplanted, without re-training the model, which improves the deployment efficiency of the quality inspection model.
  • the corresponding relationship between the detection level and the preset conditions can be established based on the storage standards of passport photos in different regions, so that the detection model has strong robustness in different regions.
  • the embodiments of the present disclosure provide an image detection device, which can be applied to electronic equipment.
  • the type of the electronic device which may be any device suitable for implementation such as a computer, a server, a mobile terminal, a wearable device, and the like.
  • the image detection device of the disclosed example includes: a determination module 10 configured to determine the target corresponding to the current detection level based on the pre-established correspondence between the detection level and the preset condition Preset conditions; the detection module 20 is configured to perform image detection on the image to be detected, and store the image to be detected in response to the image to be detected meeting the target preset condition.
  • the quality inspection model can be applied to a variety of scene requirements and is more robust. Moreover, the quality inspection model can be applied to multiple scenarios only after one training, and only need to switch the corresponding preset conditions when transplanting the scene, without re-training the model, which improves the deployment efficiency of the quality inspection model.
  • the disclosed device further includes a relationship establishment module 40 configured to: acquire a plurality of detection types for performing quality detection on the image to be detected and each The detection condition corresponding to the detection type; determining the detection type and detection condition corresponding to each detection level from the plurality of detection types, and obtaining the corresponding relationship between the detection level and the preset condition.
  • a relationship establishment module 40 configured to: acquire a plurality of detection types for performing quality detection on the image to be detected and each The detection condition corresponding to the detection type; determining the detection type and detection condition corresponding to each detection level from the plurality of detection types, and obtaining the corresponding relationship between the detection level and the preset condition.
  • the relationship establishment module 40 is further configured to: acquire at least two preset image detection standards, wherein each preset image detection standard includes at least one detection type and at least one detection type corresponding to the detection type Conditions: determining a plurality of detection types and detection conditions for detecting the image to be detected according to the detection types and detection conditions included in the at least two preset image detection standards.
  • the detection type corresponding to the detection type can be obtained condition.
  • the preset image detection criteria include criteria for storing photos in different regions.
  • the detection module 20 is specifically configured to: perform feature extraction on the image to be detected to obtain image features corresponding to each detection type included in the target preset condition; The image feature determines that the detection of each of the detection types in the target preset condition passes, and determines that the image to be detected satisfies the target preset condition.
  • the image to be detected is a face image; the detection type includes at least one of the following: image size; face proportion; face position; face angle; face brightness; face sharpness; The degree of opening and closing of the mouth; the outline of facial features.
  • the device of the embodiment of the present disclosure further includes: an acquisition module 30 configured to receive the image to be detected uploaded through a display interface.
  • the detection module 20 is specifically configured to: in response to the image to be detected not satisfying the preset target condition, acquire the detection type of the image to be detected that fails to be detected in the preset target condition;
  • the prompt information is determined according to the detection type that the detection fails.
  • the detection module 20 is specifically configured to: determine user data according to the image to be detected and user information corresponding to the image to be detected; and save the user data in a database.
  • FIG. 14 shows a schematic structural diagram of an electronic device 600 suitable for implementing the method of the present disclosure.
  • the electronic device shown in FIG. 14 corresponding functions of the above-mentioned processor and storage medium can be realized.
  • the electronic device 600 includes a processor 601 that can perform various appropriate actions and processes according to programs stored in the memory 602 or loaded from the storage part 608 into the memory 602 .
  • various programs and data necessary for the operation of the electronic device 600 are also stored.
  • the processor 601 and the memory 602 are connected to each other through a bus 604 .
  • An input/output (I/O) interface 605 is also connected to the bus 604 .

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及计算机视觉技术领域,具体涉及一种用于图像检测的方法、装置、电子设备以及存储介质。一种图像检测方法,包括:基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件;对待检测图像进行图像检测,响应于所述待检测图像满足所述目标预设条件,对所述待检测图像进行入库处理。本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。质量检测模型可以适用于多种场景需求,鲁棒性更强,提高了质量检测模型部署效率。

Description

用于图像检测的方法、装置、电子设备以及存储介质
相关申请的交叉引用
本申请要求于2021年9月15日提交的、申请号为202111080907.X的中国专利申请的优先权,该中国专利申请公开的全部内容以引用的方式并入本文中。
技术领域
本公开涉及计算机视觉技术领域,具体涉及一种用于图像检测的方法、装置、电子设备以及存储介质。
背景技术
图像质量检测是人脸识别领域的重要研究方向之一,图像质量检测规范化了人脸图像的入库标准,可以为后续的人脸识别业务提供较为准确的参考图像。但是,相关技术中的质量检测模型,对于具有不同入库标准的差异化场景部署效率较低和鲁棒性较差。
发明内容
为提高检测模型部署效率和鲁棒性,本公开实施方式提供了一种图像检测方法、装置、电子设备以及存储介质。
第一方面,本公开实施方式提供了一种图像检测方法,包括:基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件;对待检测图像进行图像检测,响应于所述待检测图像满足所述目标预设条件,对所述待检测图像进行入库处理。
在一些实施方式中,预先建立所述检测等级与预设条件的对应关系,包括:获取对所述待检测图像进行检测的至少一个检测类型以及每个所述检测类型对应的至少一个检测条件;从所述至少一个多个检测类型中确定每个所述检测等级对应的检测类型和检测条件,得到所述检测等级与预设条件的对应关系。
在一些实施方式中,所述从所述至少一个检测类型中确定每个所述检测等级对应的检测类型和检测条件,得到所述检测等级与预设条件的对应关系,包括:针对每个所述检测等级,从获取的所述至少一个检测类型中确定所述检测等级中包括的检测类型;根据所述检测等级所包括的检测类型对应的检测条件,确定所述检测等级对应的预设条件;基于每个所述检测等级对应的预设条件,得到所述检测等级与预设条件的对应关系。
在一些实施方式中,所述获取对所述待检测图像进行检测的至少一个检测类型以及每个所述检测类型对应的至少一个检测条件,包括:获取至少两个预设图像检测标准,其中每个所述预设图像检测标准包括至少一个检测类型以及所述检测类型对应的至少一个检测条件;根据所述至少两个预设图像检测标准包括的检测类型和检测条件,确定对所述待检测图像进行检测的至少一个检测类型和检测条件。
在一些实施方式中,所述根据所述至少两个预设图像检测标准包括的检测类型和检测条件,确定对所述待检测图像进行检测的至少一个检测类型和检测条件,包括:获取每个所述预设图像检测标准包括的检测类型和检测条件;对所述至少两个预设图像检测标准包括的检测类型进行融合处理,得到对所述待检测图像进行检测的检测类型;对于对所述待检测图像进行检测的任意一个检测类型,根据所述检测类型在所述至少两个预设图像检测标准中对应的各个检测条件取交集,得到所述检测类型对应的检测条件。
在一些实施方式中,所述预设图像检测标准包括不同地域范围的照片入库标准。
在一些实施方式中,所述对待检测图像进行图像检测,响应于所述待检测图像满足所述目标预设条件,包括:对所述待检测图像进行特征提取,得到与所述目标预设条件包括的每个检测类型对应的图像特征;响应于根据所述图像特征确定所述目标预设条件中的每个所述检测类型的检测通过,确定所述待检测图像满足所述目标预设条件。
在一些实施方式中,所述待检测图像为人脸图像;所述检测类型包括以下至少之一:图像尺寸;人脸占比;人脸位置;人脸角度;人脸亮度;人脸锐度;嘴部开合程度;人脸五官轮廓。
在一些实施方式中,所述方法还包括:接收通过显示界面上传的所述待检测图像;响应于所述待检测图像不满足所述目标预设条件,生成对应的提示信息,并通过所述显示界面输出所述提示信息。
在一些实施方式中,所述响应于所述待检测图像不满足所述目标预设条件,生成对应的提示信息,包括:响应于所述待检测图像不满足所述目标预设条件,获取所述目标预设条件中检测未通过的检测类型;根据所述检测未通过的检测类型确定所述提示信息。
在一些实施方式中,所述对所述待检测图像进行入库处理包括:根据所述待检测图像以及与所述待检测图像对应的用户信息确定用户数据;将所述用户数据保存在数据库中。
第二方面,本公开实施方式提供了一种图像检测装置,包括:确定模块,被配置为基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件;检测模块,被配置为对待检测图像进行图像检测,响应于所述待检测图像满足所述目标预设条件,对所述待检测图像进行入库处理。
在一些实施方式中,本公开装置还包括关系建立模块,所述关系建立模块被配置为:获取对所述待检测图像进行质量检测的多个检测类型以及每个检测类型对应的检测条件;由所述多个检测类型中确定每个检测等级对应的检测类型和检测条件,得到所述检测等级与所述预设条件的对应关系。
在一些实施方式中,所述关系建立模块还被配置为:获取至少两个预设图像检测标准,其中每个预设图像检测标准包括至少一个检测类型以及所述检测类型对应的至少一个检测条件;根据所述至少两个预设图像检测标准包括的检测类型和检测条件,确定对所述待检测图像进行检测的多个检测类型和检测条件。
在一些实施方式中,所述关系建立模块还被配置为:获取每个所述预设图像检测标准包括的所述检测类型和所述检测条件;对所述至少两个预设图像检测标准包括的检测类型进行融合处理,得到对所述待检测图像进行质量检测的检测类型;对于对所述待检测图像进行质量检测的任意一个检测类型,根据所述检测类型在所述至少两个预设图像检测标准中对应的各个检测条件取交集,可以得到所述检测类型对应的检测条件。
在一些实施方式中,所述预设图像检测标准包括不同地域范围的照片入库标准。
在一些实施方式中,所述检测模块具体被配置为:对所述待检测图像进行特征提取,得到与所述目标预设条件包括的每个检测类型对应的图像特征;响应于根据所述图像特征确定所述目标预设条件中的每个所述检测类型的检测通过,确定所述待检测图像满足所述目标预设条件。
在一些实施方式中,所述待检测图像为人脸图像;所述检测类型包括以下至少之一:图像尺寸;人脸占比;人脸位置;人脸角度;人脸亮度;人脸锐度;嘴部开合程度;人脸五官轮廓。
在一些实施方式中,本公开实施方式的装置,还包括:获取模块,被配置为接收通过显示界面上传的所述待检测图像。
在一些实施方式中,所述检测模块还被配置为:响应于所述待检测图像不满足所述目标预设条件,生成对应的提示信息,并通过所述显示界面输出所述提示信息。
在一些实施方式中,所述检测模块具体被配置为:响应于所述待检测图像不满足所述目标预设条件,获取所述目标预设条件中待检测图像检测未通过的检测类型;根据所述检测未通过的检测类型确定所述提示信息。
在一些实施方式中,所述检测模块具体被配置为:根据所述待检测图像以及与所述待检测图像对应的用户信息确定用户数据;将所述用户数据保存在数据库中。
第三方面,本公开实施方式提供了一种电子设备,包括:处理器;以及存储器,存储有能够被所述处理器读取的计算机指令,当所述计算机指令被读取时,所述处理器执行第一方面任一实施方式所述的方法。
第四方面,本公开实施方式提供了一种存储介质,用于存储计算机可读指令,所述计算机可读指令用于使计算机执行第一方面任一实施方式所述的方法。
第五方面,本公开实施方式提供了一种计算机程序产品,包括计算机可执行程序,所述计算机可执行程序被处理器执行时执行第一方面任一实施方式所述的方法。
本公开实施方式的图像检测方法,包括基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件,对待检测图像进行图像检测,响应于待检测图像满足目标预设条件,对待检测图像进行入库处理。本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。在图像质量检测时,质量检测模型可以适用于多种场景需求,鲁棒性更强。并且,质量检测模型只需要经过一次训练即可应用于多种场景,在场景移植时只需要切换对应的预设条件即可,无需重新进行模型训练,提高模型部署效率。
附图说明
为了更清楚地说明本公开具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍。下面描述中的附图是本公开的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是根据本公开一些实施方式中图像检测方法的流程图。
图2是根据本公开一些实施方式中图像检测方法的流程图。
图3是根据本公开一些实施方式中图像检测方法的流程图。
图4是根据本公开一些实施方式中图像检测方法的流程图。
图5是根据本公开一些实施方式中图像检测方法的流程图。
图6是根据本公开一些实施方式中图像检测系统的结构示意图。
图7是根据本公开一些实施方式中客户端显示界面的示意图。
图8是根据本公开一些实施方式中图像检测方法的流程图。
图9是根据本公开一些实施方式中客户端显示界面的示意图。
图10是根据本公开一些实施方式中图像检测方法的流程图。
图11是根据本公开一些实施方式中图像检测方法的流程图。
图12是根据本公开一些实施方式中图像检测装置的结构框图。
图13是根据本公开一些实施方式中图像检测装置的结构框图。
图14是适于实现本公开图像检测方法的电子设备的结构框图。
具体实施方式
下面将结合附图对本公开的技术方案进行清楚、完整地描述。所描述的实施方式只是本公开一部分实施方式,而不是全部的实施方式。基于本公开中的实施方式,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施方式,都属于本公开保护的范围。此外,下面所描述的本公开不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。
图像质量检测是计算机视觉(Computer Vision,CV)以及人脸识别领域的重要研究方向之一。以人脸识别为例,入库图像的入库标准与后续识别业务的精度强相关,因此,对入库图像的人脸质量检测规范化了入库标准,可有效提高后续人脸识别业务的精度。
在实际人脸识别的应用场景中,不同场景具有不同的检测精度需求。可根据不同的场景需求对图像质量检测划分不同的检测等级。以常规安防场景为例,一般基于视频流形式数据进行检测识别,识别精度要求相对较低、但需高速处理。因此,对于入库图像的质量检测要求也相对较低,入库图像只要符合尺寸要求、保证人脸在图像上即可。
以写字楼、居民楼等门禁场景为例,为避免陌生人出入,对人脸识别系统的精度要求相对增高,从而对入库图像的质量检测要求也相对增高。例如,入库图像在满足上述基础的关于尺寸和人脸的要求外,还需要进一步限制人脸角度、人脸锐度、人脸占比、人脸遮挡情况、人脸完整度等因素。
以高级别的会员场景为例,需要严格把控人员出入,因此对人脸识别系统的精度要求更高,从而对入库图像的质量检测要求也更高。例如,入库图像在满足前述所有要求外,还需要进一步限制人脸嘴部开合、五官轮廓等综合因素,另外还会在各个检测类型上提高检测通过的标准。
相关技术中,针对上述不同检测等级的场景需求,若采用同一个检测标准来训练质量检测模型,将会导致训练出的质量检测模型难以满足不同的实际场景需求。而若是针对不同的场景需求来分别训练不同检测等级的质量检测模型,当需要将某个检测等级的质量检测模型移植到不同检测等级的场景时,需要重新训练质量检测模型,这无疑增大了模型训练的工作量,降低模型的部署效率。
正是基于上述缺陷,本公开实施方式提供了一种图像检测方法、装置、电子设备以及存储介质,旨在提供适用于不同场景需求的图像质量检测,在满足各场景需求的同时无需重新训练质量检测模型,可以提高质量检测模型的部署效率及鲁棒性。
第一方面,本公开实施方式提供了一种图像检测方法,该方法可应用于电子设备。本公开实施方式中,对于电子设备的类型不作限制,其可以是例如计算机、服务器、移动终端、穿戴设备等任何适于实施的设备。
如图1所示,在一些实施方式中,本公开示例的图像检测方法,包括:
S110、基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件。
本公开实施方式中,需要预先建立检测等级与预设条件的对应关系。检测等级是指 根据不同的场景需求,对图像质量检测划分的检测等级。在一个示例中,可针对前述的常规安防场景、门禁场景以及会员场景分别设置不同的检测等级。预设条件是基于不同的检测等级设置的对图像质量检测的检测逻辑,也即每个检测等级对应有一个预设条件,该预设条件表示满足该检测等级对于图像质量检测要求的条件。
在一些实施方式中,预先建立的检测等级与预设条件的对应关系可如下表一所示:
表一
检测等级 预设条件
等级I 条件1
等级II 条件2
等级III 条件3
当前检测等级表示当前场景下所对应的检测等级。在一些实施方式中,当前检测等级可以由后台工作人员预先进行设置,例如,在部署图像质量检测模型时,工作人员可以基于当前场景需求设置当前检测等级。
基于上述例如表一所示的对应关系,在得到当前检测等级之后,即可以根据该对应关系得到与当前检测等级对应的预设条件,也即目标预设条件。例如在一个示例中,当前检测等级为“等级I”,从而可以根据表一的对应关系确定目标预设条件为“条件1”。
对于建立检测等级与预设条件的对应关系的具体过程,本公开在下文的实施方式中进行说明,在此暂不详述。
S120、对待检测图像进行图像检测,响应于待检测图像满足目标预设条件,对待检测图像进行入库处理。
在确定目标预设条件之后,即可根据目标预设条件对待检测图像进行图像检测,以判断待检测图像是否满足目标预设条件。
待检测图像表示需要进行质量检测的图像。在一些实施方式中,待检测图像可以由用户主动上传得到,也可以通过图像采集设备被动采集得到,还可以通过网络获取得到,本公开对此不作限制。
可以理解,目标预设条件表示当前检测等级下图像是否符合入库要求的判断条件。因此,可以基于图像检测技术对待检测图像进行图像检测,从而确定待检测图像是否满足目标预设条件。若待检测图像不满足目标预设条件,则表示待测图像不符合当前检测等级下的入库要求。若待检测图像满足目标预设条件,则表示待检测图像符合当前检测等级下的入库要求,从而可对待检测图像进行入库处理。
待检测图像在进行入库处理之后,即可被保存在数据库中,作为后续业务中的参考图像。以后续业务为人脸识别为例,当用户A的待检测图像入库之后,即可以作为用户A的参考图像,从而在后续的人脸识别场景中,基于采集的用户A的人脸图像与数据库中用户A的该参考图像进行对比,以对用户A进行人脸识别。本领域技术人员对此可以理解,本公开不再赘述。
通过上述可知,本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。在图像质量检测时,质量检测模型可以适用于多种场景需求,鲁棒性更强。并且,质量检测模型只需要经过一次训练即可应用于多种场景,在场景移植 时只需要切换对应的预设条件即可,无需重新进行模型训练,可以提高质量检测模型的部署效率。
如图2所示,在一些实施方式中,本公开示例的图像检测方法中,建立检测等级与预设条件的对应关系的过程包括:
S210、获取对待检测图像进行质量检测的多个检测类型以及每个检测类型对应的检测条件。
S220、由所述多个检测类型中确定每个检测等级对应的检测类型和检测条件,得到所述检测等级与所述预设条件的对应关系。
检测类型表示对待检测图像进行检测的多个检测维度。例如一些实施方式中,以人脸识别场景为例,检测维度可以包括以下几个方面:图像中是否有人脸、人脸范围占比、人脸遮挡情况、人脸转动角度、人脸五官轮廓等,通过综合这些检测维度,可以构建出相对应的多个检测类型。
其中,每个检测类型具有相对应的检测条件,检测条件表示检测类型是否检测通过的判断条件。在一个示例中,以检测类型为“人脸占比”为例,其对应的检测条件可以是“人脸占比不低于35%”,当待检测图像中人脸占比低于35%,表示待检测图像的人脸占比检测不通过,反之,即当待检测图像中人脸占比不低于35%,则表示待检测图像的人脸占比检测通过。在另一个示例中,以检测类型为“人脸角度”为例,其对应的检测条件可以是“人脸偏转角不超过15°”,当待检测图像中人脸偏转角超过15°,表示待检测图像中人脸角度检测不通过,反之,即当待检测图像中人脸偏转角不超过15°,则表示待检测图像中人脸角度检测通过。
在一些实施方式中,获取检测类型和检测条件的过程可以参见图3所示的实施方式,下面结合图3进行说明。
如图3所示,在一些实施方式中,本公开示例的图像检测方法中,获取多个检测类型和检测条件的过程包括:
S211、获取至少两个预设图像检测标准,其中每个预设图像检测标准包括至少一个检测类型以及检测类型对应的至少一个检测条件。
S212、根据至少两个预设图像检测标准包括的检测类型和检测条件,确定对待检测图像进行检测的多个检测类型和检测条件。
预设图像检测标准表示预先设置的对图像进行质量检测的检测标准。可以理解,预设图像检测标准可以是基于先验知识或者通过网络等渠道获取的不同领域中对图像进行质量检测的检测标准。在一些实施方式中,预设图像检测标准可以是不同地域范围的照片入库标准。
以人脸识别场景为例,一个示例中,不同国家对于护照照片的入库标准均具有多维度的要求,因此护照照片的入库标准即可以作为其中一个预设图像检测标准。又一个示例中,社保局对于社保照片的入库标准具有多维度的要求,因此社保照片的入库标准即可以作为其中一个预设图像检测标准。
当然,本公开所述的预设图像检测标准还可以是其他任何适于实施的针对图像的规范化检测标准,并不局限于上述的护照照片和社保照片的入库标准。本领域技术人员对此可以理解,本公开不再赘述。
在得到多个预设图像检测标准之后,即可根据多个预设图像检测标准包括的检测类型和检测条件,确定对待检测图像进行质量检测的多个检测类型和检测条件。
如图4所示,在一些实施方式中,本公开示例的图像检测方法,确定对待检测图像进行质量检测的多个检测类型和检测条件的过程,包括:
S410、获取每个预设图像检测标准包括的检测类型和检测条件。
S420、对至少两个预设图像检测标准包括的检测类型进行融合处理,得到对待检测图像进行质量检测的检测类型。
在一些实施方式中,为使得质量检测模型可以针对不同国家或地域范围的人脸均具有良好的精度,因此可将不同地域范围的护照照片的入库标准作为预设图像检测标准,并且可以基于预设图像检测标准包括的不同检测条件之间的共性和差异建立本公开针对待检测图像的多个检测类型。
举例来说,A国家护照照片的入库标准要求了:照片尺寸为5*5厘米,人脸范围占整张照片不低于50%,人脸位置位于照片正中间,人脸角度不能倾斜。B国家护照照片的入库标准要求了:照片尺寸为3*4厘米,五官需露出不得有遮盖,人眼不得斜视,人脸范围占整张照片不低于35%,人脸角度不能倾斜。
也即,上述A国家对护照照片的检测维度包括了:照片尺寸、人脸占比、人脸位置、人脸角度。B国家对护照照片的检测维度包括了:照片尺寸、五官轮廓、注视方向、人脸占比、人脸角度。
在一些实施方式中,可以综合A国家和B国家对护照照片的检测维度,对各个检测维度取并集,以此构建得到的多个检测类型可包括:照片尺寸、人脸占比、人脸位置、人脸角度、五官轮廓、注视方向。
可以理解,上述仅作为本公开实施方式的一些示例,在其他实施方式中,检测类型还可以包括其他的检测维度,例如人脸亮度、人脸锐度、嘴部开合程度等。本领域技术人员可以根据具体场景需求进行选择,本公开对此无需穷举。
S430、对于对待检测图像进行质量检测的任意一个检测类型,根据检测类型在至少两个预设图像检测标准中对应的各个检测条件取交集,可以得到该检测类型对应的检测条件。
可以理解,预设图像检测标准中的每个检测类型均具有对应的检测条件。在一个示例中,以检测类型为图像尺寸为例,对应的检测条件即可以是“图像尺寸不超过5*5厘米”。在另一个示例中,以检测类型为人脸占比为例,对应的检测条件即可以是“人脸范围/图像大小不小于35%”。在又一个示例中,以检测类型为人脸角度为例,对应的检测条件即可以是“人脸的偏转角/航向角/俯仰角不超过15°”。
也即,每个检测类型均具有对应的检测条件,检测条件表示该项检测类型是否通过检测的判断逻辑。例如,以检测类型为图像尺寸为例,对应的检测条件为“图像尺寸不超过5*5厘米”,若待检测图像的尺寸大于5*5厘米,则表示待检测图像针对图像尺寸的检测未通过。
在一些实施方式中,多个预设图像检测标准中可能具有相同的检测类型,但是同一检测类型在不同的预设图像检测标准中对应的检测条件可能各不相同。例如,以检测类型为图像尺寸为例,其在检测标准1中对应的检测条件为“图像尺寸不超过3.5cm*3.5cm”,而其在检测标准2中对应的检测条件为“图像尺寸不小于2cm*2cm,且不超过5cm*5cm”。从而,可综合这两个检测标准中的检测条件,例如对这两个检测条件取交集,确定图像尺寸对应的检测条件为“图像尺寸不小于2cm*2cm,且不超过3.5cm*3.5cm”,使其可以同时满足两个不同的检测标准。本领域技术人员对此可以理解并充分实施,本公开对此不再赘述。
在构建针对待检测图像的多个检测类型以及检测条件之后,即可针对不同的检测等级设置对应的检测类型以及预设条件。可以理解,不同检测等级对应不同的场景需求,因此不同检测等级所包括的检测类型也不相同。由于预设条件由检测等级所包括的检测类型对应的检测条件组成,因此各个检测等级对应的预设条件也就各不相同。
例如一些实施方式中,建立的检测等级与预设条件的对应关系可如下表二所示:
表二
检测等级 检测类型 预设条件
等级I 类型1、类型2 条件1
等级II 类型1、类型2、类型3 条件2
等级III 类型1、类型3、类型4、类型5、类型6 条件3
通过上表二可以看到,不同的检测等级所包括的检测类型不相同,从而后续对待检测图像进行质量检测时的预设条件也不相同。
在一些实施方式中,以人脸图像的质量检测场景为例,检测类型可以包括以下至少检测维度之一:
1)图像尺寸,表示图像的大小,例如2.5cm*3.5cm。
2)人脸占比,表示图像中人脸范围占整个图像的比值大小,例如35%、50%、80%等。
3)人脸位置,表示图像中人脸范围在整个图像的位置,例如居中、偏左、偏右等。
4)人脸角度,表示图像中人脸的偏转情况,包括俯仰角、偏转角以及航向角的偏转角度。
5)人脸亮度,表示图像中人脸的亮度值。
6)人脸锐度,表示图像中人脸的清晰度。
7)嘴部开合程度,表示图像中人脸嘴部的开合大小。
8)人脸五官轮廓,表示图像中人脸五官的遮挡情况,是否可以捕捉到五官关键点。
基于上述检测类型,建立的检测等级与预设条件的对应关系可如下表三所示:
表三
Figure PCTCN2022108681-appb-000001
值得说明的是,上述检测类型和对应关系仅作为本公开示例性的实施方式。在其他实施方式中,检测类型还可以包括其他的检测维度,并且检测等级与检测类型的对应关系也不局限于上述示例。本领域技术人员可以根据具体场景需求进行选择,本公开对此无需穷举。
通过上述可知,本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。在图像质量检测时,质量检测模型可以适用于多种场景需求,鲁棒性更强。并且,质量检测模型只需要经过一次训练即可应用于多种场景,在场景移植时只需要切换对应的检测等级即可,无需重新进行模型训练,提高了质量检测模型部署效率。另外,可以基于不同地域范围的护照照片的检测条件建立检测等级与预设条件的对应关系,使得检测模型在不同地域范围使用均具有较强的鲁棒性。
通过上述表三所示的对应关系,即可在当前检测等级下对待检测图像进行质量检测。
如图5所示,在一些实施方式中,本公开示例的图像检测方法中,确定待检测图像是否满足目标预设条件的过程包括:
S510、对待检测图像进行特征提取,得到与目标预设条件包括的每个检测类型对应的图像特征。
S520、响应于根据图像特征确定待检测图像通过目标预设条件中每个检测类型的检测,确定待检测图像满足目标预设条件。
基于前述检测等级与检测类型、预设条件的对应关系可确定当前检测等级对应的检测类型和预设条件。例如参照上述表三所示,根据当前检测等级对应的各个检测类型,对待检测图像进行特征提取,从而得到每个检测类型对应的图像特征。
在一个示例中,以检测类型为图像尺寸为例,通过对待检测图像进行处理,得到待检测图像的尺寸大小,该尺寸大小即为与图像尺寸对应的图像特征。
在一个示例中,以检测类型为人脸角度为例,基于人脸识别技术对待检测图像中的人脸范围进行特征提取,确定待检测图像中的人脸偏转角度,该偏转角度即为与人脸角度对应的图像特征。
在一个示例中,以检测类型为人脸占比为例,基于人脸识别技术对待检测图像中的人脸范围进行特征提取,确定待检测图像中的人脸占比大小,该人脸占比大小即为与人脸占比对应的图像特征。
换言之,图像特征是指待检测图像中与检测类型对应的相关参数,本领域技术人员对此可以理解并充分实施,本公开不再赘述枚举。
对于每个检测类型,在得到对应的图像特征之后,即可根据该图像特征和该检测类型对应的检测条件确定待检测图像的该检测类型是否检测通过。
在一个示例中,以检测类型为图像尺寸为例,检测条件为“图像尺寸不超过2.5cm*3.5cm”。通过对待检测图像进行特征提取,若得到待检测图像的图像特征为“图像尺寸大小为3.5cm*3.5cm”,则可以确定待检测图像的图像尺寸的检测未通过。若得到待检测图像的图像特征为“图像尺寸大小为2cm*2cm”,则可以确定待检测图像的图像尺寸的检测通过。
在一个示例中,以检测类型为人脸占比为例,检测条件为“人脸占比不低于50%”。通过对待检测图像进行特征提取,若得到待检测图像的图像特征为“人脸占比为38%”,则可以确定待检测图像的人脸占比的检测未通过。若得到待检测图像的图像特征为“人脸占比为65%”,则可以确定待检测图像的人脸占比的检测通过。
通过上述示例的过程,可依次对当前检测等级对应的各个检测类型进行判断。若当前检测等级对应的目标预设条件中的每个检测类型均检测通过,则确定待检测图像满足目标预设条件,可以入库。反之,若当前检测等级对应的目标预设条件中的某个检测类型未检测通过,表示待检测图像不满足目标预设条件,无法入库。
通过上述可知,本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。在图像质量检测时,质量检测模型可以适用于多种场景需求,鲁棒性更强。并且,质量检测模型只需要经过一次训练即可应用于多种场景,在场景移植时只需要切换对应的检测等级即可,无需重新进行模型训练,提高了质量检测模型部署效率。
图6示出了本公开一些实施方式中图像检测系统的示意图。如图6所示,所述图像检测系统包括服务器100和客户端200,本公开上述质量检测模型可以部署于服务器100中,服务器100可通过无线或者有线的方式与各个客户端200建立通信连接。
在一些实施方式中,本公开示例中的待检测图像可以是由客户端200上传的图像。
具体来说,客户端200可以是计算机或者移动终端等设备,客户端200具有显示屏,从而在其显示屏上可输出显示界面。显示界面如图7所示,客户端200的用户可通过显示界面上的“上传图像”按钮添加待检测图像,在用户添加完成之后,客户端200可将用户添加的待检测图像发送至服务器100。
在一些实施方式中,服务器100在获取到待检测图像之后,可利用人脸检测模型对待检测图像进行图像检测,提取待检测图像中包含有效人脸的区域,作为后续特征提取的基础图像。
在一些实施方式中,本公开实施方式的图像检测方法还包括:响应于待检测图像不满足目标预设条件,生成对应的提示信息,并通过显示界面输出提示信息。
结合前述可知,当待检测图像对于目标预设条件的某项检测类型的检测未通过,可生成对应的提示信息,并通过显示界面输出该提示信息。从而可以提示用户哪项检测类型未通过检测,便于用户有针对性地对待检测图像进行调整,继而上传符合预设条件的待检测图像。下面结合图8进行具体说明。
如图8所示,在一些实施方式中,本公开示例的图像检测方法中,生成提示信息的过程包括:
S810、响应于待检测图像不满足目标预设条件,获取目标预设条件中待检测图像检测未通过的检测类型。
S820、根据检测未通过的检测类型确定提示信息。
具体来说,结合前述图5所示的实施方式,在待检测图像不满足目标预设条件的情况下,表示目标预设条件中的至少一个检测类型的检测未通过,从而可以获取所有检测未通过的检测类型,然后根据检测未通过的检测类型确定提示信息。
在一个示例中,假设待检测图像的图像尺寸过大导致图像尺寸的检测未通过,并且人脸占比过小导致人脸占比的检测未通过。从而可以根据该两项检测未通过的检测类型,确定提示信息为“图像尺寸过大,请上传不超过2.5cm*3.5cm的图像;图像人脸占比过小,请上传人脸占比不低于65%的图像”,例如图9中所示。
通过上述可知,本公开实施方式中,在待检测图像不满足目标预设条件时,通过显示界面输出提示信息,可以提示用户哪项检测类型的检测未通过,便于用户有针对性地对待检测图像进行调整。
在一些实施方式中,在确定待检测图像满足目标预设条件之后,即可对待检测图像进行入库处理。
如图10所示,在一些实施方式中,本公开示例的图像检测方法,对待检测图像进行入库处理的过程包括:
S1010、根据待检测图像以及与待检测图像对应的用户信息确定用户数据。
S1020、将用户数据保存在数据库中。
在确定待检测图像满足目标预设条件的情况下,表示待检测图像符合入库要求,此时可获取与待检测图像对应的用户信息。用户信息表示上传待检测图像的用户标识,例如用户ID(Identity document,身份标识号)等。在得到用户信息之后,可将用户信息与待检测图像打包作为该用户的用户数据,并将用户数据保存在数据库中,作为下游识别任务的参考图像数据。
如图11所示,在一些实施方式中,本公开示例的图像检测方法包括:
S1110、根据至少两个不同地域范围的护照照片的入库标准,确定对待检测图像的多个检测类型及检测条件。
例如,可以根据多个国家的护照照片的入库标准,基于其中包括的检测条件的共性和差异确定对待检测图像的多个检测类型以及对应的检测条件。本领域技术人员参照前述可以理解并充分实施,在此不再赘述。
S1120、根据每个检测等级对应的至少一个检测类型和检测条件,建立检测等级与预设条件的对应关系。
本领域技术人员参照前述图2所示实施方式即可,对此不再赘述。
S1130、基于检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件。
当前检测等级可以由服务器端的工作人员基于具体的场景需求进行设置。在设置检测等级之后,即可根据设置的检测等级确定对应的预设条件为目标预设条件。
S1140、接收客户端发送的待检测图像,并对待检测图像进行特征提取,得到与目标预设条件包括的每个检测类型对应的图像特征。
如图6所示,用户可通过客户端200上传待检测图像,从而服务器100可以接收到客户端发送的待检测图像。服务器基于前述图5所示的实施方式对待检测图像进行特征提取,得到与目标预设条件包括的多个检测类型中的每个检测类型对应的图像特征。
S1150、响应于根据图像特征确定目标预设条件中的每个检测类型的检测通过,确定待检测图像满足目标预设条件。
可基于前述图5所示的实施方式分别确定每个检测类型是否检测通过,若每个检测类型均检测通过,确定待检测图像满足目标预设条件,执行步骤S1160。
S1160、对所述待检测图像进行入库处理。
可参照前述图10的实施方式所示,对待检测图像进行入库处理,对此不再赘述。
S1170、响应于根据图像特征确定目标预设条件中的至少一个检测类型的检测未通过,确定待检测图像不满足目标预设条件。
可基于前述图5所示的实施方式分别确定每个检测类型是否检测通过,若存在某个检测类型的检测未通过,确定待检测图像不满足目标预设条件,执行步骤S1180。
S1180、生成并输出提示信息。
具体而言,可基于前述图8所示的实施方式生成提示信息,并将提示信息在客户端200的显示界面上输出,以提示用户修改待检测图像后重新上传。
通过上述可知,本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。在图像质量检测时,质量检测模型可以适用于多种场景需求,鲁棒性更强。并且,质量检测模型只需要经过一次训练即可应用于多种场景,在场景移植时只需要切换对应的检测等级即可,无需重新进行模型训练,提高了质量检测模型部署效率。另外,可以基于不同地域范围的护照照片的入库标准建立检测等级与预设条件的对应关系,使得检测模型在不同地域范围使用均具有较强的鲁棒性。在待检测图像不满足目标预设条件时,通过显示界面输出提示信息,从而可以提示用户哪项检测类型的检测未通过,便于用户有针对性地对待检测图像进行调整。
第二方面,本公开实施方式提供了一种图像检测装置,该装置可应用于电子设备。本公开实施方式中,对于电子设备的类型不作限制,其可以是例如计算机、服务器、移动终端、穿戴设备等任何适于实施的设备。
如图12所示,在一些实施方式中,本公开示例的图像检测装置包括:确定模块10,被配置为基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件;检测模块20,被配置为对待检测图像进行图像检测,响应于所述待检测图像满足所述目标预设条件,对所述待检测图像进行入库处理。
通过上述可知,本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。在图像质量检测时,质量检测模型可以适用于多种场景需求,鲁棒性更强。并且,质量检测模型只需要经过一次训练即可应用于多种场景,在场景移植时只需要切换对应的预设条件即可,无需重新进行模型训练,提高了质量检测模型部署效率。
如图13所示,在一些实施方式中,本公开装置还包括关系建立模块40,所述关系建立模块40被配置为:获取对所述待检测图像进行质量检测的多个检测类型以及每个检测类型对应的检测条件;由所述多个检测类型中确定每个检测等级对应的检测类型和 检测条件,得到所述检测等级与所述预设条件的对应关系。
在一些实施方式中,所述关系建立模块40还被配置为:获取至少两个预设图像检测标准,其中每个预设图像检测标准包括至少一个检测类型以及所述检测类型对应的至少一个检测条件;根据所述至少两个预设图像检测标准包括的检测类型和检测条件,确定对所述待检测图像进行检测的多个检测类型和检测条件。
在一些实施方式中,所述关系建立模块40还被配置为:获取每个所述预设图像检测标准包括的所述检测类型和所述检测条件;对所述至少两个预设图像检测标准包括的检测类型进行融合处理,得到对所述待检测图像进行质量检测的检测类型;
对于对所述待检测图像进行质量检测的任意一个检测类型,根据所述检测类型在所述至少两个预设图像检测标准中对应的各个检测条件取交集,可以得到所述检测类型对应的检测条件。
在一些实施方式中,所述预设图像检测标准包括不同地域范围的照片入库标准。
在一些实施方式中,所述检测模块20具体被配置为:对所述待检测图像进行特征提取,得到与所述目标预设条件包括的每个检测类型对应的图像特征;响应于根据所述图像特征确定所述目标预设条件中的每个所述检测类型的检测通过,确定所述待检测图像满足所述目标预设条件。
在一些实施方式中,所述待检测图像为人脸图像;所述检测类型包括以下至少之一:图像尺寸;人脸占比;人脸位置;人脸角度;人脸亮度;人脸锐度;嘴部开合程度;人脸五官轮廓。
如图13所示,在一些实施方式中,本公开实施方式的装置,还包括:获取模块30,被配置为接收通过显示界面上传的所述待检测图像。
在一些实施方式中,所述检测模块20还被配置为:响应于所述待检测图像不满足所述目标预设条件,生成对应的提示信息,并通过所述显示界面输出所述提示信息。
在一些实施方式中,所述检测模块20具体被配置为:响应于所述待检测图像不满足所述目标预设条件,获取所述目标预设条件中待检测图像检测未通过的检测类型;根据所述检测未通过的检测类型确定所述提示信息。
在一些实施方式中,所述检测模块20具体被配置为:根据所述待检测图像以及与所述待检测图像对应的用户信息确定用户数据;将所述用户数据保存在数据库中。
通过上述可知,本公开实施方式中,基于不同的场景需求建立不同的检测等级,提高识别业务的精度。在图像质量检测时,质量检测模型可以适用于多种场景需求,鲁棒性更强。并且,质量检测模型只需要经过一次训练即可应用于多种场景,在场景移植时只需要切换对应的检测等级即可,无需重新进行模型训练,提高了质量检测模型部署效率。另外,基于不同地域范围的护照照片的入库标准建立检测等级与预设条件的对应关系,使得检测模型在不同地域范围使用均具有较强的鲁棒性。在待检测图像不满足目标预设条件时,通过显示界面输出提示信息,从而可以提示用户哪项检测类型未通过检测,便于用户有针对性地对待检测图像进行调整。
第三方面,本公开实施方式提供了一种电子设备,包括处理器以及存储器,存储有能够被所述处理器读取的计算机指令,当所述计算机指令被读取时,所述处理器执行第一方面任一实施方式所述的方法。
第四方面,本公开实施方式提供了一种存储介质,用于存储计算机可读指令,所述计算机可读指令用于使计算机执行第一方面任一实施方式所述的方法。
具体而言,图14示出了适于用来实现本公开方法的电子设备600的结构示意图,通过图14所示电子设备,可实现上述处理器及存储介质相应功能。
如图14所示,电子设备600包括处理器601,其可以根据存储在存储器602中的程序或者从存储部分608加载到存储器602中的程序而执行各种适当的动作和处理。在存储器602中,还存储有电子设备600操作所需的各种程序和数据。处理器601和存储器602通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网、局域网等的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于使得从其上读出的计算机程序根据需要被安装入存储部分608。
特别地,根据本公开的实施方式,上文的方法过程可以被实现为计算机软件程序。例如,本公开的实施方式包括一种计算机程序产品,其包括包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行上述方法的程序代码。在这样的实施方式中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。
附图中的流程图和框图,图示了按照本公开各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
显然,上述实施方式仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引申出的显而易见的变化或变动仍处于本公开创造的保护范围之中。

Claims (15)

  1. 一种图像检测方法,其特征在于,包括:
    基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件;
    对待检测图像进行图像检测,
    响应于所述待检测图像满足所述目标预设条件,对所述待检测图像进行入库处理。
  2. 根据权利要求1所述的方法,其特征在于,预先建立所述检测等级与预设条件的对应关系,包括:
    获取对所述待检测图像进行检测的至少一个检测类型以及每个所述检测类型对应的至少一个检测条件;
    从所述至少一个检测类型中确定每个所述检测等级对应的检测类型和检测条件,得到所述检测等级与预设条件的对应关系。
  3. 根据权利要求2所述的方法,其特征在于,所述从所述至少一个检测类型中确定每个所述检测等级对应的检测类型和检测条件,得到所述检测等级与预设条件的对应关系,包括:
    针对每个所述检测等级,
    从获取的所述至少一个检测类型中确定所述检测等级中包括的检测类型;
    根据所述检测等级包括的检测类型对应的检测条件,确定所述检测等级对应的预设条件;
    基于每个所述检测等级对应的预设条件,得到所述检测等级与预设条件的对应关系。
  4. 根据权利要求2所述的方法,其特征在于,所述获取对所述待检测图像进行检测的至少一个检测类型以及每个所述检测类型对应的至少一个检测条件,包括:
    获取至少两个预设图像检测标准,其中每个所述预设图像检测标准包括至少一个检测类型以及所述检测类型对应的至少一个检测条件;
    根据所述至少两个预设图像检测标准包括的检测类型和检测条件,确定对所述待检测图像进行检测的至少一个检测类型和检测条件。
  5. 根据权利要求4所述方法,其特征在于,所述根据所述至少两个预设图像检测标准包括的检测类型和检测条件,确定对所述待检测图像进行检测的至少一个检测类型和检测条件,包括:
    获取每个所述预设图像检测标准包括的检测类型和检测条件;
    对所述至少两个预设图像检测标准包括的检测类型进行融合处理,得到对所述待检测图像进行检测的检测类型;
    对于对所述待检测图像进行检测的任意一个检测类型,根据所述检测类型在所述至少两个预设图像检测标准中对应的各个检测条件取交集,得到所述检测类型对应的检测条件。
  6. 根据权利要求4所述的方法,其特征在于,
    所述预设图像检测标准包括不同地域范围的照片入库标准。
  7. 根据权利要求2所述的方法,其特征在于,所述对待检测图像进行图像检测,响应于所述待检测图像满足所述目标预设条件,包括:
    对所述待检测图像进行特征提取,得到与所述目标预设条件包括的每个检测类型对应的图像特征;
    响应于根据所述图像特征确定所述目标预设条件中的每个所述检测类型的检测通过,确定所述待检测图像满足所述目标预设条件。
  8. 根据权利要求2至7任一项所述的方法,其特征在于,
    所述待检测图像为人脸图像;
    所述检测类型包括以下至少之一:图像尺寸;人脸占比;人脸位置;人脸角度;人 脸亮度;人脸锐度;嘴部开合程度;人脸五官轮廓。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述方法还包括:
    接收通过显示界面上传的所述待检测图像;
    响应于所述待检测图像不满足所述目标预设条件,生成对应的提示信息,并通过所述显示界面输出所述提示信息。
  10. 根据权利要求9所述的方法,其特征在于,所述响应于所述待检测图像不满足所述目标预设条件,生成对应的提示信息,包括:
    响应于所述待检测图像不满足所述目标预设条件,获取所述目标预设条件中检测未通过的检测类型;
    根据所述检测未通过的检测类型确定所述提示信息。
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述对所述待检测图像进行入库处理包括:
    根据所述待检测图像以及与所述待检测图像对应的用户信息确定用户数据;
    将所述用户数据保存在数据库中。
  12. 一种图像检测装置,其特征在于,包括:
    确定模块,被配置为基于预先建立的检测等级与预设条件的对应关系,确定与当前检测等级对应的目标预设条件;
    检测模块,被配置为对待检测图像进行图像检测,响应于所述待检测图像满足所述目标预设条件,对所述待检测图像进行入库处理。
  13. 一种电子设备,其特征在于,包括:
    处理器;以及
    存储器,存储有能够被所述处理器读取的计算机指令,当所述计算机指令被读取时,所述处理器执行根据权利要求1至11任一项所述的方法。
  14. 一种存储介质,其特征在于,用于存储计算机可读指令,所述计算机可读指令用于使计算机执行根据权利要求1至11任一项所述的方法。
  15. 一种计算机程序产品,包括计算机可执行程序,所述计算机可执行程序被处理器执行时执行根据权利要求1至11任一项所述的方法。
PCT/CN2022/108681 2021-09-15 2022-07-28 用于图像检测的方法、装置、电子设备以及存储介质 WO2023040480A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111080907.X 2021-09-15
CN202111080907.XA CN113792662B (zh) 2021-09-15 2021-09-15 图像检测方法、装置、电子设备以及存储介质

Publications (1)

Publication Number Publication Date
WO2023040480A1 true WO2023040480A1 (zh) 2023-03-23

Family

ID=78878394

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/108681 WO2023040480A1 (zh) 2021-09-15 2022-07-28 用于图像检测的方法、装置、电子设备以及存储介质

Country Status (2)

Country Link
CN (1) CN113792662B (zh)
WO (1) WO2023040480A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792662B (zh) * 2021-09-15 2024-05-21 北京市商汤科技开发有限公司 图像检测方法、装置、电子设备以及存储介质
CN115240265B (zh) * 2022-09-23 2023-01-10 深圳市欧瑞博科技股份有限公司 用户智能识别方法、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2187350A1 (en) * 2008-11-05 2010-05-19 Thomson Licensing Method and device for assessing image quality degradation
CN107169458A (zh) * 2017-05-18 2017-09-15 深圳云天励飞技术有限公司 数据处理方法、装置及存储介质
CN107590212A (zh) * 2017-08-29 2018-01-16 深圳英飞拓科技股份有限公司 一种人脸图片的入库系统及方法
CN112001280A (zh) * 2020-08-13 2020-11-27 浩鲸云计算科技股份有限公司 一种实时、可在线优化的人脸识别系统和方法
CN113792662A (zh) * 2021-09-15 2021-12-14 北京市商汤科技开发有限公司 图像检测方法、装置、电子设备以及存储介质
CN113792661A (zh) * 2021-09-15 2021-12-14 北京市商汤科技开发有限公司 图像检测方法、装置、电子设备以及存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5693162B2 (ja) * 2010-11-09 2015-04-01 キヤノン株式会社 画像処理システム、撮像装置、画像処理装置及びそれらの制御方法、プログラム
CN108391059A (zh) * 2018-03-23 2018-08-10 华为技术有限公司 一种图像处理的方法和装置
CN108509958A (zh) * 2018-03-30 2018-09-07 北京金山安全软件有限公司 缺陷类型检测方法、装置、电子设备及介质
CN109858381A (zh) * 2019-01-04 2019-06-07 深圳壹账通智能科技有限公司 活体检测方法、装置、计算机设备和存储介质
CN110070001A (zh) * 2019-03-28 2019-07-30 上海拍拍贷金融信息服务有限公司 行为检测方法及装置、计算机可读存储介质
CN110458062A (zh) * 2019-07-30 2019-11-15 深圳市商汤科技有限公司 人脸识别方法及装置、电子设备和存储介质
CN111783663A (zh) * 2020-06-30 2020-10-16 公安部第三研究所 一种用于人证核验设备性能检测的算法测评系统及检测方法
CN112115886A (zh) * 2020-09-22 2020-12-22 北京市商汤科技开发有限公司 图像检测方法和相关装置、设备、存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2187350A1 (en) * 2008-11-05 2010-05-19 Thomson Licensing Method and device for assessing image quality degradation
CN107169458A (zh) * 2017-05-18 2017-09-15 深圳云天励飞技术有限公司 数据处理方法、装置及存储介质
CN107590212A (zh) * 2017-08-29 2018-01-16 深圳英飞拓科技股份有限公司 一种人脸图片的入库系统及方法
CN112001280A (zh) * 2020-08-13 2020-11-27 浩鲸云计算科技股份有限公司 一种实时、可在线优化的人脸识别系统和方法
CN113792662A (zh) * 2021-09-15 2021-12-14 北京市商汤科技开发有限公司 图像检测方法、装置、电子设备以及存储介质
CN113792661A (zh) * 2021-09-15 2021-12-14 北京市商汤科技开发有限公司 图像检测方法、装置、电子设备以及存储介质

Also Published As

Publication number Publication date
CN113792662A (zh) 2021-12-14
CN113792662B (zh) 2024-05-21

Similar Documents

Publication Publication Date Title
WO2023040480A1 (zh) 用于图像检测的方法、装置、电子设备以及存储介质
JP6994588B2 (ja) 顔特徴抽出モデル訓練方法、顔特徴抽出方法、装置、機器および記憶媒体
TW201911130A (zh) 一種翻拍影像識別方法及裝置
US9262614B2 (en) Image processing device, image processing method, and storage medium storing image processing program
WO2023040314A1 (zh) 用于图像检测的方法、装置、电子设备以及存储介质
US9280804B2 (en) Rotation of an image based on image content to correct image orientation
WO2022100337A1 (zh) 人脸图像质量评估方法、装置、计算机设备及存储介质
CN112954450B (zh) 视频处理方法、装置、电子设备和存储介质
US11126827B2 (en) Method and system for image identification
CN111738120B (zh) 人物识别方法、装置、电子设备及存储介质
CN108509994B (zh) 人物图像聚类方法和装置
WO2021004137A1 (zh) 基于人脸识别的信息推送方法、装置、计算机设备
CN114463828B (zh) 基于人证统一的监考方法及系统、电子设备和存储介质
TW201944294A (zh) 身份驗證方法和裝置、電子裝置、電腦程式和儲存介質
EP3779775A1 (en) Media processing method and related apparatus
EP2701096A2 (en) Image processing device and image processing method
CN111241873A (zh) 图像翻拍检测方法及其模型的训练方法、支付方法及装置
CN111881740A (zh) 人脸识别方法、装置、电子设备及介质
CN112270261A (zh) 题干及答案混合的切分方法、装置、存储介质
CN111783677A (zh) 人脸识别方法、装置、服务器和计算机可读介质
US20230116291A1 (en) Image data processing method and apparatus, device, storage medium, and product
TWI667054B (zh) 飛行器飛行控制方法、裝置、飛行器及系統
CN111325185B (zh) 人脸防欺诈方法及系统
CN115690883A (zh) 一种目标训练样本集的获得方法及相关装置
US11749021B2 (en) Retrieval device, control method, and non-transitory storage medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE