Method for processing red-eye image data and red-eye level analysis device

Through the neural network model, the ophthalmic image data is intelligently segmented and analyzed, and the ophthalmic lesions area is calculated and the level is determined. This solves the problems of inaccurate analysis and great influence of lighting in the prior art, and achieves high accuracy and robust ophthalmic analysis.

CN115035103BActive Publication Date: 2025-06-13ZD MEDICAL (HANGZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210914523.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-01
Publication Date
2025-06-13
Estimated Expiration
2042-08-01

AI Technical Summary

Technical Problem

In the prior art, in the ophthalmic analysis area, incomplete extraction of the congestive area, and large influence of external light, the analysis area has led to excessive differences in the analysis area and inaccurate ratings.

Method used

By obtaining ophthalmic image data, input it to a pre-trained neural network model to output the ophthalmic analysis area, extract the color channel and calculate the ophthalmic lesion area, and determine the ophthalmic level based on the region proportional relationship. This method utilizes the intelligent segmentation and automatic quantitative analysis of neural networks to improve the accuracy and robustness of the analysis.

Benefits of technology

It realizes intelligent segmentation of the ball ophthalmic red analysis area, and automatically quantifies the analysis of ophthalmic red symptoms on the color channel, reducing the impact of light and improving the accuracy and robustness of ratings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035103B_ABST
    Figure CN115035103B_ABST
Patent Text Reader

Abstract

A method for processing red-eye image data and a red-eye level analysis device provided by an embodiment of the present invention can obtain red-eye image data, input the red-eye image data into a pre-trained first neural network model, output a red-eye analysis region, extract the color channels of the red-eye image data, and obtain a corresponding red-eye lesion region; calculate the proportional relationship between the red-eye analysis region and the red-eye lesion region, and determine the red-eye level of the red-eye image data. It can intelligently segment the red-eye analysis region of the bulbar conjunctiva region, automatically quantify and analyze the red-eye symptoms on the color channels. This method avoids the situation where medical staff simply judge the red-eye characteristics of patients based on experience in the past. At the same time, compared with using traditional digital image processing technology to analyze the proportion of the red area, it is less affected by external factors such as light, and has characteristics such as high robustness and high accuracy, and the rating is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ophthalmic medicine, and in particular, to a method for processing red-eye image data and a red-eye level analysis device. Background Art

[0002] Red eye is one of the common clinical manifestations in ophthalmology. It is an eye disease mainly characterized by conjunctival vasodilation and congestion, and is a common disease in the ophthalmology clinic. The common clinical red-eye states include: conjunctival congestion, ciliary congestion, and mixed congestion, etc. In the past, red-eye analysis was mainly determined by doctors' experience, and there were also some methods using computer-aided determination. Traditional digital image processing technology was used to analyze the proportion of the red area.

[0003] However, the current red-eye analysis using traditional digital image processing technology often has problems such as inaccurate analysis area of the bulbar conjunctiva, incomplete extraction of the congested area, being greatly affected by external light, resulting in too large differences in the analysis area, and inaccurate grading. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method for processing red-eye image data and a red-eye level analysis device, which can obtain a photo of the anterior segment of the eye as red-eye image data, intelligently segment the required analysis area, and automatically quantify and analyze the red-eye symptoms on the color channel. This method is less affected by external factors such as light, and has characteristics such as high robustness and high accuracy.

[0005] In the first aspect, an embodiment of the present invention provides a method for processing red-eye image data. The method includes: obtaining red-eye image data; inputting the red-eye image data into a pre-trained first neural network model, and outputting the red-eye analysis area included in the red-eye image data through the first neural network model; extracting the color channel of the red-eye image data, and calculating the red-eye lesion area included in the red-eye image data based on the color channel and the red-eye analysis area; wherein, the first neural network model is trained using red-eye image sample data marked with red-eye analysis areas; calculating the proportional relationship between the red-eye analysis area and the red-eye lesion area, and determining the red-eye level of the red-eye image data based on the proportional relationship.

[0006] Further, the step of inputting the red-eye image data into a pre-trained first neural network model includes: converting the red-eye image data to a three-primary color system, segmenting the color space corresponding to the red-eye image data in the three-primary color system, and inputting the segmented red-eye image data into the first neural network model.

[0007] Further, the step of calculating the red-eye lesion area included in the red-eye image data based on the color channel and the red-eye analysis area includes: performing an AND operation on the red-eye analysis area and the color channel to obtain a region of interest corresponding to the red-eye analysis area; inputting the region of interest into a pre-trained second neural network model, and outputting the red-eye lesion area included in the red-eye image data through the second neural network model; the second neural network model is trained using red-eye image sample data annotated with the red-eye lesion area, and the second neural network model includes an attention mechanism related to the red-eye lesion.

[0008] Further, the step of calculating the proportional relationship between the red-eye analysis area and the red-eye lesion area includes: respectively obtaining the pixel values of the red-eye analysis area and the red-eye lesion area; calculating the pixel ratio of the red-eye lesion area to the red-eye analysis area according to the pixel values of the red-eye analysis area and the red-eye lesion area; determining the pixel ratio as the proportional relationship between the red-eye analysis area and the red-eye lesion area.

[0009] Further, the step of calculating the proportional relationship between the red-eye analysis area and the red-eye lesion area further includes: respectively obtaining the areas of the red-eye analysis area and the red-eye lesion area; calculating the area ratio of the red-eye lesion area to the red-eye analysis area according to the areas of the red-eye analysis area and the red-eye lesion area; taking the area ratio as the proportional relationship between the red-eye analysis area and the red-eye lesion area.

[0010] Further, the method further includes: initializing a first neural network model, where the first neural network model is a semantic segmentation model; obtaining red-eye image sample data, where the red-eye image sample data includes a labeled red-eye analysis area; inputting the red-eye image sample data into the first neural network model to train the weight parameters of the first neural network model.

[0011] Further, the method further includes: initializing a second neural network model, where the second neural network model includes an attention mechanism related to the red-eye lesion; obtaining red-eye image sample data annotated with the red-eye lesion area; inputting the red-eye image sample data into the second neural network model to train the weight parameters of the second neural network model.

[0012] In a second aspect, an apparatus for analyzing the level of bloodshot eyes according to an embodiment of the present invention is characterized in that the apparatus includes: an acquisition module for acquiring bloodshot eye image data; an analysis module for inputting the bloodshot eye image data into a pre-trained first neural network model, and outputting a bloodshot eye analysis area included in the bloodshot eye image data through the first neural network model; an extraction module for extracting color channels of the bloodshot eye image data, and calculating a bloodshot eye lesion area included in the bloodshot eye image data based on the color channels and the bloodshot eye analysis area; wherein the first neural network model is trained using bloodshot eye image sample data labeled with bloodshot eye analysis areas; a calculation module for calculating a proportional relationship between the bloodshot eye analysis area and the bloodshot eye lesion area, and determining the bloodshot eye level of the bloodshot eye image data based on the proportional relationship.

[0013] In a third aspect, an electronic device according to an embodiment of the present invention includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the above methods.

[0014] In a fourth aspect, a computer-readable storage medium according to an embodiment of the present invention stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the above method.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] A method for processing bloodshot eye image data and an apparatus for analyzing the level of bloodshot eyes according to an embodiment of the present invention can acquire bloodshot eye image data; input the bloodshot eye image data into a pre-trained first neural network model, and output a bloodshot eye analysis area included in the bloodshot eye image data through the first neural network model; extract color channels of the bloodshot eye image data, and calculate a bloodshot eye lesion area included in the bloodshot eye image data based on the color channels and the bloodshot eye analysis area; calculate a proportional relationship between the bloodshot eye analysis area and the bloodshot eye lesion area, and determine the bloodshot eye level of the bloodshot eye image data. It can intelligently segment the bloodshot eye analysis area, automatically quantify and analyze the bloodshot eye symptoms on the color channels. This method is less affected by external factors such as light, and has characteristics such as high robustness and high accuracy, and the rating is more accurate.

