Method, device, computer equipment and storage medium for detecting fundus lesions
By identifying the type, number, location and size of lesions in fundus images, the urgency of the lesions is determined, which solves the problems of low recognition rate and low detection efficiency in the existing technology, and achieves efficient fundus lesion detection and treatment recommendation generation.
Patent Information
- Application Number
- CN201910309071.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-17
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-04-17
AI Technical Summary
Existing fundus lesion detection methods have low recognition rate and low detection efficiency, cannot realize batch automatic detection, and cannot determine the priority of lesions.
By acquiring fundus images and inputting a preset detection model for identification, the type, number, location and size of lesions are obtained. Based on this information, the urgency of the lesions is determined and medical treatment recommendations are generated.
It improves the recognition rate and detection efficiency of fundus lesions, can accurately determine the urgency of the condition, and helps formulate medical treatment recommendations.
Smart Images

Figure CN110163844B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image detection, and in particular to a method, device, computer equipment and storage medium for detecting fundus lesions. Background Art
[0002] At present, the situation of ophthalmic diseases among the Chinese people is very serious, and my country's ophthalmic medical resources are still very scarce. Among them, most of the ophthalmic medical resources are still concentrated in large cities, and there are only a small part or even no ophthalmic medical resources in remote or rural areas. Due to the poor medical conditions in remote or rural areas, there may be relatively more people suffering from ophthalmic diseases. For fundus retinal diseases, early diagnosis and early treatment must be done, otherwise the disease will be aggravated. However, the existing methods, such as the detection of abnormal lesions based on the grayscale, gradient and other features of the image and simple threshold filtering, have low recognition rate and detection efficiency of abnormal lesions, and cannot realize batch automatic detection. Moreover, the scheme cannot determine the severity of the lesions. Therefore, finding a technical solution for automatic detection of fundus images that can improve the recognition rate and detection efficiency and determine the urgency of the disease has become a problem that technicians in this field need to solve urgently. Summary of the invention
[0003] Based on this, it is necessary to provide a fundus lesion detection method, device, computer equipment and storage medium to address the above-mentioned technical problems, which can not only improve the recognition rate and detection efficiency of lesions, but also determine the urgency of the disease, so as to formulate corresponding medical recommendations based on the urgency of the disease.
[0004] A method for detecting fundus lesions, comprising:
[0005] Acquire fundus images of the person to be tested;
[0006] Inputting the fundus image into a preset detection model for recognition, and obtaining a recognition result output by the detection model, wherein the recognition result includes whether the fundus image of the person to be detected contains a lesion or does not contain a lesion;
[0007] When the recognition result is that the fundus image contains lesions, obtaining the lesion type of the lesions contained in the fundus image, and obtaining the corresponding lesion number, lesion location and lesion size based on the lesion type; determining the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size;
[0008] Generate medical advice based on the urgency of the lesion type.
[0009] A fundus lesion detection device, comprising:
[0010] A fundus image acquisition module is used to acquire the fundus image of the person to be detected;
[0011] An input module, used for inputting the fundus image into a preset detection model for recognition, and obtaining a recognition result output by the detection model, wherein the recognition result includes whether the fundus image of the person to be detected contains a lesion or does not contain a lesion;
[0012] an acquisition module, configured to, when the identification result indicates that the fundus image contains a lesion, acquire the lesion type of the lesion contained in the fundus image, and acquire the corresponding lesion number, lesion location and lesion size based on the lesion type; and determine the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size;
[0013] A generation module is used to generate a medical consultation recommendation based on the urgency of the lesion type.
[0014] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned fundus lesion detection method when executing the computer program.
[0015] A computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned fundus lesion detection method when executed by a processor.
[0016] The above-mentioned fundus lesion detection method, device, computer equipment and storage medium first obtain a fundus image of the person to be detected; secondly, the fundus image is input into a preset detection model for recognition, and a recognition result output by the detection model is obtained, and the recognition result includes whether the fundus image of the person to be detected contains lesions or does not contain lesions; then, when the recognition result is that the fundus image contains lesions, the lesion type of the lesion contained in the fundus image is obtained, and based on the lesion type, the corresponding lesion number, lesion location and lesion size are obtained, and the urgency of the lesion type in the fundus image is determined according to the lesion type, lesion location, lesion number and lesion size; finally, a medical recommendation is generated according to the urgency of the lesion type. The present invention inputs the fundus image into the detection model for recognition, which can improve the recognition rate and detection efficiency of the fundus image; the urgency of the lesion type in the fundus image is determined according to the lesion type, number of lesions, lesion location and lesion size of the lesions contained in the fundus image, so as to determine the urgency of the disease, so as to formulate corresponding medical advice according to the urgency of the disease. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0018] Figure 1 is a schematic diagram of an application environment of a method for detecting fundus lesions in one embodiment of the present invention;
[0019] Figure 2 is a flow chart of a method for detecting fundus lesions in one embodiment of the present invention;
[0020] Figure 3 is a flow chart of step S30 of the method for detecting fundus lesions in an application environment in one embodiment of the present invention;
[0021] Figure 4 is a flow chart of step S30 of the method for detecting fundus lesions in one embodiment of the present invention in another application environment;
[0022] Figure 5 is a schematic structural diagram of a fundus lesion detection device in one embodiment of the present invention;
[0023] Figure 6 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The method for detecting fundus lesions provided by the present invention can be applied in Figure 1 In an application environment, a computer client communicates with a server through a network. The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0026] In one embodiment, if Figure 2 As shown, a method for detecting fundus lesions is provided, and the method is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps:
[0027] S10, obtaining a fundus image of the person to be detected.
[0028] It can be understood that the device for capturing fundus images can be an OCT (optical coherence tomography) fundus scanning device, and the fundus image is a Bscan (horizontal scanning) image including the macular area and the optic disc area. Specifically, after the OCT fundus scanning device captures the fundus image of the person to be tested, the server can obtain the fundus image sent to the server by the OCT fundus scanning device, so as to identify the fundus image through a preset detection model. It can be understood that after the fundus image of the person to be tested is captured by the OCT fundus scanning device, it can be directly stored in the database of the server, so that the preset detection model can be retrieved when the fundus image needs to be used for identification.
[0029] S20, inputting the fundus image into a preset detection model for recognition, and obtaining a recognition result output by the detection model, wherein the recognition result includes whether the fundus image of the person to be detected contains a lesion or does not contain a lesion.
[0030] In a specific embodiment, the recognition object of the input of the preset detection model is the fundus image, and the output of the preset detection model is the recognition result.
[0031] Furthermore, before the fundus image is input into the preset detection model for recognition, the preset detection model needs to be trained. In this case, step S20 further includes the following steps:
[0032] Acquire fundus image samples.
[0033] The fundus image samples may be a plurality of (for example, 20,000) fundus images with lesions marked which are pre-stored in a database, and each of the fundus image samples corresponds to a recognition result.
[0034] The fundus image sample is recognized by a detection model including initial parameters, and the overall deviation between the recognition result of the fundus image obtained after the recognition and the recognition result in the fundus image corresponding to the fundus image sample is obtained.
[0035] It is understandable that the detection model (obtained by initializing the deep neural network model) includes weights and biases of each neuron connection between each layer (initial parameters include weights and biases), and these weights and biases determine the properties and recognition effect of the detection model. The initial parameters can be set according to demand. For example, the initial values of the weights and biases in the detection model can be set to smaller values, such as between the interval [-0.3, 0.3], or the initial weights and biases can be set directly using empirical values. A detection model with reasonable initial parameters can make the detection model have more flexible adjustment capabilities in the early stage, and can effectively adjust the model during the detection model training process, so that the trained detection model has better detection effect.
[0036] Determine whether the overall deviation is greater than a preset deviation value.
[0037] The deviation value (threshold for stopping iteration) can be set according to demand or experience.
[0038] If the overall deviation is greater than the deviation value, the initial parameters of the detection model are adjusted to the corrected parameters, and the fundus image sample is identified by the detection model with the corrected parameters, and the overall deviation between the recognition result of the fundus image obtained after this identification and the recognition result of the fundus image corresponding to the fundus image sample is obtained, and it is determined whether the overall deviation is greater than the preset deviation value, until the overall deviation is less than or equal to the deviation value.
[0039] The image feature vectors are grouped and input into the deep neural network model. The output value of the deep neural network model is obtained according to the forward propagation algorithm. The output value of the i-th group of samples of the image feature vector in the current layer of the deep neural network model is expressed as a i,l =σ(W l a i,l-1 +b l ), where a is the output value, i represents the i-th group of samples of the input image feature vector, l is the current layer of the deep neural network model, σ is the activation function, W is the weight, l-1 is the previous layer of the current layer of the deep neural network model, and b is the bias.
[0040] Specifically, the total number of layers of the DNN (initialized deep neural network model) model is L, the weights W connecting each neuron in the DNN model, the bias b and the input value vector x i , the output value a of the output layer i,L (i represents the i-th group of samples of the input image feature vector), then a 1 =x i (The output of the first layer is the image feature vector input in the input layer, that is, the input value vector x i), according to the forward propagation algorithm, we know that the output a i,l =σ(W l a i,l-1 +b l ), where l represents the current layer of the deep neural network model, and σ is the activation function. The specific activation function used here can be sigmoid or tanh activation function. According to the above calculation a i,l The formula is forward propagated layer by layer to obtain the final output value a of the network in the DNN model i,L (that is, the output value of the deep neural network model), with the output value a i,L That is, according to the output value a i,L The network parameters (weights W connecting each neuron, bias b) in the DNN model are adjusted to obtain a detection model with excellent detection of fundus lesions.
[0041] Based on the output value of the deep neural network model, error back propagation is performed to update the weights and biases of each layer of the deep neural network model to obtain the detection model. The calculation formula for updating the weights is: l is the current layer of the detection model, W is the weight, W l is the weight of the current layer, W l' is the updated weight of the current layer, α is the iteration step, m is the total number of input samples, δ i,l is the sensitivity of the current layer; δ i,l =(W l+1 ) T δ i,l+1 *σ'(z i,l ), z i,l =W l a i,l-1 +b l , a i,l-1 is the output of the previous layer, T represents the matrix transposition operation, σ' is the derivative of the activation function, * represents the multiplication of the corresponding elements of the two matrices (Hadamard product), and the calculation formula for updating the bias is l is the current layer of the detection model, b l is the bias of the current layer, b l is the bias of the current layer after update, α is the iteration step size, m is the total number of input samples, δ i,l is the sensitivity of the current layer.
[0042] Specifically, the weights W and bias b of each layer of the DNN model are updated using the back propagation algorithm. The minimum value of the error function is obtained according to the back propagation algorithm to optimize the update of the weights W and bias b of each layer of the DNN model and obtain the detection model. Specifically, the iteration step size of the model training is set to α, the maximum number of iterations MAX and the stop iteration threshold ∈. In the back propagation algorithm, the sensitivity δi,l is a common factor that appears every time the parameters are updated, so we can use the sensitivity δ i,l Calculate the error to update the network parameters in the DNN model. 1 =x i (The output of the first layer is the image feature vector input in the input layer, that is, the input value vector x i ), then first find the sensitivity δ of the output layer i,L , δ i,L =(a i,L -y i )*σ'(z L ), z i,l =W l a i,l-1 +b l , where i represents the i-th group of samples of the input image feature vector, and y is the label value (that is, used to compare with the output value a i,L Then according to δ i,L Find the sensitivity δ of the lth layer of the deep neural network model i,l According to the back propagation algorithm, the sensitivity δ of the lth layer of the deep neural network model can be calculated i,l =(W l+1 ) T δ i,l+1 *σ'(z i,l ), and obtain the sensitivity δ of the lth layer of the deep neural network model i,l After that, the weights W and bias b of each layer of the DNN model can be updated. The updated weights are The updated bias is Among them, α is the iteration step of model training, m is the total number of samples of the input image feature vector, and T represents the matrix transpose operation. When all the changes in W and b are less than the stop iteration threshold ∈, the training can be stopped. The error between the output value of the image feature vector in the DNN model and the pre-set label value is used to update the weights W and bias b of each layer of the DNN model, so that the final detection model can detect image lesions based on the image feature vector.
[0043] If the overall deviation is less than the deviation value, it indicates that the training of the detection model is completed.
[0044] In this step, the detection model training is completed. The determined detection model has been trained with a large number of samples, and its overall deviation is kept within a small range (less than or equal to the deviation value). The detection model is used to evaluate whether the fundus image contains lesions, and the identification results of whether the fundus image contains lesions and whether the fundus image does not contain lesions can be obtained.
[0045] S30. When the recognition result is that the fundus image contains lesions, obtain the lesion type of the lesions contained in the fundus image, and obtain the corresponding lesion number, lesion location and lesion size based on the lesion type; determine the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size.
[0046] It is understandable that the information of the lesion type, lesion location, lesion number and lesion size of the lesion can be extracted from the fundus image; the urgency reflects the severity of the lesion type in the fundus image corresponding to the person to be detected, wherein the higher the urgency, the more severe the lesion type in the fundus image corresponding to the person to be detected. At this time, the urgency of the lesion type in the fundus image can be judged by the lesion type, lesion location, lesion number and lesion size.
[0047] In another embodiment, when the identification result is that the fundus image does not contain a lesion, there is no need to further determine the urgency of the disease corresponding to the lesion. In this case, the person to be tested is informed of the result that he or she does not have a fundus lesion and is advised to have regular checkups.
[0048] Furthermore, if Figure 3 As shown, the step of obtaining the lesion type of the lesion contained in the fundus image includes:
[0049] S301, matching the fundus image with a lesion fundus image in a preset fundus image library, wherein the lesion fundus image is a fundus image of which the lesion type has been determined.
[0050] In a specific embodiment, the lesion fundus images in the preset fundus image library are all fundus images that have been professionally identified and judged and have defined corresponding lesion types. At this time, the fundus image is matched with the lesion fundus image. If the match is successful, it means that the lesion type in the fundus image can find the corresponding lesion type in the preset fundus image library. If the match is unsuccessful, it can be explained that the recognition result obtained in the previous step has a problem or the lesion type in the fundus image is not included in the preset fundus image library.
[0051] S302: If the match is successful, determine that the lesion type in the fundus image is the corresponding lesion type in the lesion fundus image.
[0052] It is understandable that if the match is successful, it means that the fundus image can find the corresponding fundus image in the preset fundus image library, and it can also be explained that the lesion type in the fundus image can find the corresponding class lesion type in the preset fundus image library. At this time, it can be determined that the lesion type in the fundus image is the lesion type in the corresponding lesion fundus image. It is understandable that in a fundus image, there may be multiple lesion types at the same time, and each lesion type in the preset fundus image library will not be repeated, that is, each lesion type will be successfully matched once in the preset fundus image library (there are more than two lesions of the same type in the preset fundus image library. The lesions can be matched successfully multiple times). If the fundus image and the lesion fundus image in the preset fundus image library are only matched successfully once, at this time, the total number of lesion types in the fundus image will be equal to 1; if the fundus image and the lesion fundus image in the preset fundus image library are matched successfully multiple times, it means that there are multiple lesion types in the fundus image, and at this time, the total number of lesion types in the fundus image will be greater than 1.
[0053] S303: If the matching is unsuccessful, the associated fundus image and the lesion type corresponding to the fundus image are entered into the preset fundus image library or a preset reviewer is prompted to review the recognition result.
[0054] It is understandable that if the match is unsuccessful, it means that the lesion type in the fundus image cannot find the corresponding lesion type in the preset fundus image library, or it may mean that there is a problem with the recognition result obtained in the previous step, or the lesion type in the fundus image is not included in the preset fundus image library. At this time, the preset reviewer (the reviewer can be set as a professional physician according to needs) can be prompted to review the recognition result, or the fundus image and the lesion type corresponding to the fundus image can be entered into the preset fundus image library (because the fundus image and the lesion type corresponding to the fundus image have not yet been entered into the preset fundus image library, at this time, the server cannot match the lesion type in the fundus image, and the fundus image can be sent to the reviewer to determine the lesion type in the fundus image. When the lesion type in the fundus image has been determined, the server adds the lesion type associated with it in the fundus image to the fundus image library and stores it in association).
[0055] Furthermore, if Figure 4 As shown, the obtaining of the corresponding lesion quantity, lesion location and lesion size based on the lesion type includes:
[0056] S304: Acquire the number of lesions in the fundus image from the fundus image, where the number of lesions refers to the total number of all lesion types in the fundus image.
[0057] It is understandable that in one fundus image, there may be multiple lesion types at the same time, and each lesion type in the preset fundus image library will not be repeated, that is, each lesion type will be successfully matched once in the preset fundus image library (lesions with more than two lesion types of the same type can be successfully matched multiple times in the preset fundus image library). If the fundus image and the lesion fundus image in the preset fundus image library are matched successfully only once, at this time, the total number of lesion types in the fundus image will be equal to 1; if the fundus image and the lesion fundus image in the preset fundus image library are matched successfully multiple times, it means that there are multiple lesion types in the fundus image, and at this time, the total number of lesion types in the fundus image will be greater than 1. When the fundus image fails to match the lesion fundus image in the preset fundus image library (the probability of this happening is low), after the server obtains the lesion type associated with the fundus image determined by the reviewer, the server can count the lesion type associated with the fundus image into the total number of lesion types.
[0058] S305. Extract the lesion position corresponding to each lesion type from the fundus image, where each lesion type corresponds to at least one lesion position.
[0059] It is understandable that the lesion position can be expressed by coordinates. The fundus image is regarded as a plane, a coordinate system is established, and any position on the plane can be expressed by coordinates. Therefore, when each of the lesion types in the fundus image is located at a certain position in the fundus image, the position of the lesion can be obtained in the form of extracted coordinates. In one embodiment, the number of lesion positions corresponding to each lesion type can also be recorded as the number of disease points. It is understandable that since there may be multiple lesion types in a fundus image at the same time, and there may also be multiple lesion positions of the same lesion type in the same fundus image at the same time, in this embodiment, it is necessary to extract all lesion positions corresponding to each lesion type in order to accurately determine the urgency of the patient's condition corresponding to the fundus image.
[0060] S306. Extract the lesion size of the lesion position corresponding to each lesion type from the fundus image, and record the lesion size with the largest size as the lesion size of the lesion type.
[0061] It is understandable that the size of the lesion in the fundus image may be irregular in shape. At this time, the calculation of the lesion size can be carried out by measuring the longest and widest parts of the position of the lesion, so as to determine the lesion size (it can also be based on some special shape characteristics of the lesion, such as the shape characteristics of the ratio of the longest and widest parts). It is understandable that after calculating the lesion size corresponding to each lesion type, each lesion type is associated with its lesion position and the lesion size and stored in the database.
[0062] In another embodiment, the lesion size can be the area size of the lesion. In this case, the lesion size can be calculated by approximating the lesion area size, approximating the irregular shape into a regular shape, and thus roughly calculating the lesion area size.
[0063] Furthermore, when the recognition result is that the fundus image contains lesions, it is also necessary to determine whether the lesions in the fundus image are false positive lesions (false positive lesions refer to the result of detecting a positive result for a person who does not have positive symptoms). At this time, in step S30, after obtaining the lesion type of the lesion contained in the fundus image and obtaining the corresponding lesion number, lesion location and lesion size based on the lesion type, the following steps may also be included:
[0064] Determine the lesion features corresponding to the lesion type in the fundus image. The lesion features are positives and false positives corresponding to the lesion type.
[0065] If the lesion feature is positive, it is determined that the judgment of the lesion type in the recognition result is correct. When the lesion feature is positive, it means that the recognition result of the detection model is correct.
[0066] If the lesion feature is a false positive, it is determined that the judgment of the lesion type in the recognition result is wrong, and the recognition result is modified so that the fundus image does not contain the lesion type. When the lesion feature is a false positive, it means that the recognition result of the detection model is wrong.
[0067] In one embodiment, the determining of the lesion feature corresponding to the lesion type in the fundus image is specifically:
[0068] It is determined whether the size of a lesion corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold.
[0069] In this step, the preset size threshold can be set according to the type of lesion. For example, for lesions such as epiretinal membrane, since the lesions are not obvious, in order to avoid missed detection, the size threshold is set lower. For lesions such as drusen, since the lesions are more obvious and less severe, in order to avoid false detection, the size threshold is set higher.
[0070] It is determined whether the lesion position corresponding to the lesion type in the fundus image is a preset position associated with the lesion type in the fundus image.
[0071] In this step, the preset position is set differently according to each lesion type, and the preset position of each lesion type is associated with the lesion type. The preset position can be set to a position that has a greater impact on the condition according to demand (when the position where the lesion appears represents that the condition is particularly mild and does not require treatment, it can be identified as a false positive), for example, if the preset position is the center position in the fundus image. If it is determined that the lesion position corresponding to the lesion type is at a preset position associated with the lesion type in the fundus image, then the lesion type can be determined to be positive. If the lesion position of the lesion type is above or below the preset position (center position) in the fundus image, it means that the lesion position of the lesion type is not in the preset position. At this time, it means that the lesion type is very mild and does not require treatment, and it is a false positive lesion.
[0072] It is determined whether the lesion shape feature corresponding to the lesion type in the fundus image is a preset lesion shape feature.
[0073] In this step, the preset lesion shape feature is also set differently according to each lesion type, and the preset lesion shape feature of each lesion type is associated with the lesion type. For example, the dome-shaped lesion of pigment epithelial detachment usually appears as an arc, so its detection frame is usually detected as a square. If the detection frame is detected as a rectangle (i.e., the aspect ratio is too large), it can be identified as a false positive.
[0074] If the lesion size corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold, or if the lesion position corresponding to the lesion type in the fundus image is at a preset position associated with the lesion type in the fundus image, or if the lesion shape feature corresponding to the lesion type in the fundus image is the preset lesion shape feature, then the lesion feature is determined to be positive.
[0075] In this step, it can be understood that when one or any two of the above three situations occur, or when all three situations occur, the lesion feature corresponding to the lesion type is determined to be positive.
[0076] Otherwise, the lesion feature is determined to be a false positive.
[0077] In this step, it can be understood that the "otherwise" means that if the lesion size corresponding to the lesion type in the fundus image is smaller than a preset size threshold, and if the lesion position corresponding to the lesion type in the fundus image is not in the preset position associated with the lesion type in the fundus image, and if the lesion shape feature corresponding to the lesion type in the fundus image is not the preset lesion shape feature, then it can be determined that the lesion feature corresponding to the lesion type is a false positive.
[0078] Further, in one embodiment, in step S30, determining the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size may specifically include the following steps:
[0079] If the lesion type in the fundus image is a lesion type in a preset severe lesion list, it is determined that the urgency of the lesion type in the fundus image is high.
[0080] In this step, if the lesion type in the fundus image is a preset severe lesion type, it means that the lesion type of the person to be detected is very severe. If the lesion type in the fundus image is not a preset severe lesion type, it means that the lesion type of the person to be detected is low in severity.
[0081] In one embodiment, in step S30, determining the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size may specifically include the following steps:
[0082] If the position of the lesion in the fundus image is at a preset high urgency position, it is determined that the urgency of the lesion type in the fundus image is high.
[0083] In this step, if the lesion position in the fundus image is at a preset high urgency position (such as the center position in the fundus image), it means that the severity of the lesion type of the person to be detected is very high. It is understandable that the high urgency position corresponding to each lesion type may be different, and the high urgency position corresponding to each lesion type has been pre-set. If the lesion position in the fundus image is not at the preset high urgency position, it means that the severity of the lesion type of the person to be detected is low.
[0084] In one embodiment, in step S30, determining the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size may specifically include the following steps:
[0085] If the number of lesions in the fundus image exceeds a preset number threshold, it is determined that the urgency of the type of lesions in the fundus image is high.
[0086] In this step, the number of lesions refers to the total number of lesion types. If the number of lesions in the fundus image exceeds the preset number threshold, it means that the severity of the lesion type of the person to be detected is very high. At this time, it can be determined that the urgency of the lesion type in the fundus image is high. If the number of lesions in the fundus image does not exceed the preset number threshold, it means that the severity of the lesion type of the person to be detected is low.
[0087] In another embodiment, the number of diseased points in step S305 can also be used to determine whether it exceeds a preset diseased point number threshold. If it exceeds the preset diseased point number threshold, it can also be determined that the urgency of the lesion type in the fundus image is high; otherwise, it can be determined that the urgency of the lesion contained in the fundus image is low.
[0088] In one embodiment, in step S30, determining the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size may specifically include the following steps:
[0089] If the size of the lesion in the fundus image is greater than or equal to a preset size threshold, it is determined that the urgency of the lesion type in the fundus image is high.
[0090] In this step, if the size of the lesion in the fundus image is greater than or equal to the preset size threshold, it means that the severity of the lesion type of the person to be detected is very high. If the size of the lesion in the fundus image is less than the preset size threshold, it means that the severity of the lesion type of the person to be detected is low.
[0091] It should be noted that the urgency can also be manually judged by a doctor on the fundus image. When the doctor believes that the type of lesion in the fundus image is very serious, the fundus image corresponding to the recognition result can be marked with urgency to serve as an urgency prompt.
[0092] In a specific embodiment, the urgency of the lesion type in the fundus image can also be determined in combination with the above method. For example, the urgency of the lesion type is considered high only when it meets one or more conditions (for example, the conditions include: the lesion type in the fundus image is a lesion type in a preset list of serious lesions, the lesion location in the fundus image is at a preset high urgency location, the number of lesions in the fundus image exceeds a preset number threshold, and the size of the lesion in the fundus image is greater than or equal to a preset size threshold).
[0093] Preferably, it can also be set that when one of the above conditions is met, the urgency of determining the type of lesion in the fundus image is high, which can indicate that the severity of the lesion type of the person to be detected is high; when two or more of the above conditions are met, the urgency of determining the type of lesion in the fundus image is higher than when only one condition is met, and so on, and the priority of medical treatment can be further determined by the number of the above conditions met. When none of the above conditions determines that the urgency of the type of lesion in the fundus image is high, it can indicate that the severity of the lesion type of the person to be detected is low.
[0094] S40. Generate a medical consultation recommendation based on the urgency of the lesion type.
[0095] It is understandable that after determining the urgency of the lesion type through the above step S30, a medical advice is immediately generated according to the urgency of the lesion type (for example, what should be paid attention to during examination and recuperation, whether to go to the hospital outpatient clinic, etc.).
[0096] Furthermore, the step S40 includes the following steps:
[0097] If the urgency of the lesion type of the person to be tested is high, an immediate medical consultation recommendation for the lesion type is generated, and the medical examination information and referral hospital information related to the lesion type are prompted to the person to be tested.
[0098] In this step, if the urgency of the lesion of the person to be tested is high, it means that the lesion of the person to be tested is very serious. At this time, an immediate medical consultation suggestion can be generated to remind the person to be tested, and the medical examination information related to the lesion type (basic medical knowledge related to ophthalmological examination and medical examination information such as ophthalmological disease manifestations and treatment knowledge corresponding to the person to be tested) and referral hospital information can also be prompted to the person to be tested, which plays a role in popular science education for the person to be tested.
[0099] If the urgency of the lesion type of the person to be tested is low, a recent medical consultation recommendation for the lesion type is generated, and the medical examination information related to the lesion type is prompted to the person to be tested.
[0100] In this step, if the urgency of the lesion of the person to be tested is low, it means that the lesion of the person to be tested is not serious. At this time, a suggestion for recent medical treatment can be generated to remind the person to be tested, and the medical examination information related to the lesion type (basic medical knowledge related to ophthalmological examination and medical examination information such as ophthalmological disease manifestations and treatment knowledge corresponding to the person to be tested) can also be prompted to the person to be tested, which plays a role in popular science education for the person to be tested.
[0101] In one embodiment, the fundus image of the person to be tested contains two types of lesions. The urgency of the first type of lesion is high, so an immediate medical consultation recommendation corresponding to the first type of lesion can be generated, while the urgency of the second type of lesion is low, so a recent medical consultation recommendation corresponding to the second type of lesion is generated. The above two types of medical consultation recommendations can be included in the same generated report, which will be sent to the person to be tested for reference on how to seek medical treatment.
[0102] In summary, the above provides a method for detecting fundus lesions, which first obtains a fundus image of a person to be detected; secondly, the fundus image is input into a preset detection model for recognition, and a recognition result output by the detection model is obtained, and the recognition result includes whether the fundus image of the person to be detected contains lesions or does not contain lesions; then, when the recognition result is that the fundus image contains lesions, the lesion type of the lesions contained in the fundus image is obtained, and based on the lesion type, the corresponding lesion number, lesion location and lesion size are obtained, and the urgency of the lesion type in the fundus image is determined according to the lesion type, lesion location, lesion number and lesion size; finally, a medical recommendation is generated according to the urgency of the lesion type. The present invention inputs the fundus image into the detection model for recognition, which can improve the recognition rate and detection efficiency of the fundus image; the urgency of the lesion type in the fundus image is determined according to the lesion type, number of lesions, lesion location and lesion size of the lesions contained in the fundus image, so as to determine the urgency of the disease, so as to formulate corresponding medical advice according to the urgency of the disease.
[0103] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0104] In one embodiment, a fundus lesion detection device is provided, and the fundus lesion detection device corresponds to the fundus lesion detection method in the above embodiment. Figure 5 As shown, the fundus lesion detection device includes a fundus image acquisition module 11, an input module 12, an acquisition module 13 and a generation module 14. The functional modules are described in detail as follows:
[0105] The fundus image acquisition module 11 is used to acquire the fundus image of the person to be detected.
[0106] The input module 12 is used to input the fundus image into a preset detection model for recognition, and obtain a recognition result output by the detection model, wherein the recognition result includes whether the fundus image of the person to be detected contains a lesion or not.
[0107] The acquisition module 13 is used to obtain the lesion type of the lesion contained in the fundus image when the recognition result is that the fundus image contains lesions, and obtain the corresponding lesion number, lesion location and lesion size based on the lesion type; determine the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size.
[0108] The generating module 14 is used to generate a medical consultation recommendation according to the urgency of the lesion type.
[0109] Furthermore, the acquisition module includes:
[0110] The matching submodule is used to match the fundus image with a lesion fundus image in a preset fundus image library, wherein the lesion fundus image is a fundus image in which the lesion type has been determined.
[0111] The first determination submodule is used to determine, if the match is successful, that the type of lesion in the fundus image is the corresponding type of lesion in the lesion fundus image.
[0112] The prompting submodule is used to enter the associated fundus image and the lesion type corresponding to the fundus image into the preset fundus image library or prompt a preset reviewer to review the recognition result if the matching is unsuccessful. Further, the acquisition module includes:
[0113] The acquisition submodule is used to acquire the number of lesions in the fundus image from the fundus image, where the number of lesions refers to the total number of all lesion types in the fundus image.
[0114] The extraction submodule is used to extract the lesion position corresponding to each lesion type from the fundus image, and each lesion type corresponds to at least one lesion position.
[0115] The recording submodule is used to extract the lesion size of the lesion position corresponding to each lesion type from the fundus image, and record the lesion size with the largest size as the lesion size of the lesion type.
[0116] Furthermore, the fundus lesion detection device further comprises:
[0117] A judgment module is used to judge the lesion features corresponding to the lesion type in the fundus image.
[0118] A first determination module, configured to determine that the judgment of the lesion type in the recognition result is correct if the lesion feature is positive;
[0119] The second determination module is used to determine that the judgment of the lesion type in the recognition result is wrong if the lesion feature is determined to be a false positive, and to modify the recognition result so that the fundus image does not contain the lesion type.
[0120] Furthermore, the judging module includes:
[0121] A first judgment submodule is used to judge whether the size of the lesion corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold;
[0122] A second judgment submodule is used to judge whether the lesion position corresponding to the lesion type in the fundus image is a preset position associated with the lesion type in the fundus image;
[0123] A third judgment submodule is used to judge whether the lesion shape feature corresponding to the lesion type in the fundus image is a preset lesion shape feature;
[0124] a second determination submodule, configured to determine that the lesion feature is positive if the size of the lesion corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold, or if the position of the lesion corresponding to the lesion type in the fundus image is at a preset position associated with the lesion type in the fundus image, or if the shape feature of the lesion corresponding to the lesion type in the fundus image is the preset lesion shape feature;
[0125] The third determination submodule is used to determine that the lesion feature is a false positive otherwise.
[0126] Furthermore, the acquisition module includes:
[0127] a fourth determination submodule, configured to determine that the urgency of the lesion type in the fundus image is high if the lesion type in the fundus image is a lesion type in a preset severe lesion list;
[0128] a fifth determination submodule, configured to determine that the urgency of the lesion type in the fundus image is high if the lesion position in the fundus image is at a preset high urgency position;
[0129] a sixth determination submodule, configured to determine that the urgency of the type of lesions in the fundus image is high if the number of lesions in the fundus image exceeds a preset number threshold;
[0130] The seventh determination submodule is configured to determine that the urgency of the lesion type in the fundus image is high if the lesion size in the fundus image is greater than or equal to a preset size threshold.
[0131] For the specific definition of the fundus lesion detection device, please refer to the definition of the fundus lesion detection method above, which will not be repeated here. Each module in the above fundus lesion detection device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0132] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the fundus lesion detection method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a fundus lesion detection method is implemented.
[0133] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the fundus lesion detection method in the above embodiment are implemented, for example: Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit of the fundus lesion detection device in the above embodiment are realized, for example Figure 5 The functions of modules 11 to 14 are shown in Figure 1. To avoid repetition, they will not be described here.
[0134] In one embodiment, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, the steps of the fundus lesion detection method in the above embodiment are implemented, for example Figure 2 Alternatively, when the computer program is executed by the processor, the functions of each module / unit of the fundus lesion detection device in the above embodiment are realized, for example Figure 5 The functions of modules 11 to 14 are shown in Figure 1. To avoid repetition, they will not be described here.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0136] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0137] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for detecting fundus lesions, characterized in that: include: Acquire a fundus image of the person to be tested; Inputting the fundus image into a preset detection model for recognition, and obtaining a recognition result output by the detection model, wherein the recognition result includes whether the fundus image of the person to be detected contains a lesion or does not contain a lesion; When the recognition result is that the fundus image contains lesions, obtaining the lesion type of the lesions contained in the fundus image, and obtaining the corresponding lesion number, lesion location and lesion size based on the lesion type; determining the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size; The obtaining the corresponding lesion number, lesion location and lesion size based on the lesion type includes: Acquire the number of lesions in the fundus image from the fundus image, where the number of lesions refers to the total number of all lesion types in the fundus image; Extracting the lesion position corresponding to each lesion type from the fundus image, each lesion type corresponds to at least one lesion position; Extracting the lesion size of the lesion position corresponding to each lesion type from the fundus image, and recording the lesion size with the largest size as the lesion size of the lesion type; After acquiring the lesion type of the lesion contained in the fundus image and acquiring the corresponding lesion number, lesion position and lesion size based on the lesion type, the method further includes: Determining lesion features corresponding to the lesion type in the fundus image; If the lesion feature is positive, determining that the judgment of the lesion type in the recognition result is correct; If the lesion feature is a false positive, determining that the judgment of the lesion type in the recognition result is wrong, and modifying the recognition result so that the fundus image does not contain the lesion type; The determining of the lesion feature corresponding to the lesion type in the fundus image is specifically: Determine whether the size of the lesion corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold; the lesion size is determined by measuring the longest and widest parts of the lesion to calculate the lesion size, or by approximating an irregular shape into a regular shape to calculate the lesion size; Determining whether a lesion position corresponding to the lesion type in the fundus image is a preset position associated with the lesion type in the fundus image; Determining whether a lesion shape feature corresponding to the lesion type in the fundus image is a preset lesion shape feature; If the size of the lesion corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold, or if the position of the lesion corresponding to the lesion type in the fundus image is at a preset position associated with the lesion type in the fundus image, or if the shape feature of the lesion corresponding to the lesion type in the fundus image is the preset lesion shape feature, then determining that the lesion feature is positive; Otherwise, the lesion feature is determined to be a false positive; Generate medical advice based on the urgency of the lesion type.
2. The method for detecting fundus lesions according to claim 1, characterized in that: The acquiring the lesion type of the lesion contained in the fundus image comprises: Matching the fundus image with a lesion fundus image in a preset fundus image library, wherein the lesion fundus image is a fundus image in which the lesion type has been determined; If the match is successful, determining that the lesion type in the fundus image is the lesion type in the corresponding lesion fundus image; If the matching is unsuccessful, the fundus image after association and the lesion type corresponding to the fundus image are entered into the preset fundus image library or a preset reviewer is prompted to review the recognition result.
3. The method for detecting fundus lesions according to claim 1, characterized in that: The determining the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size includes: If the lesion type in the fundus image is a lesion type in a preset severe lesion list, determining that the urgency of the lesion type in the fundus image is high; or If the position of the lesion in the fundus image is at a preset high urgency position, determining that the urgency of the lesion type in the fundus image is high; or If the number of lesions in the fundus image exceeds a preset number threshold, determining that the urgency of the type of lesions in the fundus image is high; or If the size of the lesion in the fundus image is greater than or equal to a preset size threshold, it is determined that the urgency of the lesion type in the fundus image is high.
4. A fundus lesion detection device, characterized in that: include: A fundus image acquisition module is used to acquire the fundus image of the person to be detected; An input module, used for inputting the fundus image into a preset detection model for recognition, and obtaining a recognition result output by the detection model, wherein the recognition result includes whether the fundus image of the person to be detected contains a lesion or does not contain a lesion; an acquisition module, configured to, when the identification result indicates that the fundus image contains a lesion, acquire the lesion type of the lesion contained in the fundus image, and acquire the corresponding lesion number, lesion location and lesion size based on the lesion type; and determine the urgency of the lesion type in the fundus image according to the lesion type, lesion location, lesion number and lesion size; The acquisition module is further used for: Acquire the number of lesions in the fundus image from the fundus image, where the number of lesions refers to the total number of all lesion types in the fundus image; Extracting the lesion position corresponding to each lesion type from the fundus image, each lesion type corresponds to at least one lesion position; Extracting the lesion size of the lesion position corresponding to each lesion type from the fundus image, and recording the lesion size with the largest size as the lesion size of the lesion type; The acquisition module is further used for: Determining lesion features corresponding to the lesion type in the fundus image; If the lesion feature is positive, determining that the judgment of the lesion type in the recognition result is correct; If the lesion feature is a false positive, determining that the judgment of the lesion type in the recognition result is wrong, and modifying the recognition result so that the fundus image does not contain the lesion type; as well as Determine whether the size of the lesion corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold; the lesion size is determined by measuring the longest and widest parts of the lesion to calculate the lesion size, or by approximating an irregular shape into a regular shape to calculate the lesion size; Determining whether a lesion position corresponding to the lesion type in the fundus image is a preset position associated with the lesion type in the fundus image; Determining whether a lesion shape feature corresponding to the lesion type in the fundus image is a preset lesion shape feature; If the size of the lesion corresponding to the lesion type in the fundus image is greater than or equal to a preset size threshold, or if the position of the lesion corresponding to the lesion type in the fundus image is at a preset position associated with the lesion type in the fundus image, or if the shape feature of the lesion corresponding to the lesion type in the fundus image is the preset lesion shape feature, then determining that the lesion feature is positive; Otherwise, the lesion feature is determined to be a false positive; A generation module is used to generate a medical consultation recommendation based on the urgency of the lesion type.
5. The fundus lesion detection device according to claim 4, characterized in that: The acquisition module comprises: A matching submodule, used for matching the fundus image with a lesion fundus image in a preset fundus image library, wherein the lesion fundus image is a fundus image in which the lesion type has been determined; A first determination submodule is used to determine, if the match is successful, that the type of lesion in the fundus image is the type of lesion in the corresponding lesion fundus image; The prompting submodule is used to enter the associated fundus image and the lesion type corresponding to the fundus image into the preset fundus image library or prompt a preset reviewer to review the recognition result if the matching is unsuccessful.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for detecting fundus lesions as described in any one of claims 1 to 3 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting fundus lesions as claimed in any one of claims 1 to 3 is implemented.
