CN112287830A - Image detection method and device - Google Patents
Image detection method and device Download PDFInfo
- Publication number
- CN112287830A CN112287830A CN202011180584.7A CN202011180584A CN112287830A CN 112287830 A CN112287830 A CN 112287830A CN 202011180584 A CN202011180584 A CN 202011180584A CN 112287830 A CN112287830 A CN 112287830A
- Authority
- CN
- China
- Prior art keywords
- image
- face
- processed
- extension
- standard
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 103
- 238000000034 method Methods 0.000 claims abstract description 72
- 238000004590 computer program Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 5
- 230000001815 facial effect Effects 0.000 abstract description 11
- 210000000697 sensory organ Anatomy 0.000 description 21
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 210000000056 organ Anatomy 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/165—Detection; Localisation; Normalisation using facial parts and geometric relationships
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
- G06V40/171—Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- General Health & Medical Sciences (AREA)
- Geometry (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Collating Specific Patterns (AREA)
Abstract
The invention provides a method and a device for detecting an image, computer equipment and a computer readable storage medium, wherein the method comprises the following steps: identifying at least one face region from the image to be processed; performing edge extension on the face area by taking the face area as a center to obtain a face extension image; and determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image. According to the invention, through edge extension, the face extension image finally compared with the standard image not only comprises a face area with human facial features in the image to be processed, but also comprises other areas around the face area, and the other areas can contain other features of the human body, so that the other features of the human body and the human facial features can be simultaneously utilized to be compared with the standard image together, and therefore, the accuracy of face detection can be improved without special shooting process and shooting rule, and the process of shooting to obtain the image to be processed is rapid and convenient.
Description
Technical Field
The invention belongs to the technical field of image recognition, and particularly relates to an image detection method, an image detection device, computer equipment and a computer readable storage medium.
Background
With the development of society and the progress of science and technology, face recognition plays an important role in the application fields of identity authentication, access control, security detection, monitoring, man-machine intelligent interaction and the like.
In the prior art, when performing face recognition on an image including a portrait, the image is usually detected by using existing face recognition software such as an open-source computer vision library, and by recognizing features of five sense organs of a human body included in the image, a region including the features of the five sense organs of the human body in the image is determined as a to-be-detected face image including a single face, and by comparing the to-be-detected face image with a standard face image of a target user determined from a preset face image library, for example, a public security system, it is determined whether the to-be-detected face image matches the standard face image, and if the to-be-detected face image matches the standard face image, the portrait included in the image is determined as the target user.
However, in the prior art, in order to improve the accuracy of the face recognition process, a special shooting process and shooting rules are required to ensure that the image contains relatively obvious features of five sense organs, which results in a complicated shooting process, long time consumption and poor user experience.
Disclosure of Invention
In view of this, the present invention provides an image detection method, an image detection apparatus, a computer device, and a computer-readable storage medium, which solve the problem that the current scheme has a complicated and long time-consuming process of acquiring an image for face recognition, which results in poor user experience.
According to a first aspect of the present invention, there is provided an image detection method, including:
acquiring an image to be processed and user information corresponding to the image to be processed;
identifying at least one face area from the image to be processed according to the face characteristics;
in the image to be processed, performing edge extension on the face area by taking the face area as a center to obtain a face extension image comprising a complete face;
acquiring a standard image corresponding to the user information;
and determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image.
According to a second aspect of the present invention, there is provided an apparatus for detecting an image, the apparatus may include:
the device comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring an image to be processed and user information corresponding to the image to be processed;
the recognition module is used for recognizing at least one face area from the image to be processed according to the face features;
the edge extension module is used for carrying out edge extension on the face area by taking the face area as a center in the image to be processed to obtain a face extension image comprising a complete face;
the second acquisition module is used for acquiring a standard image corresponding to the user information;
and the comparison module is used for determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image.
In a third aspect, an embodiment of the present invention provides a computer device, where the computer device includes:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the steps included in the image detection method according to the first aspect according to the obtained program instructions.
In a fourth aspect, the embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the image detection method according to the first aspect.
Aiming at the prior art, the invention has the following advantages:
the invention provides a method for detecting an image, which comprises the following steps: acquiring an image to be processed and user information corresponding to the image to be processed; identifying at least one face area from the image to be processed according to the face characteristics; in the image to be processed, carrying out edge extension on the face area by taking the face area as the center to obtain a face extension image comprising a complete face; acquiring a standard image corresponding to user information; and determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image. After the face region is identified from the image to be processed, the face extension image is further obtained through edge extension, so that the face extension image which is finally compared with the standard image comprises a complete face, namely the face extension image not only comprises the face region with human five sense organs characteristics identified and obtained in the image to be processed according to the face characteristics, but also comprises other regions around the face region, and the other regions can comprise other characteristics of the human body, such as: the outline, the hairline, the neck and the shoulders of the human face can be simultaneously utilized to compare other human body characteristics and human five sense organs characteristics with the standard image, so that the accuracy of human face detection can be improved without special shooting process and shooting rules, the process of shooting to-be-processed images is quick and convenient, and the use experience of a user is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating steps of a method for detecting an image according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an image detection system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a face region in an image to be processed according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps of another method for detecting an image according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an edge extension provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of another edge extension provided by an embodiment of the present invention;
FIG. 7 is a diagram of a hardware architecture provided by an embodiment of the present invention;
fig. 8 is a block diagram of an image detection apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart illustrating steps of an image detection method according to an embodiment of the present invention, where as shown in fig. 1, the method may include:
In this step, an image to be processed for image detection and user information corresponding to the image to be processed may be acquired first.
In the embodiment of the present invention, the detection scheme of the image may be applied to a process of an insurance company for a renewal failure policy, where an administrator of the insurance company visits a client for the renewal failure policy, determines a picture recording the visiting process as a visiting attachment, and uploads the visiting attachment to an Enterprise Content Management (ECM) system.
Further, in order to verify the authenticity of the identity information of the client, the supervising pipe or other personnel in the interview process, the interview attachment generated in the interview process can be determined as the image to be processed, the information of the client corresponding to the continuous insurance policy is determined as the user information corresponding to the image to be processed, then the image to be processed is detected, whether the image to be processed contains the client or not is judged, meanwhile, whether the image to be processed contains the supervising pipe or other personnel or not can be detected, and therefore the authenticity of the identity information of the interview personnel is determined.
Fig. 2 is a schematic structural diagram of an image detection system according to an embodiment of the present invention, and as shown in fig. 2, the image detection system includes a local standard image database, a renewal management platform, an image recognition and expansion system, and an ECM system, where the local standard image database is used to provide a standard image and provide a face recognition interface for comparing a face with a to-be-processed image by using the standard image; the renewal management platform is used for managing the renewal warranty and detecting images of the renewal failure warranty which is not checked and sold in the renewal warranty, the newly added renewal failure warranty and the renewal failure warranty of which the face detection result is not successful; the historical database in the image recognition and expansion system is used for storing information of each policy, such as a division code of the policy, a policy number, a policyholder client number, a policyholder job number, a supervisory type (toll, supervisory part) uploading classification number of an ECM, an image key code uploading the ECM and the like, and storing client information corresponding to the policy, such as a policyholder name, a policyholder certificate type, a policyholder certificate number and the like; the ECM system is used for storing image data generated in the whole process of processing the insurance policy, such as pictures of recording interview processes generated by a supervising and managing staff of an insurance company when interviewing clients aiming at the insurance policy with failure.
Correspondingly, based on the detection system of the image, the image recognition and expansion system can determine the renewal failure policy which needs to be verified from the renewal management platform, so that the information such as the classification number of the uploaded ECM and the image key code of the uploaded ECM corresponding to the renewal failure policy is utilized to obtain the image to be processed corresponding to the renewal failure policy from the ECM system, and the information such as the name of the applicant, the type of the applicant certificate and the number of the applicant certificate corresponding to the renewal failure policy is determined as the user information corresponding to the image to be processed, wherein the renewal failure policy which needs to be verified and is determined by the renewal management platform comprises the renewal failure policy which is not checked, the newly added renewal failure policy and the renewal failure policy which has undergone face detection but the face detection result is not the renewal failure policy which is successfully detected.
For example, if the image recognition and expansion system determines from the renewal management platform that the renewal failure policy requiring verification is stored at 10.129.88.9, the IP address of the renewal failure policy stored in the unified client view platform is 10.129.88.9, the policy information of the renewal failure policy can be determined according to the IP address, including the classification number 34030055 of the ECM corresponding to the renewal failure policy, so that the image corresponding to the renewal failure policy can be read from the ECM system as the image to be processed according to the classification number 34030055, and at the same time, the client information of the renewal failure policy can be determined according to the IP address, so that the applicant certificate type and the applicant certificate number in the client information are used as the user information corresponding to the image to be processed.
And 102, identifying at least one face area from the image to be processed according to the face features.
In this step, after the image to be processed is determined, at least one face region containing the face features may be identified from the image to be processed according to the face features.
Specifically, the face region of the image to be processed may be identified by using an open source computer vision library (OpenCV), and a region including the face features in the image to be processed is determined as the face region according to the face features including the human five sense organs in the image to be processed.
Fig. 3 is a schematic diagram of a face region in an image to be processed according to an embodiment of the present invention, and as shown in fig. 3, 1 face region a1 containing face features can be obtained in the image to be processed according to face feature recognition.
And 103, performing edge extension on the face area by taking the face area as a center in the image to be processed to obtain a face extension image comprising a complete face.
In this step, after the face region is determined in the image to be processed, edge extension may be further performed on the face region to obtain a face extension image including a complete face.
Specifically, when the edge of the face region is expanded in the image to be processed, the edge of the face region may be expanded outward in the image to be processed with the face region as a center, so that the finally obtained face expanded image step-by-step includes the face region and a region around the face region in the image to be processed.
It should be noted that, because the face features including the five sense organs of the human body are used for recognition in the face recognition process, referring to fig. 3, the obtained face area a1 generally only includes the five sense organs in the image to be processed, if the face image corresponding to the face area is directly used for subsequent comparison with the standard image to obtain the face detection result, the features of the five sense organs of the human body in the face image can only be used for comparison with the features of the five sense organs of the human body in the standard image to determine whether the person included in the face image is the person corresponding to the standard image, in order to ensure the accuracy of the face detection process, it is necessary to ensure that the face image obtained according to the image to be processed includes the obvious and clear features of the five sense organs of the human body, so that when the image to be processed is obtained by shooting, the user needs to go through a special shooting process, according to the specified shooting rule, the to-be-processed image with the size, the angle and the definition meeting certain requirements is shot, so that the shooting process is complicated, the consumed time is long, and the user experience is poor.
In the embodiment of the present invention, referring to fig. 3, after a face region a1 is determined in an image to be processed, an edge extension may be further performed on the face region to obtain a face extension image a2 including a complete face, so that the face extension image a2 may be used to perform a subsequent comparison with a standard image to obtain a face detection result, and since the face extension image a2 includes not only a face region a1 having human facial features identified according to face features in the image to be processed, but also other regions around the face region, which may include other features of a human body, for example: the outline, the hairline, the neck and the shoulder of a human face and the like are adopted, so when the human face extension image A2 is compared with a standard image, other characteristics of the human body and the characteristics of five sense organs of the human body can be simultaneously utilized, and the human face extension image A2 and the standard image are compared together, so that the accuracy of human face detection is improved, a user does not need to obtain an image to be processed with certain requirements on size, angle and definition through a special shooting process and a special shooting rule, namely, under the condition that the user feels no, the image to be processed for image detection can be obtained, the process of shooting the image to be processed is quick and convenient, and the use experience of the user is improved.
And 104, acquiring a standard image corresponding to the user information.
In this step, a standard image corresponding to the user information may be determined from the user information acquired in step 101.
The standard image may be a standard image corresponding to the user information, which is determined according to the user information from a preset standard image database.
Specifically, referring to fig. 2, in the process of processing the renewal failure policy, the standard image may be a standard image corresponding to the user information determined from a preset local standard image database, that is, the standard image of the user, that is, the applicant, may be photographed and stored in the local standard image database when the policy is generated, and it is ensured that the standard image includes the complete facial features of the user.
And 105, determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image.
In this step, after the face extension image and the standard image are obtained, the face extension image and the standard image may be compared to determine a face detection result for the image to be processed, and determine whether the image to be processed includes a user corresponding to the user information.
Specifically, the face extension image includes a complete face, that is, the face extension image includes human facial features included in a face region, and also includes other human body features included in a region after edge extension, such as a contour, a hairline, a neck, shoulders, and the like of the face.
Furthermore, in the process of comparing the face extension image with the standard image, comparing the human five sense organ features in the face extension image with the human five sense organ features in the standard image, judging the first similarity of the two, meanwhile, comparing other human body features in the face extension image with other human body features in the standard image, and judging the second similarity of the two, thereby judging whether the image to be processed contains the user corresponding to the user information or not by combining the first similarity and the second similarity.
In the embodiment of the invention, corresponding weight values can be set for the first similarity and the second similarity, so that the first similarity and the second similarity are comprehensively considered, the overall similarity between the face extension image and the standard image is obtained through calculation, when the overall similarity is greater than a preset value, the face extension image and the standard image can be judged to be matched with each other, and the image to be processed contains a user corresponding to the user information.
Specifically, referring to fig. 2, after the image recognition and expansion system intercepts a portrait area from an image to be processed and obtains a face expansion image through edge expansion, a face recognition interface can be directly called to perform face comparison, the interface compares the face expansion image with a standard image and returns a comparison result to the image recognition and expansion system, the image recognition and expansion system determines a final face detection result according to the returned comparison result and pushes the face detection result to a renewal management platform, the renewal management platform can perform statistics and analysis according to the face detection result to generate a detection list and a statistical report to be displayed, so that a worker can obtain the detection list and the statistical report.
In summary, the image detection method provided in the embodiment of the present invention includes: acquiring an image to be processed and user information corresponding to the image to be processed; identifying at least one face area from the image to be processed according to the face characteristics; in the image to be processed, carrying out edge extension on the face area by taking the face area as the center to obtain a face extension image comprising a complete face; acquiring a standard image corresponding to user information; and determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image. After the face region is identified from the image to be processed, the face extension image is further obtained through edge extension, so that the face extension image which is finally compared with the standard image comprises a complete face, namely the face extension image not only comprises the face region with human five sense organs characteristics identified and obtained in the image to be processed according to the face characteristics, but also comprises other regions around the face region, and the other regions can comprise other characteristics of the human body, such as: the outline, the hairline, the neck and the shoulders of the human face can be simultaneously utilized to compare other human body characteristics and human five sense organs characteristics with the standard image, so that the accuracy of human face detection can be improved without special shooting process and shooting rules, the process of shooting to-be-processed images is quick and convenient, and the use experience of a user is improved.
Fig. 4 is a flowchart illustrating steps of another image detection method according to an embodiment of the present invention, and as shown in fig. 4, the method may include:
This step may specifically refer to step 101, which is not described herein again.
In this step, if the number of the acquired to-be-processed images corresponding to the same user information is at least two, it is necessary to sequentially identify each to-be-processed image according to the face features, so that at least one face region is identified from all the to-be-processed images.
For example, the above-mentioned image detection scheme may be applied to a process of an insurance policy renewal failure policy by an insurance company, wherein an administrator of the insurance company visits clients with respect to the insurance policy renewal failure policy, photographs a plurality of pictures recorded in the interview process, and uploads the pictures recorded in the interview process to an ECM system, and the ECM classification number stored in the pictures recorded in the interview process is 34030055, so that in a process of detecting images for the insurance policy renewal failure policy, the pictures recorded in the interview process are downloaded from the ECM system according to the ECM classification number 34030055 corresponding to the insurance policy renewal failure policy as images to be processed.
And 203, performing edge extension on the face area by taking the face area as a center in the image to be processed to obtain a face extension image comprising a complete face.
In this step, after the face region is determined in the image to be processed, edge extension may be further performed on the face region to obtain a face extension image including a complete face.
Optionally, the face extension image includes a face region in the image to be processed, and a region in the image to be processed, where a distance between the edge of the face region and the region to be processed is smaller than or equal to a preset distance.
Therefore, in the edge extension process performed on the face region, the edge of the face region may be extended outward by a preset distance with the face region as a center in the image to be processed, so as to obtain a face region included in the image to be processed, and a face extension image in which the distance between the image to be processed and the edge of the face region is smaller than or equal to the preset distance.
Fig. 5 is a schematic diagram of edge extension according to an embodiment of the present invention, as shown in fig. 5, 1 face region a1 including human facial features is identified from an image to be processed according to the face features, and the face region a1 has a rectangular structure, so that, further, four sides of the face region a1 in the image to be processed are respectively extended by a distance a in an outward direction perpendicular to the sides, and an edge-extended region is cut from the image to be processed to obtain a face extension image a 2.
Wherein the predetermined distance may be a predetermined fixed size, for example 5 cm.
And step 204, acquiring a standard image corresponding to the user information.
In this step, a standard image corresponding to the user information may be determined from the user information acquired in step 101.
The standard image may be a standard image corresponding to the user information, which is determined according to the user information from a preset standard image database.
Optionally, the user information includes user identification card information, the standard image includes the user identification card photo, that is, the standard image database may also be a database for storing the citizen identification card photo in the public security system, and under the condition of having corresponding database access authority, the identity card photo corresponding to the user identification card name or identity card number is determined from the public security system by calling the interface of the public security system, and is used as the standard image for comparing with the face extension image, so as to ensure the authenticity of the standard image, and meanwhile, when the public security system collects the identification card photo, the public security system has strict and uniform standard, and the identity card photo has clear and standard human five-sense organ characteristics, and the outline, the hairline, the neck, the shoulder and other human body characteristics of the human face, so that when the identification card certificate photo is used as a standard image to detect the human face of the image to be processed, the accuracy of the detection process can be further improved.
In the embodiment of the present invention, if the task of detecting the image is to check the continuous maintenance failure policy and the image to be processed is the supervisor visit accessory, the rule triggering the call interface to compare may include:
under the condition that a continuous protection failure policy is uploaded to the face of a supervising and supervising operator for multiple visits by the accessory before the verification and the sale, if the face detection result of the continuous protection failure policy is 'detection success', even if the face of the supervising and supervising operator is uploaded for multiple visits by the accessory, an interface is not adjusted for comparison;
and under the condition that the supervision manager uploads the face visit accessories for many times before the insurance policy is checked and sold, if the face detection result of the insurance policy is not 'detection success', the interface is called for comparison as long as the supervision manager uploads the face visit accessories.
In this step, if no face region is identified from the image to be processed according to the face features, it is indicated that the face containing obvious human five sense organs signs cannot be identified in the image to be processed, that is, the face extension image compared with the standard image cannot be determined from the image to be processed, so that the image to be processed cannot be detected; if the user information cannot be acquired, it is indicated that the user information corresponding to the image to be processed is not stored in the system, that is, the standard image compared with the face extension image cannot be further determined according to the user information, so that the image to be processed cannot be detected, and at this time, it may be determined that the face detection result of the image to be processed is undetectable.
TABLE 1
For example, the detection scheme of the image may be applied to a process of processing an insurance policy renewal failure policy by an insurance company, where the image to be processed is a picture recorded in a interview process of a client by an administrator of the insurance company aiming at the insurance policy renewal failure policy, and information of an applicant corresponding to the policy is identification card information of the user corresponding to the image to be processed, as shown in table 1 above, if a face region is not identified in the image to be processed or the user information is non-identification card information, a face extension image obtained after the edge extension of the face region in the image to be processed is not needed, and a process of comparing the face extension image with a standard image determined by the user information can directly determine that a face detection result of the policy client is "undetectable".
And step 206, sequentially comparing the at least two face extension images with the standard image to determine a comparison result.
In this step, after the face extension image and the standard image are obtained, a comparison result may be determined by comparing the face extension image with the standard image, so that a face detection result for the image to be processed may be further determined according to the comparison result, and it is determined whether the image to be processed includes a user corresponding to the user information.
Optionally, in the case that at least two face regions are identified in the image to be processed and at least two face extension images are obtained correspondingly, step 206 may specifically include the following sub-steps:
substep 2061, comparing at least two of the face expansion images with the standard image in sequence.
In this step, if at least two face regions are identified in the image to be processed, edge extension may be performed on each face region, so as to obtain at least two face extension images, and then the at least two face extension images are sequentially compared with the standard image, and whether each face extension image matches the standard image is determined, that is, whether each face extension image is an image of a user corresponding to the user information is determined.
Fig. 6 is a schematic diagram of another edge extension provided in the embodiment of the present invention, as shown in fig. 6, 3 face regions B1, B2, and B3 containing human facial features are identified from the image to be processed according to the human face features, and are all rectangular structures, so that, further, four side edges of the face region B1 in the image to be processed are respectively extended by a distance B in an outward direction perpendicular to the side edges, and the edge-extended region is cut from the image to be processed, so as to obtain a face extension image B2; expanding the four side edges of the face region C1 to the outward direction perpendicular to the side edges by a distance b in the to-be-processed image, and intercepting the edge-expanded region from the to-be-processed image to obtain a face expanded image C2; and respectively expanding the four side edges of the face region D1 in the image to be processed by a distance b in the direction perpendicular to the side edges outwards, and intercepting the region after edge expansion from the image to be processed to obtain a face expansion image D2.
Further, after three face extension images are obtained, the three face extension images B1, B2, and B3 are sequentially compared with the standard image.
Sub-step 2062, in the case that an image matching the standard image is detected in at least two of the face extension images, determining that the comparison result is a successful match.
In this step, if an image matching the standard image is detected in the at least two face extension images after comparing the at least two face extension images obtained in the above step with the standard image, it can be shown that at least one of the at least two face extension images successfully matches the standard image, and therefore, it can be determined that the comparison result between the face extension image and the standard image is a successful match.
Correspondingly, after the at least two face extension images obtained in the above steps are compared with the standard image, the at least two face extension images are not matched with the standard image, so that the comparison result between the face extension image and the standard image can be determined as a matching failure.
And step 207, determining a face detection result aiming at the image to be processed according to the comparison result.
In this step, a face detection result for the image to be processed may be further determined according to a comparison result between the face extension image and the standard image.
Optionally, step 207 may specifically include the following sub-steps:
substep 2071, determining the face detection result of the image to be processed as a detection failure when the comparison result is a matching failure, and determining that the image of the user corresponding to the user information does not exist in the image to be processed.
In this step, if the comparison result between the face extension image and the standard image is a matching failure, it is indicated that the face extension image is not matched with the standard image, that is, the human facial features and other human body features contained in the face extension image and the standard image have low similarity to the human facial features and other human body features contained in the standard image, and the person contained in the face extension image and the person contained in the standard image are not the same person, so that it can be determined that the face detection result of the image to be processed is a detection failure, and the image of the user corresponding to the user information does not exist in the image to be processed.
Referring to table 1, if a face region is recognized in the image to be processed and the user information is identification card information, the face detection result of the policy-preserving client is determined by comparing a face extension image obtained by extending the edge of the face region in the image to be processed with a standard image determined by using the user identification card information and further according to the comparison result.
And a substep 2072, determining that the face detection result of the image to be processed is successful in detection when the comparison result is successful in matching, and the image of the user corresponding to the user information exists in the image to be processed.
In this step, if the comparison result between the face extension image and the standard image is successful, it is indicated that the face extension image and the standard image are matched with each other, that is, the human facial features and other human body features contained in the face extension image and the standard image have higher similarity to the human facial features and other human body features contained in the standard image, and the person contained in the face extension image and the person contained in the standard image are the same person, so that it can be determined that the face detection result of the image to be processed is successful, and the image of the user corresponding to the user information exists in the image to be processed.
Referring to table 1, if a face region is recognized in the image to be processed and the user information is identification card information, the face detection result of the policy-preserving client is determined by comparing the face extension image obtained by extending the edge of the face region in the image to be processed with a standard image determined by using the user identification card information and further according to the comparison result.
In addition, if other situations than those described above in the embodiment of the present invention occur in the image detection process, it may be determined that the policy client face detection result is "other".
Fig. 7 is a schematic diagram of a hardware architecture according to an embodiment of the present invention, and as shown in fig. 7, a hardware configuration server in the hardware architecture of the image detection method according to the present invention includes a load balancing server for balancing different image detection tasks; the cache server is used for counting the times of calling a standard image database to carry out face detection; the database server is used for storing the face region contained in the image to be processed, which is successfully detected as the face detection result, for subsequent research, and in the process, the face region identified from the image to be processed can be adjusted into a face image with a uniform size and then stored, so that the stored face image has the definition capable of clearly identifying the face features while not occupying too much storage space; the system comprises three application servers, an ECM system and a human face expansion server, wherein the three application servers are used for detecting images, downloading images to be processed from the ECM system, detecting the number of the images to be processed, identifying a human face area in each image to be processed, and performing edge expansion on the human face area to obtain a human face expansion image; and simultaneously acquiring user information, acquiring a standard image corresponding to the user information from the public security department, and finally comparing the face extended image with the standard image, thereby determining a face detection result of the image to be processed according to the comparison result. In addition, logging is performed throughout the detection of the image at the application level.
In summary, the image detection method provided in the embodiment of the present invention includes: acquiring an image to be processed and user information corresponding to the image to be processed; identifying at least one face area from the image to be processed according to the face characteristics; in the image to be processed, carrying out edge extension on the face area by taking the face area as the center to obtain a face extension image comprising a complete face; acquiring a standard image corresponding to user information; and determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image. After the face region is identified from the image to be processed, the face extension image is further obtained through edge extension, so that the face extension image which is finally compared with the standard image comprises a complete face, namely the face extension image not only comprises the face region with human five sense organs characteristics identified and obtained in the image to be processed according to the face characteristics, but also comprises other regions around the face region, and the other regions can comprise other characteristics of the human body, such as: the outline, the hairline, the neck and the shoulders of the human face can be simultaneously utilized to compare other human body characteristics and human five sense organs characteristics with the standard image, so that the accuracy of human face detection can be improved without special shooting process and shooting rules, the process of shooting to-be-processed images is quick and convenient, and the use experience of a user is improved.
In addition, the number of the images to be processed corresponding to the user information can be at least two, so that when the images to be processed are shot, the images to be processed with a large number can be obtained to carry out face detection, the accuracy of the face detection process can be further improved, meanwhile, the number of the face extension images obtained by identification and edge extension in the images to be processed can be at least two, namely, the face detection can be carried out on the images containing a plurality of people, the single people do not need to be shot in sequence, and the process of obtaining the images to be processed by shooting is further simplified.
Fig. 8 is a block diagram of an apparatus for detecting an image according to an embodiment of the present invention, and as shown in fig. 8, the apparatus may include:
a first obtaining module 301, configured to obtain an image to be processed and user information corresponding to the image to be processed;
the recognition module 302 is configured to recognize at least one face region from the image to be processed according to the face features;
an edge extension module 303, configured to perform edge extension on the face region with the face region as a center in the image to be processed, so as to obtain a face extension image including a complete face;
a second obtaining module 304, configured to obtain a standard image corresponding to the user information;
a comparing module 305, configured to determine a face detection result for the image to be processed by comparing the face extension image with the standard image.
Optionally, in a case that at least two face regions are identified in the image to be processed and at least two face extension images are obtained correspondingly, the comparing module 305 includes:
and the comparison submodule is used for sequentially comparing the at least two face extension images with the standard image, determining a comparison result and determining a face detection result aiming at the image to be processed according to the comparison result.
Optionally, the comparison sub-module includes:
the comparison unit is used for sequentially comparing the at least two face extension images with the standard image;
and the first determining unit is used for determining that the comparison result is successful in matching under the condition that an image matched with the standard image is detected in at least two face extension images.
Optionally, the apparatus further comprises:
a determining module, configured to determine that a face detection result of the image to be processed is undetectable when the face region is not identified in the image to be processed or the user information is not acquired;
the comparison sub-module comprises:
a second determining unit, configured to determine, when the comparison result is a matching failure, that a face detection result of the to-be-processed image is a detection failure, where an image of a user corresponding to the user information does not exist in the to-be-processed image;
and a third determining unit, configured to determine that a face detection result of the to-be-processed image is successful in detection if the comparison result is that matching is successful, where an image of the user corresponding to the user information exists in the to-be-processed image.
Optionally, when there are at least two images to be processed corresponding to the user information, the identifying module 302 includes:
and the recognition submodule is used for sequentially recognizing the face area from each image to be processed according to the face features.
Optionally, the face extension image includes a face region in the image to be processed, and a region in the image to be processed, where a distance between the edge of the face region and the region to be processed is smaller than or equal to a preset distance.
Optionally, the user information includes identification card information of the user, and the standard image includes an identification card photo of the user.
In summary, an image detection apparatus provided in an embodiment of the present invention includes: acquiring an image to be processed and user information corresponding to the image to be processed; identifying at least one face area from the image to be processed according to the face characteristics; in the image to be processed, carrying out edge extension on the face area by taking the face area as the center to obtain a face extension image comprising a complete face; acquiring a standard image corresponding to user information; and determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image. After the face region is identified from the image to be processed, the face extension image is further obtained through edge extension, so that the face extension image which is finally compared with the standard image comprises a complete face, namely the face extension image not only comprises the face region with human five sense organs characteristics identified and obtained in the image to be processed according to the face characteristics, but also comprises other regions around the face region, and the other regions can comprise other characteristics of the human body, such as: the outline, the hairline, the neck and the shoulders of the human face can be simultaneously utilized to compare other human body characteristics and human five sense organs characteristics with the standard image, so that the accuracy of human face detection can be improved without special shooting process and shooting rules, the process of shooting to-be-processed images is quick and convenient, and the use experience of a user is improved.
For the above device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant points, refer to the partial description of the method embodiment.
Preferably, an embodiment of the present invention further provides a computer device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program, when executed by the processor, implements each process of the above-mentioned embodiment of the image detection method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the image detection method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As is readily imaginable to the person skilled in the art: any combination of the above embodiments is possible, and thus any combination between the above embodiments is an embodiment of the present invention, but the present disclosure is not necessarily detailed herein for reasons of space.
The detection methods of images provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The structure required to construct a system incorporating aspects of the present invention will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the method of detecting an image according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Claims (10)
1. A method for detecting an image, the method comprising:
acquiring an image to be processed and user information corresponding to the image to be processed;
identifying at least one face area from the image to be processed according to the face characteristics;
in the image to be processed, performing edge extension on the face area by taking the face area as a center to obtain a face extension image comprising a complete face;
acquiring a standard image corresponding to the user information;
and determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image.
2. The method according to claim 1, wherein in the case that at least two face regions are identified in the image to be processed and at least two face extension images are obtained correspondingly,
the step of determining a face detection result for the image to be processed by comparing the face extension image with the standard image includes:
and sequentially comparing at least two face extension images with the standard image, determining a comparison result, and determining a face detection result aiming at the image to be processed according to the comparison result.
3. The method according to claim 2, wherein the step of sequentially comparing at least two of the face extension images with the standard image to determine a comparison result comprises:
sequentially comparing at least two face extension images with the standard image;
and in at least two face extension images, determining that the comparison result is successful in matching under the condition that an image matched with the standard image is detected.
4. The method according to claim 2, wherein before the step of sequentially comparing at least two of the face extension images with the standard image to determine a comparison result, the method further comprises:
determining that the face detection result of the image to be processed is undetectable under the condition that the face area is not identified in the image to be processed or the user information is not acquired;
the step of determining a face detection result for the image to be processed according to the comparison result comprises:
determining that the face detection result of the image to be processed is detection failure when the comparison result is matching failure, wherein the image of the user corresponding to the user information does not exist in the image to be processed;
and under the condition that the comparison result is successful in matching, determining that the face detection result of the image to be processed is successful in detection, wherein the image of the user corresponding to the user information exists in the image to be processed.
5. The method according to claim 1, wherein, in the case where there are at least two images to be processed corresponding to the user information,
the step of identifying at least one face region from the image to be processed according to the face features comprises the following steps:
and sequentially identifying the face area from each image to be processed according to the face features.
6. The method according to claim 1, wherein the face extension image comprises a face region in the image to be processed, and a region in the image to be processed, in which a distance from an edge of the face region is smaller than or equal to a preset distance.
7. The method of claim 1, wherein the user information comprises identification card information of a user, and wherein the standard image comprises a photograph of the identification card of the user.
8. An apparatus for detecting an image, the apparatus comprising:
the device comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring an image to be processed and user information corresponding to the image to be processed;
the recognition module is used for recognizing at least one face area from the image to be processed according to the face features;
the edge extension module is used for carrying out edge extension on the face area by taking the face area as a center in the image to be processed to obtain a face extension image comprising a complete face;
the second acquisition module is used for acquiring a standard image corresponding to the user information;
and the comparison module is used for determining a face detection result aiming at the image to be processed by comparing the face extension image with the standard image.
9. A computer device, characterized in that the computer device comprises:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the steps included in the image detection method according to any one of claims 1 to 7 according to the obtained program instructions.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of detecting an image according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011180584.7A CN112287830A (en) | 2020-10-29 | 2020-10-29 | Image detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011180584.7A CN112287830A (en) | 2020-10-29 | 2020-10-29 | Image detection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112287830A true CN112287830A (en) | 2021-01-29 |
Family
ID=74372745
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011180584.7A Pending CN112287830A (en) | 2020-10-29 | 2020-10-29 | Image detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112287830A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115457644A (en) * | 2022-11-10 | 2022-12-09 | 成都智元汇信息技术股份有限公司 | Method and device for obtaining image recognition of target based on extended space mapping |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106791655A (en) * | 2016-12-24 | 2017-05-31 | 深圳云天励飞技术有限公司 | A kind of method for processing video frequency and device |
CN107818313A (en) * | 2017-11-20 | 2018-03-20 | 腾讯科技(深圳)有限公司 | Vivo identification method, device, storage medium and computer equipment |
CN108566485A (en) * | 2018-03-21 | 2018-09-21 | 努比亚技术有限公司 | A kind of unlocking method, terminal and computer readable storage medium |
CN109285234A (en) * | 2018-09-29 | 2019-01-29 | 中国平安人寿保险股份有限公司 | Human face identification work-attendance checking method, device, computer installation and storage medium |
WO2019085403A1 (en) * | 2017-10-31 | 2019-05-09 | 平安科技(深圳)有限公司 | Intelligent face recognition comparison method, electronic device, and computer readable storage medium |
CN109919003A (en) * | 2019-01-23 | 2019-06-21 | 平安科技(深圳)有限公司 | Face identification method, terminal device and computer readable storage medium |
CN110069983A (en) * | 2019-03-08 | 2019-07-30 | 深圳神目信息技术有限公司 | Vivo identification method, device, terminal and readable medium based on display medium |
CN110751025A (en) * | 2019-09-06 | 2020-02-04 | 平安普惠企业管理有限公司 | Business handling method, device, equipment and medium based on face recognition |
-
2020
- 2020-10-29 CN CN202011180584.7A patent/CN112287830A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106791655A (en) * | 2016-12-24 | 2017-05-31 | 深圳云天励飞技术有限公司 | A kind of method for processing video frequency and device |
WO2019085403A1 (en) * | 2017-10-31 | 2019-05-09 | 平安科技(深圳)有限公司 | Intelligent face recognition comparison method, electronic device, and computer readable storage medium |
CN107818313A (en) * | 2017-11-20 | 2018-03-20 | 腾讯科技(深圳)有限公司 | Vivo identification method, device, storage medium and computer equipment |
CN108566485A (en) * | 2018-03-21 | 2018-09-21 | 努比亚技术有限公司 | A kind of unlocking method, terminal and computer readable storage medium |
CN109285234A (en) * | 2018-09-29 | 2019-01-29 | 中国平安人寿保险股份有限公司 | Human face identification work-attendance checking method, device, computer installation and storage medium |
CN109919003A (en) * | 2019-01-23 | 2019-06-21 | 平安科技(深圳)有限公司 | Face identification method, terminal device and computer readable storage medium |
CN110069983A (en) * | 2019-03-08 | 2019-07-30 | 深圳神目信息技术有限公司 | Vivo identification method, device, terminal and readable medium based on display medium |
CN110751025A (en) * | 2019-09-06 | 2020-02-04 | 平安普惠企业管理有限公司 | Business handling method, device, equipment and medium based on face recognition |
Non-Patent Citations (1)
Title |
---|
张修宝 等: "全天候自然场景下的人脸佩戴口罩识别技术", 《中国科学:信息科学》, vol. 50, no. 7, pages 37 - 38 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115457644A (en) * | 2022-11-10 | 2022-12-09 | 成都智元汇信息技术股份有限公司 | Method and device for obtaining image recognition of target based on extended space mapping |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109948408B (en) | Activity test method and apparatus | |
CN108733819B (en) | Personnel archive establishing method and device | |
US9147127B2 (en) | Verification of user photo IDs | |
US8634601B2 (en) | Surveillance-based high-resolution facial recognition | |
US20220092881A1 (en) | Method and apparatus for behavior analysis, electronic apparatus, storage medium, and computer program | |
KR20190069457A (en) | IMAGE BASED VEHICLES LOSS EVALUATION METHOD, DEVICE AND SYSTEM, | |
US20060056664A1 (en) | Security system | |
CN110163053B (en) | Method and device for generating negative sample for face recognition and computer equipment | |
KR101781358B1 (en) | Personal Identification System And Method By Face Recognition In Digital Image | |
CN110738178A (en) | Garden construction safety detection method and device, computer equipment and storage medium | |
CN111886842A (en) | Remote user authentication using threshold-based matching | |
CN109766779A (en) | It hovers personal identification method and Related product | |
CN110866466A (en) | Face recognition method, face recognition device, storage medium and server | |
CN110889314B (en) | Image processing method, device, electronic equipment, server and system | |
CN110705476A (en) | Data analysis method and device, electronic equipment and computer storage medium | |
WO2019210575A1 (en) | Real estate information enquiry method and apparatus, and computer device and storage medium | |
CA3049042A1 (en) | System and method for authenticating transactions from a mobile device | |
CN109598251A (en) | Testimony of a witness checking method, device, equipment and system and storage medium | |
CN113497807A (en) | Method and device for detecting user login risk and computer readable storage medium | |
CN112287830A (en) | Image detection method and device | |
WO2021180001A1 (en) | Identity verification | |
WO2021135614A1 (en) | Video processing method, apparatus, and system | |
WO2019071663A1 (en) | Electronic apparatus, virtual sample generation method and storage medium | |
CN109871456B (en) | Method and device for analyzing relationship between watchmen and electronic equipment | |
CN115906028A (en) | User identity verification method and device and self-service terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210129 |