Search

CN-116665286-B - Rapid double-iris detection method and device and electronic equipment

CN116665286BCN 116665286 BCN116665286 BCN 116665286BCN-116665286-B

Abstract

The application provides a rapid double-iris detection method and device and electronic equipment. The method is applied to a server and comprises the steps of obtaining an image to be detected, inputting the image to be detected into a trained rapid detection model, segmenting the image to be detected into a first image and a second image according to a preset mode, wherein the first image comprises a first iris, the second image comprises a second iris, scanning the first image to detect a first iris frame comprising the first iris, obtaining the coordinate and the diameter of a first center point of the first iris frame, determining the area where the second iris is located based on the coordinate and the diameter of the first center point, and scanning the area where the second iris is located to detect a second iris frame comprising the second iris. The application has the effect of improving the efficiency of double iris detection.

Inventors

  • ZHANG XIAOLIANG
  • JIA FUCHANG
  • LI MAOLIN
  • WEI YANZHAO
  • YANG ZHANJIN

Assignees

  • 北京万里红科技有限公司

Dates

Publication Date
20260505
Application Date
20230527

Claims (10)

  1. 1. A rapid double iris detection method, wherein the method is applied to a server and comprises the following steps: Acquiring an image to be detected; Inputting the image to be detected into a trained rapid detection model, and according to a preset mode, inputting the image to be detected into a training rapid detection model The method comprises the steps of dividing an image into a first image and a second image, wherein the first image comprises a first iris, and the second image comprises a second iris; Acquiring the diameter of the first iris frame and the coordinates of a first center point, and based on the diameter and the first center point The coordinates of the center point determine the area where the second iris is located, and the first center point is the center point of the first iris frame; and scanning the area where the second iris is positioned, and detecting a second iris frame containing the second iris.
  2. 2. The method of claim 1, wherein the scanning the first image to detect a first iris frame including the first iris, specifically comprises: dividing the first image into a plurality of image blocks; Sampling each image block by adopting a plurality of square sliding frames with different sizes respectively to generate a plurality of sampling samples; respectively extracting features of the sampling samples to obtain iris frames and confidence corresponding to the sampling samples A degree score; Selecting an iris frame corresponding to the confidence coefficient score meeting the preset condition as the first iris frame, wherein the confidence coefficient score meeting the preset condition is the confidence coefficient score which is larger than a preset first threshold value in the confidence coefficient scores, or the confidence coefficient score meeting the preset condition is the highest confidence coefficient score in the confidence coefficient scores.
  3. 3. The method for rapid double-iris detection according to claim 2, wherein each of the image blocks is sampled by a plurality of square slide frames with different sizes, and a plurality of sampled samples are generated, specifically comprising: Selecting a first image block, wherein the first image block is any one image block of a plurality of image blocks; Controlling the first square sliding frame to sequentially and alternately adopt the first sliding frame from any vertex of the first image block The first square sliding frame is any square sliding frame in a plurality of square sliding frames with different sizes; The first sliding mode is sliding from a first starting point to a first direction, and the first square sliding frame slides to the first position Returning the edge of the image block to the first starting point, and moving the first square sliding frame to a second direction by a first preset distance, wherein the first direction is parallel to any side of the first image block, the second direction is perpendicular to the first direction, the position of any vertex is the first starting point, and the position of the first vertex, which is moved from the first starting point to the second direction by the first preset distance, is the second starting point; The second sliding mode is that the first square sliding frame slides to the second direction from the second starting point And returning the edge of the first image block to the second starting point, and moving the first square sliding frame to the first direction by a second preset distance.
  4. 4. The method for rapid double-iris detection according to claim 1, wherein the obtaining the diameter of the first iris frame specifically comprises: generating an iris image frame based on the first iris frame, wherein the iris image frame is an circumscribed rectangle of the first iris frame A frame; Acquiring the width and height dimensions of the iris image frame; and calculating the diameter of the first iris frame based on the width-height dimension.
  5. 5. The method for rapid double-iris detection according to claim 4, wherein the obtaining the coordinates of the first center point of the first iris frame specifically comprises: Obtaining vertex coordinates of any vertex of the iris image frame; and calculating the coordinates of the first center point based on the vertex coordinates and the width-height dimension.
  6. 6. The method for rapid double iris detection according to claim 1, wherein the determining the area where the second iris is located based on the diameter and the coordinates of the first center point specifically comprises: calculating a pupil distance based on the diameter; calculating the coordinate of a second center point according to the coordinate of the first center point and the interpupillary distance, wherein the second center point is positioned in the second image and is positioned at the same horizontal height as the first center point, and the second center point is the center point of the second iris frame; And taking the second center point as a center, presetting a width and height dimension as a side length, and generating an area where the second iris is located.
  7. 7. The method of claim 1, wherein prior to the capturing the image to be detected, the method further comprises: acquiring a plurality of iris samples and non-iris samples; and training the initial rapid detection model through a plurality of iris samples and a plurality of non-iris samples to obtain the trained rapid detection model.
  8. 8. The method of claim 1, wherein after the scanning the area where the second iris is located and detecting a second iris frame including the second iris, the method further comprises: acquiring a first size of the first iris frame and a second size of the second iris frame; judging whether the first size is in a first preset range or not and whether the second size is in a second preset range or not; If the first size is determined to be in the first preset range, and the second size is determined to be in the second preset range, cutting the image to be detected according to the first iris frame and the second iris frame to obtain a first cutting image and a second cutting image; Scaling and splicing the first clipping image and the second clipping image to obtain a processed image; Acquiring an iris frame integrity score of the processed image; And judging whether the iris frame integrity score is larger than a preset second threshold value, and if the iris frame integrity score is larger than the second threshold value, determining the first iris frame and the second iris frame as final prediction frames.
  9. 9. The rapid double-iris detection device is characterized by being installed on a server and comprising an acquisition module (701), an image segmentation module (702), an image recognition module (703) and a processing module (704), wherein: the acquisition module (701) is used for acquiring an image to be detected; The image segmentation module (702) is used for segmenting the image to be detected into a first image and a second image according to a preset mode, wherein the first image comprises a first iris, and the second image comprises a second iris; The image recognition module (703) is configured to scan the first image and detect a first iris frame including the first iris; The processing module (704) is configured to obtain a diameter of the first iris frame and coordinates of a first center point, and determine an area where the second iris is located based on the diameter and the coordinates of the first center point, where the first center point is a center point of the first iris frame; The image recognition module (703) is further configured to scan an area where the second iris is located, and detect a second iris frame including the second iris.
  10. 10. An electronic device comprising a processor (801), a memory (805), a user interface (803), and -A network interface (804), the memory (805) for storing instructions, the user interface (803) and the network interface (804) each being for communicating to other devices, the processor (801) being for executing the instructions stored in the memory (805) to cause the electronic device to perform the method according to any of claims 1-8.