[0017] Other features and advantages of the present invention will be described in the following specification, and part of them will become obvious from the specification or be understood by implementing the present invention. The objectives and other advantages of the present invention are achieved and obtained by the structures specifically pointed out in the specification and the drawings.

[0018] To make the above objectives, features, and advantages of the present invention more obvious and understandable, the following specific preferred embodiments are given in conjunction with the accompanying drawings and described in detail as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0020] Figure 1 It is a flowchart of a method for processing red-eye image data provided by an embodiment of the present invention;

[0021] Figure 2 It is a flowchart of another method for processing red-eye image data provided by an embodiment of the present invention;

[0022] Figure 3 It is a flowchart of another method for processing red-eye image data provided by an embodiment of the present invention;

[0023] Figure 4 It is a schematic structural diagram of a red-eye level analysis device provided by an embodiment of the present invention;

[0024] Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Specific Embodiments

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions of the present invention with reference to the drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0026] Red eye is one of the common clinical manifestations in ophthalmology. It is an eye disease mainly characterized by the dilation and congestion of conjunctival blood vessels and is a common disease in the ophthalmology outpatient clinic. The commonly seen red eye states in clinical practice include: conjunctival congestion, ciliary congestion, and mixed congestion, etc. In the past, the analysis of red eye was mainly determined by doctors' experience, and there were also some methods using computer-aided determination. Traditional digital image processing technology was adopted to analyze the proportion of the red area. At present, when using traditional digital image processing technology for red eye analysis, there are often problems such as inaccurate analysis area of the bulbar conjunctiva, incomplete extraction of red blood vessels, being greatly affected by external light, resulting in too large differences in the analysis area and inaccurate grading. Based on this, a processing method for red eye image data provided by an embodiment of the present invention can obtain red eye image data, extract the color channels of the red eye image data, calculate the red eye lesion area included in the red eye image data based on the color channels and the red eye analysis area, calculate the proportional relationship between the red eye analysis area and the red eye lesion area, and determine the red eye grade of the red eye image data. It can intelligently segment the red eye analysis area of the eyeball and automatically quantify and analyze the red eye symptoms on the color channels. This method is less affected by external factors such as light and has characteristics such as high robustness and high accuracy, and the grading is more accurate.

