WO2021189848A1 - 模型训练方法、杯盘比确定方法、装置、设备及存储介质 - Google Patents

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

Info

Publication number
WO2021189848A1
WO2021189848A1 PCT/CN2020/125008 CN2020125008W WO2021189848A1 WO 2021189848 A1 WO2021189848 A1 WO 2021189848A1 CN 2020125008 W CN2020125008 W CN 2020125008W WO 2021189848 A1 WO2021189848 A1 WO 2021189848A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
loss function
value
cup
projection
Prior art date
Application number
PCT/CN2020/125008
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 WO2021189848A1 publication Critical patent/WO2021189848A1/zh

Links

Images

Classifications

    • 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/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/003Reconstruction from projections, e.g. tomography
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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

Definitions

  • This application relates to the field of image processing, and in particular to a method for training a segmentation model of a cup and a disc, a method, a device, a device, and a storage medium for determining a cup-to-disk ratio based on a neural network.
  • Glaucoma is one of the three major blind ophthalmological diseases in the world. Its irreversibility leads to its early diagnosis and treatment which 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 segmentation method is used to segment the optic cup and the optic disk in the fundus image, and then the cup-to-disk ratio is calculated.
  • the inventor realizes that the existing segmentation method of the optic disc is usually a pixel-level segmentation method, and each pixel is judged separately, and the global expression of the optic disc is not considered, which easily leads to a large error in the calculated cup-to-disk ratio and accuracy. The degree is low, resulting in multiple sieves or leaking sieves.
  • the present application provides a method for training a segmentation model of an optic cup and a disc, the method including:
  • the value of the loss function and the value of the projection loss function are used to obtain the value of the network loss function, wherein the segmentation loss function is used to calculate the loss between the predicted segmented image of the optic disc and the corresponding image label.
  • the projection loss function is used to calculate the loss between the label projection value and the image projection value; the preset neural network is trained according to the value of the network loss function to obtain the cup disc segmentation model.
  • the present application also provides a method for determining a cup-to-disk ratio based on a neural network, and the method includes:
  • the present application also provides a device for training a segmentation model of the optic cup and disc, which includes:
  • the sample construction module is used to obtain the sample image and the image label corresponding to the sample image, so as to construct the sample data according to the sample image and the image label corresponding to the sample image;
  • the image prediction module is used to input the sample data A preset neural network to obtain the predicted cup disc segmentation image; an image projection module for respectively projecting the image label and the predicted cup disc segmentation image to obtain the label projection value corresponding to the image label And the predicted image projection value of the segmented image of the optic disc;
  • a loss calculation module for calculating the value of the segmentation loss function and the value of the projection loss function to obtain the value of the network loss function, wherein the segmentation loss function Is used to calculate the loss between the predicted cup disc segmentation image and the corresponding image label, and the projection loss function is used to calculate the loss between the label projection value and the image projection value;
  • a model training module It is used to train the preset neural network according to the value of the network loss function to obtain a segmentation model of the optic disc.
  • the present application also provides a device for determining the cup-to-tray ratio based on a neural network, the device comprising:
  • the image detection module is used to obtain the fundus image and perform optic disc area detection on the fundus image to obtain the optic disc area;
  • the network prediction module is used to input the optic disc area into the pre-trained optic disc segmentation model to obtain the optic disc
  • the optic disc segmentation image, the optic disc segmentation model is a model obtained by training using the optic disc segmentation model training method described in the first aspect;
  • the cup-to-disk ratio determination module is configured to determine the cup disc based on the optic disc segmentation image Compare.
  • the application also provides a computer device, the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and realizes when the computer program is executed The following steps:
  • the optic disc segmentation model being a model obtained by training using the aforementioned optic disc segmentation model training method
  • the cup-to-disk ratio is determined based on the segmented image of the cup-to-disk.
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the following steps:
  • the optic disc segmentation model being a model obtained by training using the aforementioned optic disc segmentation model training method
  • the cup-to-disk ratio is determined based on the segmented image of the cup-to-disk.
  • FIG. 1 is a schematic flowchart of a method for training a segmentation model of a cup and a disc according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a preset neural network provided by an embodiment of the present application.
  • Fig. 3a is a schematic diagram of projection provided by an embodiment of the present application.
  • FIG. 3b is a graph of projection values obtained after projection provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for determining a cup-to-disk ratio based on a neural network according to an embodiment of the present application
  • FIG. 5 is a schematic block diagram of a device for training a segmentation model of a cup and a disc according to an embodiment of the present application
  • FIG. 6 is a schematic block diagram of a device for determining a cup-to-disk ratio based on a neural network according to an embodiment of the present application
  • FIG. 7 is a schematic block diagram of the structure of a computer device provided by an embodiment of this application.
  • the embodiments of the present application provide a method for training a cup-to-disk segmentation model, a method, a device, a device, and a storage medium for determining a cup-to-disk ratio based on a neural network.
  • the cup-to-disk segmentation model training method is used to train to obtain a cup-to-disk segmentation model.
  • the cup-to-disk segmentation model can be stored in a terminal or a server.
  • the cup-to-disk segmentation model is used to realize the cup-to-disk ratio determination based on the neural network. method.
  • the neural network-based cup-to-disk ratio determination method uses artificial intelligence to segment the cup-to-disk image from the fundus image, which can be used to screen for glaucoma diseases and reduce the multiple screening and missed screening of glaucoma diseases.
  • the terminal can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and other electronic devices;
  • the server can be an independent server or a server cluster.
  • the optic disc segmentation model is obtained and saved in the desktop computer.
  • the fundus image of the patient is obtained by the instrument that collects the fundus image
  • the fundus image can be input into the trained optic cup
  • the cup optic disc segmentation image is obtained, so that the cup disc ratio can be calculated according to the obtained optic disc segmentation image, and the glaucoma disease screening can be performed.
  • FIG. 1 is a schematic flowchart of a method for training a segmentation model of a optic cup and a disc according to an embodiment of the present application.
  • the method for training the cup and disc segmentation model is based on a neural network to train the constructed sample data to obtain the cup and disc segmentation model.
  • the training method of the optic disc segmentation model of the optic cup specifically includes: step S101 to step S105.
  • the sample image can obtain the corresponding sample image from the image system.
  • the fundus image of the patient who has been screened for glaucoma can be retrieved from the medical database as the sample image.
  • the image label corresponding to the sample image is acquired, and the image label is the segmented image of the optic disc corresponding to the sample image. After obtaining the sample image and the image label corresponding to the sample image, the construction of the sample data can be completed.
  • the method for training the optic disc segmentation model includes: performing optic disc region detection on the sample image to obtain an optic disc region image; Constructing sample data according to the sample image and the image label corresponding to the sample image includes: constructing sample data according to the video disc area image and the image label corresponding to the video disc area image.
  • the sample image may be a fundus image or an image of the optic disc area.
  • the optic disc area can be detected on the sample image to obtain the optic disc area image, and finally according to the optic disc area image and the corresponding image label of the optic disc area image Construct sample data.
  • the MaskRCNN model can be used to detect the sample image, so as to obtain the boundary coordinates of the optic disc area image, and then the sample can be processed according to the boundary coordinates of the optic disc area image.
  • the image is cropped to obtain an image of the video disc area.
  • the sample data is input to the preset neural network for model training, so as to obtain the predicted segmented image of the optic cup and optic disc.
  • the preset neural network includes a feature extraction layer, a convolutional layer, and a decoding layer, as shown in FIG. 2, which is a schematic diagram of the structure of the preset neural network provided in an embodiment of the present application.
  • step S102 specifically includes: performing feature extraction on the sample image through the feature extraction layer to obtain a first feature image corresponding to the sample image; and performing convolution on the first feature image through the convolution layer.
  • Product operation to obtain a second feature image representing a segmented image of the cup and disc; and input the second feature image into the decoding layer to obtain a predicted segmented image of the cup and disc.
  • the feature extraction layer in the neural network is used to extract the features of the sample image.
  • the feature extraction layer can use the mobilenetv2 network to perform feature extraction on the sample image to obtain the first image corresponding to the sample image. Feature image.
  • the convolutional layer After obtaining the first feature image, the convolutional layer performs convolution and dilation convolution operations on the first feature image. For example, 1*1 convolution and dilation parameter 6 dilation convolution can be used to perform convolution operations to obtain a representative The second feature image of the segmented image of the optic disc.
  • the second feature image representing the segmented image of the cup and the disc is input to the decoding layer for decoding and output, and the predicted segmented image of the cup and disc is obtained.
  • the loss function of the decoding layer is the cross-entropy loss function.
  • the method for training the optic disc segmentation model before inputting the sample data into the preset neural network, includes: preprocessing the sample image, and the preprocessing includes scaling processing.
  • the scaling process is to process the image of the optical disc area into a specific size, for example, 256*256, which is convenient for the preset neural network to perform feature extraction on the sample image.
  • S103 Project the image label and the predicted segmented image of the cup and disc respectively to obtain the label projection value corresponding to the image label and the predicted image projection value of the segment of the cup and disc.
  • the predicted cup disc segmentation image and the image label corresponding to the sample image are respectively projected.
  • orthographic projection can be performed in the horizontal direction, as shown in Figure 3a, It is a schematic diagram during projection, in which the direction of the arrow indicates the projection direction, and the horizontal line where the arrow is located indicates the image label corresponding to each sample image.
  • Fig. 3b is a graph of the projection value obtained after projection, and the curves in Fig. 3b are the projection curve of the optic disc and the projection curve of the optic cup, respectively. Among them, the line with the higher peak is the projection curve of the optic cup, and the line with the lower peak is the projection curve of the optic disc.
  • S104 Calculate the value of the segmentation loss function and the value of the projection loss function respectively to obtain the value of the network loss function.
  • the segmentation loss function is the loss function when the preset neural network performs the prediction of the cup and disc segmentation image, and is used to calculate the loss between the predicted cup and disc segmentation image and the corresponding image label, so
  • the projection loss function is a loss function when the image label and the predicted segmented image of the optic disc are projected, and is used to calculate the loss between the label projection value and the image projection value.
  • the segmentation loss function may be a cross-entropy loss function.
  • the following calculation formula may be used for calculation:
  • L seg represents the value of the segmentation loss function
  • y pred represents the segmented image of the cup and optic disc predicted by the preset neural network based on the sample image
  • y true represents the image label corresponding to the sample image
  • the following formula when calculating the value of the projection loss function, the following formula may be used for calculation:
  • L proj represents the value of the projection loss function
  • p true represents the label projection value
  • p pred represents the image projection value. That is, the value of the projection loss function L proj is the second norm of the label projection value p true and the image projection value p pred , and the specific formula of the projection loss function is:
  • the network loss function L is:
  • the neural network is trained according to the value of the network loss function.
  • the value of the network loss function stabilizes or reaches the maximum number of iterations
  • the training of the preset neural network is completed, and the trained neural network is regarded as the visual
  • the cup optic disc segmentation model is used to segment the optic disc image from the fundus image.
  • the method for training the cup and disc segmentation model constructs sample data by obtaining sample images and image labels corresponding to the sample images, and inputs the sample data into a preset neural network to obtain predicted cup and disc segmentation images, and then Project the image label of the sample image and the predicted segmented image of the cup and disc respectively to obtain the label projection value corresponding to the image label and the predicted image projection value of the segmented image of the cup and disc, and finally calculate the segmentation loss function and projection loss respectively Function to obtain the network loss function, and to train the preset neural network according to the network loss function to obtain the optic disc segmentation model.
  • FIG. 4 is a schematic flowchart of a method for determining a cup-to-plate ratio based on a neural network provided by an embodiment of the present application.
  • the method for determining the cup-to-disk ratio based on the neural network can be applied to a terminal or a server to diagnose glaucoma based on fundus images.
  • the method for determining the cup-to-plate ratio based on the neural network includes steps S201 to S203.
  • the fundus image is acquired by the device that collects the fundus image, and the optic disc area is detected on the acquired fundus image, so as to obtain the optic disc area.
  • detecting the optic disc area on the fundus image to obtain the optic disc area includes: detecting the fundus image to obtain boundary coordinates of the optic disc area; and cropping the fundus image based on the boundary coordinates to obtain the optic disc area .
  • the MaskRCNN model can be used to detect the fundus image, so as to obtain the boundary coordinates of the optic disc area.
  • the boundary coordinates can refer to the two diagonal coordinates of the optic disc area.
  • Figure 3 it is a schematic diagram of the optic disc area in the fundus image.
  • the rectangular box is the optic disc area obtained by detecting the fundus image.
  • the boundary coordinates of the optic disc area It can be the coordinates of the upper left corner and the lower right corner of the rectangular box.
  • the fundus image is cropped based on the boundary coordinates to obtain an image of the optic disc area.
  • the fundus image can be cropped according to the coordinates of the upper left corner and the lower right corner of the rectangular frame to obtain the optic disc area as shown in Figure 4.
  • S202 Input the optic disc region into a pre-trained optic disc segmentation model to obtain a optic disc segmentation image of the optic disc.
  • the cup optic disc segmentation model is a model obtained by using the optic cup optic disc segmentation model training method provided in the foregoing embodiment. Through this model, the input optic disc area is detected and segmented to obtain an accurate segmented optic disc image.
  • S203 Determine a cup-to-disk ratio based on the segmented image of the cup-to-disk.
  • the cup-to-disk ratio is calculated based on the cup-to-disk segmentation image.
  • the determining the cup-to-disk ratio based on the segmented image of the cup and the disc includes: determining the outer contour of the cup and the outer contour of the optic disc based on the segmented image of the optic cup; The outer contour respectively determines the smallest circumscribed rectangle of the optic cup and the smallest circumscribed rectangle of the optic disc; the diameter of the optic cup and the optic disc are respectively determined based on the smallest circumscribed rectangle of the optic cup and the smallest circumscribed rectangle of the optic disc.
  • 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 image of the optic disc, and then use the rotating caliper algorithm to obtain the smallest outer rectangle of the outer contour of the optic cup and the outer contour of the optic disc.
  • the length of the side in the vertical direction of the smallest circumscribed rectangle of the optic cup is the diameter of the optic cup (VCD).
  • the length of the side in the vertical direction of the smallest circumscribed rectangle of the optic disc is the diameter of the optic disc (VDD).
  • the cup-disc ratio can be calculated according to the calculation formula of the cup-disc ratio.
  • the method for determining the cup-to-disc ratio based on the neural network obtains the optic disc area by acquiring a fundus image and detecting the optic disc area of the fundus image, and then inputting the optic disc area into a pre-trained optic disc segmentation model to obtain the optic disc Divide the image, and finally determine the cup-to-disk ratio based on the cup-to-disk segmented image.
  • the pre-trained cup-to-disk segmentation model is used to determine the cup-to-disk segmentation image, which improves the accuracy of the cup-to-disk segmentation image when determining the cup-to-disk ratio, and further improves the accuracy of the determined cup-to-disk ratio.
  • FIG. 5 is a schematic block diagram of a cup optic disc segmentation model training device provided by an embodiment of the present application.
  • the cup optic disc segmentation model training device is used to perform the aforementioned cup optic disc segmentation model training method.
  • the device for training the video cup and disc segmentation model can be configured in the server.
  • the server can be an independent server or a server cluster.
  • the terminal can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
  • the device 300 for training the segmentation model of the optic cup and disc includes: a sample construction module 301, an image prediction module 302, an image projection module 303, a loss calculation module 304 and a model training module 305.
  • the sample construction module 301 is configured to obtain a sample image and an image label corresponding to the sample image, so as to construct sample data according to the sample image and the image label corresponding to the sample image.
  • the image prediction module 302 is configured to input the sample data into a preset neural network to obtain a predicted segmented image of the optic disc.
  • the image projection module 303 is configured to respectively project the image label and the predicted cup disc segmented image to obtain the label projection value corresponding to the image label and the predicted image projection value of the cup disc segmented image.
  • the loss calculation module 304 is used to calculate the value of the segmentation loss function and the value of the projection loss function to obtain the value of the network loss function, wherein the segmentation loss function is used to calculate the predicted segmented image of the optic disc and the corresponding
  • the projection loss function is used to calculate the loss between the projection value of the label and the projection value of the image.
  • the model training module 305 is configured to train the preset neural network according to the value of the network loss function to obtain the optic disc segmentation model.
  • FIG. 6 is a schematic block diagram of a device for determining a cup-to-tray ratio based on a neural network according to an embodiment of the present application.
  • the device for determining a cup-to-tray ratio based on a neural network may be configured in a terminal or a server for Perform the aforementioned neural network-based cup-to-disc ratio determination method.
  • the device 400 for determining the cup-to-tray ratio based on a neural network includes an image detection module 401, a network prediction module 402, and a cup-to-tray ratio determining module 403.
  • the image detection module 401 is configured to obtain a fundus image and perform optic disc area detection on the fundus image to obtain the optic disc area;
  • the network prediction module 402 is configured to input the optic disc region into a pre-trained optic disc segmentation model to obtain a optic disc segmentation image, and the optic disc segmentation model is obtained by training using the aforementioned optic disc segmentation model training method Model;
  • the cup-to-disk ratio determining module 403 is configured to determine the cup-to-disk ratio based on the cup-to-disk segmented image.
  • the above-mentioned apparatus may be implemented in the form of a computer program, and the computer program may run on the computer device as shown in FIG. 7.
  • FIG. 7 is a schematic block diagram of the structure of a computer device provided by an embodiment of the present application.
  • the computer equipment can be a server or a terminal.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may be volatile or non-volatile.
  • the non-volatile storage medium can store an operating system and a computer program.
  • the computer program includes program instructions.
  • the processor can execute any method for training the cup and disc segmentation model or the method for determining the cup-to-disk ratio based on a neural network.
  • the processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
  • the internal memory provides an environment for the operation of the computer program in the non-volatile storage medium.
  • the processor can execute any method for training the cup and disk segmentation model or the cup-to-disk ratio based on the neural network. Determine the method.
  • the network interface is used for network communication, such as sending assigned tasks.
  • the network interface is used for network communication, such as sending assigned tasks.
  • FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • the processor is used to run a computer program stored in a memory to implement the following steps:
  • the value of the loss function and the value of the projection loss function are used to obtain the value of the network loss function, wherein the segmentation loss function is used to calculate the loss between the predicted segmented image of the optic disc and the corresponding image label.
  • the projection loss function is used to calculate the loss between the label projection value and the image projection value; the preset neural network is trained according to the value of the network loss function to obtain the cup disc segmentation model.
  • the processor when the processor implements the calculation of the value of the segmentation loss function and the value of the projection loss function separately, it is used to implement:
  • the segmentation loss function formula is used to calculate the value of the segmentation loss function; the segmentation loss function formula is:
  • L seg represents the value of the segmentation loss function
  • y pred represents the segmented image of the cup and optic disc predicted by the preset neural network based on the sample image
  • y true represents the image label corresponding to the sample image
  • the processor when the processor implements the calculation of the value of the segmentation loss function and the value of the projection loss function separately, it is used to implement:
  • the projection loss function formula is used to calculate the value of the projection loss function; the projection loss function formula is:
  • L proj represents the value of the projection loss function
  • p true represents the label projection value
  • p pred represents the image projection value
  • the preset neural network includes a feature extraction layer, a convolutional layer, and a decoding layer; the processor is implementing the input of the sample data into the preset neural network to obtain the predicted visual When the cup disc is segmented, it is used to achieve:
  • the processor before the input of the sample data into the preset neural network, the processor is used to implement:
  • the sample image is preprocessed, and the preprocessing includes scaling processing.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium may be volatile or non-volatile.
  • the computer-readable storage medium stores a computer program.
  • the computer program includes program instructions, and the processor executes the program instructions to implement any of the methods for training a cup-to-disk segmentation model or a method for determining a cup-to-disk ratio based on a neural network provided in the embodiments of the present application.
  • the computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, for example, the hard disk or memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD) ) Card, Flash Card, etc.
  • a plug-in hard disk equipped on the computer device such as a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD) ) Card, Flash Card, etc.
  • SD Secure Digital

