Abnormal picture recognition method
Patent Information
- Application Number
- CN202610777041.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-08-28
AI Technical Summary
早期方法依赖手工提取图像特征,但可能误判具有诊断价值但轻微模糊的图像,导致有效数据损失,不能满足医学图像分析应用的工作要求,为此提出异常图片识别方法
[0034] 1. In the construction of the dataset, this invention can acquire and preprocess different anterior segment images, providing a rich and optimized data foundation for subsequent analysis. In the HP-Net model construction stage, the main classification branch uses the ResNet101 network to extract depth features, and the prior extraction branch uses Hough circle transform to detect the eyeball. This structural design can effectively mine image features and locate key regions. The blur detection evaluates image sharpness and generates labels based on Laplacian variance, Sobel gradient and frequency domain variance. After processing by a multilayer perceptron, the output feature vector realizes accurate judgment of image state from multiple dimensions. At the same time, the added feature fusion step can integrate features from different branches, enhance the information used for image quality classification, and improve classification accuracy.
Smart Images

Figure CN122657573A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image analysis applications, and in particular to a method for identifying abnormal images. Background Technology
[0002] The anterior segment of the eye contains key structures in the front part of the eyeball. Anterior segment diseases are a major global health challenge and a leading cause of vision impairment and blindness. Currently, the gold standard for recording and diagnosing anterior segment diseases relies primarily on subjective identification of lesions in the cornea, iris, and anterior chamber under a slit-lamp microscope. However, this method is highly dependent on the quality of the acquired images; operator error, patient cooperation, and equipment limitations can all affect imaging results. Low-quality slit-lamp images often lead to the loss of crucial diagnostic information, further increasing the difficulty of assessment. Traditional image quality assessment requires expert involvement, which is time-consuming and labor-intensive, especially in large-scale screening.
[0003] Research on automated quality assessment of slit-lamp images remains very limited. Early methods relied on manual feature extraction, but these could misinterpret slightly blurred images with diagnostic value, leading to loss of valuable data and failing to meet the requirements of medical image analysis applications. Therefore, anomaly image recognition methods have been proposed. Summary of the Invention
[0005] This invention provides the following technical solution: an abnormal image recognition method, comprising the following steps:
[0006] S1. Dataset Construction:
[0007] First, images of different anterior segments are acquired and used as a dataset. At the same time, the anterior segment images in the dataset are preprocessed.
[0008] S2 and HP-Net model construction:
[0009] An HP-Net model is constructed, comprising a main classification branch and a prior extraction branch. The main classification branch is composed of a ResNet101 network, which extracts the depth features of the image and outputs the feature vector to a fully connected layer of size 512. To introduce rule-based quality prior information, an additional prior extraction branch is set up in addition to the main classification branch. This branch first uses Hough circle transform to detect the eye region and makes a preliminary judgment on the image ("normal", "incorrect location" or "off-center"). Then, it evaluates the image sharpness based on the frequency domain variance and classifies the image as "normal" or "blurred". The two judgment results are merged to obtain a unified prior text label, which is then input into a multilayer perceptron for feature mapping and outputs a prior feature vector of size 512.
[0010] S3, Feature Fusion:
[0011] The features of the prior extraction branch in step S2 are concatenated with the 512-size feature vector of the main classification branch to form a 1024-size fully connected layer. Then, the classification result of image quality is output through two fully connected layers.
[0012] S4. Statistical Analysis:
[0013] A comparative experiment was conducted between the constructed HP-Net model and an image classification neural network model. The performance of all models was evaluated using metrics such as accuracy, precision, recall, specificity, and F1 score. Receiver operating characteristic curves were plotted, the area under the curve was calculated, and the performance differences between models were visualized using a confusion matrix.
[0014] Preferably, the specific method for preprocessing the eye images in the dataset in step S1 is as follows:
[0015] S11, Data augmentation operations for eye images:
[0016] Data augmentation techniques are employed, including performing horizontal flips, vertical flips, and random angle rotations with a 50% probability.
[0017] S12. Preparation of blurred images for eye image training and testing:
[0018] Use Gaussian blur to generate additional blurred images for training, while retaining all real blurred images for testing;
[0019] S13. Uniform adjustment of eye image pixel size:
[0020] Adjust all images to 394×262 pixels.
[0021] Preferably, the specific method for detecting the eyeball in step S2 by extracting the Hough circle transform within the branch a priori is as follows:
[0022] S21. Convert the input color eye image to a grayscale image to obtain the preprocessed eye image;
[0023] S22. Perform edge detection and use the Canny edge detection algorithm to extract edge information in the image;
[0024] S23. Apply the Hough circle transform method to the edge map extracted in step S22 to detect circular structures in the image;
[0025] S24. Perform circular filtering on the circular structures detected in step S23. If multiple circles are detected, calculate the distance between the center of each circle and the center of the image based on the diameter of the circle and normalize it to obtain data S_d. At the same time, calculate the difference in average gray value between the inner and outer regions of the circle and normalize it to obtain data S_g. Then, calculate the score S according to the formula S=(1-S_d)+S_g, where S is obtained by adding (1−S_d) and S_g. The larger S is, the closer the circular region is to the eyeball region.
[0026] Preferably, in the data set of step S1, the eye images are classified and stored according to image quality. Images with no corneal obstruction, clarity, no misalignment, and normal illumination are classified as normal diffusion; images with more than 1 / 2 of the cornea obstructed above or below are classified as incomplete exposure; images with out-of-focus iris texture that cannot be distinguished are classified as poorly focused; images with more than 1 / 5 of the eyelid incomplete are classified as misaligned; and images with too dim or too bright illumination causing unclear pupil boundaries or too bright illumination causing unclear conjunctival blood vessels are classified as abnormal exposure. When converting the color eye image to a grayscale image in step S11, a weighted average method is used for conversion, where the weight of the green component is 0.54, the weight of the red component is 0.29, and the weight of the blue component is 0.17.
[0027] Preferably, in the data augmentation technique in step S12, in addition to horizontal flipping, vertical flipping and random angular rotation, an image scaling operation is simultaneously added with a probability of 10%, and the scaling ratio is randomly selected between 0.8 and 1.2.
[0028] Preferably, when constructing the HP-Net model in step S2, an attention mechanism module is added synchronously after the ResNet101 network in the main classification branch. The attention mechanism module adopts a self-attention mechanism to reweight the extracted deep features. Before performing the Hough circle transform, the image is first subjected to histogram equalization to enhance the image contrast.
[0029] Preferably, in step S3, before evaluating image sharpness using methods based on Laplacian variance, Sobel gradient, and frequency domain variance during blur detection, the image is first denoised using median filtering with a kernel size of 3×3 to reduce noise interference with sharpness evaluation.
[0030] Preferably, in the feature fusion step S4, before concatenating the features of the prior extraction branch with the feature vector of the main classification branch, the features of the prior extraction branch are first normalized using the Z-score normalization method so that the fused features are on the same scale. In the statistical analysis step S5, in addition to plotting the subject operating characteristic curve, the precision recall curve is plotted simultaneously.
[0031] Preferably, in the statistical analysis of step S5, when conducting model comparison experiments, the 95% confidence interval is calculated for the evaluation index of each model, and in the statistical analysis of step S5, when visualizing the performance differences between models through the confusion matrix, the confusion matrix is displayed in the form of a heatmap, where the darker the color, the larger the value of the corresponding element.
[0032] Preferably, after feature fusion in step S4, a feature filtering module is added simultaneously. The feature filtering module uses the ReliefF algorithm to filter the fused features, remove redundant features, reduce computation, and improve the generalization ability of the model.
[0033] In summary, compared with the prior art, the present invention provides an abnormal image recognition method, which has the following beneficial effects:
[0034] 1. In the construction of the dataset, this invention can acquire and preprocess different anterior segment images, providing a rich and optimized data foundation for subsequent analysis. In the HP-Net model construction stage, the main classification branch uses the ResNet101 network to extract depth features, and the prior extraction branch uses Hough circle transform to detect the eyeball. This structural design can effectively mine image features and locate key regions. The blur detection evaluates image sharpness and generates labels based on Laplacian variance, Sobel gradient and frequency domain variance. After processing by a multilayer perceptron, the output feature vector realizes accurate judgment of image state from multiple dimensions. At the same time, the added feature fusion step can integrate features from different branches, enhance the information used for image quality classification, and improve classification accuracy.
[0035] 2. This invention comprehensively and objectively measures model capabilities by comparing them with other models in statistical analysis, evaluating performance through multiple indicators, plotting curves, and visualizing performance differences. This helps to accurately judge the merits of models, improve the efficiency and accuracy of anterior segment image analysis, and provide doctors with fast and accurate diagnostic references. Attached Figure Description
[0036] Figure 1 This is a flowchart of the method of the present invention.
[0037] Figure 2 This is a flowchart of step S1 of the present invention.
[0038] Figure 3 This is the network framework diagram of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] Please see Figure 1 and Figure 3 The present invention provides a technical solution, an abnormal image recognition method, comprising the following steps;
[0041] S1. Dataset Construction:
[0042] First, different anterior segment images are acquired and used as a dataset. Then, the anterior segment images in the dataset are preprocessed. The specific method for preprocessing the anterior segment images in the dataset is as follows:
[0043] Please see Figure 2 S11, Data augmentation operation for eye images:
[0044] Data augmentation techniques are employed, including performing horizontal flip, vertical flip, and random angle rotation with a 50% probability, while simultaneously adding image scaling with a 10% probability. The scaling ratio is randomly selected between 0.8 and 1.2. The specific process of the above steps is as follows:
[0045] First, determine the eye image dataset for which data augmentation will be performed. These images are those acquired in previous steps and may have undergone preliminary processing (such as classification and storage, image transformation, etc.). Iterate through each eye image in the dataset. For each image, generate a random number between 0 and 1. If the random number is less than or equal to 0.5 (i.e., a 50% probability), perform a horizontal flip operation on that image, i.e., mirror the image horizontally. For images that have undergone horizontal flipping (if performed) or for images that have not undergone horizontal flipping, iterate through the dataset again. For each image, generate a new random number between 0 and 1. If the random number is less than or equal to 0.5, perform a vertical flip operation on that image, i.e., mirror the image vertically. For images that have undergone vertical flipping (if performed) or for images that have not undergone vertical flipping... For each image, the dataset is iterated again. A random number between 0 and 1 is generated. If the random number is less than or equal to 0.5, a random angle rotation operation is performed on the image. A random rotation angle is determined, which can be randomly selected within a pre-defined angle range (e.g., between -180° and 180°). The image is rotated according to the selected angle value. After completing the above three operations (if performed) or directly for images that have not undergone the above operations, the dataset is iterated again. For each image, a random number between 0 and 1 is generated. If the random number is less than or equal to 0.1 (i.e., 10% probability), a scaling operation is performed on the image. A random number between 0.8 and 1.2 is generated as the scaling ratio. The image is scaled according to the generated scaling ratio, so that the image size is enlarged or reduced according to that ratio.
[0046] S12. Preparation of blurred images for eye image training and testing:
[0047] Use Gaussian blur to generate additional blurred images for training, while retaining all real blurred images for testing. The specific process for using Gaussian blur to generate additional blurred images for training is as follows:
[0048] Images of different anterior segment were obtained using the methods mentioned above, and a dataset was constructed. The images were then categorized and stored according to image quality: images with no corneal obstruction, clarity, no misalignment, and normal illumination were classified as normal diffusion; images with more than 1 / 2 occlusion above or below the cornea were classified as incomplete exposure; images with out-of-focus iris textures that were indistinguishable were classified as poorly focused; images with more than 1 / 5 of the eyelid incomplete were classified as misaligned; and images with insufficient illumination resulting in unclear pupil boundaries or excessive brightness resulting in unclear conjunctival vessels and strong reflections were classified as abnormally illuminated. Clarity assessments were performed on all eye images in the dataset (e.g., based on Laplacian variance, Sobel gradient, and...). Preliminary evaluation using methods such as frequency domain variance or by utilizing existing labels is performed to identify the real blurred images. These real blurred images are individually labeled and stored. These images are preserved in their entirety and used specifically for testing. The real blurred images identified for testing are excluded from the dataset, resulting in a subset of images used to generate additional blurred images. This subset is iterated over, and for each image, a Gaussian kernel size is randomly determined. The image is then processed using a Gaussian blur algorithm with the selected kernel size to obtain an additional blurred image. The generated additional blurred image is labeled as a training image and stored in the relevant location in the training set.
[0049] S13. Uniform adjustment of eye image pixel size:
[0050] Adjust all images to 394×262 pixels;
[0051] In the dataset of step S1, eye images are classified and stored according to image quality. Images with no corneal obstruction, clarity, no misalignment, and normal illumination are classified as normal diffusion; images with more than 1 / 2 of the cornea obstructed above or below are classified as incomplete exposure; images with out-of-focus iris texture that cannot be distinguished are classified as poorly focused; images with more than 1 / 5 of the eyelid incomplete are classified as misaligned; and images with dim lighting resulting in unclear pupil boundaries or excessive lighting resulting in unclear conjunctival vessels and strong reflections are classified as abnormally illuminated. In step S11, when converting color eye images to grayscale images, a weighted average method is used for conversion, where the weight of the green component is 0.54, the weight of the red component is 0.29, and the weight of the blue component is 0.17. The specific process of the above method is as follows.
[0052] Read a color eye image from the dataset. Each pixel in the image is composed of three color components: red (R), green (G), and blue (B). Assuming the image width is w and the height is h, the image has a total of w × h pixels. Obtain the red component value R(x, y), green component value G(x, y), and blue component value B(x, y) of the pixel. Calculate the converted grayscale value Gray(x, y) of the pixel using the weighted average formula: Gray(x, y) = 0.29 × R(x, y) + 0.54 × G(x, y) + 0.17 × B(x, y). Create a new image with the same width and height as the original color image, and use a data type representing grayscale values (e.g., an 8-bit unsigned integer). Fill the corresponding positions in the new image with the calculated grayscale value Gray(x, y) of each pixel. After the above steps, the newly created image is the converted grayscale image, which can be used for subsequent processing steps, such as data augmentation.
[0053] S2 and HP-Net model construction:
[0054] The HP-Net model comprises a main classification branch and a prior extraction branch. The main classification branch is constructed using a ResNet101 network, which extracts depth features from the image and outputs the feature vectors to a fully connected layer of size 512. Simultaneously, the prior extraction branch uses the Hough circle transform method to detect eyeballs. The specific method of using the Hough circle transform method for eyeball detection is as follows:
[0055] S21. Convert the input color eye image to a grayscale image to obtain the preprocessed eye image;
[0056] S22. Perform edge detection and use the Canny edge detection algorithm to extract edge information in the image;
[0057] S23. Apply the Hough circle transform method to the edge map extracted in step S22 to detect circular structures in the image;
[0058] S24. Perform circular screening on the circular structures detected in step S23. If multiple circles are detected, calculate the distance between the center of each circle and the center of the image based on the diameter of the circle and normalize it to obtain data S_d. At the same time, calculate the difference in average gray value between the inner and outer regions of the circle and normalize it to obtain data S_g. Then, calculate the sum of data S_d and S_g according to the formula S=(1-S_d)+S_g. The larger the obtained data S is, the closer the circular region is to the eyeball.
[0059] In step S2, when constructing the HP-Net model, an attention mechanism module is added synchronously after the ResNet101 network in the main classification branch. The attention mechanism module adopts a self-attention mechanism to reweight the extracted deep features.
[0060] Before performing the Hough circle transform, the image is first subjected to histogram equalization to enhance the image contrast. The specific process of the above method is as follows:
[0061] Fuzz detection:
[0062] The image sharpness is evaluated using a method based on Laplacian variance, Sobel gradient, and frequency domain variance. The image is classified as "normal" or "blurred" and a label is generated to indicate whether the image is "normal", "incorrect part", or "blurred". The generated labels are processed by a multilayer perceptron to output a feature vector of size 512. Before evaluating the image sharpness using the method based on Laplacian variance, Sobel gradient, and frequency domain variance, the image is first denoised using median filtering with a kernel size of 3×3 to reduce the interference of noise on the sharpness evaluation. The specific process of denoising is as follows:
[0063] First, a set of eye images for sharpness assessment is determined. These images are those that have undergone a series of preprocessing operations (such as image transformation, data augmentation, blur preparation, pixel size adjustment, etc.). For each image in the set, a median filter kernel size of 3×3 is determined. Taking each pixel in the image as the center, the pixel values in the surrounding 3×3 neighborhood are taken. These 9 pixel values are arranged in order of size, and the median value (the 5th value) is taken as the new value of the pixel after denoising. The above operation is performed on all pixels in the image in order from left to right and from top to bottom, thereby completing the median filtering denoising process of the entire image. After denoising, the sharpness of the denoised image is assessed using a method based on Laplacian variance, Sobel gradient, and frequency domain variance. The image is then classified as "normal" and "blurred" and corresponding labels are generated.
[0064] S3, Feature Fusion:
[0065] The features of the prior extraction branch in steps S2 and S3 are concatenated with the 512-size feature vector of the main classification branch to form a 1024-size fully connected layer. Then, the image quality classification result is output through two fully connected layers. Before concatenating the features of the prior extraction branch with the feature vector of the main classification branch, the features of the prior extraction branch are normalized using the Z-score normalization method to ensure that the fused features are on the same scale. In the statistical analysis in step S5, in addition to plotting the receiver operating characteristic curve, the precision and recall curve is plotted simultaneously. After feature fusion, a feature filtering module is added simultaneously. The feature filtering module uses the ReliefF algorithm to filter the fused features, remove redundant features, reduce the amount of computation, and improve the generalization ability of the model. The specific process of the above method is as follows:
[0066] After completing the feature fusion operation (concatenating the features from the prior extraction branches in steps S2 and S3 with the 512-size feature vector of the main classification branch, normalizing them with Z-score to form a 1024-size fully connected layer, and then outputting the image quality classification result through two fully connected layers), the fused feature set is obtained. Based on the number of features and samples in the fused feature set, the relevant parameters of the ReliefF algorithm are initialized. For example, the value of the number of nearest neighbors (k) is determined. This value is usually determined based on experience or cross-validation, and can generally be set to a small value, such as 10. A sample instance is randomly selected from the sample set, and the k nearest neighbor samples of that sample instance are found (according to a pre-set distance metric, such as Euclidean distance). These nearest neighbor samples are divided into same-class neighbors (belonging to the same category as the sample) and different-class neighbors (belonging to different categories as the sample). The weight of each feature is calculated according to the formula of the ReliefF algorithm. The formula is roughly as follows: for each feature, its difference between same-class neighbors and different-class neighbors is calculated, and the weight update is based on the weighted sum of these differences, setting a weight threshold. This threshold can be determined by analyzing the distribution of weights. For example, the weight value corresponding to a certain percentile of the weight distribution can be selected as the threshold, or a fixed value can be determined based on multiple trials. Features with weights higher than the threshold are retained, and features with weights lower than the threshold are removed, thereby achieving the purpose of removing redundant features. The filtered feature set can then be used for subsequent operations, such as model training, testing, or evaluation. These filtered features will help reduce the amount of computation and improve the generalization ability of the model.
[0067] S4. Statistical Analysis:
[0068] The constructed HP-Net model was compared with an image classification neural network model. All models were evaluated for performance using metrics such as accuracy, precision, recall, specificity, and F1 score. Receiver operating characteristic (ROC) curves were plotted, the area under the curve was calculated, and the performance differences between models were visualized using a confusion matrix. During the model comparison experiment, the 95% confidence interval was calculated for each model's evaluation metrics. In the statistical analysis of step S5, when visualizing the performance differences between models using the confusion matrix, the confusion matrix was displayed as a heatmap, where darker colors indicate larger values for the corresponding elements.
[0069] In terms of dataset construction, this scheme can acquire and preprocess different anterior segment images, providing a rich and optimized data foundation for subsequent analysis. In the HP-Net model construction stage, the main classification branch uses the ResNet101 network to extract depth features, and the prior extraction branch uses Hough circle transform to detect the eyeball. This structural design can effectively mine image features and locate key regions. Blur detection evaluates image sharpness and generates labels based on Laplacian variance, Sobel gradient, and frequency domain variance. After processing by a multilayer perceptron, the output feature vector realizes accurate judgment of image state from multiple dimensions. At the same time, the added feature fusion step can integrate features from different branches, enhance the information used for image quality classification, and improve classification accuracy.
[0070] This approach comprehensively and objectively measures model capabilities by comparing them with other models in statistical analysis, evaluating performance through multiple indicators, plotting curves, and visualizing performance differences. This helps to accurately determine the merits of different models, improve the efficiency and accuracy of anterior segment image analysis, and provide doctors with rapid and accurate diagnostic references.
[0071] This approach offers significant advantages in dataset construction, efficiently acquiring various types of anterior segment images to provide a core data source for subsequent analysis. Furthermore, preprocessing the raw data standardizes and optimizes its quality, effectively enhancing data usability and reliability, thus providing robust support for subsequent in-depth analysis. The preprocessed image data fully preserves key anterior segment features, encompassing subtle lesion textures, overall tissue structure, and other multi-dimensional characteristics, providing high-quality, reliable data for subsequent algorithm analysis and model building. The main classification branch employs the ResNet101 network to extract depth features. The ResNet101 network boasts powerful feature extraction capabilities, deeply mining various complex features in eye images. These depth features cover information ranging from the overall contour of the eye to its internal fine structures, serving as crucial evidence for determining the type and severity of anterior segment diseases. Simultaneously, the prior extraction branch utilizes the Hough circle transform to detect the eyeball. The Hough circle transform is an effective method for detecting circular structures; in eye images, the eyeball is a critical region, and accurate eyeball localization aids in further analysis of the surrounding area. The ingenuity of this structural design lies in its ability to analyze images from different angles, uncovering both the depth features of the image and accurately locating key regions. These two aspects complement each other, providing rich information for the diagnosis of anterior segment diseases.
[0072] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0073] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An abnormal image recognition method, characterized in that, Includes the following steps: S1. Dataset Construction: First, images of different anterior segments are acquired and used as a dataset. At the same time, the anterior segment images in the dataset are preprocessed. S2 and HP-Net model construction: An HP-Net model containing a main classification branch and a prior extraction branch is constructed. The main classification branch is composed of a ResNet101 network, which extracts the depth features of the image and outputs the feature vector to a fully connected layer of size 512. The prior extraction branch is used to generate prior information: first, the Hough circle transform is used to detect the eye region, and the image is judged as "normal" or "incorrect location" based on the detection result. Then, the image sharpness is evaluated based on the frequency domain variance, and the image is judged as "normal" or "blurred". The above two judgment results are merged to obtain a unified prior text label, and the prior label is input into a multilayer perceptron for feature mapping, outputting a prior feature vector of size 512. S3, Feature Fusion: The features of the prior extraction branch in step S2 are concatenated with the 512-size feature vector of the main classification branch to form a 1024-size fully connected layer. Then, the classification result of image quality is output through two fully connected layers. S4. Statistical Analysis: A comparative experiment was conducted between the constructed HP-Net model and an image classification neural network model. The performance of all models was evaluated using metrics such as accuracy, precision, recall, specificity, and F1 score. Receiver operating characteristic curves were plotted, the area under the curve was calculated, and the performance differences between models were visualized using a confusion matrix.
2. The abnormal image recognition method according to claim 1, characterized in that: The specific method for preprocessing the eye images in the dataset in step S1 is as follows: S11, Data augmentation operations for eye images: Data augmentation techniques are employed, including performing horizontal flipping, vertical flipping, and random angular rotation on each image with a 50% probability; S12. Preparation of blurred images for eye image training and testing: Use Gaussian blur to generate additional blurred images for training, while retaining all real blurred images for testing; S13. Uniform adjustment of eye image pixel size: Adjust all images to 394×262 pixels.
3. The abnormal image recognition method according to claim 1, characterized in that: The specific method for detecting the eyeball in step S2 by extracting the Hough circle transform within the branch a priori is as follows: S21. Convert the input color eye image to a grayscale image to obtain the preprocessed eye image; S22. Perform edge detection and use the Canny edge detection algorithm to extract edge information in the image; S23. Apply the Hough circle transform method to the edge map extracted in step S22 to detect circular structures in the image; S24. Perform circular filtering on the circular structures detected in step S23. If multiple circles are detected, calculate the distance between the center of each circle and the center of the image based on the diameter of the circle and normalize it to obtain data S_d. At the same time, calculate the difference in average gray value between the inner and outer regions of the circle and normalize it to obtain data S_g. Then, calculate the score S according to the formula S=(1-S_d)+S_g, where S is obtained by adding (1−S_d) and S_g. The larger S is, the closer the circular region is to the eyeball region.
4. The abnormal image recognition method according to claim 1, characterized in that: In the dataset of step S1, eye images are classified and stored according to image quality. Images with no corneal obstruction, clarity, no misalignment, and normal illumination are classified as normal diffusion. Images with more than 1 / 2 of the cornea obstructed above or below are classified as incomplete exposure. Images with out-of-focus iris texture that cannot be distinguished are classified as poorly focused. Images with more than 1 / 5 of the eyelid incomplete are classified as misaligned. Images with too dim or too bright illumination resulting in unclear pupil boundaries or too bright illumination resulting in unclear conjunctival blood vessels are classified as abnormal exposure. When converting the color eye image to a grayscale image in step S11, OpenCV's cv2.cvtColor is used for grayscale conversion.
5. The abnormal image recognition method according to claim 1, characterized in that: In the data augmentation techniques in step S12, in addition to horizontal flipping, vertical flipping and random angle rotation, and when Gaussian blur is used to generate additional blurred images for training in step S13, the sizes of the four Gaussian blur kernels are (15,15), (15,25), (25,25), and (35,35).
6. The abnormal image recognition method according to claim 1, characterized in that: When constructing the HP-Net model in step S2, an attention mechanism module is added synchronously after the ResNet101 network in the main classification branch. The attention mechanism module adopts a self-attention mechanism to reweight the extracted depth features. In the prior extraction branch, the image is first subjected to histogram equalization before performing Hough circle transform to enhance the contrast of the image, thereby improving the stability and accuracy of eye region detection.
7. The abnormal image recognition method according to claim 1, characterized in that: In step S3, before evaluating image sharpness using the frequency domain variance-based method, the image is first denoised using median filtering with a 3×3 kernel size to reduce noise interference with sharpness evaluation during blur detection.
8. The abnormal image recognition method according to claim 1, characterized in that: In the feature fusion step S4, before concatenating the features of the prior extraction branch with the feature vector of the main classification branch, the features of the prior extraction branch are first normalized using the Z-score normalization method to ensure that the fused features are on the same scale. In the statistical analysis of step S4, in addition to plotting the receiver operating characteristic curve, the precision recall curve is plotted simultaneously.
9. The abnormal image recognition method according to claim 1, characterized in that: In the statistical analysis of step S5, when conducting model comparison experiments, for each model's evaluation index, a 95% confidence interval is calculated for each model. In the statistical analysis of step S5, when visualizing the performance differences between models through the confusion matrix, the confusion matrix is displayed in the form of a heatmap, where a darker color indicates a larger value for the corresponding element.
10. The abnormal image recognition method according to claim 1, characterized in that: After feature fusion in step S4, a feature filtering module is added simultaneously. The feature filtering module uses the ReliefF algorithm to filter the fused features, remove redundant features, reduce computation, and improve the generalization ability of the model.