[0027] For the convenience of understanding this embodiment, first, a processing method for red eye image data disclosed in an embodiment of the present invention will be introduced in detail.

[0028] An embodiment of the present invention provides a processing method for red eye image data, Figure 1 which is a flowchart of a processing method for red eye image data provided by an embodiment of the present invention. As Figure 1 shown, the method specifically includes the following steps:

[0029] Step S101, obtain red eye image data;

[0030] In practical applications, an anterior segment image can be collected in the red eye mode by an ocular surface comprehensive analyzer as the red eye image data. At the same time, according to actual needs, the clinical information of the patient and the doctor's diagnosis information can be combined, and the above-mentioned red eye image data can be desensitized.

[0031] Step S103, input the red eye image data into a pre-trained first neural network model, and output the red eye analysis area included in the red eye image data through the first neural network model;

[0032] Specifically, the anterior segment image is input into the first neural network model as red-eye image data. The first neural network model in this application is a neural network semantic segmentation model. Semantic segmentation is a basic task in image segmentation, which means that each pixel in the image is labeled with the corresponding category without distinguishing individuals. In the process of identifying an image, the visual input data needs to be divided into different semantically interpretable categories. Therefore, the first neural network model in this application can be used to complete the segmentation of the red-eye image data to identify the red-eye analysis region. Using the above first neural network model to segment the red-eye image data in this application has the characteristic of high robustness.

[0033] Step S105: Extract the color channels of the red-eye image data, and calculate the red-eye lesion region included in the red-eye image data based on the color channels and the red-eye analysis region; among them, the first neural network model is trained using the red-eye image sample data labeled with the red-eye analysis region.

[0034] In practical applications, in order to identify the specific red-eye lesion region, the above red-eye image data can be divided into more detailed color channels. Therefore, the above red-eye image data can be input into the hexagonal pyramid model HSV (Hue, Saturation, Value) color space to obtain more features that conform to the human eye's discrimination of colors. Therefore, the H channel can be analyzed to obtain the specific red-eye region. Since this model only focuses on color recognition, it is less affected by external light noise and the rating is more accurate.

