WO2023024418A1 - 杯盘比确定方法、装置、设备及存储介质 - Google Patents

杯盘比确定方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023024418A1
WO2023024418A1 PCT/CN2022/071693 CN2022071693W WO2023024418A1 WO 2023024418 A1 WO2023024418 A1 WO 2023024418A1 CN 2022071693 W CN2022071693 W CN 2022071693W WO 2023024418 A1 WO2023024418 A1 WO 2023024418A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
image
feature map
cup
optic
Prior art date
Application number
PCT/CN2022/071693
Other languages
English (en)
French (fr)
Inventor
李葛
曾婵
郑强
高鹏
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023024418A1 publication Critical patent/WO2023024418A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30041Eye; Retina; Ophthalmic
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Definitions

  • the present application relates to the field of artificial intelligence, and in particular to a method, device, equipment and storage medium for determining a cup-to-disk ratio.
  • Glaucoma is one of the three major eye diseases that cause blindness in the world. Its irreversibility makes its early diagnosis and treatment play a vital role in improving the quality of life of patients.
  • the cup-to-disk ratio is usually used as an evaluation index, and the cup and disc in the fundus image are segmented by a segmentation method, and then the cup-to-disk ratio is calculated.
  • Traditional methods are susceptible to image acquisition quality, such as illumination, occlusion, and noise, resulting in greatly reduced segmentation accuracy.
  • the performance of the segmentation method based on the deep neural network is generally higher than that of the traditional method, it is also very susceptible to the influence of image illumination and noise, resulting in a decrease in segmentation accuracy.
  • the present application provides a cup-to-disk ratio determination method, device, equipment, and storage medium, which are used to solve the existing technical problem that the accuracy of the cup-to-disk ratio cannot be guaranteed due to the low segmentation accuracy of the image segmentation of the fundus image.
  • the first aspect of the present application provides a method for determining the cup-to-disk ratio based on an image segmentation model.
  • the image segmentation model includes an encoding network, a decoding network, and a connection layer. Region detection, to obtain the optic disc area of the fundus image; input the optic disc area into the encoding network of the image segmentation model to extract image features, and obtain a first feature map; input the first feature map into the decoding network
  • the position correction network of the position correction network performs hollow space pyramid pooling on the first feature image through the position correction network to obtain the second feature map after position correction; the segmentation network in the decoding network performs the first feature image Convolute the image to obtain a third feature map representing the segmented image of the optic cup and disc; through the connection layer, splicing the second feature map and the third feature map to obtain an image segmentation result; extracting the The outer contour of the optic disc and the outer contour of the optic cup in the image segmentation results, and according to the outer contour of the optic disc and the outer
  • the second aspect of the present application provides a device for determining cup-to-plate ratio based on an image segmentation model, including a memory, a processor, and computer-readable instructions stored in the memory and operable on the processor, the image
  • the segmentation model includes an encoding network, a decoding network, and a connection layer.
  • the network performs hollow space pyramid pooling on the first feature image to obtain a second feature map after position correction; the segmentation network in the decoding network performs a convolution operation on the first feature map to obtain a representative cup
  • the third feature map of the optic disc segmentation image; through the connection layer, the second feature map and the third feature map are spliced to obtain the image segmentation result; the outer contour of the optic disc and the visual disc in the image segmentation result are extracted Cup outer contour, and according to the optic disc outer contour and the optic cup outer contour, calculate the optic cup diameter and optic disc diameter; calculate the cup-to-disk ratio of the fundus image according to the optic cup diameter and optic disc diameter.
  • the third aspect of the present application provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are run on the computer, the computer is made to perform the following steps: acquire a fundus image, and Perform optic disc region detection on the fundus image to obtain the optic disc region of the fundus image; input the optic disc region into the encoding network of the image segmentation model to extract image features to obtain a first feature map; input the first feature map
  • the network performs a convolution operation on the first feature map to obtain a third feature map representing the segmented image of the optic cup and disc; through the connection layer of the image segmentation model, the second feature map and the third feature map are spliced.
  • the cup diameter and optic disc diameter calculate the cup-to-disk ratio of the fundus image.
  • the fourth aspect of the present application provides a device for determining the cup-to-plate ratio based on an image segmentation model, wherein the image segmentation model includes an encoding network, a decoding network, and a connection layer, and the device for determining the cup-to-plate ratio based on the image segmentation model includes :
  • the acquisition module is used to acquire the fundus image, and performs optic disc region detection on the fundus image to obtain the optic disc region of the fundus image;
  • the special diagnosis extraction module is used to input the optic disc region into the encoding of the image segmentation model Extract image features in the network to obtain a first feature map;
  • a pooling module is used to input the first feature map into the position correction network in the decoding network, and perform the first feature image through the position correction network Empty space pyramid pooling to obtain a second feature map after position correction;
  • a convolution module for performing a convolution operation on the first feature map through the segmentation network in the decoding network to obtain a segmented image representing the optic cup
  • the optic disc area of the fundus image is obtained by acquiring the fundus image and detecting the optic disc area of the fundus image; inputting the optic disc area into the encoding network of the image segmentation model to extract image features, and obtaining the first feature map; Input the first feature map into the position correction network in the decoding network, and perform hollow space pyramid pooling on the first feature image through the position correction network to obtain the second feature map after position correction; through the segmentation network in the decoding network, the first The feature map is convolved to obtain the third feature map representing the segmented image of the optic disc; through the connection layer, the second feature map and the third feature map are spliced to obtain the image segmentation result; the image segmentation result is extracted
  • FIG. 1 is a schematic diagram of a first embodiment of a method for determining a cup-to-disc ratio based on an image segmentation model in an embodiment of the present application;
  • Fig. 2 is a schematic diagram of the second embodiment of the method for determining the cup-to-disc ratio based on the image segmentation model in the embodiment of the present application;
  • FIG. 3 is a schematic diagram of a third embodiment of a method for determining a cup-to-disc ratio based on an image segmentation model in an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a fourth embodiment of a method for determining a cup-to-disk ratio based on an image segmentation model in an embodiment of the present application
  • FIG. 5 is a schematic diagram of a fifth embodiment of a method for determining a cup-to-disc ratio based on an image segmentation model in an embodiment of the present application
  • FIG. 6 is a schematic diagram of an embodiment of a device for determining a cup-to-disk ratio based on an image segmentation model in an embodiment of the present application
  • Fig. 7 is a schematic diagram of another embodiment of the device for determining the cup-to-disc ratio based on the image segmentation model in the embodiment of the present application;
  • Fig. 8 is a schematic diagram of an embodiment of a device for determining a cup-to-plate ratio based on an image segmentation model in an embodiment of the present application.
  • the embodiment of the present application provides a cup-to-disk ratio determination method, device, equipment and storage medium, which are used to solve the existing technical problem that the accuracy of the cup-to-disc ratio cannot be guaranteed due to the low segmentation precision of the existing fundus image segmentation.
  • An embodiment of the method for determining the cup-to-disc ratio based on the image segmentation model in the embodiment of the present application includes:
  • the subject of execution of the present application may be a device for determining the cup-to-plate ratio based on an image segmentation model, and may also be a terminal or a server, which is not specifically limited here.
  • the embodiment of the present application is described by taking the server as an execution subject as an example.
  • the above database can be stored in a block chain node.
  • the fundus image is obtained by means of a device for collecting fundus images.
  • the fundus is the tissue at the back of the eyeball, that is, the inner membrane of the eyeball—the retina, the optic disc, the macula, and the central retinal artery and vein. It is generally photographed by a fundus camera Obtain a fundus image.
  • the optic disc region is detected on the acquired fundus image, so as to obtain the optic disc region.
  • the image segmentation model is trained through the following steps: obtain the sample image and the image label corresponding to the sample image, and construct sample data according to the sample and the image label, wherein the image label includes a segmentation label and a position guidance label; the sample The data is input into the preset neural network to obtain the network prediction result; the sample image and the network prediction result are respectively projected to obtain the sample projection value and the segmentation projection value respectively; the position deviation value between the sample image and the network prediction result is calculated; respectively Calculate the segmentation loss function according to the segmentation label and the network prediction result, calculate the position loss function according to the position guide label and position deviation value, calculate the projection loss function according to the sample projection value and the segmentation projection value; according to the segmentation loss function, position loss function and projection loss function , calculate the total loss function; according to the total loss function, iteratively train the preset neural network to obtain the image segmentation model.
  • the network prediction result of the segmentation branch is y_pred
  • the label is y_true
  • the value of the forward projection of the network prediction result is recorded as p_pred
  • the value of the label is recorded as p_true
  • the network prediction result of the position guidance branch is l_pred
  • the label is l_true .
  • the loss function of the network consists of three parts, the loss function L_loc for position regression, the cross-entropy loss function L_seg for image segmentation, and the projection loss function L_proj for regression projection.
  • the final loss function expression is as follows:
  • the image segmentation model includes an encoding network, a decoding network, and a connection layer, wherein the decoding network includes a position correction network and a segmentation network, and the optic disc region is input into the encoding network of the image segmentation model to extract image features, for example,
  • the encoding can use the mobilenetv2 network to perform feature extraction on the optic disc area, and then obtain the first feature image corresponding to the optic disc area.
  • Atrous spatial pyramid pooling samples a given input in parallel with atrous convolutions of different sampling rates, which is equivalent to capturing the context of an image at multiple scales
  • the position correction network uses the ASPP algorithm to perform hollow space pyramid pooling on the first feature image, and outputs spatial feature maps of different receptive field sizes.
  • the spatial feature maps of different receptive field sizes are concatenated and input to the deep learning network for temporal feature extraction. The direction can be corrected by predicting the position.
  • the segmentation network uses cam (channel attention module, Channel Attention Module) and pam (position attention module, Position Attention Module) respectively, and the channel map of each high level feature can be regarded as a specific
  • cam can highlight the interdependent feature maps and improve the feature representation of specific semantics by mining the interdependence relationship between channel maps, and pam aims to use the correlation between any two features to enhance each other. expression of characteristics.
  • the feature maps obtained by the two modules are concatenated to obtain the final prediction result.
  • the idea of DenseNet is used for reference, and the concat splicing strategy is chosen instead of the add strategy. That is, let the input second feature map be d(x), the third feature map is f(x), and the result of concat splicing is [d(x)
  • the method of finding the largest outer contour can be used to extract the outer contour of the optic cup and the outer contour of the optic disc from the segmented images of the optic cup and disc, and then use the rotating caliper algorithm to compare the outer contour of the optic cup and the outer contour of the optic disc respectively.
  • the minimum circumscribed rectangle of the contour is obtained, and the minimum circumscribed rectangle of the optic cup and the minimum circumscribed rectangle of the optic disc are obtained.
  • the vertical side length of the smallest circumscribed rectangle of the optic cup is the optic cup diameter (VCD).
  • the vertical side length of the smallest circumscribed rectangle of the optic disc is the optic disc diameter (VDD).
  • cup-to-disc ratio is the ratio of the optic cup diameter (vertical cup diameter, VCD) to the optic disc diameter (vertical disc diameter, VDD), and the optic cup diameter ( VCD) is divided by the optic disc diameter (VDD) to obtain the cup-to-disk ratio (CDR).
  • the optic disc region of the fundus image is obtained by acquiring the fundus image and detecting the optic disc region of the fundus image; inputting the optic disc region into the encoding network of the image segmentation model to extract image features, and obtaining the first feature map;
  • a feature map is input to the position correction network in the decoding network, and the first feature image is subjected to empty space pyramid pooling through the position correction network to obtain the second feature map after position correction;
  • the first feature map is processed through the segmentation network in the decoding network Perform a convolution operation to obtain a third feature map representing the segmented image of the optic cup and disc; through the connection layer, splicing the second feature map and the third feature map to obtain an image segmentation result; extracting the outer contour of the optic disc in the image segmentation result and The outer contour of the optic cup, and calculate the diameter of the optic cup and the diameter of the optic disc according to the outer contour of the optic disc and the outer contour of the optic cup; calculate the cup-to-disk ratio of the fundus image according to the
  • the second embodiment of the method for determining the cup-to-disc ratio based on the image segmentation model in the embodiment of the present application includes:
  • the target detection technology can be used, and the MaskRCNN model can be used to detect the fundus image, and the first coordinate point of the region and the second coordinate point of the region in the fundus image can be detected through the MaskRCNN model, and the first coordinate point of the region and the second coordinate point of the region can be detected.
  • the coordinate points are two points on the diagonal line of the optic disc area, which can be two points on the upper left corner and the lower right corner, or two points on the upper right corner and the lower left corner.
  • the rectangular area can be determined by two points on the diagonal.
  • the coordinates of the first coordinate point of the area are (a, b), and the coordinates of the second coordinate point of the area are (c, d).
  • the coordinates of the four points in the rectangular area are (a, b), (c, b), (c, d) and (a, d) respectively, and the four points are connected to obtain the rectangular area.
  • this embodiment describes in detail the process of acquiring the fundus image and performing optic disc region detection on the fundus image to obtain the optic disc region of the fundus image.
  • the fundus image is input into the preset In the optic disc region detection model of the region, the first coordinate point of the region and the second coordinate point of the region are obtained; according to the first coordinate point of the region and the second coordinate point of the region, a rectangular region is generated; the fundus image is processed according to the rectangular region crop to obtain the optic disc region of the fundus image.
  • the detection of the optic disc region is carried out through the detection of the preset optic disc region detection model, which can improve the accuracy of the segmented optic cup and optic disc images, and reduce the multi-screening and missing screening in the disease screening process.
  • the third embodiment of the cup-to-disc ratio determination method based on the image segmentation model in the embodiment of the present application includes:
  • the image needs to be pre-processed before the image is input into the model, and the pre-processing includes stretching and stretching.
  • the preset neural network is used to extract the features of the sample image.
  • this embodiment describes in detail the process of inputting the optic disc region into the encoding network of the image segmentation model to extract image features and obtain the first feature map, by scaling the optic disc region , to obtain a zoomed image of a preset size; input the zoomed image into the mobilenetv2 network in the encoding network, and perform convolution processing through the n-layer convolution layer in the mobilenetv2 network to obtain n feature maps; the mobilenetv2 network
  • the feature map output by the last convolutional layer is used as the first feature map.
  • the image before the image is input into the encoding network, the image is preprocessed, so that the preset neural network can perform feature extraction on the sample image.
  • the fourth embodiment of the method for determining the cup-to-disc ratio based on the image segmentation model in the embodiment of the present application includes:
  • the spatial information of feature maps of different scales are fused to obtain a second feature map
  • Atrous spatial pyramid pooling samples a given input in parallel with atrous convolutions of different sampling rates, which is equivalent to capturing the context of an image at multiple scales
  • the position correction network uses the ASPP algorithm to perform hollow space pyramid pooling on the first feature image, and outputs spatial feature maps of different receptive field sizes.
  • the spatial feature maps of different receptive field sizes are concatenated and input to the deep learning network for temporal feature extraction. The direction can be corrected by predicting the position.
  • A is sent to the convolutional layer with regularization and Relu layers to generate two feature maps B and C; the C transpose is multiplied by the B execution matrix, and the softmax layer is used to calculate the mapping of the spatial attention.
  • the feature A is sent to the convolution with regularization and ReLU layer to generate a new feature D, and D and S are transposed to perform matrix multiplication; finally, the obtained result is added to A to perform item-by-item addition, Get the final output location feature subgraph.
  • transposition of X and A perform matrix multiplication; the obtained result is resized and A performs element-wise addition to obtain a channel feature submap.
  • this embodiment explains in detail that the first feature map is input into the position correction network in the decoding network, and the first feature image is subjected to hollow space pyramid pooling through the position correction network to obtain the position corrected position correction network.
  • the fifth embodiment of the method for determining the cup-to-disc ratio based on the image segmentation model in the embodiment of the present application includes:
  • applying the findcontours function in OpenCV to carry out contour recognition on the image segmentation results will obtain different contour images, and realize setting the contour levels of the outer contour of the optic disc and the outer contour of the optic cup as the largest contour image and the second largest contour image respectively.
  • Contour image, the outer contour of the optic disc and the outer contour of the optic cup can be filtered out from the contour recognition results.
  • the rotating caliper algorithm constructs parallel lines by taking two extreme points on the coordinates on the contour, and then rotates the two lines. When the line coincides with a side of the polygon, calculates the area of the rectangle and continues to rotate until the rotation angle exceeds 90 degrees , take the rectangle with the smallest area as the smallest circumscribed rectangle.
  • this embodiment extracts the outer contour of the optic disc and the outer contour of the optic cup in the image segmentation results in detail, and calculates the diameter of the optic cup and the diameter of the optic disc according to the outer contour of the optic disc and the outer contour of the optic cup.
  • findcontours function in OpenCV Use the findcontours function in OpenCV to perform contour recognition on the image segmentation results to obtain the contour recognition results; according to the preset contour levels of the optic disc contour and optic cup contour, filter out the optic disc contour and optic cup contour from the contour recognition results ; According to the rotating caliper algorithm, the minimum circumscribed rectangle of the outer contour of the optic disc and the outer contour of the optic cup is extracted respectively; This method can accurately perform contour recognition through the findcontours function in OpenCV, improve the accuracy of the cup-to-disc ratio, and reduce the situation of multiple screening and missing screening in the process of disease screening.
  • the method for determining the cup-to-plate ratio based on the image segmentation model in the embodiment of the present application has been described above.
  • the device for determining the cup-to-plate ratio based on the image segmentation model in the embodiment of the present application will be described below. Please refer to FIG. 6.
  • the determination of the cup-to-plate ratio based on the image segmentation model includes:
  • An acquisition module 601 configured to acquire a fundus image, and perform optic disc region detection on the fundus image to obtain the optic disc region of the fundus image;
  • a special diagnosis extraction module 602 configured to input the optic disc region into the encoding network of the image segmentation model to extract image features to obtain a first feature map
  • the pooling module 603 is configured to input the first feature map into the position correction network in the decoding network, perform hollow space pyramid pooling on the first feature image through the position correction network, and obtain the position corrected the second feature map;
  • Convolution module 604 configured to perform a convolution operation on the first feature map through the segmentation network in the decoding network to obtain a third feature map representing the segmented image of the optic cup and disc;
  • connection module 605 configured to splice the second feature map and the third feature map through the connection layer to obtain an image segmentation result
  • a diameter calculation module 606, configured to extract the outer contour of the optic disc and the outer contour of the optic cup in the image segmentation result, and calculate the diameter of the optic cup and the diameter of the optic disc according to the outer contour of the optic disc and the outer contour of the optic cup;
  • the cup-to-disk ratio calculation module 607 is configured to calculate the cup-to-disk ratio of the fundus image according to the diameter of the optic cup and the diameter of the optic disc.
  • the above database can be stored in a block chain node.
  • the image segmentation model-based cup-to-disk ratio determination device operates the above-mentioned image segmentation model-based cup-to-disc ratio determination method, and the image segmentation model-based cup-to-disc ratio determination device obtains the fundus image, and The optic disc area is detected on the fundus image to obtain the optic disc area of the fundus image; the optic disc area is input into the encoding network of the image segmentation model to extract image features, and the first feature map is obtained; the first feature map is input into the position correction network in the decoding network, through The position correction network performs hollow space pyramid pooling on the first feature image to obtain the second feature map after position correction; the convolution operation is performed on the first feature map through the segmentation network in the decoding network to obtain the segmented image representing the optic cup and disc The third feature map; through the connection layer, the second feature map and the third feature map are spliced to obtain the image segmentation result; the outer contour of the optic disc and the outer contour of the optic cup in the image segment
  • the second embodiment of the device for determining the cup-to-plate ratio based on the image segmentation model in the embodiment of the present application wherein the image segmentation model includes an encoding network, a decoding network and a connection layer, and the decoding network includes position correction Network and segmentation network; the second embodiment of the device for determining the cup-to-plate ratio based on the image segmentation model includes:
  • An acquisition module 601 configured to acquire a fundus image, and perform optic disc region detection on the fundus image to obtain the optic disc region of the fundus image;
  • a special diagnosis extraction module 602 configured to input the optic disc region into the encoding network of the image segmentation model to extract image features to obtain a first feature map
  • the pooling module 603 is configured to input the first feature map into the position correction network in the decoding network, perform hollow space pyramid pooling on the first feature image through the position correction network, and obtain the position corrected the second feature map;
  • Convolution module 604 configured to perform a convolution operation on the first feature map through the segmentation network in the decoding network to obtain a third feature map representing the segmented image of the optic cup and disc;
  • connection module 605 configured to splice the second feature map and the third feature map through the connection layer to obtain an image segmentation result
  • a diameter calculation module 606, configured to extract the outer contour of the optic disc and the outer contour of the optic cup in the image segmentation result, and calculate the diameter of the optic cup and the diameter of the optic disc according to the outer contour of the optic disc and the outer contour of the optic cup;
  • the cup-to-disk ratio calculation module 607 is configured to calculate the cup-to-disk ratio of the fundus image according to the diameter of the optic cup and the diameter of the optic disc.
  • the acquisition module 601 is specifically configured to: acquire a fundus image, input the fundus image into a preset optic disc region detection model, and obtain the first coordinate point of the region and the second coordinate point of the region; according to the The first coordinate point of the region and the second coordinate point of the region generate a rectangular region; the fundus image is cropped according to the rectangular region to obtain the optic disc region of the fundus image.
  • the encoding network is a mobilenetv2 network
  • the mobilenetv2 network includes n layers of convolutional layers, where n is a natural number not less than 1
  • the feature extraction module 602 is specifically used to: Perform scaling processing to obtain a zoomed image of a preset size; input the zoomed image into the mobilenetv2 network in the encoding network, and perform convolution processing through an n-layer convolution layer in the mobilenetv2 network to obtain n feature maps;
  • the feature map output by the last convolutional layer in the mobilenetv2 network is used as the first feature map.
  • the position correction network is an aspp network
  • the pooling module 603 is specifically configured to: input the first feature map into the position correction network in the decoding network, and use the aspp algorithm to input
  • the first feature map of the first feature map is subjected to hollow space pyramid pooling, and the feature map space information of different scales of the first feature map is extracted; the feature map space information is transformed by global average pooling, and the spatial information of feature maps of different scales is calculated. weights; according to the weights, the spatial information of the feature maps of different scales are fused to obtain a second feature map.
  • the segmentation network includes a channel attention sub-network and a position attention sub-network;
  • the convolution module 604 is specifically used to: send the first feature map to the convolutional layer in the position attention sub-network , to generate three feature maps; perform matrix multiplication on two of the three feature maps, and use the softmax layer to calculate the space map after matrix multiplication; combine the remaining feature maps of the three feature maps with the performing matrix multiplication by space mapping transposition, and performing element-wise addition of the matrix multiplication result to the first feature map to obtain a position feature submap; combining the first feature map and the first feature map Transpose performs matrix multiplication and uses a softmax layer to compute the matrix-multiplied channel map; performs matrix multiplication on the channel map with the first feature map and performs element-wise matrix multiplication with the first feature map adding together to obtain a channel feature submap; adding and fusing the position feature submap and the space feature submap to obtain a third feature map.
  • the diameter calculation module 606 is specifically configured to: use the findcontours function in OpenCV to perform contour recognition on the image segmentation result to obtain the contour recognition result; Contour level, screen out the outer contour of the optic disc and the outer contour of the optic cup from the contour recognition results; according to the rotating caliper algorithm, extract the minimum circumscribed rectangle of the outer contour of the optic disc and the outer contour of the optic cup respectively; The outer contour and the length of the smallest circumscribed rectangle of the outer contour of the optic cup in the vertical direction are used as the diameter of the optic disc and the diameter of the optic cup.
  • the apparatus for determining the cup-to-disk ratio based on an image segmentation model further includes a model training module 608, and the model training module 608 is specifically configured to: obtain a sample image and an image label corresponding to the sample image, and The sample and the image label construct sample data, wherein the image label includes a segmentation label and a position guidance label; the sample data is input into a preset neural network to obtain a network prediction result; the sample image and The network prediction results are respectively projected to obtain a sample projection value and a segmentation projection value; calculate a position deviation value between the sample image and the network prediction result; calculate according to the segmentation label and the network prediction result respectively Segmentation loss function, calculating a position loss function according to the position guide label and the position deviation value, calculating a projection loss function according to the sample projection value and the segmentation projection value; according to the segmentation loss function, the position loss function and the projection loss function to calculate a total loss function; according to the total loss function, iteratively train the preset neural network to obtain
  • this embodiment describes in detail the specific functions of each module and the unit composition of some modules. Through the newly added modules, the accuracy of the segmented optic cup and disc images is improved, and the disease screening process is reduced. The situation of multiple sieves and missing sieves.
  • FIG. 8 is a schematic structural diagram of an image segmentation model-based cup-to-disc ratio determination device provided by an embodiment of the present application.
  • the image segmentation model-based cup-to-disc ratio determination device 800 may have relatively large differences due to different configurations or performances.
  • One or more processors (central processing units, CPU) 810 for example, one or more processors
  • memory 820 may be included, and one or more storage media 830 for storing application programs 833 or data 832 (for example, one or more above mass storage devices).
  • the memory 820 and the storage medium 830 may be temporary storage or persistent storage.
  • the program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations for the cup-to-plate ratio determination device 800 based on the image segmentation model.
  • the processor 810 may be configured to communicate with the storage medium 830, and execute a series of instruction operations in the storage medium 830 on the image segmentation model-based cup-to-disk ratio determination device 800, so as to realize the above-mentioned image segmentation model-based cup-to-disc ratio determination device 800 than determine the steps of the method.
  • the cup-to-plate ratio determination device 800 based on an image segmentation model may also include one or more power sources 840, one or more wired or wireless network interfaces 850, one or more input-output interfaces 860, and/or, one or more operating System 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
  • operating System 831 such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with each other using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer-readable storage medium may also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are run on the computer, the computer is made to execute the steps of the method for determining the cup-to-disc ratio based on the image segmentation model.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Molecular Biology (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Geometry (AREA)
  • Medical Informatics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本申请涉及人工智能领域,公开了一种杯盘比确定方法、装置、设备及存储介质,该方法包括:获取并检测眼底图像,得到视盘区域;将视盘区域输入图像分割模型的编码网络提取图像特征,得到第一特征图;将第一特征图输入解码网络的位置校正网络,得到位置校正的第二特征图;通过解码网络中的分割网络对第一特征图进行卷积操作,得到第三特征图;通过连接层,拼接第二特征图和第三特征图,得到图像分割结果;根据图像分割结果,计算得到视杯直径和视盘直径;根据视杯直径和视盘直径计算眼底图像的杯盘比。本方法提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况,此外,本申请还涉及区块链技术,眼底图像可存储于区块链中。

Description

杯盘比确定方法、装置、设备及存储介质
本申请要求于2021年08月25日提交中国专利局、申请号为202110978322.3、发明名称为“杯盘比确定方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种杯盘比确定方法、装置、设备及存储介质。
背景技术
青光眼是一种全球三大致盲的眼科疾病之一,其不可逆性导致它的早期诊断和治疗对于提高患者的生活质量有至关重要的作用。在对青光眼进行自动筛查时,通常使用杯盘比作为评估指标,采用分割方法对眼底图像中的视杯和视盘进行分割,然后计算杯盘比。
发明人意识到,现有技术通常分为两种方法对视盘视杯进行分割,1、基于眼底图像的色彩,纹理的特征进行特征提取与聚类的传统图像处理方法。2、基于深度神经网络,如U-Net,FCN分割网络的方法。传统方法易受图像采集质量,如光照,遮挡,噪声的影响而导致分割精度大大降低。而基于深度神经网络的分割方法虽然性能普遍高于传统方法,但同样的也极易受到图像光照,噪声的影响而导致分割精度的降低。一旦视盘视杯的分割结果出现错误,则CDR的准确率也无法保证,这将造成大量多筛,漏筛的现象出现。
发明内容
本申请提供了一种杯盘比确定方法、装置、设备及存储介质,用于解决现有的对眼底图像进行图像分割的分割精度低,导致杯盘比准确率无法保证的技术问题。
本申请第一方面提供了一种基于图像分割模型的杯盘比确定方法,所述图像分割模型包括编码网络、解码网络和连接层,方法包括:获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
本申请第二方面提供了一种基于图像分割模型的杯盘比确定设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述图像分割模型包括编码网络、解码网络和连接层,所述处理器执行所述计算机可读指令时实现如下步骤:获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
本申请的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:获取眼底 图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;将所述视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;将所述第一特征图输入图像分割模型的解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;通过图像分割模型的连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
本申请第四方面提供了一种基于图像分割模型的杯盘比确定装置,其中,所述图像分割模型包括编码网络、解码网络和连接层,所述基于图像分割模型的杯盘比确定装置包括:获取模块,用于获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;特诊提取模块,用于将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;池化模块,用于将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;卷积模块,用于通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;连接模块,用于通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;直径计算模块,用于提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;杯盘比计算模块,用于根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
本申请提供的技术方案中,通过获取眼底图像,并对眼底图像进行视盘区域检测,得到眼底图像的视盘区域;将视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;将第一特征图输入解码网络中的位置校正网络,通过位置校正网络对第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;通过解码网络中的分割网络对第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;通过连接层,将第二特征图和第三特征图进行拼接,得到图像分割结果;提取图像分割结果中的视盘外轮廓和视杯外轮廓,并根据视盘外轮廓和视杯外轮廓,计算得到视杯直径和视盘直径;根据视杯直径和视盘直径计算眼底图像的杯盘比。本方法提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况。
附图说明
图1为本申请实施例中基于图像分割模型的杯盘比确定方法的第一个实施例示意图;
图2为本申请实施例中基于图像分割模型的杯盘比确定方法的第二个实施例示意图;
图3为本申请实施例中基于图像分割模型的杯盘比确定方法的第三个实施例示意图;
图4为本申请实施例中基于图像分割模型的杯盘比确定方法的第四个实施例示意图;
图5为本申请实施例中基于图像分割模型的杯盘比确定方法的第五个实施例示意图;
图6为本申请实施例中基于图像分割模型的杯盘比确定装置的一个实施例示意图;
图7为本申请实施例中基于图像分割模型的杯盘比确定装置的另一个实施例示意图;
图8为本申请实施例中基于图像分割模型的杯盘比确定设备的一个实施例示意图。
具体实施方式
本申请实施例提供了一种杯盘比确定方法、装置、设备及存储介质,用于解决现有的对眼底图像进行图像分割的分割精度低,导致杯盘比准确率无法保证的技术问题。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四” 等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例中基于图像分割模型的杯盘比确定方法的一个实施例包括:
101、获取眼底图像,并对眼底图像进行视盘区域检测,得到眼底图像的视盘区域;
可以理解的是,本申请的执行主体可以为基于图像分割模型的杯盘比确定装置,还可以是终端或者服务器,具体此处不做限定。本申请实施例以服务器为执行主体为例进行说明。
需要强调的是,为保证数据的私密和安全性,上述数据库可以存储于一区块链的节点中。
在本实施例中,通过采集眼底图像的器械获取眼底图像,眼底就是眼球内后部的组织,即眼球的内膜——视网膜、视乳头、黄斑和视网膜中央动静脉,一般通过眼底摄像机进行拍摄得到眼底图像。
在本实施例中,对获取到的眼底图像进行视盘区域的检测,从而得到视盘区域。可以使用目标检测技术,MaskRCNN模型对眼底图像进行检测,得到视盘区域的左上角和右下角坐标,接下来根据矩形框坐标对眼底图像进行裁剪,得到视盘区域。
102、将视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;
在本实施例中,图像分割模型通过以下步骤训练得到:获取样本图像和样本图像对应的图像标签,并根据样本和图像标签构建样本数据,其中,图像标签包括分割标签和位置引导标签;将样本数据输入预设的神经网络中,得到网络预测结果;对样本图像和网络预测结果分别进行投影,分别得到样本投影值和分割投影值;计算样本图像和网络预测结果之间的位置偏差值;分别根据分割标签和网络预测结果计算分割损失函数,根据位置引导标签和位置偏差值计算位置损失函数,根据样本投影值和分割投影值计算投影损失函数;根据分割损失函数、位置损失函数和投影损失函数,计算总损失函数;根据总损失函数,对预设的神经网络进行迭代训练,得到图像分割模型。
在本实施例中,计算出总损失函数后,判断总损失函数的数值是否小于预设的函数阈值,若是,则停止进行模型训练,得到图像分割模型,若否,则通过反向传播的方式更新神经网络的网络参数,并重新将样本图像输入神经网络中进行模型训练,直到总损失函数的数值小于预设的函数阈值。
在本实施例中,计算损失函数之前,我们需要先分别计算网络预测结果和标签的投影值,利用Radon transform方法对网络预测结果和标签分别沿水平方向进行正投影。将分割分支的网络预测结果为y_pred,标签为y_true,对网络预测结果做正投影的值记为p_pred,标签做正投影的值记为p_true,位置引导分支的网络预测结果为l_pred,标签为l_true。网络的损失函数由三部分构成,用于位置回归的损失函数L_loc,用于图像分割的交叉熵损失函数L_seg和用于回归投影的投影损失函数L_proj。最终的损失函数表达式如下:
L=L seg+L proj+L loc
其中
L seg=-[y truelog y pred+(1-y true)log(1-y pred)]
L proj=||p true-p pred|| 2
L loc=||l true-l pred|| 2
在本实施例中,图像分割模型包括编码网络、解码网络和连接层,其中,所述解码网络包括位置校正网络和分割网络,将视盘区域输入图像分割模型的编码网络中提取图像特征,例如,编码可以使用mobilenetv2网络对视盘区域进行特征提取,进而得到视盘区域对应的第一特征图像。
103、将第一特征图输入解码网络中的位置校正网络,通过位置校正网络对第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
在本实施例中,空洞空间卷积池化金字塔(atrous spatial pyramid pooling(ASPP))对所给定的输入以不同采样率的空洞卷积并行采样,相当于以多个比例捕捉图像的上下文,位置校正网络通过ASPP算法对第一特征图像进行空洞空间金字塔池化,输出不同接受域大小的空间特征图,不同接受域大小的空间特征图串联起来,输入到深度学习网络中进行时间特征提取,能过预测位置校正方向。
104、通过解码网络中的分割网络对第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
在本实施例中,分割网络分别使用了cam(通道注意力模块,Channel Attention Module)和pam(位置注意力模块,Position Attention Module),每个high level特征的通道图都可以看作是一个特定于类的响应,cam通过挖掘通道图之间的相互依赖关系,可以突出相互依赖的特征图,提高特定语义的特征表示,pam则旨在利用任意两点特征之间的关联,来相互增强各自特征的表达。
105、通过连接层,将第二特征图和第三特征图进行拼接,得到图像分割结果;
在本实施例中,经过两个模块得到的特征图经过concatenate操作得到最终预测结果,为了避免提取特征信息有限的不足,借鉴于DenseNet的思想,选择的是concat拼接策略而非add相加策略,即设输入第二特征图为d(x),第三特征图是f(x),concat拼接得到的是[d(x)||f(x)]。
106、提取图像分割结果中的视盘外轮廓和视杯外轮廓,并根据视盘外轮廓和视杯外轮廓,计算得到视杯直径和视盘直径;
在本实施例中,可以采用寻找最大外轮廓的方法,从视杯视盘的分割图像中分别提取出视杯外轮廓和视盘外轮廓,然后再利用旋转卡尺算法分别对视杯外轮廓和视盘外轮廓求得最小外接矩形,得到视杯的最小外接矩形和视盘的最小外接矩形。视杯的最小外接矩形的垂直方向上的边长即是视杯直径(VCD),同样的,视盘的最小外接矩形的垂直方向上的边长即是视盘直径(VDD)。
107、根据视杯直径和视盘直径计算眼底图像的杯盘比。
在本实施例中,杯盘比(vertical cup to disc ratio,CDR)即视杯直径(vertical cup diameter,VCD)和视盘直径(vertical disc diameter,VDD)之比,通过前述得到的视杯直径(VCD)除以视盘直径(VDD)即可得到杯盘比(CDR)。
在本实施例中,通过获取眼底图像,并对眼底图像进行视盘区域检测,得到眼底图像的视盘区域;将视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;将第一特征图输入解码网络中的位置校正网络,通过位置校正网络对第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;通过解码网络中的分割网络对第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;通过连接层,将第二特征图和第三特征图进行拼接,得到图像分割结果;提取图像分割结果中的视盘外轮廓和视杯外轮廓,并根据视盘外轮廓和视杯外轮廓,计算得到视杯直径和视盘直径;根据视杯直径 和视盘直径计算眼底图像的杯盘比。本方法提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况。
请参阅图2,本申请实施例中基于图像分割模型的杯盘比确定方法的第二个实施例包括:
201、获取眼底图像,将眼底图像输入预设的视盘区域检测模型中,得到区域第一坐标点和区域第二坐标点;
在本实施例中,可以使用目标检测技术,MaskRCNN模型对眼底图像进行检测,通过MaskRCNN模型检测出眼底图像中的区域第一坐标点和区域第二坐标点,区域第一坐标点和区域第二坐标点为视盘区域的对角线上的两点,可以分别是左上角和右下角的两点,或是右上角和左下角的两点。
202、根据区域第一坐标点和区域第二坐标点,生成矩形区域;
203、根据矩形区域对眼底图像进行裁剪,得到眼底图像的视盘区域;
在本实施例中,通过对角线上的两点,可以确定矩形区域,例如,区域第一坐标点的坐标为(a,b),区域第二坐标点的坐标为(c,d),则矩形区域的四点的坐标分别为(a,b)、(c,b)、(c,d)和(a,d),将四点进行连接,即可得到矩形区域。
204、将视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;
205、将第一特征图输入解码网络中的位置校正网络,通过位置校正网络对第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
206、通过解码网络中的分割网络对第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
207、通过连接层,将第二特征图和第三特征图进行拼接,得到图像分割结果;
208、提取图像分割结果中的视盘外轮廓和视杯外轮廓,并根据视盘外轮廓和视杯外轮廓,计算得到视杯直径和视盘直径;
209、根据视杯直径和视盘直径计算眼底图像的杯盘比。
本实施例在上一实施例的基础上,详细描述了获取眼底图像,并对眼底图像进行视盘区域检测,得到眼底图像的视盘区域的过程,通过获取眼底图像,将所述眼底图像输入预设的视盘区域检测模型中,得到区域第一坐标点和区域第二坐标点;根据所述区域第一坐标点和区域第二坐标点,生成矩形区域;根据所述矩形区域对所述眼底图像进行裁剪,得到所述眼底图像的视盘区域。本实施例中通过预设的视盘区域检测模型检测进行视盘区域的检测,能够提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况。
请参阅图3,本申请实施例中基于图像分割模型的杯盘比确定方法的第三个实施例包括:
301、获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;
302、将所述视盘区域进行缩放处理,得到预设尺寸的缩放图像;
在本实施例中,在图像输入模型前需要对图像进行预处理,所述预处理包括伸缩处理,伸缩处理是为了将视盘区域的图像处理为特定的尺寸,例如可以是256*256,便于所述预设的神经网络对样本图像进行特征提取。
303、将所述缩放图像输入所述编码网络中的mobilenetv2网络中,通过mobilenetv2网络中的n层卷积层进行卷积处理,得到n个特征图;
304、将mobilenetv2网络中最后一个卷积层输出的特征图作为第一特征图;
305、将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
306、通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
307、通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;
308、提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;
309、根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
本实施例在前实施例的基础上,详细描述了将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图的过程,通过将所述视盘区域进行缩放处理,得到预设尺寸的缩放图像;将所述缩放图像输入所述编码网络中的mobilenetv2网络中,通过mobilenetv2网络中的n层卷积层进行卷积处理,得到n个特征图;将mobilenetv2网络中最后一个卷积层输出的特征图作为第一特征图。本实施例中在将图像输入编码网络前,对图像进行预处理,便于所述预设的神经网络对样本图像进行特征提取。
请参阅图4,本申请实施例中基于图像分割模型的杯盘比确定方法的第四个实施例包括:
401、获取眼底图像,并对眼底图像进行视盘区域检测,得到眼底图像的视盘区域;
402、将视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;
403、将第一特征图输入解码网络中的位置校正网络,通过aspp算法对输入的第一特征图进行空洞空间金字塔池化,提取第一特征图不同尺度的特征图空间信息;
404、对特征图空间信息进行全局平均池化转化,计算不同尺度的特征图空间信息的权重;
405、根据权重,将不同尺度的特征图空间信息进行融合,得到第二特征图;
在本实施例中,空洞空间卷积池化金字塔(atrous spatial pyramid pooling(ASPP))对所给定的输入以不同采样率的空洞卷积并行采样,相当于以多个比例捕捉图像的上下文,位置校正网络通过ASPP算法对第一特征图像进行空洞空间金字塔池化,输出不同接受域大小的空间特征图,不同接受域大小的空间特征图串联起来,输入到深度学习网络中进行时间特征提取,能过预测位置校正方向。
406、将第一特征图送入位置注意力子网络中的卷积层,产生三个特征映射;
407、将三个特征映射中的其中两个特征映射执行矩阵相乘,并使用softmax层计算矩阵相乘后的空间映射;
408、将三个特征映射中的剩余特征映射和空间映射转置执行矩阵相乘,并将矩阵相乘结果与第一特征图执行逐项素相加,得到位置特征子图;
首先将A送入到具有正则化和Relu层的卷积层,以此来产生两个特征映射B和C;将C转置和B执行矩阵相乘,使用softmax层计算空间attention的映射。
同时,将特征A送入到带有正则化和ReLU层的卷积来产生新的特征D,将D和S转置执行矩阵相乘;最后将得到的结果与A执行逐项素相加,得到最后的输出位置特征子图。
409、将第一特征图和第一特征图的转置执行矩阵相乘并使用softmax层计算矩阵相乘后的通道映射;
410、将通道映射与第一特征图执行矩阵相乘并矩阵相乘结果与第一特征图执行逐元素 相加,得到通道特征子图;
从原始的特征图A直接计算通道映射X;具体来说,将A和A的转置执行矩阵相乘操作;最后应用softmax层得到通道attention映射X;
除此之外,X的转置和A执行矩阵相乘;将得到的结果重新调整大小与A执行逐元素相加得到通道特征子图。
411、将位置特征子图和空间特征子图相加融合,得到第三特征图;
412、通过连接层,将第二特征图和第三特征图进行拼接,得到图像分割结果;
413、提取图像分割结果中的视盘外轮廓和视杯外轮廓,并根据视盘外轮廓和视杯外轮廓,计算得到视杯直径和视盘直径;
414、若损失函数值大于或等于预设阈值,则回到将最优特征子集作为模型输入样本进行初始基于图像分割模型的杯盘比确定模型的模型训练的步骤,直至损失函数值小于预设阈值;
415、根据视杯直径和视盘直径计算眼底图像的杯盘比。
本实施例在前实施例的基础上,详细说明了将第一特征图输入解码网络中的位置校正网络,通过位置校正网络对第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图和通过解码网络中的分割网络对第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图的过程。通过在解码网络中加入基于aspp算法的位置矫正模块,对图像进行位置矫正,提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况。
请参阅图5,本申请实施例中基于图像分割模型的杯盘比确定方法的第五个实施例包括:
501、获取眼底图像,并对眼底图像进行视盘区域检测,得到眼底图像的视盘区域;
502、将视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;
503、将第一特征图输入解码网络中的位置校正网络,通过位置校正网络对第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
504、通过解码网络中的分割网络对第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
505、通过连接层,将第二特征图和第三特征图进行拼接,得到图像分割结果;
506、采用OpenCV中的findcontours函数对图像分割结果进行轮廓识别,得到轮廓识别结果;
507、根据预设的视盘外轮廓和视杯外轮廓的轮廓级别,从轮廓识别结果中筛选出视盘外轮廓和视杯外轮廓;
在本实施例中,应用OpenCV中的findcontours函数对图像分割结果进行轮廓识别将得到不同的轮廓图像,实现设置视盘外轮廓和视杯外轮廓的轮廓级别分别为最大的轮廓图像和第二大的轮廓图像,即可从轮廓识别结果中筛选出视盘外轮廓和视杯外轮廓。
508、根据旋转卡尺算法,分别提取视盘外轮廓和视杯外轮廓的最小外接矩形;
在本实施例中,旋转卡尺算法通过取轮廓上坐标上两极值点构成平行线,旋转两线,当线与多边形一条边重合时,计算构成矩形面积,继续旋转,直至旋转角度超过90度,取最小面积的矩形作为最小外接矩形。
509、分别将视盘外轮廓和视杯外轮廓的最小外接矩形在垂直方向的边长作为视盘直径和视杯直径。
本实施例在前实施例的基础上,详细提取图像分割结果中的视盘外轮廓和视杯外轮廓, 并根据视盘外轮廓和视杯外轮廓,计算得到视杯直径和视盘直径的过程,通过采用OpenCV中的findcontours函数对图像分割结果进行轮廓识别,得到轮廓识别结果;根据预设的视盘外轮廓和视杯外轮廓的轮廓级别,从轮廓识别结果中筛选出视盘外轮廓和视杯外轮廓;根据旋转卡尺算法,分别提取视盘外轮廓和视杯外轮廓的最小外接矩形;分别将视盘外轮廓和视杯外轮廓的最小外接矩形在垂直方向的边长作为视盘直径和视杯直径。本方法通过OpenCV中的findcontours函数能够准确的进行轮廓识别,提高杯盘比的准确率,减少疾病筛查过程中的多筛、漏筛情况。
上面对本申请实施例中基于图像分割模型的杯盘比确定方法进行了描述,下面对本申请实施例中基于图像分割模型的杯盘比确定装置进行描述,请参阅图6,本申请实施例中基于图像分割模型的杯盘比确定装置一个实施例,其中所述图像分割模型包括编码网络、解码网络和连接层,所述解码网络包括位置校正网络和分割网络;基于图像分割模型的杯盘比确定装置一个实施例包括:
获取模块601,用于获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;
特诊提取模块602,用于将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;
池化模块603,用于将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
卷积模块604,用于通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
连接模块605,用于通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;
直径计算模块606,用于提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;
杯盘比计算模块607,用于根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
需要强调的是,为保证数据的私密和安全性,上述数据库可以存储于一区块链的节点中。
本申请实施例中,所述基于图像分割模型的杯盘比确定装置运行上述基于图像分割模型的杯盘比确定方法,所述基于图像分割模型的杯盘比确定装置通过获取眼底图像,并对眼底图像进行视盘区域检测,得到眼底图像的视盘区域;将视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;将第一特征图输入解码网络中的位置校正网络,通过位置校正网络对第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;通过解码网络中的分割网络对第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;通过连接层,将第二特征图和第三特征图进行拼接,得到图像分割结果;提取图像分割结果中的视盘外轮廓和视杯外轮廓,并根据视盘外轮廓和视杯外轮廓,计算得到视杯直径和视盘直径;根据视杯直径和视盘直径计算眼底图像的杯盘比。本方法提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况。
请参阅图7,本申请实施例中基于图像分割模型的杯盘比确定装置的第二个实施例,其中所述图像分割模型包括编码网络、解码网络和连接层,所述解码网络包括位置校正网络和分割网络;基于图像分割模型的杯盘比确定装置第二个实施例包括:
获取模块601,用于获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;
特诊提取模块602,用于将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;
池化模块603,用于将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
卷积模块604,用于通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
连接模块605,用于通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;
直径计算模块606,用于提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;
杯盘比计算模块607,用于根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
在本实施例中,所述获取模块601具体用于:获取眼底图像,将所述眼底图像输入预设的视盘区域检测模型中,得到区域第一坐标点和区域第二坐标点;根据所述区域第一坐标点和区域第二坐标点,生成矩形区域;根据所述矩形区域对所述眼底图像进行裁剪,得到所述眼底图像的视盘区域。
在本实施例中,所述编码网络为mobilenetv2网络,所述mobilenetv2网络包含n层卷积层,所述n为不小于1的自然数;所述特征提取模块602具体用于:将所述视盘区域进行缩放处理,得到预设尺寸的缩放图像;将所述缩放图像输入所述编码网络中的mobilenetv2网络中,通过mobilenetv2网络中的n层卷积层进行卷积处理,得到n个特征图;将mobilenetv2网络中最后一个卷积层输出的特征图作为第一特征图。
在本实施例中,所述位置校正网络为aspp网络,所述池化模块603具体用于:将所述第一特征图输入所述解码网络中的位置校正网络,通过所述aspp算法对输入的第一特征图进行空洞空间金字塔池化,提取所述第一特征图不同尺度的特征图空间信息;对所述特征图空间信息进行全局平均池化转化,计算不同尺度的特征图空间信息的权重;根据所述权重,将所述不同尺度的特征图空间信息进行融合,得到第二特征图。
在本实施例中,所述分割网络包括通道注意力子网络和位置注意力子网络;所述卷积模块604具体用于:将第一特征图送入位置注意力子网络中的卷积层,产生三个特征映射;将三个特征映射中的其中两个特征映射执行矩阵相乘,并使用softmax层计算矩阵相乘后的空间映射;将三个特征映射中的剩余特征映射和所述空间映射转置执行矩阵相乘,并将矩阵相乘结果与所述第一特征图执行逐项素相加,得到位置特征子图;将所述第一特征图和所述第一特征图的转置执行矩阵相乘并使用softmax层计算矩阵相乘后的通道映射;将所述通道映射与所述第一特征图执行矩阵相乘并矩阵相乘结果与所述第一特征图执行逐元素相加,得到通道特征子图;将所述位置特征子图和所述空间特征子图相加融合,得到第三特征图。
在本实施例中,所述直径计算模块606具体用于:采用OpenCV中的findcontours函数对所述图像分割结果进行轮廓识别,得到轮廓识别结果;根据预设的视盘外轮廓和视杯外轮廓的轮廓级别,从所述轮廓识别结果中筛选出视盘外轮廓和视杯外轮廓;根据旋转卡尺算法,分别提取所述视盘外轮廓和所述视杯外轮廓的最小外接矩形;分别将所述视盘外轮廓和所述视杯外轮廓的最小外接矩形在垂直方向的边长作为视盘直径和视杯直径。
在本实施例中,所述基于图像分割模型的杯盘比确定装置还包括模型训练模块608, 所述模训练模块608具体用于:获取样本图像和所述样本图像对应的图像标签,并根据所述样本和所述图像标签构建样本数据,其中,所述图像标签包括分割标签和位置引导标签;将所述样本数据输入预设的神经网络中,得到网络预测结果;对所述样本图像和所述网络预测结果分别进行投影,分别得到样本投影值和分割投影值;计算所述样本图像和所述网络预测结果之间的位置偏差值;分别根据所述分割标签和所述网络预测结果计算分割损失函数,根据所述位置引导标签和所述位置偏差值计算位置损失函数,根据所述样本投影值和所述分割投影值计算投影损失函数;根据所述分割损失函数、所述位置损失函数和所述投影损失函数,计算总损失函数;根据所述总损失函数,对所述预设的神经网络进行迭代训练,得到图像分割模型。
本实施例在上一实施例的基础上,详细描述了各个模块的具体功能以及部分模块的单元构成,通过新增的模块,提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况。
上面图6和图7从模块化功能实体的角度对本申请实施例中的中基于图像分割模型的杯盘比确定装置进行详细描述,下面从硬件处理的角度对本申请实施例中基于图像分割模型的杯盘比确定设备进行详细描述。
图8是本申请实施例提供的一种基于图像分割模型的杯盘比确定设备的结构示意图,该基于图像分割模型的杯盘比确定设备800可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)810(例如,一个或一个以上处理器)和存储器820,一个或一个以上存储应用程序833或数据832的存储介质830(例如一个或一个以上海量存储设备)。其中,存储器820和存储介质830可以是短暂存储或持久存储。存储在存储介质830的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对基于图像分割模型的杯盘比确定设备800中的一系列指令操作。更进一步地,处理器810可以设置为与存储介质830通信,在基于图像分割模型的杯盘比确定设备800上执行存储介质830中的一系列指令操作,以实现上述基于图像分割模型的杯盘比确定方法的步骤。
基于图像分割模型的杯盘比确定设备800还可以包括一个或一个以上电源840,一个或一个以上有线或无线网络接口850,一个或一个以上输入输出接口860,和/或,一个或一个以上操作系统831,例如Windows Serve,Mac OS X,Unix,Linux,FreeBSD等等。本领域技术人员可以理解,图8示出的基于图像分割模型的杯盘比确定设备结构并不构成对本申请提供的基于图像分割模型的杯盘比确定设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行所述基于图像分割模型的杯盘比确定方法的步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统或装置、单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围

Claims (20)

  1. 一种基于图像分割模型的杯盘比确定方法,其中,所述图像分割模型包括编码网络、解码网络和连接层,其中,所述解码网络包括位置校正网络和分割网络;
    所述基于图像分割模型的杯盘比确定方法包括:
    获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;
    将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;
    将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
    通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
    通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;
    提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;
    根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
  2. 根据权利要求1所述的基于图像分割模型的杯盘比确定方法,其中,所述获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域包括:
    获取眼底图像,将所述眼底图像输入预设的视盘区域检测模型中,得到区域第一坐标点和区域第二坐标点;
    根据所述区域第一坐标点和区域第二坐标点,生成矩形区域;
    根据所述矩形区域对所述眼底图像进行裁剪,得到所述眼底图像的视盘区域。
  3. 根据权利要求1所述基于图像分割模型的杯盘比确定方法,其中,所述编码网络为mobilenetv2网络,所述mobilenetv2网络包含n层卷积层,所述n为不小于1的自然数;
    所述将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图包括:
    将所述视盘区域进行缩放处理,得到预设尺寸的缩放图像;
    将所述缩放图像输入所述编码网络中的mobilenetv2网络中,通过mobilenetv2网络中的n层卷积层进行卷积处理,得到n个特征图;
    将mobilenetv2网络中最后一个卷积层输出的特征图作为第一特征图。
  4. 根据权利要求1所述的基于图像分割模型的杯盘比确定方法,其中,所述位置校正网络为aspp网络,所述将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图包括:
    将所述第一特征图输入所述解码网络中的位置校正网络,通过所述aspp算法对输入的第一特征图进行空洞空间金字塔池化,提取所述第一特征图不同尺度的特征图空间信息;
    对所述特征图空间信息进行全局平均池化转化,计算不同尺度的特征图空间信息的权重;
    根据所述权重,将所述不同尺度的特征图空间信息进行融合,得到第二特征图。
  5. 根据权利要求1所述的基于图像分割模型的杯盘比确定方法,其中,所述分割网络包括通道注意力子网络和位置注意力子网络;
    所述通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图包括:
    将第一特征图送入位置注意力子网络中的卷积层,产生三个特征映射;
    将三个特征映射中的其中两个特征映射执行矩阵相乘,并使用softmax层计算矩阵相 乘后的空间映射;
    将三个特征映射中的剩余特征映射和所述空间映射转置执行矩阵相乘,并将矩阵相乘结果与所述第一特征图执行逐项素相加,得到位置特征子图;
    将所述第一特征图和所述第一特征图的转置执行矩阵相乘并使用softmax层计算矩阵相乘后的通道映射;
    将所述通道映射与所述第一特征图执行矩阵相乘并矩阵相乘结果与所述第一特征图执行逐元素相加,得到通道特征子图;
    将所述位置特征子图和所述空间特征子图相加融合,得到第三特征图。
  6. 根据权利要求1-5中任一项所述的基于图像分割模型的杯盘比确定方法,其中,所述提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径包括:
    采用OpenCV中的findcontours函数对所述图像分割结果进行轮廓识别,得到轮廓识别结果;
    根据预设的视盘外轮廓和视杯外轮廓的轮廓级别,从所述轮廓识别结果中筛选出视盘外轮廓和视杯外轮廓;
    根据旋转卡尺算法,分别提取所述视盘外轮廓和所述视杯外轮廓的最小外接矩形;
    分别将所述视盘外轮廓和所述视杯外轮廓的最小外接矩形在垂直方向的边长作为视盘直径和视杯直径。
  7. 根据权利要求1-5中任一项所述的基于图像分割模型的杯盘比确定方法,其中,所述图像分割模型通过以下步骤训练得到:
    获取样本图像和所述样本图像对应的图像标签,并根据所述样本和所述图像标签构建样本数据,其中,所述图像标签包括分割标签和位置引导标签;
    将所述样本数据输入预设的神经网络中,得到网络预测结果;
    对所述样本图像和所述网络预测结果分别进行投影,分别得到样本投影值和分割投影值;
    计算所述样本图像和所述网络预测结果之间的位置偏差值;
    分别根据所述分割标签和所述网络预测结果计算分割损失函数,根据所述位置引导标签和所述位置偏差值计算位置损失函数,根据所述样本投影值和所述分割投影值计算投影损失函数;
    根据所述分割损失函数、所述位置损失函数和所述投影损失函数,计算总损失函数;
    根据所述总损失函数,对所述预设的神经网络进行迭代训练,得到图像分割模型。
  8. 一种基于图像分割模型的杯盘比确定设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述图像分割模型包括编码网络、解码网络和连接层,所述处理器执行所述计算机可读指令时实现如下步骤:获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
  9. 根据权利要求8所述的基于图像分割模型的杯盘比确定设备,其中,所述获取眼底 图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域包括:
    获取眼底图像,将所述眼底图像输入预设的视盘区域检测模型中,得到区域第一坐标点和区域第二坐标点;
    根据所述区域第一坐标点和区域第二坐标点,生成矩形区域;
    根据所述矩形区域对所述眼底图像进行裁剪,得到所述眼底图像的视盘区域。
  10. 根据权利要求8所述的基于图像分割模型的杯盘比确定设备,其中,所述编码网络为mobilenetv2网络,所述mobilenetv2网络包含n层卷积层,所述n为不小于1的自然数;
    所述将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图包括:
    将所述视盘区域进行缩放处理,得到预设尺寸的缩放图像;
    将所述缩放图像输入所述编码网络中的mobilenetv2网络中,通过mobilenetv2网络中的n层卷积层进行卷积处理,得到n个特征图;
    将mobilenetv2网络中最后一个卷积层输出的特征图作为第一特征图。
  11. 根据权利要求8所述的基于图像分割模型的杯盘比确定设备,其中,所述位置校正网络为aspp网络,所述将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图包括:
    将所述第一特征图输入所述解码网络中的位置校正网络,通过所述aspp算法对输入的第一特征图进行空洞空间金字塔池化,提取所述第一特征图不同尺度的特征图空间信息;
    对所述特征图空间信息进行全局平均池化转化,计算不同尺度的特征图空间信息的权重;
    根据所述权重,将所述不同尺度的特征图空间信息进行融合,得到第二特征图。
  12. 根据权利要求8所述的基于图像分割模型的杯盘比确定设备,其中,所述分割网络包括通道注意力子网络和位置注意力子网络;
    所述通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图包括:
    将第一特征图送入位置注意力子网络中的卷积层,产生三个特征映射;
    将三个特征映射中的其中两个特征映射执行矩阵相乘,并使用softmax层计算矩阵相乘后的空间映射;
    将三个特征映射中的剩余特征映射和所述空间映射转置执行矩阵相乘,并将矩阵相乘结果与所述第一特征图执行逐项素相加,得到位置特征子图;
    将所述第一特征图和所述第一特征图的转置执行矩阵相乘并使用softmax层计算矩阵相乘后的通道映射;
    将所述通道映射与所述第一特征图执行矩阵相乘并矩阵相乘结果与所述第一特征图执行逐元素相加,得到通道特征子图;
    将所述位置特征子图和所述空间特征子图相加融合,得到第三特征图。
  13. 根据权利要求8-12中任一项所述的基于图像分割模型的杯盘比确定设备,其中,所述提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径包括:
    采用OpenCV中的findcontours函数对所述图像分割结果进行轮廓识别,得到轮廓识别结果;
    根据预设的视盘外轮廓和视杯外轮廓的轮廓级别,从所述轮廓识别结果中筛选出视盘 外轮廓和视杯外轮廓;
    根据旋转卡尺算法,分别提取所述视盘外轮廓和所述视杯外轮廓的最小外接矩形;
    分别将所述视盘外轮廓和所述视杯外轮廓的最小外接矩形在垂直方向的边长作为视盘直径和视杯直径。
  14. 根据权利要求8-12中任一项所述的基于图像分割模型的杯盘比确定设备,其中,所述图像分割模型通过以下步骤训练得到:
    获取样本图像和所述样本图像对应的图像标签,并根据所述样本和所述图像标签构建样本数据,其中,所述图像标签包括分割标签和位置引导标签;
    将所述样本数据输入预设的神经网络中,得到网络预测结果;
    对所述样本图像和所述网络预测结果分别进行投影,分别得到样本投影值和分割投影值;
    计算所述样本图像和所述网络预测结果之间的位置偏差值;
    分别根据所述分割标签和所述网络预测结果计算分割损失函数,根据所述位置引导标签和所述位置偏差值计算位置损失函数,根据所述样本投影值和所述分割投影值计算投影损失函数;
    根据所述分割损失函数、所述位置损失函数和所述投影损失函数,计算总损失函数;
    根据所述总损失函数,对所述预设的神经网络进行迭代训练,得到图像分割模型。
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;
    将所述视盘区域输入图像分割模型的编码网络中提取图像特征,得到第一特征图;
    将所述第一特征图输入图像分割模型的解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
    通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
    通过图像分割模型的连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;
    提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;
    根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域包括:
    获取眼底图像,将所述眼底图像输入预设的视盘区域检测模型中,得到区域第一坐标点和区域第二坐标点;
    根据所述区域第一坐标点和区域第二坐标点,生成矩形区域;
    根据所述矩形区域对所述眼底图像进行裁剪,得到所述眼底图像的视盘区域。
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述编码网络为mobilenetv2网络,所述mobilenetv2网络包含n层卷积层,所述n为不小于1的自然数;
    所述将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图包括:
    将所述视盘区域进行缩放处理,得到预设尺寸的缩放图像;
    将所述缩放图像输入所述编码网络中的mobilenetv2网络中,通过mobilenetv2网络中的n层卷积层进行卷积处理,得到n个特征图;
    将mobilenetv2网络中最后一个卷积层输出的特征图作为第一特征图。
  18. 根据权利要求15所述的计算机可读存储介质,其中,所述位置校正网络为aspp网络,所述将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图包括:
    将所述第一特征图输入所述解码网络中的位置校正网络,通过所述aspp算法对输入的第一特征图进行空洞空间金字塔池化,提取所述第一特征图不同尺度的特征图空间信息;
    对所述特征图空间信息进行全局平均池化转化,计算不同尺度的特征图空间信息的权重;
    根据所述权重,将所述不同尺度的特征图空间信息进行融合,得到第二特征图。
  19. 根据权利要求15所述的计算机可读存储介质,其中,所述分割网络包括通道注意力子网络和位置注意力子网络;
    所述通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图包括:
    将第一特征图送入位置注意力子网络中的卷积层,产生三个特征映射;
    将三个特征映射中的其中两个特征映射执行矩阵相乘,并使用softmax层计算矩阵相乘后的空间映射;
    将三个特征映射中的剩余特征映射和所述空间映射转置执行矩阵相乘,并将矩阵相乘结果与所述第一特征图执行逐项素相加,得到位置特征子图;
    将所述第一特征图和所述第一特征图的转置执行矩阵相乘并使用softmax层计算矩阵相乘后的通道映射;
    将所述通道映射与所述第一特征图执行矩阵相乘并矩阵相乘结果与所述第一特征图执行逐元素相加,得到通道特征子图;
    将所述位置特征子图和所述空间特征子图相加融合,得到第三特征图。
  20. 一种基于图像分割模型的杯盘比确定装置,其中,所述图像分割模型包括编码网络、解码网络和连接层,其中,所述解码网络包括位置校正网络和分割网络;所述基于图像分割模型的杯盘比确定装置包括:
    获取模块,用于获取眼底图像,并对所述眼底图像进行视盘区域检测,得到所述眼底图像的视盘区域;
    特诊提取模块,用于将所述视盘区域输入所述图像分割模型的编码网络中提取图像特征,得到第一特征图;
    池化模块,用于将所述第一特征图输入所述解码网络中的位置校正网络,通过所述位置校正网络对所述第一特征图像进行空洞空间金字塔池化,得到位置校正后的第二特征图;
    卷积模块,用于通过所述解码网络中的分割网络对所述第一特征图进行卷积操作,得到代表视杯视盘分割图像的第三特征图;
    连接模块,用于通过所述连接层,将所述第二特征图和所述第三特征图进行拼接,得到图像分割结果;
    直径计算模块,用于提取所述图像分割结果中的视盘外轮廓和视杯外轮廓,并根据所述视盘外轮廓和所述视杯外轮廓,计算得到视杯直径和视盘直径;
    杯盘比计算模块,用于根据所述视杯直径和视盘直径计算所述眼底图像的杯盘比。
PCT/CN2022/071693 2021-08-25 2022-01-13 杯盘比确定方法、装置、设备及存储介质 WO2023024418A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110978322.3 2021-08-25
CN202110978322.3A CN113658165B (zh) 2021-08-25 2021-08-25 杯盘比确定方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023024418A1 true WO2023024418A1 (zh) 2023-03-02

Family

ID=78492779

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071693 WO2023024418A1 (zh) 2021-08-25 2022-01-13 杯盘比确定方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN113658165B (zh)
WO (1) WO2023024418A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117764985A (zh) * 2024-02-01 2024-03-26 江西师范大学 眼底图像分割模型训练方法、设备和青光眼辅助诊断系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113658165B (zh) * 2021-08-25 2023-06-20 平安科技(深圳)有限公司 杯盘比确定方法、装置、设备及存储介质
CN117011918B (zh) * 2023-08-08 2024-03-26 南京工程学院 基于线性注意力机制的人脸活体检测模型的构建方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340819A (zh) * 2020-02-10 2020-06-26 腾讯科技(深圳)有限公司 图像分割方法、装置和存储介质
CN111862187A (zh) * 2020-09-21 2020-10-30 平安科技(深圳)有限公司 基于神经网络的杯盘比确定方法、装置、设备及存储介质
CN112132265A (zh) * 2020-09-22 2020-12-25 平安科技(深圳)有限公司 模型训练方法、杯盘比确定方法、装置、设备及存储介质
US20210150281A1 (en) * 2019-11-14 2021-05-20 Nec Laboratories America, Inc. Domain adaptation for semantic segmentation via exploiting weak labels
CN113658165A (zh) * 2021-08-25 2021-11-16 平安科技(深圳)有限公司 杯盘比确定方法、装置、设备及存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11816870B2 (en) * 2019-08-01 2023-11-14 Boe Technology Group Co., Ltd. Image processing method and device, neural network and training method thereof, storage medium
CN111353980B (zh) * 2020-02-27 2022-05-17 浙江大学 基于深度学习的眼底荧光造影图像渗漏点检测方法
CN112884788B (zh) * 2021-03-08 2022-05-10 中南大学 基于丰富上下文网络的视杯视盘分割方法及成像方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210150281A1 (en) * 2019-11-14 2021-05-20 Nec Laboratories America, Inc. Domain adaptation for semantic segmentation via exploiting weak labels
CN111340819A (zh) * 2020-02-10 2020-06-26 腾讯科技(深圳)有限公司 图像分割方法、装置和存储介质
CN111862187A (zh) * 2020-09-21 2020-10-30 平安科技(深圳)有限公司 基于神经网络的杯盘比确定方法、装置、设备及存储介质
CN112132265A (zh) * 2020-09-22 2020-12-25 平安科技(深圳)有限公司 模型训练方法、杯盘比确定方法、装置、设备及存储介质
CN113658165A (zh) * 2021-08-25 2021-11-16 平安科技(深圳)有限公司 杯盘比确定方法、装置、设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GUO GUO FAN FAN, LI WEIQING, ZHAO XIN, ZOU BEIJI: "Glaucoma Screening Method Based on Semantic Feature Map Guidance", JOURNAL OF COMPUTER-AIDED DESIGN & COMPUTER GRAPHICS, GAI-KAN BIAN-WEI-HUI, BEIJING, CN, vol. 33, no. 3, 31 March 2021 (2021-03-31), CN , pages 363 - 375, XP009543808, ISSN: 1003-9775, DOI: 10.3724/SP.J.1089.2021.18474 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117764985A (zh) * 2024-02-01 2024-03-26 江西师范大学 眼底图像分割模型训练方法、设备和青光眼辅助诊断系统
CN117764985B (zh) * 2024-02-01 2024-05-14 江西师范大学 眼底图像分割模型训练方法、设备和青光眼辅助诊断系统

Also Published As

Publication number Publication date
CN113658165B (zh) 2023-06-20
CN113658165A (zh) 2021-11-16

Similar Documents

Publication Publication Date Title
WO2023024418A1 (zh) 杯盘比确定方法、装置、设备及存储介质
CN110662484B (zh) 用于全身测量结果提取的系统和方法
WO2020215672A1 (zh) 医学图像病灶检测定位方法、装置、设备及存储介质
WO2018188453A1 (zh) 人脸区域的确定方法、存储介质、计算机设备
US20180096457A1 (en) Methods and Software For Detecting Objects in Images Using a Multiscale Fast Region-Based Convolutional Neural Network
GB2581758A (en) Human hair style generation method based on multi-feature search and deformation
WO2022257408A1 (zh) 一种基于u型网络的医学图像分割方法
CN105934193A (zh) 宽场视网膜图像采集系统和方法
CN111046717A (zh) 眼底图像黄斑中心定位方法、装置、电子设备及存储介质
US20220157047A1 (en) Feature Point Detection
CN110458829B (zh) 基于人工智能的图像质控方法、装置、设备及存储介质
CN110111316B (zh) 基于眼部图像识别弱视的方法及系统
WO2022088665A1 (zh) 病灶分割方法、装置及存储介质
EP1820141A1 (en) Multiscale variable domain decomposition method and system for iris identification
JP2012160178A (ja) オブジェクト認識デバイス、オブジェクト認識を実施する方法および動的アピアランスモデルを実施する方法
CN108764342B (zh) 一种对于眼底图中视盘和视杯的语义分割方法
WO2021218238A1 (zh) 图像处理方法和图像处理装置
WO2021190656A1 (zh) 眼底图像黄斑中心定位方法及装置、服务器、存储介质
JP2009157767A (ja) 顔画像認識装置、顔画像認識方法、顔画像認識プログラムおよびそのプログラムを記録した記録媒体
WO2021174940A1 (zh) 人脸检测方法与系统
CN111598038A (zh) 脸部特征点检测方法、装置、设备及存储介质
CN117058676B (zh) 一种基于眼底检查影像的血管分割方法、装置和系统
CN111428070A (zh) 眼科案例的检索方法、装置、服务器及存储介质
CN111738992B (zh) 肺部病灶区域提取方法、装置、电子设备和存储介质
CN111428737B (zh) 眼科影像的实例检索方法、装置、服务器及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22859779

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE