Colored pupil detection method, device, electronic device and computer readable medium
Through the matching of the characteristic point extraction and position proportion of the specific area of the iris image, the high accuracy of the pupil detection is achieved, and the problem of low accuracy of the pupil detection in the existing technology is solved.
Patent Information
- Application Number
- CN202210415515.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-04-20
AI Technical Summary
The existing contact lens detection methods require a large amount of training data to be marked due to the diverse styles, patterns and colors of contact lenses. The model training efficiency is inefficient and the accuracy of contact lens detection is low.
Through the first interest area and the second interest area of identifying the iris image, the feature point is extracted, the feature point information collection is generated, and the feature point matching and eliminating processing are performed according to the position ratio information.
No model training is required, which greatly improves the accuracy of pupil detection, and solves the problem of low models caused by the growth of the pupil style.
Smart Images

Figure CN114694237B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and computer-readable medium for detecting colored pupils. Background Art
[0002] Colored contact lenses are colored lenses that adhere to the tear layer on the surface of the iris. Among them, colored contact lenses often have a variety of complex patterns. Therefore, when a user wears colored contact lenses for iris detection and recognition, iris detection and recognition will fail. At present, when performing colored contact lens detection, the usual method is to use a pre-trained machine learning model to detect whether the user is wearing colored contact lenses based on the collected iris image.
[0003] However, when using the above method to detect beauty contact lenses, the following technical problems often occur:
[0004] First, since cosmetic contact lenses come in a variety of styles, patterns, and colors, a large amount of training data needs to be labeled to train the machine learning model, which results in low model training efficiency.
[0005] Second, the number of styles of cosmetic contact lenses is increasing, which makes it impossible to ensure the robustness of the machine learning model, resulting in low accuracy of cosmetic contact lens detection. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose a method, device, electronic device and computer-readable medium for detecting colored pupils to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a method for detecting a colored pupil, the method comprising: extracting feature points from a first region of interest and a second region of interest included in an iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set; determining a first position point information set and a second position point information set, wherein a position point corresponding to the first position point information in the first position point information set is located within the first region of interest and on a boundary corresponding to the inner circle boundary information, and a position point corresponding to the second position point information in the second position point information set is located within the second region of interest and on a boundary corresponding to the inner circle boundary information; determining the first feature point information set Each first feature point information in the set is matched with the second feature point information in the above-mentioned second feature point information set to generate feature point matching information, thereby obtaining a feature point matching information set; for each feature point matching information in the above-mentioned feature point matching information set, position proportion information is generated according to the first position point information and the second position point information corresponding to the above-mentioned feature point matching information; according to the obtained position proportion information set, the feature point matching information in the above-mentioned feature point matching information set is eliminated to generate a eliminated feature point matching information set; in response to determining that the number of eliminated feature point matching information in the above-mentioned eliminated feature point matching information set is greater than a preset threshold, a beauty contact lens detection prompt information is generated.
[0009] In a second aspect, some embodiments of the present disclosure provide a colored pupil detection device, the device comprising: a feature point extraction unit, configured to respectively extract feature points from a first region of interest and a second region of interest included in an iris image to be identified, so as to generate a first feature point information set and a second feature point information set; a first determination unit, configured to determine a first position point information set and a second position point information set, wherein a position point corresponding to the first position point information in the first position point information set is located within the first region of interest and on a boundary corresponding to the inner circle boundary information, and a position point corresponding to the second position point information in the second position point information set is located within the second region of interest and on a boundary corresponding to the inner circle boundary information; the second determination unit is configured to determine the first feature point information set. Each first feature point information in the set is matched with the second feature point information in the above-mentioned second feature point information set to generate feature point matching information, thereby obtaining a feature point matching information set; a first generating unit is configured to generate position proportion information for each feature point matching information in the above-mentioned feature point matching information set according to the first position point information and the second position point information corresponding to the above-mentioned feature point matching information; a eliminating processing unit is configured to eliminate the feature point matching information in the above-mentioned feature point matching information set according to the obtained position proportion information set to generate a eliminated feature point matching information set; a second generating unit is configured to generate a beauty contact lens detection prompt information in response to determining that the number of eliminated feature point matching information in the above-mentioned eliminated feature point matching information set is greater than a preset threshold.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0012] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the beauty contact lens detection method of some embodiments of the present disclosure, model training is not required, and the accuracy of beauty contact lens detection is greatly improved. Specifically, the reason for the low accuracy of beauty contact lens detection is that, since the styles, patterns and colors of beauty contact lenses are diverse, and the styles of beauty contact lenses are on the rise, the use of machine learning models for beauty contact lens detection requires a large number of training samples to be labeled for model training, resulting in low model training efficiency, and the robustness of the model cannot be guaranteed, resulting in low accuracy of beauty contact lens detection. Based on this, the beauty contact lens detection method of some embodiments of the present disclosure firstly extracts feature points from the first region of interest and the second region of interest included in the iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set. In actual situations, the collected iris image to be identified often contains interference items such as eyelashes and eyelids. Feature point extraction is performed on the entire annular area corresponding to the iris in the iris image to be identified, and feature points corresponding to interference items such as eyelashes and eyelids are often extracted. As a result, it is impossible to determine whether the user wears beauty contact lenses by setting a threshold, which leads to poor detection effect. Therefore, the present disclosure can eliminate the interference caused by the feature points corresponding to the interference items and improve the detection effect by extracting the feature points of the areas not blocked by interference items such as eyelashes and eyelids, that is, the first area of interest and the second area of interest. In addition, the pattern on the surface of the beauty contact lens often presents a periodic distribution. Therefore, it is not necessary to extract all the features contained in the annular area where the iris is located during feature acquisition. Instead, feature point extraction is performed for the first area of interest and the second area of interest, thereby greatly improving the efficiency of feature acquisition. Secondly, the first position point information set and the second position point information set are determined, wherein the position point corresponding to the first position point information in the first position point information set is located in the first area of interest and on the boundary corresponding to the inner circle boundary information, and the position point corresponding to the second position point information in the second position point information set is located in the second area of interest and on the boundary corresponding to the inner circle boundary information. Next, the second feature point information matched by each first feature point information in the first feature point information set in the second feature point information set is determined to generate feature point matching information and obtain a feature point matching information set. By determining the feature point matching information, the feature points corresponding to the first area of interest and the second area of interest are determined. Then, for each feature point matching information in the feature point matching information set, position ratio information is generated according to the first position point information and the second position point information corresponding to the feature point matching information. Further, according to the obtained position ratio information set, the feature point matching information in the feature point matching information set is eliminated to generate a feature point matching information set after elimination.In actual situations, the annular area corresponding to the iris has positional timing features when it is unfolded, and the pattern on the surface of the beauty contact lens also contains positional timing features. Therefore, through the position ratio information, the feature point matching information that is successfully matched but actually matched incorrectly can be eliminated. For example, a feature point at the junction of the iris and the sclera successfully matches a feature point at the junction of the iris and the pupil. The two feature points have similar feature point information and a high degree of similarity, but they are actually two feature points that are matched incorrectly. Therefore, the feature point matching information corresponding to these two feature points can be eliminated according to the position ratio information. Finally, in response to determining that the number of feature point matching information after elimination in the above-mentioned feature point matching information set after elimination is greater than a preset threshold, a beauty contact lens detection prompt information is generated. In this way, there is no need to annotate a large number of training samples for training the machine learning model. In addition, it can also solve the problem of low robustness of the machine learning model caused by the increase in the styles of beauty contact lenses. Thus, the accuracy of beauty contact lens detection is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is a schematic diagram of an application scenario of the method for detecting colored contact lenses in some embodiments of the present disclosure;
[0015] Figure 2 is a flow chart of some embodiments of the method for detecting colored pupils according to the present disclosure;
[0016] Figure 3 are flowcharts of other embodiments of the method for detecting colored pupils according to the present disclosure;
[0017] Figure 4 is a schematic structural diagram of some embodiments of the color pupil detection device according to the present disclosure;
[0018] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0020] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0024] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0025] Figure 1 It is a schematic diagram of an application scenario of the colored contact lens detection method of some embodiments of the present disclosure.
[0026] exist Figure 1In the application scenario, first, the computing device 101 can respectively extract feature points from the first region of interest and the second region of interest included in the iris image 102 to be identified, so as to generate a first feature point information set 103 and a second feature point information set 104; secondly, the computing device 101 can determine a first position point information set 105 and a second position point information set 106, wherein the position point corresponding to the first position point information in the first position point information set 105 is located in the first region of interest and on the boundary corresponding to the inner circle boundary information, and the position point corresponding to the second position point information in the second position point information set 106 is located in the second region of interest and on the boundary corresponding to the inner circle boundary information; then, the computing device 101 can determine each first feature point information set 103. The computing device 101 may select the second feature point information matched with the second feature point information set 104 to generate feature point matching information and obtain a feature point matching information set 107; then, the computing device 101 may generate position share information for each feature point matching information in the feature point matching information set 107 according to the first position point information and the second position point information corresponding to the feature point matching information; in addition, the computing device 101 may eliminate the feature point matching information in the feature point matching information set 107 according to the obtained position share information set 108 to generate a eliminated feature point matching information set 109; finally, the computing device 101 may generate a beauty contact lens detection prompt information 110 in response to determining that the number of eliminated feature point matching information in the eliminated feature point matching information set 109 is greater than a preset threshold.
[0027] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or it can be implemented as a single software or software module. No specific limitation is made here.
[0028] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.
[0029] Continue to refer Figure 2 , shows a process 200 of some embodiments of the method for detecting colored pupils according to the present disclosure. The method for detecting colored pupils comprises the following steps:
[0030] Step 201 : extracting feature points from a first region of interest and a second region of interest included in an iris image to be recognized, respectively, to generate a first feature point information set and a second feature point information set.
[0031] In some embodiments, the execution subject of the beauty pupil detection method (for example Figure 1 The computing device 101 shown can perform feature point extraction on the first region of interest and the second region of interest included in the iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set. The iris image to be identified can be an iris image of the object to be detected acquired by an iris acquisition device. The first region of interest can be an area in the iris region that is not blocked by eyelashes, eyelids and other obstructions. The second region of interest can be an area in the iris region that is not blocked by eyelashes, eyelids and other obstructions. The iris region can be the area where the iris is located in the iris image to be identified. The first feature point information can be feature information of feature points extracted from the first region of interest. The second feature point information can be feature information of feature points extracted from the second region of interest. The execution subject can perform feature point extraction on the first region of interest and the second region of interest included in the iris image to be identified, respectively, through a feature point extraction algorithm, to generate a first feature point information set and a second feature point information set. For example, the feature point extraction algorithm may be, but is not limited to, any one of the following: a SIFT (Scale Invariant Feature Transform) feature detection algorithm and a SURF (Speeded Up Robust Features) feature detection algorithm.
[0032] Optionally, the first feature point information in the first feature point information set may include: direction information of the feature point, scale information of the feature point and polar coordinates of the feature point. The second feature point information in the second feature point information set may include: direction information of the feature point, scale information of the feature point and polar coordinates of the feature point. The direction information of the feature point may be determined by calculating the gradient of the neighborhood around the feature point. The scale information of the feature point may characterize the scale of the feature point. The polar coordinates of the feature point may be the coordinates of the feature point in the polar coordinate system.
[0033] Step 202: Determine a first location point information set and a second location point information set.
[0034] In some embodiments, the execution entity may determine the first location point information set and the second location point information set. The first location point information in the first location point information set represents the coordinates of the location point. The second location point information in the second location point information set represents the coordinates of the location point. The location point corresponding to the first location point information in the first location point information set is located within the first region of interest and on the boundary corresponding to the inner circle boundary information, and the location point corresponding to the second location point information in the second location point information set is located within the second region of interest and on the boundary corresponding to the inner circle boundary information. The inner circle boundary information represents the boundary of the adjacent edge of the pupil and the iris in the iris image to be identified.
[0035] As an example, first, the execution entity may perform boundary recognition on the iris image to be identified to determine the boundary of the pupil and the iris adjacent edge in the iris image to be identified, so as to generate the inner circle boundary information. For example, the inner circle boundary information may include a set of coordinate points on the boundary of the pupil and the iris adjacent edge. Then, the execution entity may generate first position point information based on the position points on the boundary corresponding to the inner circle boundary information and within the first region of interest. Next, the execution entity may generate second position point information based on the position points on the boundary corresponding to the inner circle boundary information and within the second region of interest.
[0036] Step 203: determine the second feature point information matched by each first feature point information in the first feature point information set in the second feature point information set to generate feature point matching information and obtain a feature point matching information set.
[0037] In some embodiments, the execution subject may determine the second feature point information matched by each first feature point information in the first feature point information set in the second feature point information set to generate feature point matching information and obtain a feature point matching information set. The feature point matching information in the feature point matching information set may include: first feature point information and second feature point information. The first feature point information and the second feature point information included in the feature point matching information match each other.
[0038] As an example, the execution subject determines the second feature point information that matches the first feature point information in the second feature point information set by a clustering algorithm to generate feature point matching information.
[0039] Step 204 : for each feature point matching information in the feature point matching information set, generate position proportion information according to the first position point information and the second position point information corresponding to the feature point matching information.
[0040] In some embodiments, the execution entity may generate position ratio information for each feature point matching information in the feature point matching information set according to the first position point information and the second position point information corresponding to the feature point matching information. The position ratio information may characterize the relative position ratio of two feature points corresponding to the first feature point information and the second feature point information included in the feature point matching information in the iris area. The first position point information corresponding to the feature point matching information may be the coordinate point of the feature point corresponding to the first feature point information included in the feature point matching information, on the boundary corresponding to the inner circle boundary information. The second position point information corresponding to the feature point matching information may be the coordinate point of the feature point corresponding to the second feature point information included in the feature point matching information, on the boundary corresponding to the inner circle boundary information.
[0041] Step 205 , based on the obtained position proportion information set, feature point matching information in the feature point matching information set is eliminated to generate a feature point matching information set after elimination.
[0042] In some embodiments, the execution subject may remove the feature point matching information in the feature point matching information set according to the obtained position proportion information set to generate the feature point matching information set after removal. The execution subject may remove the feature point matching information whose corresponding position proportion information is greater than the target proportion value from the feature point matching information set to generate the feature point matching information set after removal.
[0043] Step 206 : In response to determining that the amount of the eliminated feature point matching information in the eliminated feature point matching information set is greater than a preset threshold, generating a beauty contact lens detection prompt information.
[0044] In some embodiments, the execution subject may generate beauty contact lens detection prompt information in response to determining that the number of feature point matching information after elimination in the feature point matching information set after elimination is greater than a preset threshold. The beauty contact lens detection prompt information may be prompt information for prompting that the object to be detected is wearing beauty contact lenses. Since the patterns on the surface of the beauty contact lenses often present a periodic distribution, the number of feature point matching information obtained is often greater than the threshold. The texture of the iris is random. When the object to be detected is not wearing beauty contact lenses, the number of feature point matching information obtained is often less than the threshold. Therefore, the threshold can be used to determine whether the object to be detected is wearing beauty contact lenses.
[0045] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the beauty contact lens detection method of some embodiments of the present disclosure, model training is not required, and the accuracy of beauty contact lens detection is greatly improved. Specifically, the reason for the low accuracy of beauty contact lens detection is that, since the styles, patterns and colors of beauty contact lenses are diverse, and the styles of beauty contact lenses are on the rise, the use of machine learning models for beauty contact lens detection requires a large number of training samples to be labeled for model training, resulting in low model training efficiency, and the robustness of the model cannot be guaranteed, resulting in low accuracy of beauty contact lens detection. Based on this, the beauty contact lens detection method of some embodiments of the present disclosure firstly extracts feature points from the first region of interest and the second region of interest included in the iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set. In actual situations, the collected iris image to be identified often contains interference items such as eyelashes and eyelids. Feature point extraction is performed on the entire annular area corresponding to the iris in the iris image to be identified, and feature points corresponding to interference items such as eyelashes and eyelids are often extracted. As a result, it is impossible to determine whether the user wears beauty contact lenses by setting a threshold, which leads to poor detection effect. Therefore, the present disclosure can eliminate the interference caused by the feature points corresponding to the interference items and improve the detection effect by extracting the feature points of the areas not blocked by interference items such as eyelashes and eyelids, that is, the first area of interest and the second area of interest. In addition, the pattern on the surface of the beauty contact lens often presents a periodic distribution. Therefore, it is not necessary to extract all the features contained in the annular area where the iris is located during feature acquisition. Instead, feature point extraction is performed for the first area of interest and the second area of interest, thereby greatly improving the efficiency of feature acquisition. Secondly, the first position point information set and the second position point information set are determined, wherein the position point corresponding to the first position point information in the first position point information set is located in the first area of interest and on the boundary corresponding to the inner circle boundary information, and the position point corresponding to the second position point information in the second position point information set is located in the second area of interest and on the boundary corresponding to the inner circle boundary information. Next, the second feature point information matched by each first feature point information in the first feature point information set in the second feature point information set is determined to generate feature point matching information and obtain a feature point matching information set. By determining the feature point matching information, the feature points corresponding to the first area of interest and the second area of interest are determined. Then, for each feature point matching information in the feature point matching information set, position ratio information is generated according to the first position point information and the second position point information corresponding to the feature point matching information. Further, according to the obtained position ratio information set, the feature point matching information in the feature point matching information set is eliminated to generate a feature point matching information set after elimination.In actual situations, the annular area corresponding to the iris has positional timing features when it is unfolded, and the pattern on the surface of the beauty contact lens also contains positional timing features. Therefore, through the position ratio information, the feature point matching information that is successfully matched but actually matched incorrectly can be eliminated. For example, a feature point at the junction of the iris and the sclera successfully matches a feature point at the junction of the iris and the pupil. The two feature points have similar feature point information and a high degree of similarity, but they are actually two feature points that are matched incorrectly. Therefore, the feature point matching information corresponding to these two feature points can be eliminated according to the position ratio information. Finally, in response to determining that the number of feature point matching information after elimination in the above-mentioned feature point matching information set after elimination is greater than a preset threshold, a beauty contact lens detection prompt information is generated. In this way, there is no need to annotate a large number of training samples for training the machine learning model. In addition, it can also solve the problem of low robustness of the machine learning model caused by the increase in the styles of beauty contact lenses. Thus, the accuracy of beauty contact lens detection is improved.
[0046] Further references Figure 3 , which shows a process 300 of another embodiment of the method for detecting colored pupils. The process 300 of the method for detecting colored pupils includes the following steps:
[0047] Step 301: iris positioning is performed on the iris image to be recognized to generate inner circle boundary information.
[0048] In some embodiments, the execution subject of the beauty pupil detection method (for example Figure 1 The computing device 101 shown in the figure can perform iris positioning on the iris image to be identified to generate the inner circle boundary information. The inner circle boundary information represents the boundary of the pupil and the iris in the iris image to be identified.
[0049] As an example, first, the execution subject may perform inner and outer circle segmentation on the iris image to be identified to determine the inner circle boundary and the outer circle boundary. The inner circle boundary is the boundary of the adjacent edges of the pupil and the iris in the iris image to be identified. The outer circle boundary is the boundary of the adjacent edges of the iris and the sclera in the iris image to be identified. Then, based on the inner circle boundary with a relatively small radius, the inner circle boundary information is generated. For example, the inner circle boundary information may include: the coordinates of points on the inner circle boundary.
[0050] Step 302 : extracting feature points from the first region of interest and the second region of interest included in the iris image to be recognized, respectively, to generate a first feature point information set and a second feature point information set.
[0051] Step 303: Determine a first location point information set and a second location point information set.
[0052] In some embodiments, the specific implementation of step 302 to step 303 and the technical effects thereof can be referred to in Figure 2 The corresponding steps 201 to 202 in the embodiments are not described in detail here.
[0053] Step 304 : determining second feature point information matched by each first feature point information in the first feature point information set in the second feature point information set to generate feature point matching information and obtain a feature point matching information set.
[0054] In some embodiments, the execution subject determines the second feature point information matched by each first feature point information in the first feature point information set in the second feature point information set to generate feature point matching information, which may include the following steps:
[0055] The first step is to determine the feature similarity between the first feature point information and each second feature point information in the second feature point information set to obtain a feature similarity sequence.
[0056] As an example, the execution entity may determine the cosine similarity between the first feature point information and each piece of second feature point information in the second feature point information set to obtain the feature similarity sequence.
[0057] As another example, the execution entity may determine the Manhattan distance between the first feature point information and each second feature point information in the second feature point information set as the feature similarity to obtain the feature similarity sequence.
[0058] Optionally, the execution subject determines the feature similarity between the first feature point information and each piece of second feature point information in the second feature point information set, which may include the following sub-steps:
[0059] In the first sub-step, vectorization is performed on the first feature point information to generate a first feature vector with a constant scale and a length consistent with the target length.
[0060] Among them, the above target length is 128.
[0061] The second sub-step is to perform vectorization processing on the second feature point information to generate a second feature vector with a constant scale and a length consistent with the target length.
[0062] The third sub-step is to determine the Euclidean distance between the first feature vector and the second feature vector to generate the feature similarity corresponding to the first feature point information.
[0063] The execution subject may determine the Euclidean distance value between the first feature vector and the second feature vector by using the Euclidean distance calculation formula to generate the feature similarity corresponding to the first feature point information.
[0064] In the second step, second feature point information whose corresponding feature similarity meets the screening condition is screened out from the above second feature point information set to obtain a screened second feature point information sequence.
[0065] The screening condition is that the feature similarity corresponding to the second feature point information is greater than or equal to the second feature similarity in the feature similarity sequence. The feature similarity corresponding to the first filtered second feature point information in the filtered second feature point information sequence is greater than the feature similarity corresponding to the second filtered second feature point information in the filtered second feature point information sequence.
[0066] The third step is to determine the ratio of the first feature similarity to the second feature similarity to generate a feature ratio.
[0067] The first feature similarity is the feature similarity corresponding to the first position of the filtered second feature point information sequence, and the second feature similarity is the feature similarity corresponding to the second position of the filtered second feature point information sequence. The first position is the position of the first filtered second feature point information in the filtered second feature point information sequence. The second position is the position of the second filtered second feature point information in the filtered second feature point information sequence.
[0068] In the fourth step, in response to determining that the feature ratio is less than a preset feature threshold, feature point matching information is generated based on the first feature point information and the filtered second feature point information at the first position in the filtered second feature point information sequence.
[0069] The feature point matching information may include: the first feature point information and the filtered second feature point information at the first position in the filtered second feature point information sequence. For example, the preset feature threshold may be 0.8.
[0070] Step 305 : for each feature point matching information in the feature point matching information set, generate position proportion information according to the first position point information and the second position point information corresponding to the feature point matching information.
[0071] In some embodiments, for each feature point matching information in the feature point matching information set, the execution subject generates the position proportion information according to the first position point information and the second position point information corresponding to the feature point matching information, which may include the following steps:
[0072] The first step is to determine the first position point information corresponding to the feature point matching information in the first position point information set according to the position of the feature point corresponding to the first feature point information included in the feature point matching information in the first region of interest.
[0073] Among them, the above-mentioned execution entity can filter out the first feature point information included in the above-mentioned feature point matching information from the above-mentioned first position point information set, and the first position point information whose corresponding feature point has the same position in the above-mentioned first area of interest as the first position point information corresponding to the above-mentioned feature point matching information.
[0074] In the second step, according to the position of the feature point corresponding to the second feature point information included in the feature point matching information in the second region of interest, the second position point information corresponding to the feature point matching information in the second position point information set is determined.
[0075] Among them, the above-mentioned execution entity can filter out the second feature point information included in the above-mentioned feature point matching information from the above-mentioned second position point information set, and the second position point information whose corresponding feature point has the same position in the above-mentioned second area of interest as the second position point information corresponding to the above-mentioned feature point matching information.
[0076] In a third step, the first position proportion is determined according to the first feature point information included in the feature point matching information and the first position point information corresponding to the feature point matching information.
[0077] The execution entity may determine the first position proportion according to the first feature point information included in the feature point matching information and the first position point information corresponding to the feature point matching information by the following formula:
[0078]
[0079] Among them, rt q Indicates the proportion of the first position mentioned above. q represents the radius coordinates of the first feature point corresponding to the first feature point information in the polar coordinate system. r1 represents the radius coordinates of the first position point information. NH represents the total number of sampling points along the radial direction when the above iris image to be detected is expanded along the polar axis.
[0080] In the fourth step, the second position proportion is determined according to the second feature point information included in the feature point matching information and the second position point information corresponding to the feature point matching information.
[0081] The execution subject may determine the second position proportion according to the second feature point information included in the feature point matching information and the second position point information corresponding to the feature point matching information by the following formula:
[0082]
[0083] Among them, rt t Indicates the proportion of the second position mentioned above. t represents the radius coordinates of the second feature point corresponding to the second feature point information in the polar coordinate system. r1 represents the radius coordinates of the second position point information. NH represents the total number of sampling points along the radial direction when the above iris image to be detected is expanded along the polar axis.
[0084] The fifth step is to generate the above position proportion information according to the above first position proportion and the above second position proportion.
[0085] The execution subject may generate the position ratio information according to the first position ratio and the second position ratio by the following formula:
[0086] rt p = abs(rt q -rt t )
[0087] Among them, rt p Indicates the above position ratio information. rt t Indicates the proportion of the second position mentioned above. rt q Indicates the proportion of the first position mentioned above.
[0088] Step 306 , based on the obtained position proportion information set, feature point matching information in the feature point matching information set is eliminated to generate a feature point matching information set after elimination.
[0089] Step 307 : In response to determining that the number of eliminated feature point matching information in the eliminated feature point matching information set is greater than a preset threshold, generating a beauty contact lens detection prompt information.
[0090] In some embodiments, the specific implementation of steps 306 to 307 and the technical effects thereof can be referred to in Figure 2 Steps 205 to 206 in the corresponding embodiments are not described in detail here.
[0091] from Figure 3 It can be seen that Figure 2Compared with the description of some corresponding embodiments, the present disclosure first determines the ratio of the first feature similarity to the second feature similarity to generate a feature ratio. In this way, based on the feature ratio, it is determined whether the first feature point information and the corresponding second feature point information with the greatest feature similarity are successfully matched. Secondly, by determining the first position proportion and the second position proportion, and then determining the position proportion information based on the first position proportion and the second position proportion, the two feature points corresponding to the feature matching information with a large relative position error are eliminated.
[0092] Further references Figure 4 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a color pupil detection device. These device embodiments are Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0093] like Figure 4 As shown, some embodiments of the beauty pupil detection device 400 include: a feature point extraction unit 401, a first determination unit 402, a second determination unit 403, a first generation unit 404, a elimination processing unit 405 and a second generation unit 406. The feature point extraction unit 401 is configured to extract feature points from the first region of interest and the second region of interest included in the iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set; the first determination unit 402 is configured to determine a first position point information set and a second position point information set, wherein the position point corresponding to the first position point information in the first position point information set is located within the first region of interest and on the boundary corresponding to the inner circle boundary information, and the position point corresponding to the second position point information in the second position point information set is located within the second region of interest and on the boundary corresponding to the inner circle boundary information; the second determination unit 403 is configured to determine each first feature point information in the first feature point information set. The second feature point information matched in the above-mentioned second feature point information set is used to generate feature point matching information and obtain a feature point matching information set; the first generating unit 404 is configured to generate position proportion information for each feature point matching information in the above-mentioned feature point matching information set according to the first position point information and the second position point information corresponding to the above-mentioned feature point matching information; the elimination processing unit 405 is configured to eliminate the feature point matching information in the above-mentioned feature point matching information set according to the obtained position proportion information set to generate a feature point matching information set after elimination; the second generating unit 406 is configured to generate a beauty contact lens detection prompt information in response to determining that the number of eliminated feature point matching information in the above-mentioned eliminated feature point matching information set is greater than a preset threshold.
[0094] It is understood that the units described in the device 400 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 400 and the units included therein, and will not be described in detail here.
[0095] Reference below Figure 5 , which shows an electronic device (such as Figure 1 A schematic diagram of the structure of the computing device 101)500 is shown. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0096] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0097] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0098] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0099] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0100] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0101] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: respectively extracts feature points from the first region of interest and the second region of interest included in the iris image to be identified to generate a first feature point information set and a second feature point information set; determines a first position point information set and a second position point information set, wherein the position point corresponding to the first position point information in the first position point information set is located within the first region of interest and on the boundary corresponding to the inner circle boundary information, and the position point corresponding to the second position point information in the second position point information set is located within the second region of interest and on the boundary corresponding to the inner circle boundary information; determines Each first feature point information in the above-mentioned first feature point information set is matched with the second feature point information in the above-mentioned second feature point information set to generate feature point matching information and obtain a feature point matching information set; for each feature point matching information in the above-mentioned feature point matching information set, position proportion information is generated according to the first position point information and the second position point information corresponding to the above-mentioned feature point matching information; according to the obtained position proportion information set, the feature point matching information in the above-mentioned feature point matching information set is eliminated to generate a eliminated feature point matching information set; in response to determining that the number of eliminated feature point matching information in the above-mentioned eliminated feature point matching information set is greater than a preset threshold, beauty contact lens detection prompt information is generated.
[0102] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0103] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0104] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be set in a processor, for example, may be described as: a processor includes a feature point extraction unit, a first determination unit, a second determination unit, a first generation unit, a elimination processing unit, and a second generation unit. The names of these units do not constitute limitations on the units themselves in certain cases. For example, the feature point extraction unit may also be described as "a unit that extracts feature points from the first region of interest and the second region of interest included in the iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set".
[0105] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0106] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for detecting colored pupils, comprising: Extracting feature points from a first region of interest and a second region of interest included in the iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set; Determine a first location point information set and a second location point information set, wherein a location point corresponding to first location point information in the first location point information set is located within the first region of interest and on a boundary corresponding to the inner circle boundary information, and a location point corresponding to second location point information in the second location point information set is located within the second region of interest and on a boundary corresponding to the inner circle boundary information; Determine second feature point information that matches each first feature point information in the first feature point information set in the second feature point information set to generate feature point matching information, thereby obtaining a feature point matching information set; For each feature point matching information in the feature point matching information set, generating position proportion information according to the first position point information and the second position point information corresponding to the feature point matching information; According to the obtained position proportion information set, feature point matching information in the feature point matching information set is eliminated to generate a feature point matching information set after elimination; In response to determining that the amount of eliminated feature point matching information in the eliminated feature point matching information set is greater than a preset threshold, generating beauty contact lens detection prompt information.
2. The method according to claim 1, wherein: Before extracting feature points from the first region of interest and the second region of interest included in the iris image to be identified to generate a first feature point information set and a second feature point information set, the method further includes: Iris positioning is performed on the iris image to be recognized to generate the inner circle boundary information.
3. The method according to claim 1, wherein: The determining second feature point information matched by each first feature point information in the first feature point information set in the second feature point information set to generate feature point matching information includes: Determine feature similarity between the first feature point information and each second feature point information in the second feature point information set to obtain a feature similarity sequence; Filter out the second feature point information whose corresponding feature similarity satisfies the filtering condition from the second feature point information set, and obtain a filtered second feature point information sequence; Determine a ratio of a first feature similarity and a second feature similarity to generate a feature ratio, wherein the first feature similarity is a feature similarity corresponding to the filtered second feature point information at a first position in the filtered second feature point information sequence, and the second feature similarity is a feature similarity corresponding to the filtered second feature point information at a second position in the filtered second feature point information sequence; In response to determining that the feature ratio is less than a preset feature threshold, feature point matching information is generated according to the first feature point information and the filtered second feature point information at a first position in the filtered second feature point information sequence.
4. The method according to claim 3, wherein: For each feature point matching information in the feature point matching information set, generating position proportion information according to the first position point information and the second position point information corresponding to the feature point matching information includes: Determine, according to the position of the feature point corresponding to the first feature point information included in the feature point matching information in the first region of interest, the first position point information corresponding to the feature point matching information in the first position point information set; The second position point information corresponding to the feature point matching information included in the feature point matching information is determined according to the position of the feature point corresponding to the second feature point information included in the feature point matching information in the second region of interest.
5. The method according to claim 4, wherein: The generating of position proportion information for each feature point matching information in the feature point matching information set according to the first position point information and the second position point information corresponding to the feature point matching information further includes: Determine a first position proportion according to first feature point information included in the feature point matching information and first position point information corresponding to the feature point matching information; Determine a second position proportion according to second feature point information included in the feature point matching information and second position point information corresponding to the feature point matching information; The position proportion information is generated according to the first position proportion and the second position proportion.
6. The method according to claim 3, wherein: The determining the feature similarity between the first feature point information and each second feature point information in the second feature point information set includes: Performing vectorization processing on the first feature point information to generate a first feature vector with a constant scale and a length consistent with a target length; Performing vectorization processing on the second feature point information to generate a second feature vector with a constant scale and a length consistent with the target length; A Euclidean distance value between the first feature vector and the second feature vector is determined to generate a feature similarity corresponding to the first feature point information.
7. A color pupil detection device, comprising: A feature point extraction unit is configured to extract feature points from a first region of interest and a second region of interest included in the iris image to be identified, respectively, to generate a first feature point information set and a second feature point information set; A first determining unit is configured to determine a first location point information set and a second location point information set, wherein a location point corresponding to first location point information in the first location point information set is located within the first region of interest and on a boundary corresponding to the inner circle boundary information, and a location point corresponding to second location point information in the second location point information set is located within the second region of interest and on a boundary corresponding to the inner circle boundary information; A second determining unit is configured to determine second feature point information that matches each first feature point information in the first feature point information set in the second feature point information set, so as to generate feature point matching information and obtain a feature point matching information set; A first generating unit is configured to generate position proportion information for each feature point matching information in the feature point matching information set according to first position point information and second position point information corresponding to the feature point matching information; A removal processing unit is configured to remove feature point matching information in the feature point matching information set according to the obtained position proportion information set, so as to generate a feature point matching information set after removal; The second generating unit is configured to generate the beauty contact lens detection prompt information in response to determining that the number of the eliminated feature point matching information in the eliminated feature point matching information set is greater than a preset threshold.
8. The color pupil detection device according to claim 7, wherein: The second determining unit is further configured to: A third determining unit is configured to determine feature similarity between the first feature point information and each second feature point information in the second feature point information set to obtain a feature similarity sequence; A screening unit is configured to screen out second feature point information whose corresponding feature similarity satisfies a screening condition from the second feature point information set, and obtain a screened second feature point information sequence; a fourth determining unit, configured to determine a ratio of a first feature similarity and a second feature similarity to generate a feature ratio, wherein the first feature similarity is a feature similarity corresponding to the filtered second feature point information at a first position in the filtered second feature point information sequence, and the second feature similarity is a feature similarity corresponding to the filtered second feature point information at a second position in the filtered second feature point information sequence; The third generating unit is configured to generate feature point matching information according to the first feature point information and the filtered second feature point information at the first position in the filtered second feature point information sequence in response to determining that the feature ratio is less than a preset feature threshold.
9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Extracting method and apparatus for iris feature information
CN105224936A
Pupil radius detection method and device, computer equipment and storage medium
CN110555875A