[0035] Step S107: Calculate the proportional relationship between the red-eye analysis region and the red-eye lesion region, and determine the red-eye level of the red-eye image data based on the proportional relationship.

[0036] In practical applications, when the proportional relationship between the red-eye analysis region and the red-eye lesion region has been calculated respectively, this proportional relationship can be used as quantitative data, and the red-eye level of the red-eye data can be determined by grading according to the international red-eye grading standard.

[0037] A method for processing red-eye image data provided by an embodiment of the present invention can obtain red-eye image data and input the red-eye image data into a pre-trained first neural network model, and output the red-eye analysis region included in the red-eye image data through the first neural network model; extract the color channels of the red-eye image data, and calculate the red-eye lesion region included in the red-eye image data based on the color channels and the red-eye analysis region; calculate the proportional relationship between the red-eye analysis region and the red-eye lesion region, and determine the red-eye level of the red-eye image data, which can intelligently segment the red-eye analysis region of the spherical eye, automatically quantify and analyze the red-eye symptoms on the color channels. This method avoids the situation where medical staff simply judge the red-eye characteristics of patients based on experience in the past. At the same time, compared with using traditional digital image processing technology to analyze the proportion of the red area, it is less affected by external factors such as light, and has characteristics such as high robustness and high accuracy, is less affected by external light, and the rating is more accurate.

[0038] Based on the above embodiment, Figure 2 The flowchart of another method for processing red-eye image data is shown, mainly describing the process of inputting red-eye image data into a pre-trained neural network model, as Figure 2 shown, the method specifically includes the following steps:

[0039] Step S201, obtain red-eye image data;

[0040] Step S203, convert the red-eye image data to the three-primary color system to segment the color space corresponding to the red-eye image data in the three-primary color system, and input the segmented red-eye image data into the first neural network model, and output the red-eye analysis region included in the red-eye image data through the first neural network model;

[0041] In practical applications, the red-eye image data can be converted to the three-primary color system, so as to obtain the red-eye image data in the corresponding three-primary color space, and input the red-eye image data converted to the three-primary color space into the first neural network for intelligent analysis of the red-eye analysis region to obtain the mask of the red-eye analysis region.

[0042] Step S205, extract the color channels of the red-eye image data;

[0043] In practical applications, in this step, in order to identify the specific red-eye lesion region, the above red-eye image data can be input into the color space of the hexagonal pyramid model, so as to obtain characteristics that are more in line with the human eye's discrimination of colors compared with the three-primary color space, and the hue channel can be analyzed to obtain the specific red-eye region.

[0044] Inputting the anterior segment image as the red-eye image data into the above-mentioned hexahedral pyramid model color space can convert it into a color space that is easier to track and segment a certain color object, and only analyze the hue channel. Compared with directly inputting the obtained red-eye image data, it is not easily affected by occlusion, shadows, and natural light, and can perform red-eye analysis only on the hue channel, thereby improving the anti-interference ability of the algorithm against external factors.

[0045] Step S207, perform an AND operation on the red-eye analysis region and the color channel to obtain the region of interest corresponding to the red-eye analysis region;

[0046] Specifically, based on the red-eye analysis region obtained through the above first neural network model and the red-eye image data input into the hexahedral pyramid model color space, an AND operation can be performed to obtain a corresponding region of interest, and a mask of the region of interest corresponding to the red-eye analysis region can be obtained.

[0047] Step S209, input the region of interest into a pre-trained second neural network model, and output the red-eye lesion region included in the red-eye image data through the second neural network model;

[0048] Step S211, the second neural network model is trained using the red-eye image sample data labeled with the red-eye lesion region, and the second neural network model includes an attention mechanism related to the red-eye lesion;

[0049] In specific applications, convolutional calculations can be used in the second neural network model and an attention mechanism can be introduced to enable the model to learn the medical image knowledge of the red-eye lesion region. Since the model can segment the region of interest mask of the bulbar conjunctiva region required for red-eye analysis with high precision and high robustness, the red-eye lesion region corresponding to the red-eye image data can be more accurately identified.