Landscapes

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

Abstract

一种视杯视盘分割模型训练方法、基于神经网络的杯盘比确定方法、装置、设备及存储介质,所述视杯视盘分割模型训练方法包括:获取样本图像和所述样本图像对应的图像标签,以构建样本数据(S101);将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像(S102);对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值(S103);分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值(S104);根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型(S105)。该方法适用于智慧医疗领域。

Description

模型训练方法、杯盘比确定方法、装置、设备及存储介质
本申请要求于2020年9月22日提交中国专利局、申请号为CN2020110056598、名称为“模型训练方法、杯盘比确定方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理领域,尤其涉及一种视杯视盘分割模型训练方法、基于神经网络的杯盘比确定方法、装置、设备及存储介质。
背景技术
青光眼是一种全球三大致盲的眼科疾病之一,其不可逆性导致它的早期诊断和治疗对于提高患者的生活质量有至关重要的作用。在对青光眼进行自动筛查时,通常使用杯盘比作为评估指标,采用分割方法对眼底图像中的视杯和视盘进行分割,然后计算杯盘比。发明人意识到,现有的视盘分割方法通常是像素级别的分割方法,对每个像素分别进行判断,未考虑视杯视盘的全局表达,容易导致计算出的杯盘比的误差较大,准确度较低,产生多筛或漏筛的情况。
因此,如何提高分割得到的视杯视盘图像的准确度,减少疾病筛查过程中的多筛、漏筛情况成为亟待解决的问题。
发明内容
本申请提供了一种视杯视盘分割模型训练方法,所述方法包括:
获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
本申请还提供了一种基于神经网络的杯盘比确定方法,所述方法包括:
获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用第一方面所述的视杯视盘分割模型训练方法训练得到的模型;基于所述视杯视盘分割图像确定杯盘比。
本申请还提供了一种视杯视盘分割模型训练装置,所述装置包括:
样本构建模块,用于获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;图像预测模块,用于将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;图像投影模块,用于对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;损失计算模块,用于分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;模型训练模块,用于根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
本申请还提供了一种基于神经网络的杯盘比确定装置,所述装置包括:
图像检测模块,用于获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;网络预测模块,用于将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用第一方面所述的视杯视盘分割模型训练方法训练得到的模型;杯盘比确定模块,用于基于所述视杯视盘分割图像确定杯盘比。
本申请还提供了一种计算机设备,所述计算机设备包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:
获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;
将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;
对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;
分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;
根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型;或者
执行所述计算机程序时实现如下步骤:
获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;
将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用上述的视杯视盘分割模型训练方法训练得到的模型;
基于所述视杯视盘分割图像确定杯盘比。
本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下步骤:
获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;
将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;
对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;
分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;
根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型;或者
执行所述计算机程序时实现如下步骤:
获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;
将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用上述的视杯视盘分割模型训练方法训练得到的模型;
基于所述视杯视盘分割图像确定杯盘比。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种视杯视盘分割模型训练方法的示意流程图;
图2是本申请实施例提供的预设的神经网络的结构示意图;
图3a是本申请实施例提供的进行投影时的示意图;
图3b是本申请实施例提供的投影后得到的投影值的曲线图;
图4是本申请实施例提供的一种基于神经网络的杯盘比确定方法的示意流程图;
图5是本申请实施例提供的一种视杯视盘分割模型训练装置的示意性框图;
图6是本申请实施例提供的一种基于神经网络的杯盘比确定装置的示意性框图;
图7为本申请实施例提供的一种计算机设备的结构示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
本申请的实施例提供了一种视杯视盘分割模型训练方法、基于神经网络的杯盘比确定方法、装置、设备及存储介质。
其中,该视杯视盘分割模型训练方法用于训练得到视杯视盘分割模型,该视杯视盘分割模型可保存在终端或服务器中,通过该视杯视盘分割模型实现基于神经网络的杯盘比确定方法。
该基于神经网络的杯盘比确定方法利用人工智能从眼底图像中分割出视杯视盘图像,可用于筛查青光眼疾病,降低青光眼疾病的多筛、漏筛情况。
其中,终端可以是手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等电子设备;服务器可以为独立的服务器,也可以为服务器集群。
例如,根据视杯视盘分割模型训练方法训练得到视杯视盘分割模型,保存在台式电脑中,当使用采集眼底图像的器械获取到患者的眼底图像后,即可将该眼底图像输入训练的视杯视盘分割模型中,从而得到视杯视盘分割图像,以便于根据得到的视杯视盘分割图像计算杯盘比,进行青光眼疾病的筛查。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
请参阅图1,图1是本申请实施例提供的一种视杯视盘分割模型训练方法的示意流程图。该视杯视盘分割模型训练方法基于神经网络对构建的样本数据进行模型训练,以得到视杯视盘分割模型。
如图1所示,该视杯视盘分割模型训练方法,具体包括:步骤S101至步骤S105。
S101、获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据。
其中,样本图像可以从图像系统中获取相应的样本图像,例如,可以从医疗数据库中调取曾进行青光眼筛查的患者的眼底图像,作为样本图像。
在获取样本图像时,获取样本图像对应的图像标签,所述图像标签即为该样本图像对应的视杯视盘分割图像。在获取到样本图像和样本图像对应的图像标签后,即可完成样本数据的构建。
在一些实施例中,在将所述样本数据输入预设的神经网络之前,所述视杯视盘分割模型训练方法,包括:对所述样本图像进行视盘区域检测,以得到视盘区域图像;所述根据所述样本图像和所述样本图像对应的图像标签构建样本数据,包括:根据所述视盘区域图像和所述视盘区域图像对应的图像标签构建样本数据。
样本图像可能为眼底图像,也可能为视盘区域图像,当样本图像为眼底图像时,可以对样本图像进行视盘区域检测,从而得到视盘区域图像,最终根据视盘区域图像和视盘区域图像对应的图像标签构建样本数据。
其中,在对样本图像进行检测时,可以采用多种目标检测技术,例如,可以是采用MaskRCNN模型对样本图像进行检测,从而得到视盘区域图像的边界坐标,然后根据视盘区域图像的边界坐标对样本图像进行裁剪,得到视盘区域图像。
S102、将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像。
将样本数据输入至预设的神经网络进行模型训练,从而得到预测的视杯视盘分割图像。
在一些实施例中,预设的神经网络包括特征提取层、卷积层和解码层,如图2所示,图2是本申请实施例提供的预设的神经网络的结构示意图。
其中,步骤S102具体包括:通过所述特征提取层对所述样本图像进行特征提取,以得到所述样本图像对应的第一特征图像;通过所述卷积层对所述第一特征图像进行卷积操作,以得到代表视杯视盘分割图像的第二特征图像;将所述第二特征图像输入所述解码层,以得到预测的视杯视盘分割图像。
将样本图像输入预先训练的神经网络后,通过神经网络中的特征提取层对样本图像进行特征提取,例如,特征提取层可以使用mobilenetv2网络对样本图像进行特征提取,进而得到样本图像对应的第一特征图像。
得到第一特征图像后,卷积层对第一特征图像进行卷积和膨胀卷积操作,例如,可以使用1*1卷积和dilation参数为6的膨胀卷积进行卷积操作,进而得到代表视杯视盘分割图像的第二特征图像。
将代表视杯视盘分割图像的第二特征图像输入解码层进行解码输出,得到预测的视杯视盘分割图像。其中,解码层的损失函数为交叉熵损失函数。
在一些实施例中,在将所述样本数据输入预设的神经网络之前,所述视杯视盘分割模型训练方法,包括:对所述样本图像进行预处理,所述预处理包括伸缩处理。
伸缩处理是为了将视盘区域的图像处理为特定的尺寸,例如可以是256*256,便于所述预设的神经网络对样本图像进行特征提取。
S103、对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值。
在得到预测的视杯视盘分割图像后,将预测的视杯视盘分割图像和样本图像对应的图像标签分别进行投影,其中,在投影时,可以沿水平方向进行正投影,如图3a所示,为投影时的示意图,其中,箭头的指向表示投影方向,而箭头所在的横线表示各个样本图像对应的图像标签。
图3b为投影后得到的投影值的曲线图,图3b中的曲线分别为视盘的投影曲线和视杯的投影曲线。其中,峰值较高的线条为视杯的投影曲线,峰值较低的线条为视盘的投影曲线。
S104、分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值。
其中,所述分割损失函数为所述预设的神经网络进行视杯视盘分割图像预测时的损失函数,用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数为对所述图像标签和预测的视杯视盘分割图像进行投影时的损失函数,用于计算所述标签投影值和所述图像投影值之间的损失。
根据预测的视杯视盘分割图像和对应的图像标签计算分割损失函数的数值,并且根据标签投影值和图像投影值计算投影损失函数的数值,在计算得到分割损失函数的数值和投影损 失函数的数值后,将分割损失函数的数值与投影损失函数的数值相加求和,从而得到网络损失函数的数值。
在一些实施例中,在分割损失函数可以为交叉熵损失函数,在计算分割损失函数的数值时,可以采用如下计算公式进行计算:
L seg=-[y truelog y pred+(1-y true)log(1-y pred)]
其中,L seg表示分割损失函数的数值,y pred表示预设的神经网络根据样本图像预测出的视杯视盘分割图像,y true表示所述样本图像对应的图像标签。
在一些实施例中,在计算投影损失函数的数值时,可以采用如下公式进行计算:
L proj=||p true-p pred|| 2
其中,L proj表示投影损失函数的数值,p true表示标签投影值,p pred表示图像投影值。也即,投影损失函数的数值L proj为标签投影值p true和图像投影值p pred的二范数,投影损失函数的公式具体为:
Figure PCTCN2020125008-appb-000001
在分别计算得到分割损失函数L seg和投影损失函数L proj后,即可确定网络损失函数。其中,该网络损失函数L的公式为:
L=L seg+L proj
S105、根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
根据网络损失函数的数值对神经网络进行训练,在网络损失函数的数值趋于稳定或达到最大迭代次数时,完成对所述预设的神经网络的训练,并将完成训练后的神经网络作为视杯视盘分割模型,用于从眼底图像中分割出视杯视盘图像。
上述实施例提供的视杯视盘分割模型训练方法,通过获取样本图像和样本图像对应的图像标签以构建样本数据,并将样本数据输入预设的神经网络,得到预测的视杯视盘分割图像,然后对样本图像的图像标签和预测得到的视杯视盘分割图像分别进行投影,从而得到图像标签对应的标签投影值和预测的视杯视盘分割图像的图像投影值,最终分别计算分割损失函数和投影损失函数,以得到网络损失函数,以根据网络损失函数对预设的神经网络进行训练,得到视杯视盘分割模型。使用图像标签对应的标签投影值和预测的视杯视盘分割图像的图像投影值来对神经网络加以约束,可以优化视杯视盘沿垂直方向的分割结果,从而使得到的视杯视盘分割图像的准确度更高,进而提高确定的杯盘比的准确度,减少疾病筛查过程中的多筛、漏筛情况。
请参阅图4,图4是本申请实施例提供的一种基于神经网络的杯盘比确定方法的示意流程图。该基于神经网络的杯盘比确定方法,可应用于终端或服务器中,用于根据眼底图像进行青光眼的诊断。
如图4所示,该基于神经网络的杯盘比确定方法,包括步骤S201至步骤S203。
S201、获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域。
通过采集眼底图像的器械获取眼底图像,并对获取到的眼底图像进行视盘区域的检测,从而得到视盘区域。
在一些实施例中,对眼底图像进行视盘区域检测得到视盘区域,包括:对所述眼底图像进行检测,得到视盘区域的边界坐标;基于所述边界坐标对所述眼底图像进行裁剪,得到视盘区域。
在对眼底图像进行检测时,可以采用多种目标检测技术,例如,可以是采用MaskRCNN模型对眼底图像进行检测,从而得到视盘区域的边界坐标。其中,边界坐标可以是指视盘区域的两个对角坐标,如图3所示,为眼底图像中视盘区域的示意图,矩形框内为对眼底图像进行检测得到的视盘区域,视盘区域的边界坐标可以是矩形框的左上角与右下角坐标。
基于边界坐标对眼底图像进行裁剪,得到视盘区域的图像。在进行裁剪时,可根据矩形 框的左上角与右下角坐标对眼底图像进行裁剪,从而得到如图4所示的视盘区域。
S202、将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像。
其中,所述视杯视盘分割模型为采用上述实施例中提供的视杯视盘分割模型训练方法得到的模型。通过该模型对输入的视盘区域进行图像的检测和分割,从而得到准确的视杯视盘分割图像。
S203、基于所述视杯视盘分割图像确定杯盘比。
对于视杯视盘分割模型输出的视杯视盘分割图像,基于该视杯视盘分割图像计算杯盘比。
在一些实施例中,所述基于所述视杯视盘分割图像确定杯盘比,包括:基于所述视杯视盘分割图像确定视杯外轮廓和视盘外轮廓;根据所述视杯外轮廓和视盘外轮廓分别确定视杯的最小外接矩形和视盘的最小外接矩形;基于所述视杯的最小外接矩形和视盘的最小外接矩形分别确定视杯直径和视盘直径。
可以采用寻找最大外轮廓的方法,从视杯视盘分割图像中分别提取出视杯外轮廓和视盘外轮廓,然后再利用旋转卡尺算法分别对视杯外轮廓和视盘外轮廓求得最小外接矩形,得到视杯的最小外接矩形和视盘的最小外接矩形。视杯的最小外接矩形的垂直方向上的边长即是视杯直径(VCD),同样的,视盘的最小外接矩形的垂直方向上的边长即是视盘直径(VDD)。
在得到视杯直径和视盘直径后,即可根据杯盘比的计算公式计算杯盘比。其中,杯盘比的计算公式为:CDR=VCD/VDD,其中,CDR为计算出的杯盘比,VCD为视杯直径,VDD为视盘直径。
上述实施例提供的基于神经网络的杯盘比确定方法,通过获取眼底图像,并对眼底图像进行视盘区域检测得到视盘区域,然后将视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,最终基于视杯视盘分割图像确定杯盘比。利用预先训练的视杯视盘分割模型确定视杯视盘分割图像,提高视杯视盘分割图像在确定时的准确度,进而提高确定出的杯盘比的准确度。
请参阅图5,图5是本申请实施例提供的一种视杯视盘分割模型训练装置的示意性框图,该视杯视盘分割模型训练装置用于执行前述的视杯视盘分割模型训练方法。其中,该视杯视盘分割模型训练装置可以配置于服务器中。
其中,服务器可以为独立的服务器,也可以为服务器集群。该终端可以是手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等电子设备。
如图5所示,视杯视盘分割模型训练装置300包括:样本构建模块301、图像预测模块302、图像投影模块303、损失计算模块304和模型训练模块305。
样本构建模块301,用于获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据。
图像预测模块302,用于将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像。
图像投影模块303,用于对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值。
损失计算模块304,用于分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失。
模型训练模块305,用于根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
请参阅图6,图6是本申请实施例提供的一种基于神经网络的杯盘比确定装置的示意性框图,该基于神经网络的杯盘比确定装置可以配置于终端或服务器中,用于执行前述的基于神经网络的杯盘比确定方法。
如图6所示,该基于神经网络的杯盘比确定装置400,包括图像检测模块401、网络预 测模块402和杯盘比确定模块403。
图像检测模块401,用于获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;
网络预测模块402,用于将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用上述的视杯视盘分割模型训练方法训练得到的模型;
杯盘比确定模块403,用于基于所述视杯视盘分割图像确定杯盘比。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
上述的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图7所示的计算机设备上运行。
请参阅图7,图7是本申请实施例提供的一种计算机设备的结构示意性框图。该计算机设备可以是服务器或终端。
参阅图7,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口,其中,存储器可以是易失性的,也可以是非易失性的。
非易失性存储介质可存储操作系统和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行任意一种视杯视盘分割模型训练方法或基于神经网络的杯盘比确定方法。
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种视杯视盘分割模型训练方法或基于神经网络的杯盘比确定方法。
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
其中,在一个实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:
获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
在一个实施例中,所述处理器在实现所述分别计算分割损失函数的数值和投影损失函数的数值时,用于实现:
基于所述预测的视杯视盘分割图像和对应的图像标签,利用分割损失函数公式计算分割 损失函数的数值;所述分割损失函数公式为:
L seg=-[y truelog y pred+(1-y true)log(1-y pred)]
其中,L seg表示分割损失函数的数值,y pred表示预设的神经网络根据样本图像预测出的视杯视盘分割图像,y true表示所述样本图像对应的图像标签。
在一个实施例中,所述处理器在实现所述分别计算分割损失函数的数值和投影损失函数的数值时,用于实现:
基于所述标签投影值和所述图像投影值,利用投影损失函数公式计算投影损失函数的数值;所述投影损失函数公式为:
L proj=||p true-p pred|| 2
其中,L proj表示投影损失函数的数值,p true表示标签投影值,p pred表示图像投影值。
在一个实施例中,所述预设的神经网络包括特征提取层、卷积层和解码层;所述处理器在实现所述将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像时,用于实现:
通过所述特征提取层对所述样本图像进行特征提取,以得到所述样本图像对应的第一特征图像;通过所述卷积层对所述第一特征图像进行卷积操作,以得到代表视杯视盘分割图像的第二特征图像;将所述第二特征图像输入所述解码层,以得到预测的视杯视盘分割图像。
在一个实施例中,在所述将所述样本数据输入预设的神经网络之前,所述处理器用于实现:
对所述样本图像进行预处理,所述预处理包括伸缩处理。
本申请的实施例中还提供一种计算机可读存储介质,计算机可读存储介质可以是易失性的,也可以是非易失性的,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任一项视杯视盘分割模型训练方法或基于神经网络的杯盘比确定方法。
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种视杯视盘分割模型训练方法,其中,包括:
    获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;
    将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;
    对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;
    分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;
    根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
  2. 根据权利要求1所述的视杯视盘分割模型训练方法,其中,所述分别计算分割损失函数的数值和投影损失函数的数值,包括:
    基于所述预测的视杯视盘分割图像和对应的图像标签,利用分割损失函数公式计算分割损失函数的数值;
    所述分割损失函数公式为:
    L seg=-[y truelog y pred+(1-y true)log(1-y pred)]
    其中,L seg表示分割损失函数的数值,y pred表示预设的神经网络根据样本图像预测出的视杯视盘分割图像,y true表示所述样本图像对应的图像标签。
  3. 根据权利要求1所述的视杯视盘分割模型训练方法,其中,所述分别计算分割损失函数的数值和投影损失函数的数值,包括:
    基于所述标签投影值和所述图像投影值,利用投影损失函数公式计算投影损失函数的数值;
    所述投影损失函数公式为:
    L proj=||p true-p pred|| 2
    其中,L proj表示投影损失函数的数值,p true表示标签投影值,p pred表示图像投影值。
  4. 根据权利要求1所述的视杯视盘分割模型训练方法,其中,所述预设的神经网络包括特征提取层、卷积层和解码层;所述将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像,包括:
    通过所述特征提取层对所述样本图像进行特征提取,以得到所述样本图像对应的第一特征图像;
    通过所述卷积层对所述第一特征图像进行卷积操作,以得到代表视杯视盘分割图像的第二特征图像;
    将所述第二特征图像输入所述解码层,以得到预测的视杯视盘分割图像。
  5. 根据权利要求1所述的视杯视盘分割模型训练方法,其中,在所述将所述样本数据输入预设的神经网络之前,所述方法包括:
    对所述样本图像进行预处理,所述预处理包括伸缩处理。
  6. 一种基于神经网络的杯盘比确定方法,其中,包括:
    获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;
    将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用权利要求1至5中任一项所述的视杯视盘分割模型训练方法训练得到的模型;
    基于所述视杯视盘分割图像确定杯盘比。
  7. 一种视杯视盘分割模型训练装置,其中,包括:
    样本构建模块,用于获取样本图像和所述样本图像对应的图像标签,以根据所述样本图 像和所述样本图像对应的图像标签构建样本数据;
    图像预测模块,用于将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;
    图像投影模块,用于对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;
    损失计算模块,用于分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;
    模型训练模块,用于根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
  8. 一种基于神经网络的杯盘比确定装置,其中,包括:
    图像检测模块,用于获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;
    网络预测模块,用于将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用权利要求1至5中任一项所述的视杯视盘分割模型训练方法训练得到的模型;
    杯盘比确定模块,用于基于所述视杯视盘分割图像确定杯盘比。
  9. 一种计算机设备,其中,所述计算机设备包括存储器和处理器;
    所述存储器用于存储计算机程序;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:
    获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;
    将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;
    对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;
    分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;
    根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
  10. 根据权利要求9所述的计算机设备,其中,所述分别计算分割损失函数的数值和投影损失函数的数值,包括:
    基于所述预测的视杯视盘分割图像和对应的图像标签,利用分割损失函数公式计算分割损失函数的数值;
    所述分割损失函数公式为:
    L seg=-[y truelog y pred+(1-y true)log(1-y pred)]
    其中,L seg表示分割损失函数的数值,y pred表示预设的神经网络根据样本图像预测出的视杯视盘分割图像,y true表示所述样本图像对应的图像标签。
  11. 根据权利要求9所述的计算机设备,其中,所述分别计算分割损失函数的数值和投影损失函数的数值,包括:
    基于所述标签投影值和所述图像投影值,利用投影损失函数公式计算投影损失函数的数值;
    所述投影损失函数公式为:
    L proj=||p true-p pred|| 2
    其中,L proj表示投影损失函数的数值,p true表示标签投影值,p pred表示图像投影值。
  12. 根据权利要求9所述的计算机设备,其中,所述预设的神经网络包括特征提取层、卷积层和解码层;所述将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像,包括:
    通过所述特征提取层对所述样本图像进行特征提取,以得到所述样本图像对应的第一特征图像;
    通过所述卷积层对所述第一特征图像进行卷积操作,以得到代表视杯视盘分割图像的第二特征图像;
    将所述第二特征图像输入所述解码层,以得到预测的视杯视盘分割图像。
  13. 根据权利要求9所述的计算机设备,其中,在所述将所述样本数据输入预设的神经网络之前,还实现以下步骤:
    对所述样本图像进行预处理,所述预处理包括伸缩处理。
  14. 一种计算机设备,其中,所述计算机设备包括存储器和处理器;
    所述存储器用于存储计算机程序;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:
    获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;
    将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用权利要求1至5中任一项所述的视杯视盘分割模型训练方法训练得到的模型;
    基于所述视杯视盘分割图像确定杯盘比。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下步骤:
    获取样本图像和所述样本图像对应的图像标签,以根据所述样本图像和所述样本图像对应的图像标签构建样本数据;
    将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像;
    对所述图像标签和预测的视杯视盘分割图像分别进行投影,以得到所述图像标签对应的标签投影值和所述预测的视杯视盘分割图像的图像投影值;
    分别计算分割损失函数的数值和投影损失函数的数值,以得到网络损失函数的数值,其中,所述分割损失函数用于计算所述预测的视杯视盘分割图像和对应的图像标签之间的损失,所述投影损失函数用于计算所述标签投影值和所述图像投影值之间的损失;
    根据所述网络损失函数的数值对所述预设的神经网络进行训练,以得到视杯视盘分割模型。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述分别计算分割损失函数的数值和投影损失函数的数值,包括:
    基于所述预测的视杯视盘分割图像和对应的图像标签,利用分割损失函数公式计算分割损失函数的数值;
    所述分割损失函数公式为:
    L seg=-[y truelog y pred+(1-y true)log(1-y pred)]
    其中,L seg表示分割损失函数的数值,y pred表示预设的神经网络根据样本图像预测出的视杯视盘分割图像,y true表示所述样本图像对应的图像标签。
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述分别计算分割损失函数的数值和投影损失函数的数值,包括:
    基于所述标签投影值和所述图像投影值,利用投影损失函数公式计算投影损失函数的数值;
    所述投影损失函数公式为:
    L proj=||p true-p pred|| 2
    其中,L proj表示投影损失函数的数值,p true表示标签投影值,p pred表示图像投影值。
  18. 根据权利要求15所述的计算机可读存储介质,其中,所述预设的神经网络包括特征提取层、卷积层和解码层;所述将所述样本数据输入预设的神经网络,以得到预测的视杯视盘分割图像,包括:
    通过所述特征提取层对所述样本图像进行特征提取,以得到所述样本图像对应的第一特征图像;
    通过所述卷积层对所述第一特征图像进行卷积操作,以得到代表视杯视盘分割图像的第二特征图像;
    将所述第二特征图像输入所述解码层,以得到预测的视杯视盘分割图像。
  19. 根据权利要求15所述的计算机可读存储介质,其中,在所述将所述样本数据输入预设的神经网络之前,还实现以下步骤:
    对所述样本图像进行预处理,所述预处理包括伸缩处理。
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下步骤:
    获取眼底图像,并对所述眼底图像进行视盘区域检测,以得到视盘区域;
    将所述视盘区域输入预先训练的视杯视盘分割模型,得到视杯视盘分割图像,所述视杯视盘分割模型为采用权利要求1至5中任一项所述的视杯视盘分割模型训练方法训练得到的模型;
    基于所述视杯视盘分割图像确定杯盘比。
