A method for detecting abnormality of a refractive medium, a storage medium and an electronic device
By enhancing the image quality and segmenting the regions of images captured from the eye, and utilizing a refractive media detection model, the problem of deviation in the detection of refractive media abnormalities was solved, thereby improving the accuracy of detection and the precision of cataract diagnosis.
Patent Information
- Application Number
- CN202411930273.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing technologies are prone to errors in detecting refractive media abnormalities, leading to inaccurate cataract diagnosis.
By acquiring images of the eyeball and performing image quality enhancement processing, cropping the pupil area, using a pre-trained refractive media detection model for region segmentation, and combining the location and area ratio of the abnormal pupil area to determine the refractive media abnormality detection result.
It improves the segmentation accuracy and precision of abnormal regions in pupil images, reduces false detections in the eyelash region, and enhances the accuracy of cataract diagnosis.
Smart Images

Figure CN119888827B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of ocular refractive media screening technology, specifically to a method for detecting refractive media abnormalities, a storage medium, and an electronic device. Background Technology
[0002] Refractive media, including the cornea, aqueous humor, lens, and vitreous humor, are the pathways through which light enters the eye and reaches the retina. These media are transparent and avascular to achieve optimal refractive power. Abnormalities in the refractive media can lead to vision problems, especially cataracts. Early symptoms of cataracts are usually subtle, but as the condition progresses, blurred vision, double vision, myopia, glare, and other symptoms may appear, potentially leading to complete blindness. Therefore, screening for refractive media abnormalities is crucial in determining the presence of cataracts.
[0003] Currently, cataract diagnosis primarily relies on slit-lamp imaging to obtain pupil images, which doctors then use for diagnosis. However, slit-lamp imaging uses visible light as the light source, and reflected light spots from the fundus can easily influence the diagnostic results. Furthermore, eyelashes may overlap with the pupil during imaging and be mistaken for part of the pupil. Therefore, pupil images cannot accurately represent the state of the eye, leading to potentially inaccurate diagnoses. Summary of the Invention
[0004] The technical problem to be solved by this application is that the existing refractive media anomaly detection scheme is prone to deviation, and therefore provides a refractive media anomaly detection method, storage medium and electronic device.
[0005] Firstly, the technical solution of this application provides a method for detecting anomalies in refractive media, including:
[0006] Acquire images of the eyeballs of the target object;
[0007] The image of the eyeball is subjected to image quality enhancement processing to obtain an enhanced image of the eyeball;
[0008] The pupil region in the enhanced eye image is determined, and the enhanced eye image is cropped according to the boundary of the pupil region to obtain the pupil image of the target under test;
[0009] The pupil image is input into a pre-trained refractive media detection model to obtain the region segmentation result of the pupil image output by the refractive media detection model. The region segmentation result includes: the normal pupil region, abnormal pupil region, and eyelash region contained in the pupil image; wherein, the refractive media detection model is trained using pupil image samples after image quality enhancement processing;
[0010] According to the position and area proportion of the pupil abnormal area in the pupil image, a refractive medium abnormality detection result of the to-be-detected target is determined.
[0011] In some schemes, the refractive medium abnormality detection method comprises the following steps:
[0012] Obtaining spatial information of the eyeball photographed image, and representing the spatial information as a sum of an illumination component and a reflection component;
[0013] Transforming the spatial information to obtain frequency domain information corresponding to the spatial information;
[0014] Filtering the frequency domain information to obtain a sum of a high-frequency component in the frequency domain information and a suppressed low-frequency component as filtered frequency domain information;
[0015] Transforming the filtered frequency domain information to obtain filtered spatial information corresponding to the filtered frequency domain information, and the filtered spatial information is represented as a sum of a filtered illumination component and a filtered reflection component;
[0016] Obtaining the enhanced eyeball image according to the filtered illumination component and the filtered reflection component.
[0017] In some schemes, the refractive medium abnormality detection method comprises the following steps:
[0018] Obtaining a pupil image sample after quality enhancement processing;
[0019] Labeling a pupil normal area, a pupil abnormal area and a eyelash area in the pupil image sample to obtain a pupil image sample with a labeled label;
[0020] Selecting an initial deep learning model, taking the pupil image sample with the labeled label as input, and taking a sample area segmentation result and a confidence obtained by segmenting the pupil image sample according to the labeled label as output to train the initial deep learning model, stopping training when the confidence reaches a set confidence to obtain the refractive medium detection model; the sample area segmentation result includes a pupil normal area, a pupil abnormal area and a eyelash area contained in the pupil image sample.
[0021] In some schemes, the refractive medium abnormality detection method comprises the following steps:
[0022] Obtaining spatial data of the eyeball photographed image: f(x, y) = f i (x, y)fr (x,y); wherein x and y represent the position of a pixel point in the eye photograph image; f i (x,y) represents the illumination function of the eye photograph image, which varies with position; f r (x,y) represents the reflection function of the eye photograph image, which varies with position;
[0023] The spatial data of the eye photograph image is logarithmically transformed to obtain the spatial information: lnf(x,y) = lnf i (x,y) + lnf r (x,y) ; wherein lnf i (x,y) represents the illumination component; and lnf r (x,y) represents the reflection component.
[0024] In some schemes, the method for detecting abnormal refraction medium, the filtering processing of the frequency domain information is performed, and the sum of the high-frequency component and the suppressed low-frequency component in the frequency domain information is obtained as the filtered frequency domain information, comprising:
[0025] The frequency domain filter H mo (u,v) is realized by using the following function:
[0026] H mo (u,v) = (γ H -γ L )H hp (u,v) + γ L ;
[0027] H hp (u,v) = 1-exp(-c(D 2 (u,v) / D0 2 )) ;
[0028] wherein: u and v represent the horizontal and vertical coordinates in the frequency domain coordinate system respectively; H hp (u,v) is a high-pass filter function; D(u,v) represents the input frequency domain signal of the high-pass filter function, D0 represents the cutoff frequency of the high-pass filter function; c is a high-pass filter shape control parameter; γ H represents the high-frequency component weight, and γ L represents the low-frequency component weight.
[0029] In some schemes, the method for detecting abnormal refraction medium, the eye photograph image and the pupil image sample are images obtained by photographing under an infrared light source.
[0030] In some embodiments, the method for detecting abnormality of refractive media comprises the following steps:
[0031] obtaining a center position (x0, y0) and an area A0 of the pupil image;
[0032] obtaining a center position (xi, yi) and an area Ai of the abnormal pupil region;
[0033] calculating the area ratio R = Ai / A0;
[0034] calculating the distance S between the center of the abnormal pupil region and the center of the pupil image;
[0035]
[0036] calculating the abnormality level of the refractive media G = k1 x R + k2 / S; wherein, k1 and k2 are preset weight coefficients.
[0037] In a second aspect, the present application provides a computer readable storage medium, wherein the storage medium stores program information, and a computer reads the program information to execute the steps of the method for detecting abnormality of refractive media according to any one of the first aspect.
[0038] In a third aspect, the present application provides a computer program product, comprising computer programs / instructions, wherein the computer programs / instructions are executed by a processor to implement the steps of the method for detecting abnormality of refractive media according to any one of the first aspect.
[0039] In a fourth aspect, the present application provides an electronic device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method for detecting abnormality of refractive media according to any one of the first aspect.
[0040] Compared with the prior art, the above technical solutions provided by the present application have the following technical effects:
[0041] The dioptric medium anomaly detection method, the storage medium and the electronic device provided by the application can improve the contrast and the definition of the pupil region in the eyeball photographing image after obtaining the eyeball photographing image of the target to be detected. On this basis, the pupil region in the enhanced eyeball image can be determined more accurately. According to this, the pupil image of the target to be detected can be obtained by cropping the enhanced eyeball image according to the boundary of the pupil region. The dioptric medium detection model is obtained by learning and training in advance. The pupil image with higher contrast and definition obtained by the foregoing method is input into the dioptric medium detection model, so that the region segmentation result of the pupil image can be obtained. The region segmentation result includes the normal pupil region, the abnormal pupil region and the eyelash region. According to the position and the area ratio of the abnormal pupil region in the pupil image, the dioptric medium anomaly detection result of the target to be detected can be determined, and the influence of the eyelash region is excluded. Through the above scheme of the application, the segmentation accuracy and the accuracy of the abnormal region in the pupil image can be improved, the false detection of the eyelashes can be avoided, the accuracy of the dioptric medium anomaly detection can be improved, and the judgment accuracy of whether the cataract is improved. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 The flowchart of the dioptric medium anomaly detection method according to an embodiment of the application is shown.
[0043] Figure 2 The schematic diagram of cropping the pupil image in the eyeball photographing image according to an embodiment of the application is shown.
[0044] Figure 3 The comparison diagram of the original pupil image and the pupil image obtained by the embodiment of the application is shown.
[0045] Figure 4a The schematic diagram of the normal pupil region obtained by segmenting the pupil image is shown. Figure 4b The schematic diagram of the abnormal pupil region obtained by segmenting the pupil image is shown. Figure 4c The schematic diagram of the eyelash region obtained by segmenting the pupil image is shown.
[0046] Figure 5 The curve schematic diagram of the frequency domain filter function according to an embodiment of the application is shown.
[0047] Figure 6 The implementation process schematic diagram of the inverted residual module of the Mobile-Unet network model is shown.
[0048] Figure 7 The logic schematic diagram of the Mobile-Unet network model used by the initial deep learning model is shown.
[0049] Figure 8The hardware connection relationship diagram of the electronic device for performing the refractive media anomaly detection method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0050] The specific embodiments of the present application will be further described below with reference to the accompanying drawings.
[0051] It is easily understood that, according to the technical solutions of the present application, a person skilled in the art can replace various structural modes and implementation modes with each other without changing the essential spirit of the present application. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical solutions of the present application, and should not be regarded as the whole or as a limitation or restriction on the technical solutions of the application.
[0052] In the present specification, the orientation terms such as up, down, left, right, front, back, front, back, top, bottom, etc. mentioned or possibly mentioned are defined with respect to the structure shown in the drawings, which are relative concepts, and therefore can be changed accordingly according to different positions and different use states. Therefore, these or other orientation terms should not be interpreted as restrictive terms.
[0053] The present embodiment provides a refractive media anomaly detection method, which is applied to an instrument control system for checking eyes, as shown in Figure 1 The method comprises the following steps:
[0054] S10: Obtain an eyeball photograph of a target to be measured.
[0055] Specifically, the target to be measured is a subject to be checked, and the face is photographed by an image acquisition device to obtain a clear image containing the eyeball as an eyeball photograph, as shown in Figure 2 In order to ensure the integrity of the eyeball, the eyeball photograph includes the forehead region and the face region, which can be removed by subsequent cropping.
[0056] S20: Perform quality enhancement processing on the eyeball photograph to obtain an enhanced eyeball image.
[0057] Specifically, the quality enhancement processing is used to improve the quality of the eyeball photograph, including adjusting the image parameters such as sharpness, contrast, and saturation.
[0058] S30: Determine the pupil region in the enhanced eyeball image, and crop the enhanced eyeball image according to the boundary of the pupil region to obtain a pupil image of the target to be measured.
[0059] Specifically, as shown in Figure 3As shown, the left side is the original pupil image, and the right side is the pupil image obtained after the quality enhancement processing and cropping. By comparison, the pupil image in the present application improves the display quality, especially the light spot of the light source is clearer, the abnormal area boundary is clearer, the eyelash display is clearer, and the pupil boundary is clearer.
[0060] S40: inputting the pupil image into a pre-trained refractive medium detection model to obtain a region segmentation result of the pupil image output by the refractive medium detection model, the region segmentation result including a pupil normal region, a pupil abnormal region and an eyelash region contained in the pupil image; wherein the refractive medium detection model is trained using a pupil image sample after quality enhancement processing.
[0061] Specifically, the pupil image sample used when training the refractive medium detection model and the pupil image in the present application are processed by the same quality enhancement processing method, reducing the environmental noise of the analysis result of the refractive medium detection model. After analysis by the refractive medium detection model, Figure 3 The pupil image shown on the right can be segmented into Figure 4a the pupil normal region shown, Figure 4b the pupil abnormal region shown, and Figure 4c the eyelash region shown.
[0062] S50: determining the refractive medium abnormality detection result of the target to be measured according to the position and area ratio of the pupil abnormal region in the pupil image.
[0063] Specifically, the closer the pupil abnormal region is to the pupil center, the greater the impact on vision; the larger the pupil abnormal region, the greater the impact on vision. Therefore, the refractive medium abnormality detection result of the target to be measured can be determined according to the position and area ratio of the pupil abnormal region in the pupil image. The distance upper threshold of the pupil abnormal region from the pupil center can be set, and once the distance of the pupil abnormal region from the pupil center exceeds the distance upper threshold, the refractive medium abnormality can be determined. The area ratio upper threshold of the area ratio of the pupil abnormal region to the pupil image can also be set, and once the area ratio of the pupil abnormal region to the pupil image exceeds the area ratio upper threshold, the refractive medium abnormality can be determined.
[0064] The above technical solution provided in the application, after obtaining the eye shooting image of the to-be-tested target, first performs quality enhancement processing on the eye shooting image to obtain an enhanced eye image, so that the contrast and definition of the pupil region in the eye shooting image can be improved. On this basis, the pupil region in the enhanced eye image can be more accurately determined. Accordingly, the enhanced eye image can be cropped according to the boundary of the pupil region to obtain a pupil image of the to-be-tested target. The refractive medium detection model is obtained in advance through learning and training. The pupil image with higher contrast and definition obtained in the foregoing manner is input into the refractive medium detection model, so that the region segmentation result of the pupil image can be obtained. The region segmentation result includes a normal pupil region, an abnormal pupil region and a eyelash region. According to the position and area proportion of the abnormal pupil region in the pupil image, the refractive medium abnormality detection result of the to-be-tested target can be determined, and the influence of the eyelash region is excluded. Through the above scheme of the application, the segmentation accuracy and accuracy of the abnormal region in the pupil image can be improved, the false detection of the eyelashes can be avoided, the accuracy of the refractive medium abnormality detection can be improved, and the judgment accuracy of whether the to-be-tested target is a cataract can be improved.
[0065] Further, the refractive medium abnormality detection method in the above scheme, the quality enhancement processing on the eye shooting image to obtain an enhanced eye image in step S20 includes:
[0066] S201: Obtain the spatial information of the eye shooting image, and express the spatial information as the sum of an illumination component and a reflection component.
[0067] Specifically, the spatial information is time domain information. In the time domain space, the eye shooting image can be regarded as consisting of two parts: the light intensity at different spatial positions, which is characterized by slow change and is concentrated in the low-frequency part of the eye shooting image; and the image of the scene reflected to the eye, which is characterized by containing various information of the scene and rich in high-frequency components. In order to facilitate the analysis of the eye shooting image, the spatial information can be expressed as the sum of an illumination component and a reflection component. That is, the illumination / reflection ratio data of the eye shooting image is used as the basis for frequency domain processing, and the compression of the brightness range and the enhancement of the contrast are used to improve the quality of the eye shooting image. As an implementation manner, the spatial information is obtained by the following manner:
[0068] S2011: Obtain the spatial data of the eye shooting image: f(x,y)=f i (x,y)f r (x,y); wherein x and y represent the positions of the pixel points in the eye shooting image; f i (x,y) represents an illumination function of the eye shooting image, which changes with the position; f r (x,y) represents a reflection function of the eye shooting image, which changes with the position.
[0069] The eye shot image comprises multiple rows and multiple columns of pixel points, and the values of x and y can be determined according to the row number and the column number of the pixel points. The eye shot image can also be defined in a certain polar coordinate system, and the position of the eye shot image corresponding to the origin of the coordinate system can be selected according to requirements, for example, the pupil center pixel point can be selected to overlap with the origin of the coordinate system, and the position of each pixel point can be determined according to the distance between each pixel point and the pupil center pixel point. In addition, the illumination function and the reflection function can be determined in the existing manner, and will not be described in detail here.
[0070] S2012: Logarithmically transforming the spatial data of the eye shot image to obtain the spatial information: lnf(x, y) = lnf i (x, y) + lnf r (x, y); wherein lnf i (x, y) represents the illumination component, and lnf r (x, y) represents the reflection component.
[0071] S202: Transforming the spatial information to obtain the frequency domain information corresponding to the spatial information.
[0072] Specifically, the spatial information is mapped from the time domain to the frequency domain through Fourier transform, that is:
[0073] DFT[lnf(x, y)] = DFT[lnf i (x, y)] + DFT[lnf r (x, y)].
[0074] S203: Filtering the frequency domain information to obtain the sum of the high-frequency component and the suppressed low-frequency component in the frequency domain information as the filtered frequency domain information.
[0075] Specifically, a frequency domain filter H mo (u, v) is selected to filter DFT[lnf(x, y)].
[0076] The eye shot image is an image with uneven illumination, and the frequency domain filter H mo (u, v) needs to simultaneously realize brightness adjustment and contrast enhancement, so as to improve the image quality of the eye shot image. As described above, the image of the scene reflected to the eye contains various information of the scene, and the high-frequency component is rich, that is, it corresponds to the pupil abnormal area which is the focus of attention, therefore the frequency domain filter H mo (u, v) should suppress the low-frequency brightness component and enhance the high-frequency reflection component. The frequency domain filter H mo (u, v) should be a high-pass filter, but it cannot completely delete the low-frequency component, and its form should be as follows: Figure 5as shown.
[0077] As a preferred solution, the embodiment adopts a frequency domain filter H mo (u,v) to perform the filtering process on the frequency domain information:
[0078] H mo (u,v) = (γ H -γ L )H hp (u,v) + γ L ;
[0079] H hp (u,v) = 1 - exp(-c(D 2 (u,v) / D0 2 ));
[0080] wherein u and v respectively represent horizontal and vertical coordinates in a frequency domain coordinate system; H hp (u,v) is a high-pass filter function; D(u,v) represents an input frequency domain signal of the high-pass filter function, D0 represents a cutoff frequency of the high-pass filter function; c is a shape control parameter of the high-pass filter; γ H represents a high frequency component weight, and γ L represents a low frequency component weight.
[0081] In the above solution, the high-pass filter function is a Gaussian high-pass filter function, and the shape control parameter c can control the steepness (slope) of the transition section from low frequency to high frequency. The greater the value, the steeper the steepness (slope). In addition, the high-pass filter can also be a Butterworth high-pass filter, a Laplacian filter, etc.
[0082] S204: Transforming the filtered frequency domain information to obtain filtered spatial information corresponding to the filtered frequency domain information, and the filtered spatial information is represented as the sum of a filtered illumination component and a filtered reflection component.
[0083] Specifically, this step still adopts Fourier transform to map the filtered frequency domain information in the frequency domain back to the time domain.
[0084] S205: Obtaining the enhanced eyeball image according to the filtered illumination component and the filtered reflection component.
[0085] According to step S201, this step can obtain the time domain filtering result by taking the exponential of the filtered illumination component and the filtered reflection component, and thus the enhanced eyeball image can be obtained.
[0086] Through the filtering processing in the above scheme, the contrast and the standardized brightness of the eye shot image can be increased at the same time, thereby achieving the purpose of enhancing the quality of the eye shot image. The eye shot image is represented as the product of its illumination function and reflection function, although the two are inseparable in the time domain, but via Fourier transform, the two can be linearly separated in the frequency domain. Since the illumination can be regarded as the illumination in the environment, the relative change is small, and can be regarded as the low-frequency component of the eye shot image; while the reflectivity of the eye shot image has a relatively large change, which can be regarded as the high-frequency component. By processing the influence of the illumination and the reflectivity on the pixel gray value respectively, the illumination of the eye shot image is made more uniform, and the reflection details such as the pupil, the eyelashes and the like are made clearer by the frequency domain filter provided in the present application.
[0087] Further preferably, the refractive medium detection model in the above scheme is obtained by the following way:
[0088] S1: obtaining a pupil image sample after quality enhancement processing.
[0089] Specifically, the pupil image sample for training is obtained, which is an image processed according to the aforementioned quality enhancement processing manner.
[0090] S2: labeling the pupil normal area, the pupil abnormal area and the eyelash area in the pupil image sample to obtain a pupil image sample with labeled labels.
[0091] Specifically, it can be performed according to the way of setting labels for training samples.
[0092] S3: selecting an initial deep learning model, taking the pupil image sample with labeled labels as input, and taking the sample area segmentation result and the confidence obtained by segmenting the pupil image sample according to the labeled labels as output to train the initial deep learning model, stopping training when the confidence reaches a set confidence to obtain the refractive medium detection model; the sample area segmentation result includes the pupil normal area, the pupil abnormal area and the eyelash area contained in the pupil image sample.
[0093] The selected initial deep learning model can be obtained from the existing deep learning algorithm in the prior art.
[0094] In order to simplify the operation process and improve the operation efficiency, the Mobile-Unet network model and the pupil image sample with labeled label are selected for training. Specifically, the lightweight requirement is not met, and the MobileNetV3 network model with three-layer neural network can be selected as the backbone network. The MobileNetV3 network model is a network combined with depth separable convolution, linear bottleneck, inverse residual structure and lightweight attention mechanism. The network has the advantages of small parameter quantity, high speed and moderate depth, and has great advantages in medical image segmentation task as a backbone network. Among them: the depth separable convolution uses the depth separable convolution with a convolution kernel of 3x3, which can reduce the calculation amount by 8 to 9 times compared with the ordinary convolution. The linear bottleneck structure is a bottleneck structure using linear activation at the end of the convolution (replace the ReLU function with a linear function). When the output dimension is low, it is easy to cause information loss, so the linear activation is selected at the end. Figure 6 As shown in the logic of the inverse residual structure
[0095] Unet network is a kind of full convolutional neural network, which is a relatively popular medical image segmentation model at present. The network is composed of two parts of encoder (up sampling) and decoder (down sampling). The encoding part reduces the dimension and extracts features of the input picture through convolution and pooling; the decoding part increases the dimension and enlarges the features of the low pixel (shallow layer feature) picture through up sampling. The different feature maps obtained by encoding are connected to the corresponding layers of the decoding part in the form of channel fusion, in which the shallow layer feature is used for segmentation, and the deep layer feature is used for positioning, and the effective combination of the two helps to increase the diversity of features. Therefore, as a specific task type network, it can be better applied to medical image segmentation. The Mobile-Unet network model shown in Figure 7 is adopted in the scheme, wherein the backbone network selects the MobileNetV3 lightweight network as described before, and the task network is the commonly used Unet network. First, the bneck module in MobileNetV3 is transplanted to the encoding part of Unet network; secondly, different depths of bneck modules are used to extract features according to the position of Unet encoding part, usually the deeper the position, the more bneck modules are needed, and the more abstract features are extracted.
[0096] The Mobile-Unet network selected in the application extracts the MobileNetV3 feature and combines the feature connection of Unet, which helps to reduce the problem of excessive network layer parameters and overfitting, thereby having the advantages of high precision, simple calculation and fewer parameters.
[0097] Further preferably, in the above scheme, the eyeball image and the pupil image sample are images obtained by shooting under an infrared light source. In this scheme, shooting under an infrared light source can avoid the contraction of the pupil of the target to be measured after being stimulated by light, so that the pupil is as large as possible during shooting, which is more helpful for the screening of refractive medium abnormalities.
[0098] As mentioned above, the closer the pupil abnormal area is to the pupil center, the greater the impact on vision; the larger the pupil abnormal area, the greater the impact on vision. In this scheme, in order to quantify the detection result, the refractive medium abnormality grade is provided as a parameter of the examination result. On this basis, the refractive medium abnormality detection result of the target to be measured is determined according to the position and area ratio of the pupil abnormal area in the pupil image in step S50, which includes:
[0099] S501: Obtain the center point position (x0, y0) and area A0 of the pupil image.
[0100] Specifically, x0 and y0 are determined according to the row number and column number of the center point of the pupil image, and the area calculation formula is determined according to the shape of the pupil. Usually it is a circle, and the area A0 can be solved according to the circular area calculation formula.
[0101] S502: Obtain the center point position (xi, yi) and area Ai of the pupil abnormal area.
[0102] Specifically, xi and yi are determined according to the row number and column number of the center point of the pupil abnormal area, and the area calculation formula is determined according to the shape of the pupil abnormal area.
[0103] S503: Calculate the area ratio R = Ai / A0.
[0104] S504: Calculate the distance between the center point of the pupil abnormal area and the center point of the pupil image:
[0105]
[0106] S505: Calculate the refractive medium abnormality grade G = k1 x R + k2 / S; wherein k1 and k2 are preset weight coefficients.
[0107] k1, k2 can be adjusted according to actual conditions, and are generally taken as 0.5, 0.5. Through the scheme, the refractive medium abnormality grade of the target to be detected can be obtained, and the quantitative detection result is obtained.
[0108] The embodiment of the present application provides a computer readable storage medium, wherein the storage medium stores program information. After the computer reads the program information, the steps of the refractive medium abnormality detection method described in any one of the schemes of the method embodiment are executed.
[0109] The embodiment of the present application provides a computer program product, including computer programs / instructions, characterized in that the computer programs / instructions are executed by a processor to realize the steps of the refractive medium abnormality detection method described in any one of the schemes of the method embodiment.
[0110] The embodiment of the present application also provides an electronic device, such as Figure 8As shown, the electronic device includes at least one processor 81 and at least one memory 82, at least one of the memories 82 stores program information, and at least one of the processors 81 reads the program information and executes the refractive media anomaly detection method described in any of the above method embodiments. The device can also include an input device 83 and an output device 84. The processor 81, the memory 82, the input device 83 and the output device 84 can be communicatively connected. The memory 82, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 81 executes various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 82, that is, implements the refractive media anomaly detection method provided in any of the above solutions. The memory 82 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the refractive media anomaly detection method, etc. In addition, the memory 82 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 82 can optionally include a memory remotely arranged with respect to the processor 81, and these remote memories can be connected to the device executing the refractive media anomaly detection method through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The input device 83 can receive input user clicks and generate signal inputs related to user settings and function control of the refractive media anomaly detection method. The output device 84 can include a display device such as a display screen. When the one or more modules are stored in the memory 82 and are run by the one or more processors 81, the refractive media anomaly detection method in any of the above method embodiments is executed.
[0111] According to the needs, the above technical solutions can be combined to achieve the best technical effect.
[0112] The above is only the principles and preferred embodiments of the present application. It should be noted that for those skilled in the art, on the basis of the principles of the present application, a number of other variants can also be made, which should also be considered as the protection scope of the present application.
Claims
1. A method of detecting an abnormality in a refractive medium, characterized by, The method comprises the following steps: obtaining an eye photograph of a target to be detected; performing quality enhancement processing on the eye photograph to obtain an enhanced eye photograph; determining a pupil region in the enhanced eye photograph, and cropping the enhanced eye photograph according to the boundary of the pupil region to obtain a pupil photograph of the target to be detected; inputting the pupil photograph into a pre-trained refractive medium detection model to obtain a region segmentation result of the pupil photograph output by the refractive medium detection model, wherein the region segmentation result comprises a normal pupil region, an abnormal pupil region and a lash region contained in the pupil photograph, and the refractive medium detection model is trained by using a pupil photograph sample subjected to quality enhancement processing; determining a refractive medium abnormality detection result of the target to be detected according to the position and area proportion of the abnormal pupil region in the pupil photograph; the quality enhancement processing on the eye photograph to obtain the enhanced eye photograph comprises the following steps: obtaining spatial information of the eye photograph, and representing the spatial information as the sum of an illumination component and a reflection component; performing transformation processing on the spatial information to obtain frequency domain information corresponding to the spatial information; performing filtering processing on the frequency domain information to obtain the sum of a high-frequency component in the frequency domain information and a suppressed low-frequency component as filtered frequency domain information; performing transformation processing on the filtered frequency domain information to obtain filtered spatial information corresponding to the filtered frequency domain information, and representing the filtered spatial information as the sum of a filtered illumination component and a filtered reflection component; obtaining the enhanced eye photograph according to the filtered illumination component and the filtered reflection component.
2. The method according to claim 1, wherein The refractive medium detection model is obtained by the following method: obtaining a pupil photograph sample subjected to quality enhancement processing; annotating the normal pupil region, the abnormal pupil region and the lash region in the pupil photograph sample to obtain a pupil photograph sample with annotation labels; selecting an initial deep learning model, taking the pupil photograph sample with annotation labels as input, and taking a sample region segmentation result and a confidence obtained by segmenting the pupil photograph sample according to the annotation labels as output to train the initial deep learning model, and stopping training when the confidence reaches a set confidence to obtain the refractive medium detection model; the sample region segmentation result comprises the normal pupil region, the abnormal pupil region and the lash region contained in the pupil photograph sample.
3. The method according to claim 1, wherein The obtaining of the spatial information of the eye photograph and the representing of the spatial information as the sum of an illumination component and a reflection component comprises: acquiring spatial data of the eye shot image: ; wherein x and y represent the position of a pixel point in the eye shot image; represents an illumination function of the eye shot image, which varies with position; represents a reflection function of the eye shot image, which varies with position; log-transforming spatial data of the image taken of the eyeball to obtain the spatial information: ; wherein, represents an illumination component and represents a reflection component.
4. The method according to claim 1, wherein The filtering processing on the frequency domain information to obtain the sum of a high-frequency component in the frequency domain information and a suppressed low-frequency component as filtered frequency domain information comprises: A frequency domain filter implemented using the following function performing the filtering process on the frequency domain information: ; ; wherein: respectively denote the horizontal and vertical coordinates in the frequency domain coordinate system; is a high-pass filter function; denotes an input frequency domain signal of the high-pass filter function, denotes a cut-off frequency of the high-pass filter function; is a high-pass filter shape control parameter; denotes a high frequency component weight, denotes a low frequency component weight.
5. The refractive medium abnormality detection method according to any one of claims 1-4, wherein: the eye photograph and the pupil photograph sample are both images obtained by shooting under an infrared light source.
6. The method according to any one of claims 1 to 4, wherein The determination of the refractive medium abnormality detection result of the target to be detected according to the position and area proportion of the abnormal pupil region in the pupil photograph comprises: Obtaining a center point position (x0, y0) and an area A0 of the pupil image; Obtaining a center point position (xi, yi) and an area Ai of the pupil abnormal area; Obtaining the area ratio R=Ai / A0; Obtaining the distance between the center point of the pupil abnormal area and the center point of the pupil image: ; Obtaining the refractive medium abnormality grade G=k1×R +k2 / S; wherein, K1 and K2 are preset weight coefficients.
7. A computer-readable storage medium, characterized in that, The storage medium has program information, and the computer reads the program information to execute the steps of the refractive medium abnormality detection method in any one of claims 1-6.
8. A computer program product, characterised in that, The computer program / instruction is characterized in that the computer program / instruction is executed by the processor to realize the steps of the refractive medium abnormality detection method in any one of claims 1-6.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, is arranged to perform the method of any one of claims 1 to 8. The processor executes the computer program to realize the steps of the refractive medium abnormality detection method in any one of claims 1-6.
Citation Information
Patent Citations
Real-time iris image evaluating method and device
CN105447440A
Eye image recognition method based on multi-task learning and related equipment
CN116563932A