[0050] Step S213, calculate the proportional relationship between the red-eye analysis region and the red-eye lesion region, and determine the red-eye level of the red-eye image data based on the proportional relationship.

[0051] Specifically, according to the following steps A1 - A3, the proportional relationship between the red-eye analysis region and the red-eye lesion region can be calculated using the method of pixel ratio.

[0052] Step A1, respectively obtain the pixel values of the red-eye analysis region and the red-eye lesion region;

[0053] Specifically, the red-eye analysis region and the red-eye lesion region can be respectively subjected to closed operation morphological image processing, contour segmentation is performed on the morphologically processed image, contour search is performed on the segmented region, and pixel screening is performed to obtain the pixel values of the final red-eye analysis region and the red-eye lesion region.

[0054] Step A2: Calculate the pixel ratio between the red-eye lesion area and the red-eye analysis area based on the pixel values of the red-eye analysis area and the red-eye lesion area;

[0055] Specifically, the pixel values of the red-eye analysis area and the red-eye lesion area can be obtained through the above process, and a proportional operation is performed to obtain the corresponding pixel ratio.

[0056] Step A3: Determine the proportional relationship between the red-eye analysis area and the red-eye lesion area as the pixel ratio.

[0057] In the embodiment of the present application, the proportional relationship between the red-eye analysis area and the red-eye lesion area can also be calculated by the method of area ratio according to the following steps B1 - B3.

[0058] Step B1: Obtain the area of the red-eye analysis area and the area of the red-eye lesion area respectively;

[0059] Specifically, the red-eye analysis area value and the red-eye lesion area can be respectively subjected to closing operation morphological image processing, the morphed image is subjected to contour segmentation, contour search is performed on the segmented area and screened by area to obtain the final red-eye analysis area value and the area value of the red-eye lesion area.

[0060] Step B2: Calculate the area ratio of the red-eye lesion area to the red-eye analysis area based on the area of the red-eye analysis area and the area of the red-eye lesion area;

[0061] Specifically, the area values of the red-eye analysis area and the red-eye lesion area can be obtained through the above process, and a proportional operation is performed to obtain the corresponding area ratio.

[0062] Step B3: Use the area ratio as the proportional relationship between the red-eye analysis area and the red-eye lesion area.

[0063] Based on the above embodiments, Figure 3 A flowchart of another method for processing red-eye image data is shown, mainly describing the process of pre-training a neural network model, as Figure 3 shown, and the method specifically includes the following steps:

[0064] Step S301: Initialize the first neural network model, where the first neural network model is a semantic segmentation model;

[0065] Specifically, after the first neural network model is constructed, it can be initialized to be trained using the obtained red-eye image sample data.

[0066] Step S303: Obtain red-eye image sample data, where the red-eye image sample data includes a labeled red-eye analysis area;

[0067] In practical applications, during the process of training the first neural network model, a large number of red-eye image sample data can be used to train the model, and the red-eye analysis regions in the pre-acquired sample data are marked. Thus, the first neural network model can identify the corresponding red-eye analysis regions.

[0068] Step S305: Input the red-eye image sample data into the first neural network model to train the weight parameters of the first neural network model;

[0069] Specifically, the red-eye image sample data with the marked red-eye analysis regions can be used to train the weight parameters of the first neural network, and a first neural network model capable of segmenting and predicting the red-eye analysis regions is constructed.

[0070] Step S307: Initialize the second neural network model, and the second neural network model includes an attention mechanism related to red-eye lesions;

[0071] In practical applications, specifically, after the second neural network model is constructed, it can be initialized to be trained using the obtained red-eye image sample data, and an attention mechanism related to red-eye lesions is introduced into the neural network. The output feature map of the last layer is multiplied and weighted with the lesion annotation mask, making the second neural network model sensitive to the red-eye lesion regions and discarding irrelevant background noise.

[0072] Step S309: Obtain the red-eye image sample data marked with red-eye lesion regions;

[0073] In practical applications, during the process of training the second neural network model, a large number of red-eye image sample data can be used to train the model, and the red-eye lesion regions in the pre-acquired sample data are marked. Thus, the second neural network model can identify the corresponding red-eye lesion regions.