PCT/CN2020/125008 2020-09-22 2020-10-30 模型训练方法、杯盘比确定方法、装置、设备及存储介质 WO2021189848A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011005659.8 2020-09-22
CN202011005659.8A CN112132265B (zh) 2020-09-22 2020-09-22 模型训练方法、杯盘比确定方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021189848A1 true WO2021189848A1 (zh) 2021-09-30

Family

ID=73842490

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125008 WO2021189848A1 (zh) 2020-09-22 2020-10-30 模型训练方法、杯盘比确定方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN112132265B (zh)
WO (1) WO2021189848A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115587629A (zh) * 2022-12-07 2023-01-10 中国科学院上海高等研究院 协方差膨胀系数估计方法、模型训练方法、存储介质终端
CN115601751A (zh) * 2022-10-31 2023-01-13 中国人民解放军国防科技大学(Cn) 一种基于领域泛化的眼底图像语义分割方法
CN116385725A (zh) * 2023-06-02 2023-07-04 杭州聚秀科技有限公司 眼底图像视盘视杯分割方法及装置、电子设备
CN116680620A (zh) * 2023-07-28 2023-09-01 克拉玛依市紫光技术有限公司 一种压裂用防乳化剂的制备方法及其系统

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 平安科技(深圳)有限公司 杯盘比确定方法、装置、设备及存储介质
CN115689923A (zh) * 2022-10-27 2023-02-03 佛山读图科技有限公司 低剂量ct图像降噪系统与降噪方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170156588A1 (en) * 2015-12-02 2017-06-08 Novartis Ag Location Indicator for Optical Coherence Tomography in Ophthalmic Visualization
CN107704886A (zh) * 2017-10-20 2018-02-16 北京工业大学 一种基于深度卷积神经网络的医疗图像分级系统和方法
CN108520522A (zh) * 2017-12-31 2018-09-11 南京航空航天大学 基于深度全卷积神经网络的视网膜眼底图像分割方法
CN109829877A (zh) * 2018-09-20 2019-05-31 中南大学 一种视网膜眼底图像杯盘比自动评估方法
CN110992382A (zh) * 2019-12-30 2020-04-10 四川大学 用于辅助青光眼筛查的眼底图像视杯视盘分割方法及系统
CN111476771A (zh) * 2020-04-03 2020-07-31 中山大学 一种基于距离对抗生成网络的领域自适应方法及系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10368734B2 (en) * 2015-02-19 2019-08-06 Carl Zeiss Meditec, Inc. Methods and systems for combined morphological and angiographic analyses of retinal features

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170156588A1 (en) * 2015-12-02 2017-06-08 Novartis Ag Location Indicator for Optical Coherence Tomography in Ophthalmic Visualization
CN107704886A (zh) * 2017-10-20 2018-02-16 北京工业大学 一种基于深度卷积神经网络的医疗图像分级系统和方法
CN108520522A (zh) * 2017-12-31 2018-09-11 南京航空航天大学 基于深度全卷积神经网络的视网膜眼底图像分割方法
CN109829877A (zh) * 2018-09-20 2019-05-31 中南大学 一种视网膜眼底图像杯盘比自动评估方法
CN110992382A (zh) * 2019-12-30 2020-04-10 四川大学 用于辅助青光眼筛查的眼底图像视杯视盘分割方法及系统
CN111476771A (zh) * 2020-04-03 2020-07-31 中山大学 一种基于距离对抗生成网络的领域自适应方法及系统

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115601751A (zh) * 2022-10-31 2023-01-13 中国人民解放军国防科技大学(Cn) 一种基于领域泛化的眼底图像语义分割方法
CN115601751B (zh) * 2022-10-31 2023-04-28 中国人民解放军国防科技大学 一种基于领域泛化的眼底图像语义分割方法
CN115587629A (zh) * 2022-12-07 2023-01-10 中国科学院上海高等研究院 协方差膨胀系数估计方法、模型训练方法、存储介质终端
CN115587629B (zh) * 2022-12-07 2023-04-07 中国科学院上海高等研究院 协方差膨胀系数估计方法、模型训练方法、存储介质终端
CN116385725A (zh) * 2023-06-02 2023-07-04 杭州聚秀科技有限公司 眼底图像视盘视杯分割方法及装置、电子设备
CN116385725B (zh) * 2023-06-02 2023-09-08 杭州聚秀科技有限公司 眼底图像视盘视杯分割方法及装置、电子设备
CN116680620A (zh) * 2023-07-28 2023-09-01 克拉玛依市紫光技术有限公司 一种压裂用防乳化剂的制备方法及其系统
CN116680620B (zh) * 2023-07-28 2023-10-27 克拉玛依市紫光技术有限公司 一种压裂用防乳化剂的制备方法及其系统