Description

Rapid double-iris detection method and device and electronic equipment Technical Field The application relates to the technical field of image detection, in particular to a rapid double-iris detection method and device and electronic equipment. Background Iris detection is a biological detection technology, and the process of identity recognition and authentication is realized by analyzing the unique characteristics of the iris of a human eye. The iris detection technology has high accuracy and safety and is not easy to imitate or forge, so that the iris detection technology is widely applied to the fields of safety guarantee, financial payment, access control management and the like. Currently, conventional iris detection is generally to detect the double irises of a face image simultaneously. Firstly, simultaneously recognizing the binocular positions in the human face, then simultaneously scanning the binocular regions to extract features, further judging whether the irises exist according to the extracted features, and further determining the positions of the two irises when the irises exist. Because the binocular is required to be identified at the same time and then two irises are detected, the calculated amount is large, and the efficiency of iris detection is reduced. Therefore, a method is needed to improve the efficiency of double iris detection. Disclosure of Invention The application provides a rapid double-iris detection method and device and electronic equipment, which have the effect of improving the double-iris detection efficiency. In a first aspect of the present application, there is provided a rapid double iris detection method, the method being applied to a server, comprising: Acquiring an image to be detected; inputting the image to be detected into a trained rapid detection model, and segmenting the image to be detected into a first image and a second image according to a preset mode, wherein the first image comprises a first iris, and the second image comprises a second iris; scanning the first image to detect a first iris frame containing the first iris; Acquiring the diameter of the first iris frame and the coordinates of a first center point, and determining the area where the second iris is located based on the diameter and the coordinates of the first center point, wherein the first center point is the center point of the first iris frame; And scanning the area where the second iris is positioned, and detecting a second iris frame containing the second iris. By adopting the technical scheme, the server only needs to scan partial images at first, so that a first iris frame containing a first iris is detected instead of scanning the whole image, the detection difficulty is greatly reduced, and the detection efficiency is improved. And secondly, after detecting the first iris frame, the server directly calculates the area where the second iris is located based on the diameter of the first iris frame and the coordinates of the first center point, and then only scans the area to detect the second iris frame containing the second iris instead of scanning the whole second image, so that the calculated amount is reduced, and the effect of improving the double-iris detection efficiency is achieved. Optionally, the scanning the first image to detect a first iris frame including the first iris specifically includes: dividing the first image into a plurality of image blocks; Sampling each image block by adopting a plurality of square sliding frames with different sizes respectively to generate a plurality of sampling samples; respectively extracting features of the sampling samples to obtain iris frames and confidence scores corresponding to the sampling samples; Selecting an iris frame corresponding to the confidence coefficient score meeting the preset condition as the first iris frame, wherein the confidence coefficient score meeting the preset condition is the confidence coefficient score which is larger than a preset first threshold value in the confidence coefficient scores, or the confidence coefficient score meeting the preset condition is the highest confidence coefficient score in the confidence coefficient scores. By adopting the technical scheme, the server divides the first image into a plurality of image blocks, and samples each image block, so that the calculation processing amount of the server in a short time can be effectively reduced. Meanwhile, square sliding frames with different sizes are adopted for sampling, so that irises with different sizes can be covered, and the universality of the detection method is improved. Optionally, the sampling is performed on each image block by using a plurality of square sliding frames with different sizes, so as to generate a plurality of sampling samples, which specifically includes: Selecting a first image block, wherein the first image block is any one image block of a plurality of image blocks; Controlling a first square sliding