[0074] Step S311: Input the red-eye image sample data into the second neural network model to train the weight parameters of the second neural network model;

[0075] In practical applications, the red-eye image sample data with the marked red-eye lesion regions can be used to train the weight parameters of the second neural network, a second neural network model capable of segmenting and predicting the red-eye lesion regions is constructed, and an attention mechanism related to red-eye lesions is introduced into the neural network. The output feature map of the last layer is multiplied and weighted with the mask of the lesion region annotation, making the second neural network sensitive to the red-eye region and discarding irrelevant background noise.

[0076] Step S313: Obtain the red-eye image data;

[0077] Step S315: Input the red-eye image data into a pre-trained first neural network model, and output the red-eye analysis area included in the red-eye image data through the first neural network model.

[0078] Step S317: Extract the color channels of the red-eye image data, and calculate the red-eye lesion area included in the red-eye image data based on the color channels and the red-eye analysis area; wherein, the first neural network model is trained using red-eye image sample data annotated with the red-eye analysis area.

[0079] Step S319: Calculate the proportional relationship between the red-eye analysis area and the red-eye lesion area, and determine the red-eye level of the red-eye image data based on the proportional relationship.

[0080] Corresponding to the above method embodiment, an embodiment of the present invention provides a red-eye level analysis device. Figure 4 FIG. shows a schematic structural diagram of a red-eye level analysis device, as Figure 4 shown, the red-eye level analysis device includes:

[0081] An acquisition module 401, which acquires red-eye image data;

[0082] An analysis module 402, configured to input the red-eye image data into a pre-trained first neural network model, and output the red-eye analysis area included in the red-eye image data through the first neural network model.

[0083] An extraction module 403, configured to extract the color channels of the red-eye image data, and calculate the red-eye lesion area included in the red-eye image data based on the color channels and the red-eye analysis area; wherein, the first neural network model is trained using red-eye image sample data annotated with the red-eye analysis area.

[0084] A calculation module 404, configured to calculate the proportional relationship between the red-eye analysis area and the red-eye lesion area, and determine the red-eye level of the red-eye image data based on the proportional relationship.

[0085] An embodiment of the present invention also provides an electronic device, as Figure 5 shown, is a schematic structural diagram of the electronic device. Among them, the electronic device includes a processor 51 and a memory 52. The memory 52 stores machine-executable instructions that can be executed by the processor 51, and the processor 51 executes the machine-executable instructions to implement the above method for processing red-eye image data.

[0086] In Figure 5 the shown embodiment, the electronic device further includes a bus 53 and a communication interface 54. Among them, the processor 51, the communication interface 54, and the memory 52 are connected through the bus.

[0087] Among them, the memory 52 may include high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 54 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 5 only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0088] The processor 51 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 51 or the instructions in the form of software. The above-mentioned processor 51 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor 51 reads the information in the memory 52 and combines its hardware to complete the steps of the method for processing the red-eye image data in the foregoing embodiments.

[0089] An embodiment of the present invention further provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-mentioned method for processing red-eye image data. For specific implementation, reference can be made to the foregoing method embodiments, which will not be elaborated herein.

[0090] The computer program product for processing red-eye image data and analyzing red-eye levels provided by the embodiments of the present invention includes a computer-readable storage medium storing program codes. The instructions included in the program codes can be used to execute the method for processing red-eye image data described in the foregoing method embodiments. For specific implementation, reference can be made to the method embodiments, which will not be elaborated herein.