Also Published As

Publication number Publication date
CN112132265A (zh) 2020-12-25
CN112132265B (zh) 2024-05-07

Similar Documents

Publication Publication Date Title
WO2021189848A1 (zh) 模型训练方法、杯盘比确定方法、装置、设备及存储介质
CN110232719B (zh) 一种医学图像的分类方法、模型训练方法和服务器
WO2021189912A1 (zh) 图像中目标物的检测方法、装置、电子设备及存储介质
WO2022151755A1 (zh) 目标检测方法及装置、电子设备、存储介质、计算机程序产品和计算机程序
WO2021189849A1 (zh) 基于神经网络的杯盘比确定方法、装置、设备及存储介质
WO2020228570A1 (zh) 乳腺钼靶图像处理方法、装置、系统及介质
WO2018108129A1 (zh) 用于识别物体类别的方法及装置、电子设备
CN110826519A (zh) 人脸遮挡检测方法、装置、计算机设备及存储介质
WO2019037676A1 (zh) 图像处理方法及装置
CN109308488B (zh) 乳腺超声图像处理装置、方法、计算机设备及存储介质
EP3979194A1 (en) Image state determination method and device, apparatus, system, and computer storage medium
WO2021259391A2 (zh) 图像处理方法及装置、电子设备和存储介质
US11501431B2 (en) Image processing method and apparatus and neural network model training method
CN109191451B (zh) 异常检测方法、装置、设备和介质
WO2021232320A1 (zh) 超声图像处理方法、系统及计算机可读存储介质
WO2021136368A1 (zh) 钼靶图像中胸大肌区域自动检测方法及装置
US8649578B2 (en) Method and system for defining a breast window
CN113780201B (zh) 手部图像的处理方法及装置、设备和介质
WO2022121170A1 (zh) 图像处理方法及装置、电子设备、存储介质和程序
WO2021189911A1 (zh) 基于视频流的目标物位置检测方法、装置、设备及介质
CN112465834A (zh) 一种血管分割方法及装置
CN110021021B (zh) 头部图像分析装置及图像分析方法
CN111882544B (zh) 基于人工智能的医学影像显示方法及相关装置
WO2024125217A1 (zh) 一种光斑追踪方法、装置、电子设备及存储介质
WO2020168647A1 (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: 20927075

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20927075

Country of ref document: EP

Kind code of ref document: A1