[0091] If the above functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0092] In addition, in the description of the embodiments of the present invention, unless otherwise clearly defined and limited, the terms "install", "connect", and "couple" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0093] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0094] Finally, it should be noted that the above-described embodiments are only specific embodiments of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting it. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that any person skilled in the art within the technical scope disclosed by the present invention can still modify the technical solutions described in the foregoing embodiments or easily conceive of changes, or make equivalent replacements for some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for processing red-eye image data, characterized in that, the method includes: Obtaining red-eye image data; Inputting the red-eye image data into a pre-trained first neural network model, and outputting the red-eye analysis area included in the red-eye image data through the first neural network model; Extracting the color channels of the red-eye image data, and calculating the red-eye lesion area included in the red-eye image data based on the color channels and the red-eye analysis area; wherein, the first neural network model is trained using red-eye image sample data labeled with red-eye analysis areas; Calculating the proportional relationship between the red-eye analysis area and the red-eye lesion area, and determining the red-eye level of the red-eye image data based on the proportional relationship; The step of calculating the red-eye lesion area included in the red-eye image data based on the color channels and the red-eye analysis area includes: Performing an AND operation on the red-eye analysis area and the color channels to obtain the region of interest corresponding to the red-eye analysis area; Inputting the region of interest into a pre-trained second neural network model, and outputting the red-eye lesion area included in the red-eye image data through the second neural network model; The second neural network model is trained using red-eye image sample data labeled with red-eye lesion areas, and the second neural network model includes an attention mechanism related to red-eye lesions.

2. The method for processing red-eye image data according to claim 1, characterized in that, the step of inputting the red-eye image data into a pre-trained first neural network model includes: Converting the red-eye image data to a trichromatic system to obtain the red-eye image data corresponding to the trichromatic system after conversion, and inputting the red-eye image data after conversion into the first neural network model.

3. The method for processing red-eye image data according to claim 1, characterized in that, the step of calculating the proportional relationship between the red-eye analysis area and the red-eye lesion area includes: Respectively obtaining the pixel values of the red-eye analysis area and the pixel values of the red-eye lesion area; Calculating the pixel ratio of the red-eye lesion area to the red-eye analysis area according to the pixel values of the red-eye analysis area and the pixel values of the red-eye lesion area; Determining the pixel ratio as the proportional relationship between the red-eye analysis area and the red-eye lesion area.

4. The method for processing red-eye image data according to claim 1, characterized in that, the step of calculating the proportional relationship between the red-eye analysis area and the red-eye lesion area further includes: Respectively obtaining the area of the red-eye analysis area and the area of the red-eye lesion area; Calculating the area ratio of the red-eye lesion area to the red-eye analysis area according to the area of the red-eye analysis area and the area of the red-eye lesion area; Taking the area ratio as the proportional relationship between the red-eye analysis area and the red-eye lesion area.

5. The method for processing red-eye image data according to claim 1, characterized in that, the method further includes: Initialize the first neural network model, where the first neural network model is a semantic segmentation model; Obtain the red-eye image sample data, where the red-eye image sample data includes the labeled red-eye analysis region; Input the red-eye image sample data into the first neural network model to train the weight parameters of the first neural network model.

6. The method for processing red-eye image data according to claim 1, wherein, the method further includes: Initialize the second neural network model, and the second neural network model includes an attention mechanism related to red-eye lesions; Obtain red-eye image sample data labeled with the red-eye lesion region; Input the red-eye image sample data into the second neural network model to train the weight parameters of the second neural network model.

7. A red-eye level analysis device, wherein, the device includes: An acquisition module for acquiring red-eye image data; An analysis module for inputting the red-eye image data into a pre-trained first neural network model, and outputting the red-eye analysis region included in the red-eye image data through the first neural network model; An extraction module for extracting the color channels of the red-eye image data, and calculating the red-eye lesion region included in the red-eye image data based on the color channels and the red-eye analysis region; wherein, the first neural network model is trained using red-eye image sample data labeled with the red-eye analysis region; A calculation module for calculating the proportional relationship between the red-eye analysis region and the red-eye lesion region, and determining the red-eye level of the red-eye image data based on the proportional relationship; The extraction module is further configured to perform an AND operation on the red-eye analysis region and the color channels to obtain the region of interest corresponding to the red-eye analysis region; input the region of interest into a pre-trained second neural network model, and output the red-eye lesion region included in the red-eye image data through the second neural network model; the second neural network model is trained using red-eye image sample data labeled with the red-eye lesion region, and the second neural network model includes an attention mechanism related to red-eye lesions.

8. An electronic device, wherein, It includes a processor and a memory, the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the method according to claims 1-6.

Citation Information

Patent Citations

  • Neural network training method, image processing method, device and storage medium

    CN110059744A

  • Focus segmentation method and device and storage medium

    CN112017185A