HK40018665B - Method, apparatus, and medical system for processing image of digestive tract - Google Patents
Method, apparatus, and medical system for processing image of digestive tract Download PDFInfo
- Publication number
- HK40018665B HK40018665B HK42020008608.0A HK42020008608A HK40018665B HK 40018665 B HK40018665 B HK 40018665B HK 42020008608 A HK42020008608 A HK 42020008608A HK 40018665 B HK40018665 B HK 40018665B
- Authority
- HK
- Hong Kong
- Prior art keywords
- digestive tract
- image
- lesion
- model
- images
- Prior art date
Links
Description
技术领域Technical Field
本申请涉及人工智能技术领域,尤其涉及一种消化道影像的处理方法、装置、以及医疗系统。This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, and medical system for processing digestive tract images.
背景技术Background Technology
随着人工智能的不断发展,人工智能被逐渐应用到医疗影像处理中,通过人工智能辅助医生进行诊断,以提高医生诊断速度和准确度。With the continuous development of artificial intelligence, it is gradually being applied to medical image processing, using AI to assist doctors in diagnosis, thereby improving the speed and accuracy of diagnosis.
目前,一般是通过大量标注息肉位置的医疗影像样本,训练目标检测模型,利用训练好的目标检测模型,提取待处理医疗影像样本中的息肉特征,根据确定出的息肉特征,在待处理医疗影像样本确定出的息肉处标注对应的矩形框。Currently, the general approach is to train a target detection model using a large number of medical image samples with labeled polyp locations, then use the trained target detection model to extract polyp features from the medical image samples to be processed, and finally mark the corresponding bounding boxes at the polyp locations in the medical image samples to be processed based on the identified polyp features.
但是这种方式只能对特征明显的息肉进行识别,识别病灶类型的准确性较低。However, this method can only identify polyps with obvious characteristics, and the accuracy of identifying lesion types is low.
发明内容Summary of the Invention
本申请实施例提供一种消化道影像的处理方法、装置、以及医疗系统,用于提高识别病灶类型的准确率。This application provides a method, apparatus, and medical system for processing digestive tract images to improve the accuracy of identifying lesion types.
第一方面,提供一种消化道影像的处理方法,包括:Firstly, a method for processing digestive tract images is provided, comprising:
获取待处理的消化道影像;Acquire images of the digestive tract to be processed;
获得所述消化道影像中各个病灶像素点的病灶类别;Obtain the lesion category of each lesion pixel in the digestive tract image;
根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别的消化道分割影像;其中,病灶区域是由相同病灶类别的病灶像素点形成的,病灶区域的病灶类别为形成该病灶区域的像素点的病灶类别。Based on the lesion categories of each lesion pixel, a segmented image of the digestive tract is obtained, which is labeled with the lesion region and the lesion category. The lesion region is formed by lesion pixels of the same lesion category, and the lesion category of the lesion region is the lesion category of the pixels that form the lesion region.
第二方面,提供一种消化道影像的处理装置,所述处理装置,包括:Secondly, a processing apparatus for digestive tract images is provided, the processing apparatus comprising:
获取单元,用于获取待处理的消化道影像;Acquisition unit, used to acquire images of the digestive tract to be processed;
识别单元,用于通过已训练的消化道影像分割模型,获得所述消化道影像中各个病灶像素点的病灶类别,所述消化道影像分割模型是根据标识有病灶区域和病灶类别的消化道影像样本训练得到的;The identification unit is used to obtain the lesion category of each lesion pixel in the digestive tract image through a trained digestive tract image segmentation model. The digestive tract image segmentation model is trained based on digestive tract image samples that are labeled with lesion regions and lesion categories.
分割单元,用于根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别的消化道分割影像;其中,病灶区域是由相同病灶类别的病灶像素点形成的,病灶区域的病灶类别为形成该病灶区域的像素点的病灶类别。The segmentation unit is used to obtain a segmented image of the digestive tract that is labeled with lesion regions and lesion categories based on the lesion categories of each lesion pixel. The lesion region is formed by lesion pixels of the same lesion category, and the lesion category of the lesion region is the lesion category of the pixels that form the lesion region.
在一种可能的实施方式中,所述处理装置包括生成单元,其中:In one possible implementation, the processing apparatus includes a generation unit, wherein:
所述生成单元,用于在根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别消化道分割影像之后,将消化道分割影像叠加至所述消化道影像中,生成包括确定出的病灶区域和病灶类别的消化道影像。The generation unit is used to, after obtaining a digestive tract segmentation image with lesion regions and lesion categories identified according to the lesion categories of each lesion pixel, superimpose the digestive tract segmentation image onto the digestive tract image to generate a digestive tract image including the identified lesion regions and lesion categories.
在一种可能的实施方式中,所述处理装置包括第一确定单元和标记单元,其中:In one possible implementation, the processing device includes a first determining unit and a marking unit, wherein:
所述第一确定单元,用于在根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别消化道分割影像之后,确定所述消化道分割影像与针对所述消化道影像前后预设个消化道影像的消化道分割影像中每个消化道分割影像的交叠率,以及根据确定出的交叠率,确定所述消化道分割影像的可信度;The first determining unit is used to determine the overlap rate of the digestive tract segmentation image with each digestive tract segmentation image in a preset number of digestive tract images before and after the digestive tract image is obtained according to the lesion category of each lesion pixel, and to determine the reliability of the digestive tract segmentation image based on the determined overlap rate.
所述标记单元,用于在所述消化道分割影像上标记确定出的可信度。The marking unit is used to mark the determined confidence level on the segmented image of the digestive tract.
在一种可能的实施方式中,所述处理装置还包括训练单元,消化道影像样本集包括训练集、验证集和测试集,消化道影像样本集中各个消化道影像样本标注有病灶区域和病灶类别,所述训练单元用于:In one possible implementation, the processing device further includes a training unit. The gastrointestinal image sample set includes a training set, a validation set, and a test set. Each gastrointestinal image sample in the gastrointestinal image sample set is labeled with a lesion region and a lesion category. The training unit is used for:
根据所述训练集中的消化道影像样本,训练消化道影像分割模型;A digestive tract image segmentation model is trained based on the digestive tract image samples in the training set.
根据所述验证集确定针对所述消化道影像分割模型在多组模型参数下不同分割结果的评价指标结果,确定出针对所述消化道影像分割模型在多组模型参数下不同分割结果的评价指标结果的多个优选值;Based on the validation set, the evaluation index results for different segmentation results of the digestive tract image segmentation model under multiple sets of model parameters are determined, and multiple preferred values for the evaluation index results of different segmentation results of the digestive tract image segmentation model under multiple sets of model parameters are determined.
根据所述测试集确定所述多个优选值中每个优选值对应的模型参数的评价指标结果,确定出所述多个优选值中对应的模型参数的评价指标结果的最优值;Based on the test set, determine the evaluation index result of the model parameter corresponding to each of the plurality of preferred values, and determine the optimal value of the evaluation index result of the model parameter corresponding to the plurality of preferred values;
将确定出的最优值所对应的模型参数确定为所述消化道影像分割模型的模型参数,获得训练完成的消化道影像分割模型。The model parameters corresponding to the determined optimal values are used as the model parameters of the digestive tract image segmentation model to obtain the trained digestive tract image segmentation model.
在一种可能的实施方式中,所述训练单元具体用于:In one possible implementation, the training unit is specifically used for:
以预设误差函数收敛的方向,调整消化道影像分割模型的模型参数;Adjust the model parameters of the digestive tract image segmentation model according to the convergence direction of the preset error function;
其中,所述预设误差函数是根据交叉熵误差函数的值和最小化混合误差函数的值加权得到的,所述最小化混合误差函数用于表示分割模型针对消化道影像样本中每个像素点的病灶类别的预测结果和针对消化道影像样本每个像素点的所属病灶类别的真实结果之间的相似度。The preset error function is obtained by weighting the value of the cross-entropy error function and the value of the minimized mixed error function. The minimized mixed error function is used to represent the similarity between the prediction result of the segmentation model for the lesion category of each pixel in the digestive tract image sample and the actual result for the lesion category of each pixel in the digestive tract image sample.
在一种可能的实施方式中,述消化道影像分割模型包括多个针对不同图像类型的消化道影像样本集分别训练的消化道影像分割模型,所述处理装置还包括第二确定单元,所述第二确定单元用于:In one possible implementation, the digestive tract image segmentation model includes multiple digestive tract image segmentation models trained separately for digestive tract image sample sets of different image types. The processing device further includes a second determining unit, which is used to:
在通过已训练的消化道影像分割模型,获得所述消化道影像中各个病灶像素点的病灶类别之前,识别所述消化道影像对应的图像类型;Before obtaining the lesion category of each lesion pixel in the digestive tract image through the trained digestive tract image segmentation model, the image type corresponding to the digestive tract image is identified.
根据所述消化道影像对应的图像类型,确定与所述图像类型关联的消化道影像分割模型;其中,不同的图像类型所关联的消化道影像分割模型不同。Based on the image type corresponding to the digestive tract image, a digestive tract image segmentation model associated with the image type is determined; wherein, different image types are associated with different digestive tract image segmentation models.
第三方面,提供一种医疗系统,包括:内窥镜,输出模块,以及第二方面中论述的任一处理装置,其中:Thirdly, a medical system is provided, comprising: an endoscope, an output module, and any of the processing devices discussed in the second aspect, wherein:
所述内窥镜,用于采集待处理的消化道影像,并发送给所述处理装置;The endoscope is used to acquire images of the digestive tract to be processed and send them to the processing device;
所述输出模块,用于输出所述处理装置获得的所述消化道分割影像。The output module is used to output the segmented image of the digestive tract obtained by the processing device.
在一种可能的实施方式中,所述系统还包括图像筛选模块,其中:In one possible implementation, the system further includes an image filtering module, wherein:
所述图像筛选模块,用于从所述内窥镜采集的多个消化道影像中,根据已训练的消化道影像筛选识别模型,过滤不符合预设条件的消化道影像,获得待处理的消化道影像,并发送给所述处理装置。The image filtering module is used to filter out digestive tract images that do not meet preset conditions from multiple digestive tract images acquired by the endoscope according to a trained digestive tract image filtering and recognition model, obtain digestive tract images to be processed, and send them to the processing device.
在一种可能的实施方式中,所述系统还包括器官部位识别模块,其中:In one possible implementation, the system further includes an organ site identification module, wherein:
所述器官部位识别模块,用于从所述图像筛选模块获得所述待处理的消化道影像,并根据已训练的器官分类识别模型,获得所述消化道影像对应的器官识别结果,并将所述器官识别结果发送给所述输出模块。The organ identification module is used to obtain the digestive tract image to be processed from the image filtering module, obtain the organ identification result corresponding to the digestive tract image according to the trained organ classification and identification model, and send the organ identification result to the output module.
第四方面,提供一种计算机设备,包括:Fourthly, a computer device is provided, comprising:
至少一个处理器,以及At least one processor, and
与所述至少一个处理器通信连接的存储器;A memory that is communicatively connected to the at least one processor;
其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述至少一个处理器通过执行所述存储器存储的指令实现如第一方面及任一可能的实施方式中任一项所述的方法。The memory stores instructions executable by the at least one processor, which implements the method as described in any one of the first aspect and any possible implementation by executing the instructions stored in the memory.
第五方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如第一方面及任一可能的实施方式中任一项所述的方法。Fifthly, a computer-readable storage medium is provided that stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of the first aspects and any possible embodiments.
相较于现有技术中利用目标检测模型检测息肉的方式,本申请实施例中通过消化道影像分割模型,确定各个病灶像素点的病灶类别,由于是以像素点为处理单元来确定的各个病灶像素点的病灶类别,因此能够识别出即使整体特征不明显的病灶,提高识别病灶类型的准确率。且,由于确定的是各个病灶像素点的病灶类别,因此可以精确地确定出病灶区域,提高识别病灶区域的精度,便于医生后期对病灶进行治疗和观察等。Compared to existing technologies that use target detection models to detect polyps, this embodiment uses a digestive tract image segmentation model to determine the lesion category of each lesion pixel. Since the lesion category is determined at the pixel level, it can identify lesions even those with indistinct overall features, improving the accuracy of lesion type identification. Furthermore, because the lesion category is determined for each individual pixel, the lesion region can be accurately identified, improving the precision of lesion region identification and facilitating subsequent treatment and observation by doctors.
附图说明Attached Figure Description
图1为本申请实施例提供的一种医疗系统的结构示意图;Figure 1 is a schematic diagram of the structure of a medical system provided in an embodiment of this application;
图2为本申请实施例提供的医疗系统的处理消化道影像的过程示例图;Figure 2 is an example diagram of the process of processing digestive tract images by the medical system provided in the embodiment of this application;
图3为本申请实施例提供的一种消化道影像的处理设备的结构示意图;Figure 3 is a schematic diagram of the structure of a digestive tract image processing device provided in an embodiment of this application;
图4为本申请实施例提供的一种医疗系统中各个设备部署的示意图;Figure 4 is a schematic diagram of the deployment of various devices in a medical system provided in an embodiment of this application;
图5为本申请实施例提供的一种消化道影像的处理方法的流程示意图;Figure 5 is a flowchart illustrating a method for processing digestive tract images according to an embodiment of this application;
图6为本申请实施例提供的一种训练消化道影像分割模型的流程示意图;Figure 6 is a flowchart illustrating a training model for digestive tract image segmentation provided in an embodiment of this application;
图7为本申请实施例提供的调整消化道影像分割模型的模型参数的过程示意图;Figure 7 is a schematic diagram of the process of adjusting the model parameters of the digestive tract image segmentation model provided in the embodiment of this application;
图8为本申请实施例提供的真实结果和预测结果的示例图;Figure 8 is an example diagram of the actual results and predicted results provided in the embodiments of this application;
图9为本申请实施例提供的不同图像类型的消化道图像的示例图;Figure 9 is an example diagram of different image types of digestive tract images provided in the embodiments of this application;
图10为本申请实施例提供的确定消化道分割影像的可信度的方法流程示意图;Figure 10 is a schematic flowchart of a method for determining the credibility of segmented images of the digestive tract provided in an embodiment of this application;
图11为本申请实施例提供的确定消化道分割影像的可信度的示例图;Figure 11 is an example diagram of determining the credibility of digestive tract segmentation images according to an embodiment of this application;
图12为本申请实施例提供的从消化道影像到叠加后的消化道分割影像的示例图;Figure 12 is an example diagram of digestive tract image to superimposed digestive tract segmentation image provided in an embodiment of this application;
图13为本申请实施例提供的一种处理装置的结构图;Figure 13 is a structural diagram of a processing device provided in an embodiment of this application;
图14为本申请实施例提供的一种医疗系统的结构图;Figure 14 is a structural diagram of a medical system provided in an embodiment of this application;
图15为本申请实施例提供的一种计算机设备的结构图。Figure 15 is a structural diagram of a computer device provided in an embodiment of this application.
具体实施方式Detailed Implementation
为了更好的理解本申请实施例提供的技术方案,下面将结合说明书附图以及具体的实施方式进行详细的说明。To better understand the technical solutions provided in the embodiments of this application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
下面对本申请实施例中涉及的部分用语进行说明,以便于本领域技术人员更好地理解本申请实施例中的技术方案。The following descriptions of some terms used in the embodiments of this application are provided to help those skilled in the art to better understand the technical solutions in the embodiments of this application.
消化道:是连接口腔和肛门的管道,由许多负责处理食物的构造组成。消化腺能分泌消化液以消化食物。消化道包括上消化道和下消化道。上消化道由口腔、咽、食道和胃组成。下消化道包括肠和肛门。肠包括小肠、大肠和结肠等。The digestive tract is the tube connecting the mouth and anus, composed of many structures responsible for processing food. Digestive glands secrete digestive juices to digest food. The digestive tract includes the upper and lower digestive tracts. The upper digestive tract consists of the mouth, pharynx, esophagus, and stomach. The lower digestive tract includes the intestines and anus. The intestines include the small intestine, large intestine, and colon, etc.
内窥镜:又称为内镜,是一种多学科通用的工具,其功能是能对有机体管道探查,通常用于观察肉眼不能直视到的部位,能在空腔内观察内部空间结构与状态,能实现远距离观察与操作。内窥镜可以包括多种成像模式,在不同的成像模式下,获得的医疗影像特征有所区别。内窥镜包括肠镜、胃镜等。Endoscope: Also known as an endoscope, it is a multidisciplinary tool used to explore the ducts and channels of an organism. It is typically used to observe areas not directly visible to the naked eye, allowing observation of internal structures and conditions within cavities, and enabling remote observation and manipulation. Endoscopes can include various imaging modes, each producing different medical image characteristics. Endoscopes include colonoscopes, gastroscopes, etc.
消化道影像:实质是用于表示消化道的图像,是对视觉感知的消化道的再现。由于消化道在人体内部,消化道影像一般可以由内窥镜获取。Gastrointestinal imaging: Essentially, these are images used to represent the digestive tract; they are a reproduction of the visual perception of the digestive tract. Since the digestive tract is located inside the human body, images of the digestive tract can generally be obtained using an endoscope.
病灶:有机体上发生病变或可能发生病变的部位。病灶可散布病原体和毒素,扩大病变。病灶可以具体可以划分为多种类别,以病灶分布方式划分为弥散性病灶等,以病灶的病发程度可以划分为良性病灶或恶性病灶等。如果按照两种不同维度划分病灶的类别,一个病灶所属的类别可以包括多类,例如一个病灶可以既属于弥散性病灶又属于良性病灶。Lesion: A site on an organism where disease has occurred or may occur. Lesions can spread pathogens and toxins, expanding the lesion. Lesions can be specifically classified into various categories, such as diffuse lesions based on their distribution pattern, and benign or malignant lesions based on their severity. If lesions are classified according to two different dimensions, a single lesion may belong to multiple categories; for example, a lesion may be both a diffuse lesion and a benign lesion.
图像类型:用于表示消化道影像的类型,例如成像类型以及染色类型等,成像类型例如内镜窄带成像术(Narrow Band Imaging,NBI)、白光成像、红外光成像。染色类型例如碘染等。Image type: Used to indicate the type of image of the digestive tract, such as imaging type and staining type. Imaging types include narrow band imaging (NBI), white light imaging, and infrared imaging. Staining types include iodine staining.
机器学习(Machine Learning,ML):是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
卷积神经网络(Convolutional Neural Network,CNN):在本质上是一种输入到输出的映射,它能够学习大量的输入与输出之间的映射关系,而不需要任何输入和输出之间的精确的数学表达式,只要用已知的模式对卷积网络加以训练,网络就具有输入输出对之间的映射能力。Convolutional Neural Network (CNN): Essentially, it is a mapping from input to output. It can learn a large number of mapping relationships between inputs and outputs without requiring any precise mathematical expressions between inputs and outputs. As long as the convolutional network is trained with known patterns, the network will have the ability to map between input-output pairs.
深度神经网络:是一种具备至少一个隐层的神经网络。与浅层神经网络类似,深度神经网络也能够为复杂非线性系统提供建模,但多出的层次为模型提供了更高的抽象层次,因而提高了模型的能力。深度神经网络通常都是前馈神经网络,但也有语言建模等方面的研究将其拓展到递归神经网络。Deep neural networks are neural networks with at least one hidden layer. Similar to shallow neural networks, deep neural networks can also model complex nonlinear systems, but the additional layers provide a higher level of abstraction, thus improving the model's capabilities. Deep neural networks are typically feedforward neural networks, but research in areas such as language modeling has extended them to recurrent neural networks.
消化道影像分割模型:本申请采用标注了病变区域和病灶类别的消化道影像样本,对基于神经网络建立的模型进行训练后获得的。Gastrointestinal image segmentation model: This application uses gastrointestinal image samples labeled with lesion areas and lesion categories to train a model based on a neural network.
编码-解码分割模型(encoder-decoder):分割模型的一种,Encoder包括卷积层和池化层,decoder通过反卷积操作实现。Encoder-decoder segmentation model: A type of segmentation model. The encoder includes convolutional layers and pooling layers, while the decoder is implemented through deconvolution operations.
掩模区域卷积神经网络(mask Region-Convolutional Neural Network,Mask-RCNN):分割算法的一种,Mask-RCNN包括候选区域选择、CNN特征提取、分类与边界回归和预测mask四个部分。Mask Region-Convolutional Neural Network (Mask-RCNN): A segmentation algorithm that includes four parts: candidate region selection, CNN feature extraction, classification and boundary regression, and mask prediction.
图像类型识别模型:本申请采用标注了图像类型的消化道影像样本,对基于深度神经网络建立的模型进行训练后获得的。Image type recognition model: This application uses digestive tract image samples labeled with image types to train a model based on a deep neural network.
消化道影像筛选识别模型:本申请采用标注了不符合预设条件的消化道影像样本,对基于深度神经网络建立的模型进行训练后获得的。Gastrointestinal image screening and recognition model: This application uses gastrointestinal image samples that do not meet the preset conditions and trains the model based on a deep neural network.
器官分类识别模型:本申请采用标注了器官类型的消化道影像样本,对基于深度神经网络建立的模型进行训练后获得的。Organ classification and identification model: This application uses digestive tract image samples labeled with organ types to train a model based on a deep neural network.
交叠率:可以理解为两个消化道分割影像的重合程度。交叠率越大,表示两个消化道分割影像的重合程度越大。如果两个消化道分割影像中病灶区域和对应病灶区域的病灶类别完全相同,那么这两个消化道分割影像的交叠率为1。交叠率可以用交并比(Intersection-over-Union,IoU)或平均交并比(Mean Intersection over Union,MIoU)等表征。Overlap ratio: This can be understood as the degree of overlap between two segmented images of the digestive tract. A higher overlap ratio indicates a greater degree of overlap between the two segmented images. If the lesion regions in two segmented images of the digestive tract are of the exact same lesion type as their corresponding lesion regions, then the overlap ratio of these two segmented images is 1. The overlap ratio can be characterized by Intersection-over-Union (IoU) or Mean Intersection-over-Union (MIoU).
下面对本申请实施例的设计思想进行说明。The design concept of the embodiments of this application will be explained below.
据统计,食道癌,胃癌和结肠癌,这三大消化道恶性肿瘤具有极高的发病率和极高的死亡率,常年居于恶性肿瘤类型榜前列。一方面,随着我国的老龄化现象加重,满足老年人的医疗需求是巨大的社会难题,再者专业医生人数有限,每天面对病人的大量影像,容易造成漏诊或误诊,另一方面,医生水平参差不齐,消化道疾病的症状较为复杂,因此无法保证对患者都能进行准确诊断。Statistics show that esophageal cancer, stomach cancer, and colon cancer, the three major malignant tumors of the digestive tract, have extremely high incidence and mortality rates, consistently ranking among the top types of malignant tumors. On the one hand, with the increasing aging population in my country, meeting the medical needs of the elderly is a huge social challenge. Furthermore, the number of professional doctors is limited, and the large number of patient images they handle daily can easily lead to missed or misdiagnosed cases. On the other hand, the varying skill levels of doctors and the complex symptoms of digestive tract diseases make accurate diagnosis impossible for all patients.
近年来,ML在医疗影像领域中的发挥着越来越大的作用,通过ML辅助医生对医疗影像进行诊断,大大提高了医生的诊断速度和准确度,对于缓解我国的医疗需求有重要意义。In recent years, machine learning (ML) has played an increasingly important role in the field of medical imaging. By assisting doctors in diagnosing medical images, ML has greatly improved the speed and accuracy of diagnosis, which is of great significance in alleviating the medical needs in my country.
现有技术中一般是目标检测模型检测息肉特征,以确定出息肉位置。In existing technologies, target detection models are generally used to detect polyp features in order to determine the location of polyps.
本申请发明人发现现有这种方式是基于息肉整体特征进行目标识别和诊断,发明人发现息肉较大,形状轮廓特征明显,且形状较为规则,目标检测模型能够识别出消化道上的大部分的息肉。但是病灶形状轮廓特征不明确,且相对较为分散,因此,本申请发明人发现现有的目标检测模型很难识别直接消化道上的病灶,导致识别消化道上的病灶类别的准确率较低。The inventors of this application have discovered that existing methods rely on the overall characteristics of polyps for target identification and diagnosis. While polyps are generally large, with well-defined and relatively regular shapes, allowing the target detection model to identify most polyps in the digestive tract, lesions have less distinct and more dispersed shapes. Therefore, the inventors have found that existing target detection models struggle to identify lesions directly in the digestive tract, resulting in low accuracy in classifying lesions.
本申请发明人进一步发现现有这种方式是基于息肉的整体特征进行目标识别,识别出的息肉的轮廓与息肉的真实轮廓的重合度并不高,确定出的息肉的位置不够精确。The inventors of this application further discovered that the existing method is based on the overall characteristics of the polyp for target identification. The overlap between the identified polyp outline and the actual polyp outline is not high, and the determined polyp location is not accurate enough.
本申请发明人进一步发现现有这种方式通常还会针对消化道的不同器官部位进行分别处理,导致医生使用时可能需要根据病人的器官部位进行不同的诊断处理,操作较为麻烦。The inventors of this application further discovered that the existing method usually requires separate treatment for different organs in the digestive tract, which may require doctors to make different diagnoses and treatments based on the patient's organ location, making the operation quite cumbersome.
鉴于此,本申请发明人基于ML设计一种消化道影像的处理方法,利用消化道影像分割模型先确定各个病灶像素点属于的病灶类别,再基于各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别的消化道分割影像。由于是针对以像素点为单元进行处理,可以提高确定病灶区域和病灶类别的准确性,以及精确定位各个病灶区域的位置。In view of this, the inventors of this application have designed a digestive tract image processing method based on machine learning. This method first determines the lesion category to which each lesion pixel belongs using a digestive tract image segmentation model, and then obtains a segmented digestive tract image labeled with lesion regions and lesion categories based on the lesion categories of each lesion pixel. Since the processing is performed on a pixel-by-pixel basis, it can improve the accuracy of determining lesion regions and lesion categories, as well as precisely locate the position of each lesion region.
本申请发明人进一步发现,消化道中各个器官部位的性质相差较小,检查病人的身体时,通常是对病人进行消化道的进行整体检查,因此本发明人发现可以训练一种消化道各个器官通用的消化道影像分割模型,用于对分割消化道影像中的各个器官上的病灶,一方面不会影响分割的准确性,另一方面可以避免在检查不同器官时,需要进行来回切换不同模型的情况,以减少医生或设备的处理量。The inventors of this application further discovered that the properties of various organs in the digestive tract are relatively similar. When examining a patient's body, the digestive tract is usually examined as a whole. Therefore, the inventors discovered that a digestive tract image segmentation model that is universal for all organs in the digestive tract can be trained to segment lesions on various organs in digestive tract images. On the one hand, this will not affect the accuracy of segmentation, and on the other hand, it can avoid the need to switch between different models when examining different organs, thereby reducing the processing load for doctors or equipment.
本申请发明人进一步发现,在医生诊断过程中,可能会切换内窥镜的成像模式,以便于更清晰地检测病灶,例如医生刚开始诊断时可能会采用白光,当医生发现可疑病灶时,可能会将内窥镜切换到NBI。由于不同图像类型的图像色彩、纹路等细节差异很大,因此,发明人发现如果针对不同图像类型,采用不同的消化道影像分割模型,可以进一步提高识别病灶类型和位置的准确性。The inventors of this application further discovered that during a doctor's diagnosis, the imaging mode of the endoscope may be switched to more clearly detect lesions. For example, a doctor may initially use white light for diagnosis, but when a suspicious lesion is found, the endoscope may be switched to NBI (Non-Intense Blasting). Because different image types exhibit significant differences in color, texture, and other details, the inventors found that using different digestive tract image segmentation models for different image types can further improve the accuracy of identifying lesion types and locations.
本申请发明人进一步发现内窥镜会不断地采集消化道影像,消化道影像分割模型会针对每个消化道影像进行处理,以确定每个消化道影像的病灶区域和病灶类型,发明人发现针对同一位置的两个相同的消化道影像,消化道影像分割模型也可能存在分割出不同结果的情况,且医生需要关注的消化道分割影像可能会较多。因此,本申请发明人进一步发现如果在得到消化道分割影像之后,可以基于该消化道分割影像的前后的消化道分割影像,对该消化道分割影像的可信度进行验证,为每个消化道分割影像标注可信度。标注消化道分割影像的可信度之后,一方面可以筛掉一些可信度较低的消化道分割影像,另外一方面可以使得医生可以根据可信度高的消化道分割影像进行诊断,以减少医生处理量,提高医生诊断的效率和准确性。The inventors of this application further discovered that endoscopy continuously acquires images of the digestive tract, and the digestive tract image segmentation model processes each image to determine the lesion region and type. The inventors found that even for two identical digestive tract images of the same location, the segmentation model may produce different results, and doctors may need to monitor a large number of segmented images. Therefore, the inventors further discovered that after obtaining segmented digestive tract images, the reliability of each segmented image can be verified based on preceding and following images, and a reliability rating can be assigned to each image. This rating allows for the filtering out of images with lower reliability, while enabling doctors to make diagnoses based on images with higher reliability, thus reducing the workload for doctors and improving diagnostic efficiency and accuracy.
在介绍完本申请实施例的设计思想之后,下面对本申请实施例的医疗系统的架构进行说明。请参照图1,图1表示本申请实施例涉及的医疗系统100,图1也可以理解为本申请实施例涉及的一种消化道影像的处理方法的应用场景示意图。After introducing the design concept of the embodiments of this application, the architecture of the medical system of the embodiments of this application will be described below. Please refer to Figure 1, which shows the medical system 100 involved in the embodiments of this application. Figure 1 can also be understood as a schematic diagram of an application scenario of a digestive tract image processing method involved in the embodiments of this application.
图1所示的医疗系统100包括内窥镜110和消化道影像的处理设备120。The medical system 100 shown in Figure 1 includes an endoscope 110 and a digestive tract image processing device 120.
具体的,内窥镜110可以参照前文论述内容,此处不再赘述。消化道影像的处理设备120可以通过具有图形处理器(Graphics Processing Unit,GPU)的设备实现,例如终端设备或服务器等,终端设备例如个人计算机等。服务器可以是实体服务器或者虚拟服务器等。消化道影像的处理设备120包括消化道影像的处理装置121,消化道影像的处理装置121可以理解为消化道影像的处理设备120中的一部分,主要用于分割消化道影像。Specifically, the endoscope 110 can be referred to the previous discussion and will not be repeated here. The digestive tract image processing device 120 can be implemented by a device with a graphics processing unit (GPU), such as a terminal device or a server. The terminal device is a personal computer, etc. The server can be a physical server or a virtual server, etc. The digestive tract image processing device 120 includes a digestive tract image processing unit 121, which can be understood as a part of the digestive tract image processing device 120, and is mainly used for segmenting digestive tract images.
其中,内窥镜110可以与消化道影像的处理设备120集成在一起,例如在内窥镜110中安装相应的处理芯片,实现消化道影像的处理设备120的功能。窥镜110可以与消化道影像的处理设备120也可以相对独立设置,例如内窥镜110可以通过接口与消化道影像的处理设备120通信,以实现医疗系统100的功能。The endoscope 110 can be integrated with the digestive tract image processing device 120. For example, a corresponding processing chip can be installed in the endoscope 110 to realize the functions of the digestive tract image processing device 120. The endoscope 110 can be integrated with the digestive tract image processing device 120 or set up relatively independently. For example, the endoscope 110 can communicate with the digestive tract image processing device 120 through an interface to realize the functions of the medical system 100.
在介绍完医疗系统100的基本构成之后,下面对该医疗系统100中各个设备的功能进行介绍。After introducing the basic structure of the medical system 100, the functions of each device in the medical system 100 will be introduced below.
内窥镜110:用于采集消化道影像。Endoscope 110: Used to acquire images of the digestive tract.
具体的,内窥镜110采集的消化道影像很多。多个消化道影像中可能包括不同图像类型的消化道影像。多个消化道影像中可能包括不同图像质量的消化道影。多个消化道影像中可能包括针对病人不同器官部位的消化道影像。Specifically, the endoscope 110 acquires numerous images of the digestive tract. These multiple images may include digestive tract images of different image types. They may also include digestive tract images of varying image quality. Furthermore, they may include images of different organ sites within the patient's digestive tract.
消化道影像的处理设备120:用于获得内窥镜110采集的消化道影像,通过消化道影像筛选识别模型对消化道影像进行筛选,筛掉不符合预设条件的消化道影像,以获得符合预设条件的消化道影像。The digestive tract image processing device 120 is used to obtain digestive tract images acquired by the endoscope 110, and to filter the digestive tract images by a digestive tract image screening and recognition model to filter out digestive tract images that do not meet the preset conditions in order to obtain digestive tract images that meet the preset conditions.
消化道影像的处理设备120再通过已训练的器官分类识别模型对符合预设条件的消化道影像进行器官部位识别,识别出各个消化道影像对应的器官部位,并输出器官部位识别结果。The digestive tract image processing device 120 then uses a trained organ classification and recognition model to identify the organ parts of the digestive tract images that meet the preset conditions, identifies the organ parts corresponding to each digestive tract image, and outputs the organ part identification results.
消化道影像的处理设备120通过已训练的图像类型识别模型识别符合预设条件的消化道影像的图像类型。消化道影像的处理设备120中的处理装置121确定与图像类型关联的消化道影像分割模型,通过消化道影像分割模型获得标识有消病灶区域和病灶分类的消化道分割影像。处理装置121还用于将消化道分割影像叠加至消化道影像中,获得包括消病灶区域和病灶分类的消化道影像。The digestive tract image processing device 120 identifies the image type of the digestive tract image that meets preset conditions using a trained image type recognition model. The processing unit 121 within the digestive tract image processing device 120 determines a digestive tract image segmentation model associated with the image type, and obtains a segmented digestive tract image labeled with lesion regions and lesion classifications using the digestive tract image segmentation model. The processing unit 121 is also used to overlay the segmented digestive tract image onto the digestive tract image to obtain a digestive tract image including lesion regions and lesion classifications.
例如,请参照图2,消化道影像的处理设备120确定a、b、c、e和d中a、b、c和d有模糊、色彩异常、过曝等情况,因此确定a、b、c和d不符合预设条件,确定e符合预设条件。For example, referring to Figure 2, the digestive tract image processing device 120 determines that a, b, c, e, and d have issues such as blurring, abnormal color, or overexposure. Therefore, it determines that a, b, c, and d do not meet the preset conditions, while it determines that e meets the preset conditions.
消化道影像的处理设备120在获得e之后,确定e所对应的器官部位。器官部位例如胃部、食部、咽部或肠等,并输出确定出的器官部位识别结果。After obtaining image 'e', the digestive tract image processing device 120 determines the organ location corresponding to 'e'. The organ location may be, for example, the stomach, esophagus, pharynx, or intestine, and outputs the identified organ location result.
消化道影像的处理设备120确定e的图像类型。消化道影像的处理设备120确定与该图像类型关联的消化道影像分割模型,并根据该消化道影像分割模型获得e对应的消化道分割影像f。消化道影像的处理设备120消化道分割影像f之后,叠加至消化道影像中,并输出包括病灶区域和病灶类型的消化道影像。The digestive tract image processing device 120 determines the image type of e. The digestive tract image processing device 120 determines a digestive tract image segmentation model associated with that image type, and obtains a segmented digestive tract image f corresponding to e based on the digestive tract image segmentation model. After processing the segmented digestive tract image f, the digestive tract image processing device 120 overlays it onto a digestive tract image and outputs a digestive tract image including the lesion region and lesion type.
在介绍完医疗系统100之后,下面对消化道影像的处理设备120的结构进行介绍。After introducing the medical system 100, the structure of the digestive tract image processing device 120 will be introduced below.
请参照图3,消化道影像的处理设备120包括处理器310、存储器320、显示面板330和I/O接口340。Referring to Figure 3, the digestive tract image processing device 120 includes a processor 310, a memory 320, a display panel 330, and an I/O interface 340.
具体的,存储器320中存储有程序指令,处理器310用于执行存储器320中的程序指令,实现前文论述的消化道影像的处理设备120的功能,I/O接口340用于实现与内窥镜110之间的交互。显示面板330可以用于显示分割消化道影像或包括病灶区域和病灶类型的消化道影像。Specifically, the memory 320 stores program instructions, and the processor 310 executes these instructions to implement the functions of the digestive tract image processing device 120 described above. The I/O interface 340 is used to enable interaction with the endoscope 110. The display panel 330 can be used to display segmented digestive tract images or digestive tract images including lesion regions and lesion types.
作为一种实施例,显示面板330为可选的部件。在这种情况下,消化道影像的处理设备120可以不显示分割消化道影像或包括病灶区域和病灶类型的消化道影像,而是经过处理获得分割消化道影像或包括病灶区域和病灶类型的消化道影像对应的数据之后,再在其他成像设备上进行显示,便于医生查看。As one embodiment, the display panel 330 is an optional component. In this case, the digestive tract image processing device 120 may not display segmented digestive tract images or digestive tract images including lesion areas and lesion types. Instead, it may process the data corresponding to the segmented digestive tract images or digestive tract images including lesion areas and lesion types, and then display them on other imaging devices for easy viewing by doctors.
在图1论述的医疗系统100的基础上,下面对医疗系统100中各个设备的场景部署示意图进行示例说明。Based on the medical system 100 described in Figure 1, the following is an example illustration of the scenario deployment diagram of each device in the medical system 100.
请参照图4,医生将内窥镜110插入病人消化道中,内窥镜110采集病人的消化道影像。内窥镜110将采集到的消化道影像发送给消化道影像的处理设备120,消化道影像的处理设备120处理消化道影像,生成消化道分割影像。Referring to Figure 4, the doctor inserts endoscope 110 into the patient's digestive tract, and endoscope 110 acquires images of the patient's digestive tract. Endoscope 110 sends the acquired digestive tract images to digestive tract image processing device 120, which processes the digestive tract images to generate segmented digestive tract images.
图4中是以消化道影像的处理设备120是个人计算机为例,但是实际上不限制消化道影像的处理设备120的具体形式。图4中是以有线通信方式为例进行说明,实际上内窥镜110与消化道影像的处理设备120之间可以通过任意方式进行通信,例如有线通信方式或无线通信方式,无线通信方式例如蓝牙或无线保真等。Figure 4 uses a personal computer as an example to illustrate the digestive tract image processing device 120, but in reality, the specific form of the digestive tract image processing device 120 is not limited. Figure 4 illustrates the wired communication method, but in reality, the endoscope 110 and the digestive tract image processing device 120 can communicate in any way, such as wired or wireless communication. Wireless communication methods include Bluetooth or Wi-Fi.
在介绍完本申请实施例涉及的医疗系统以及设备部署示例之后,下面对本申请实施例涉及的消化道影像的处理方法进行介绍。该方法由前文论述的消化道影像的处理装置121来执行。该方法涉及机器学习中的图像分割(Image segmentation)技术,具体通过如下实施例进行说明。After introducing the medical system and equipment deployment examples involved in the embodiments of this application, the processing method of gastrointestinal images involved in the embodiments of this application will be described below. This method is executed by the gastrointestinal image processing apparatus 121 discussed above. This method involves image segmentation technology in machine learning, which will be specifically illustrated through the following embodiments.
请参照图5,图5为本申请实施例中的一种消化道影像的处理方法的流程图,该方法具体包括:Please refer to Figure 5, which is a flowchart of a method for processing digestive tract images according to an embodiment of this application. The method specifically includes:
S510,获取待处理的消化道影像。S510, acquire images of the digestive tract to be processed.
待处理的消化道影像可以是从内窥镜110中获取的消化道影像,也可以消化道影像的处理设备120筛选之后的符合预设条件的消化道影像。The digestive tract images to be processed can be digestive tract images obtained from endoscope 110, or digestive tract images that meet preset conditions after being screened by digestive tract image processing device 120.
S520,获得所述消化道影像中各个病灶像素点的病灶类别。S520, obtain the lesion category of each lesion pixel in the digestive tract image.
在获得消化道影像之后,消化道影像中可能所有像素点均为病灶像素点,也可能部分像素点为病灶像素点,也可能没有病灶像素点。如果消化道影像中存在病灶像素点,可以确定消化道影像中各个病灶像素点对应的病灶类别。例如可以通过消化道影像分割模型确定各个病灶像素点对应的病灶类别,消化道影像分割模型可以参照前文论述内容,此处不再赘述。After obtaining images of the digestive tract, it's possible that all pixels in the image are lesion pixels, some pixels are lesion pixels, or there are no lesion pixels. If lesion pixels are present in the digestive tract image, the lesion category corresponding to each lesion pixel can be determined. For example, the lesion category corresponding to each lesion pixel can be determined using a digestive tract image segmentation model. The digestive tract image segmentation model can be referred to the previous discussion and will not be repeated here.
在一种可能的实施例中,将待处理的消化道影像输入已训练的消化道影像分割模型,消化道影像分割模型输出该消化道影像中各个像素点属于各个类别的概率,类别包括背景或者是各类病灶,可以将该像素点对应的类别概率最高的灶类别确定为该像素点的类别,确定出各个病灶像素点对应的病灶类别。In one possible embodiment, the digestive tract image to be processed is input into a trained digestive tract image segmentation model. The digestive tract image segmentation model outputs the probability of each pixel in the digestive tract image belonging to each category. The categories include background or various lesions. The lesion category with the highest category probability corresponding to the pixel can be determined as the category of the pixel, thus determining the lesion category corresponding to each lesion pixel.
S530,根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别的消化道分割影像。S530: Based on the lesion category of each lesion pixel, obtain a segmented image of the digestive tract that is labeled with the lesion region and lesion category.
在获得各个病灶像素点对应的分类之后,可以将属于一类病灶的像素点划分在一起,确定出该类病灶所对应的病灶区域。如果属于一类病灶的像素点均是集中在一起的,那么该类病灶的病灶区域包括一个,属于一类病灶的像素点也可能分散多个区域,那么该类病灶对应的病灶区域包括多个。以此类推,获得各个病灶区域和各个病灶区域所对应的病灶类别,也就相当于获得消化道分割影像。After obtaining the classification of each lesion pixel, pixels belonging to the same category can be grouped together to determine the corresponding lesion region. If pixels belonging to the same category are all clustered together, then the lesion region for that category includes one region. Pixels belonging to the same category may also be scattered across multiple regions, in which case the corresponding lesion region includes multiple regions. This process continues until each lesion region and its corresponding lesion category are obtained, which is equivalent to obtaining a segmented image of the digestive tract.
在一种可能的实施例中,消化道分割影像中不同类别的病灶区域采用不同的标识进行区分。In one possible embodiment, different categories of lesion regions in the segmented images of the digestive tract are distinguished by different identifiers.
具体的,消化道影像可能包括多类病灶区域,在识别出对应的病灶区域之后,可以为不同类别的病灶区域标记不同的标识,以便于区分各类病灶。不同的标识例如不同颜色,不同符号等。Specifically, gastrointestinal imaging may include various types of lesion areas. After identifying the corresponding lesion areas, different labels can be used to distinguish between different types of lesions. These labels may include different colors or different symbols.
图5所示的实施例中,由于是以像素点为单位去确定各个病灶像素点对应的病灶类别,因此相较于现有技术中基于息肉的整体特征检测息肉位置的方式,即使是病灶形状特征不明显,本申请实施例中的处理方法也能够确定出对应的病灶区域,提高识别病灶的准确率。且由于是确定各个病灶像素点的病灶分类,因此可以更精确地确定出各个病灶区域,提高了定位病灶的位置的精确度。In the embodiment shown in Figure 5, since the lesion category corresponding to each lesion pixel is determined on a pixel-by-pixel basis, compared with the existing technology that detects polyp location based on the overall features of the polyp, even if the shape features of the lesion are not obvious, the processing method in this embodiment can still determine the corresponding lesion region, improving the accuracy of lesion identification. Furthermore, since the lesion classification is determined for each lesion pixel, each lesion region can be determined more precisely, improving the accuracy of lesion location.
在介绍图5中的处理方法的总体思想之后,下面对各个步骤中涉及的具体实施方式进行说明。After introducing the overall idea of the processing method shown in Figure 5, the specific implementation methods involved in each step will be described below.
在本申请实施例S520中可以通过已训练的消化道影像分割模型确定各个病灶像素点的病灶类别,其中在执行S520之前,需要获得已训练的消化道影像分割模型,下面对消化道影像分割模型的训练过程进行示例说明。In embodiment S520 of this application, the lesion category of each lesion pixel can be determined by a trained digestive tract image segmentation model. Before executing S520, it is necessary to obtain a trained digestive tract image segmentation model. The training process of the digestive tract image segmentation model is illustrated below.
请参照图6,该训练过程包括:Please refer to Figure 6. The training process includes:
S610,根据训练集中的消化道影像样本,训练消化道影像分割模型。S610: Train a digestive tract image segmentation model based on digestive tract image samples in the training set.
具体的,可以从现有的数据库中获得符合需求的消化道样本影像集,也可以通过人工标注,获得消化道样本影像集。消化道样本影像集中包括多个消化道影像样本,每个消化道影像样本标注有病灶区域和病灶类别。在获得消化道样本影像集之后,将消化道影像样本集划分为训练集、验证集和测试集。训练集用于训练消化道影像分割模型,验证集用于选择出消化道影像分割模型的模型参数中的多个优选的模型参数,测试集用于评价多个优选的模型参数,并确定出最优的模型参数。Specifically, a suitable set of gastrointestinal image samples can be obtained from existing databases, or it can be obtained through manual annotation. The set of gastrointestinal image samples includes multiple gastrointestinal image samples, each annotated with lesion regions and lesion categories. After obtaining the set, it is divided into a training set, a validation set, and a test set. The training set is used to train the gastrointestinal image segmentation model; the validation set is used to select several preferred model parameters from the model parameters; and the test set is used to evaluate the preferred model parameters and determine the optimal model parameters.
S620,根据验证集确定针对消化道影像分割模型在多组模型参数下不同分割结果的评价指标结果,确定出针对消化道影像分割模型在多组模型参数下不同分割结果的评价指标结果的多个优选值。S620, Based on the validation set, determine the evaluation index results of the digestive tract image segmentation model under different segmentation results with multiple sets of model parameters, and determine multiple optimal values of the evaluation index results of the digestive tract image segmentation model under different segmentation results with multiple sets of model parameters.
具体的,消化道影像分割模型例如可以采用encoder-decoder分割模型或Mask-RCNN。无论消化道影像分割模型采用哪一种,训练集在训练消化道影像分割模型过程中,均需要不断地调整模型参数,再利用验证集去验证消化道影像分割模型在多个模型参数下不同分割结果的评价指标结果,找出评价指标结果中的多个优选值。多个优选值可以实际的分割质量需求确定的,每个优选值可以用于表示在本次训练中相对最符合分割质量需求的值。Specifically, digestive tract image segmentation models can employ encoder-decoder segmentation models or Mask-RCNN. Regardless of the model used, the training set needs to continuously adjust the model parameters during training. Then, a validation set is used to verify the evaluation metrics of the segmentation results under different model parameters, identifying several optimal values among the evaluation metrics. These optimal values can be determined based on the actual segmentation quality requirements, and each optimal value can be used to represent the value that best meets the segmentation quality requirements in this training session.
S630,根据测试集确定多个优选值中每个优选值对应的模型参数的评价指标结果,直到确定出多个优选值中对应的模型参数的评价指标结果的最优值;S630, determine the evaluation index result of the model parameter corresponding to each of the multiple preferred values based on the test set, until the optimal value of the evaluation index result of the model parameter corresponding to the multiple preferred values is determined;
具体的,在根据获得多个优选值所对应的模型参数之后,根据测试集以及预设的评价指标确定出多个优选值对应的模型参数的评价结果,从而确定出最优值。其中,测试集所对应的评价指标与测试集所选用的评价指标可以相同。Specifically, after obtaining the model parameters corresponding to multiple optimal values, the evaluation results of the model parameters corresponding to the multiple optimal values are determined based on the test set and preset evaluation indicators, thereby determining the optimal value. The evaluation indicators corresponding to the test set can be the same as the evaluation indicators selected for the test set.
S640,将确定出的最优值所对应的模型参数确定为消化道影像分割模型,获得训练完成的消化道影像分割模型。S640, the model parameters corresponding to the determined optimal value are used as the digestive tract image segmentation model to obtain the trained digestive tract image segmentation model.
图6论述的实施例中,采用评价指标对消化道影像分割模型的模型参数进行验证,将最优的评价指标结果作为训练完成的消化道影像分割模型的模型参数,保证了训练完成的消化道影像分割模型的分割结果质量。且,在验证集获得优选的多组模型参数之后,利用测试集再去获得最优的模型参数,使得最后得到的最优的模型参数适用性广,避免训练得到的消化道影像分割模型过拟合的情况。In the embodiment illustrated in Figure 6, evaluation metrics are used to validate the model parameters of the gastrointestinal image segmentation model. The optimal evaluation metric results are used as the model parameters of the trained gastrointestinal image segmentation model, ensuring the quality of the segmentation results. Furthermore, after obtaining multiple sets of optimized model parameters on the validation set, the optimal model parameters are obtained using the test set. This ensures that the final optimal model parameters have broad applicability and avoids overfitting in the trained gastrointestinal image segmentation model.
在一种可能的实施例中,为了保证训练出的消化道影像分割模型的准确性,消化道影像样本集可以包括消化道各个器官部位的消化道影像样本,以及各类病灶所对应的消化道影像样本。In one possible embodiment, in order to ensure the accuracy of the trained digestive tract image segmentation model, the digestive tract image sample set may include digestive tract image samples of various organs and parts of the digestive tract, as well as digestive tract image samples corresponding to various lesions.
在一种可能的实施例中,S610训练消化道影像分割模型过程中,涉及到具体如何调整参数,请参照图7,图7表示一种调整模型参数的流程图,本申请实施例中利用训练集确定消化道分割模型在不同模型参数下对应的预设误差函数的值;根据验证集确定消化道分割模型在不同模型参数下对应的评估指标结果;根据测试集确定最优的模型参数;在训练过程中朝着预设误差函数的收敛方向调整消化道分割模型的模型参数,直到确定出的最优的评价指标结果。In one possible embodiment, during the training of the digestive tract image segmentation model in S610, the specific adjustment of parameters is described in Figure 7. Figure 7 shows a flowchart of adjusting model parameters. In this embodiment, the training set is used to determine the value of the preset error function corresponding to the digestive tract segmentation model under different model parameters; the validation set is used to determine the evaluation index results corresponding to the digestive tract segmentation model under different model parameters; the test set is used to determine the optimal model parameters; and during the training process, the model parameters of the digestive tract segmentation model are adjusted in the convergence direction of the preset error function until the optimal evaluation index result is determined.
预设误差函数用于表示训练集中标注的真实结果与消化道分割模型在不同模型参数下对应的预测结果的误差值,预设误差函数的构造方式有多种,下面进行示例说明。The preset error function is used to represent the error value between the actual results labeled in the training set and the prediction results of the digestive tract segmentation model under different model parameters. There are several ways to construct the preset error function, and examples are given below.
一种预设误差函数为:One preset error function is:
Ltotal=Ldice+λ*Lce (1)L total =L dice +λ*L ce (1)
式(1)中的Ldice表示最小化混合(Dice Similarity Coefficient,dice)误差函数,Lce表示交叉熵误差函数。λ表示用于平衡dice误差函数和交叉误差函数的权重值,该权重值是一个常数。In equation (1), L <sub>dice</sub> represents minimizing the Dice Similarity Coefficient (dice) error function, and L <sub>ce</sub> represents the cross-entropy error function. λ represents the weight value used to balance the dice error function and the cross-entropy error function, and this weight value is a constant.
Ldice可以表示为:L dice can be represented as:
式(2)中的A表示消化道分割模型对消化道影像样本中属于某个病灶类别的预测结果的所有像素点的集合,B表示真实结果中属于的该病灶类别的所有像素点的集合。最小化混合误差函数表示预测结果和真实结果之间的相似性。In Equation (2), A represents the set of all pixels in the digestive tract segmentation model that predict a certain lesion category in a digestive tract image sample, and B represents the set of all pixels in the actual result that belong to the same lesion category. Minimizing the mixture error function represents the similarity between the predicted result and the actual result.
例如,请参照图8,图8中的(1)包括a,b和c三个消化道影像样本,图8中的(1)表示消化道影像样本真实结果中每个像素点属于的类别,图8中的(1)中每个小矩形框表示一个像素点,图8中的(1)中“1”表示该像素点属于该病灶类别,“0”表示该像素点不属于该病灶类别。图8中的(2)表示对应消化道影像样本经过消化道影像分割模型之后输出的结果,图8中的(2)中每个小矩形框中的数据表示每个像素点属于病灶类别的概率。For example, please refer to Figure 8. Figure 8(1) includes three digestive tract image samples: a, b, and c. Figure 8(1) represents the category to which each pixel belongs in the actual result of the digestive tract image sample. Each small rectangle in Figure 8(1) represents a pixel. In Figure 8(1), "1" indicates that the pixel belongs to the lesion category, and "0" indicates that the pixel does not belong to the lesion category. Figure 8(2) represents the output result of the corresponding digestive tract image sample after passing through the digestive tract image segmentation model. The data in each small rectangle in Figure 8(2) represents the probability that each pixel belongs to the lesion category.
以图8中的a所示的消化道影像样本为例,A则可以表示为:Taking the digestive tract image sample shown in Figure 8a as an example, A can be represented as:
B可以表示为:由此可以得到消化道影像样本a对应的Ldice的值。B can be represented as: From this, we can obtain the value of L dice corresponding to the digestive tract imaging sample a.
交叉熵误差函数Lce可以表示为:The cross-entropy error function Lce can be expressed as:
Lce=∑(yilog(pi)+(1-yi)log(1-pi)) (3)L ce =∑(y i log(p i )+(1-y i )log(1-p i )) (3)
式(3)中的yi表示消化道影像样本真实结果中每个像素点属于的类别,pi表示消化道影像分割模型输出的消化道影像样本中每个像素点属于的类别概率。交叉熵误差函数用于预测像素点概率分布(在所有类上)和实际的所有像素点概率分布的差异。In Equation (3), yi represents the category to which each pixel in the actual result of the digestive tract image sample belongs, and pi represents the probability of each pixel in the digestive tract image sample output by the digestive tract image segmentation model belonging to the category. The cross-entropy error function is used to compare the predicted pixel probability distribution (across all classes) with the actual probability distribution of all pixels.
在消化道影像分割模型对各个消化道影像样本进行处理之后,例如可以通过前文中的公式(1)、(2)和(3)计算出该模型参数下的消化道分割模型所对应的预设误差函数的值。在获得预设误差函数的值之后,朝着预设误差函数收敛的方向,调整消化道影像分割模型的模型参数。After the digestive tract image segmentation model processes each digestive tract image sample, the value of the preset error function corresponding to the digestive tract segmentation model under the model parameters can be calculated, for example, using formulas (1), (2), and (3) mentioned above. After obtaining the value of the preset error function, the model parameters of the digestive tract image segmentation model are adjusted in the direction of convergence of the preset error function.
利用验证集中的消化道影像样本输入至该模型参数下的消化道影像分割模型中,并根据消化道影像分割模型的预测结果和真实结果,利用评价指标计算出该模型参数下的消化道分割模型所对应的评价指标结果。The digestive tract image samples from the validation set are input into the digestive tract image segmentation model under the model parameters. Based on the prediction results and actual results of the digestive tract image segmentation model, the evaluation index results corresponding to the digestive tract segmentation model under the model parameters are calculated using the evaluation index.
在获得多组模型参数,以及对应的多个评价指标结果之后,可以选择最优的评价指标结果对应的模型参数作为消化道影像分割模型的模型参数。After obtaining multiple sets of model parameters and corresponding evaluation index results, the model parameters corresponding to the optimal evaluation index results can be selected as the model parameters of the digestive tract image segmentation model.
例如,评价指标可以采用均交并比(Mean Intersection over Union,MIoU):For example, the evaluation metric could be the Mean Intersection over Union (MIoU):
式(4)中,k表示病灶的所有类别对应的总数量,pii真实像素类别为i的像素被预测为类别i的总数量。pij真实像素类别为i的像素被预测为类别j的总数量。MIoU用于表示消化道影像样本中真实结果和预测结果的重叠率。In equation (4), k represents the total number of lesions corresponding to all categories, p<sub> ii </sub> represents the total number of pixels of true category i predicted as category i, and p<sub> ij </sub> represents the total number of pixels of true category i predicted as category j. MIoU is used to represent the overlap rate between the true and predicted results in the gastrointestinal imaging sample.
在获得训练完成的消化道影像分割模型之后,可以直接根据训练完成的消化道影像分割模型执行步骤502。After obtaining the trained digestive tract image segmentation model, step 502 can be executed directly based on the trained digestive tract image segmentation model.
或者在一种可能的实施例中,由于不同图像类型的图像差别较大,因此,为了提高消化道影像分割模型分割消化道影像的准确度,本申请实施例中消化道影像分割模型是针对图像类型的消化道影像样本集分别训练得到的。Alternatively, in one possible embodiment, since images of different image types differ significantly, in order to improve the accuracy of the digestive tract image segmentation model in segmenting digestive tract images, the digestive tract image segmentation model in this embodiment is trained separately for digestive tract image sample sets of different image types.
具体的,采用同一图像类型的消化道影像样本集训练得到该类图像类型的消化道影像分割模型,获得不同图像类型对应的消化道影像分割模型。也就是说,不同图像类型所关联的消化道影像分割模型是不同的,不同可以理解为不同图像类型所对应的消化道影像分割模型不完全相同,可以是对应的消化道影像分割模型的网络结构不完全相同,也可以是消化道影像分割模型的模型参数不同。在获得不同的图像类型对应的消化道影像分割模型之后,可以保存不同的图像类型对应的消化道影像分割模型之间的关联关系。Specifically, a digestive tract image segmentation model for that image type is trained using a sample set of digestive tract images of the same image type, resulting in digestive tract image segmentation models for different image types. In other words, the digestive tract image segmentation models associated with different image types are different. This difference can be understood as the digestive tract image segmentation models corresponding to different image types not being entirely identical; it could be that the network structures of the corresponding digestive tract image segmentation models are not completely identical, or that the model parameters of the digestive tract image segmentation models are different. After obtaining the digestive tract image segmentation models corresponding to different image types, the correlation between these models can be preserved.
例如,不同图像类型对应的消化道影像分割模型相同,但是由于分别训练的,不同图像类型对应的消化道影像分割模型的模型参数不同。例如图像类型与确定的消化道影像分割模型的模型参数的关联关系具体如下表1所示。For example, different image types may correspond to the same digestive tract image segmentation model, but because they are trained separately, the model parameters of the digestive tract image segmentation models for different image types are different. For example, the specific relationship between image type and the model parameters of a given digestive tract image segmentation model is shown in Table 1 below.
表1Table 1
进一步,如果消化道影像分割模型是通过不同图像类型的消化道影像样本集分别训练得到的,在执行S520之前,需要先根据该消化道影像的图像类型,确定与该图像类型关联的消化道影像分割模型。Furthermore, if the digestive tract image segmentation model is trained separately using digestive tract image sample sets of different image types, before executing S520, it is necessary to first determine the digestive tract image segmentation model associated with the image type of the digestive tract image.
具体的,可以是通过前文论述中的图像类型识别模型确定该消化道影像对应的图像类型,图像类型可以参照前文论述的内容,此处不再赘述。识别出该消化道影像对应的图像类型之后,可以根据该图像类型以及前文中论述的关联关系,从而确定出该图像类型对应的消化道影像分割模型。Specifically, the image type corresponding to the digestive tract image can be determined using the image type recognition model discussed earlier. The image type can be referred to in the previous discussion and will not be repeated here. After identifying the image type corresponding to the digestive tract image, the digestive tract image segmentation model corresponding to that image type can be determined based on the image type and the correlation discussed earlier.
例如,请参照图9,确定图9中的a、b和c所示的消化道影像的图像类型分别为白光、NBI和碘染三种图像类型,继续以表1所示的关联关系为例,因此,从而确定图9中的a、b和c对应采用的模型参数分别为第一组模型参数、第二组模型参数和第三组模型参数。For example, referring to Figure 9, we can determine that the image types of the digestive tract images shown in Figure 9 a, b, and c are white light, NBI, and iodine staining, respectively. Continuing with the correlation shown in Table 1, we can determine that the model parameters used for a, b, and c in Figure 9 are the first set of model parameters, the second set of model parameters, and the third set of model parameters, respectively.
针对同一部位,内窥镜在预设时间段内可以采集多个消化道影像,针对同一部位的消化道影像,理论上得到的消化道分割影像应该是相同的,但是可能由于某些原因,导致确定出的消化道分割影像差异较大,过多的消化道分割影像会增加医生诊断的工作量,还可能会导致医生误判。因此,在一种可能的实施例中,确定各个消化道分割影像的可信度。下面对确定消化道分割影像的可信度的方式进示例说明。For the same location, an endoscope can acquire multiple images of the digestive tract within a preset time period. Theoretically, the resulting segmented images of the digestive tract from the same location should be identical. However, due to various reasons, the determined segmented images may differ significantly. Too many segmented images increase the workload for doctors and may even lead to misdiagnosis. Therefore, in one possible embodiment, the reliability of each segmented image is determined. The following example illustrates the method for determining the reliability of the segmented images.
请参照图10,确定可信度的方式具体包括:Please refer to Figure 10. The specific methods for determining credibility include:
S1001,确定消化道分割影像与针对消化道影像前后预设个消化道影像的消化道分割影像中每个消化道分割影像的交叠率。S1001, determine the overlap rate of each digestive tract segmentation image in the digestive tract segmentation image and the digestive tract segmentation image of the preset digestive tract images before and after the digestive tract image.
S1002,根据确定出的交叠率,确定消化道分割影像的可信度,并在消化道分割影像上标记确定出的可信度。S1002, Based on the determined overlap rate, determine the reliability of the digestive tract segmentation image, and mark the determined reliability on the digestive tract segmentation image.
本申请实施例中,根据消化道分割影像的前后预设个消化道分割影像,确定该消化道分割影像的可信度,并在消化道分割影像上标记上可信度,便于医生根据确定出的可信度高的消化道分割影像进行判断。In this embodiment, the reliability of the digestive tract segmentation image is determined based on a preset number of digestive tract segmentation images before and after the digestive tract segmentation image, and the reliability is marked on the digestive tract segmentation image, so that doctors can make judgments based on the digestive tract segmentation images with high reliability.
在介绍本申请实施例的总体思路之后,下面对执行S1001的具体方式进行说明:After introducing the overall concept of the embodiments of this application, the specific method of executing S1001 is described below:
内窥镜110采集消化道影像时,通常是连续进行采集的,在预设时间段内,内窥镜110会针对同一部位采集多个相同的消化道影像,因此可以根据前后预设个数消化道影像对应的消化道分割影像来确定该消化道分割影像的可信度。前后预设个数可以理解为该消化道影像前预设个数的消化道影像,以及后预设个数的消化道影像。针对内窥镜110采集的第一个消化道影像,由于第一个消化道影像不存在前几个,因此,可以采用相对于第一个消化道影像的后预设个数消化道影像进行处理。在对多个消化道影像经过前文图5中论述的处理方法进行分割处理之后,可以获得多个消化道影像对应的多个消化道分割影像。When the endoscope 110 acquires images of the digestive tract, it typically does so continuously. Within a preset time period, the endoscope 110 acquires multiple identical images of the same digestive tract region. Therefore, the reliability of a digestive tract segmentation image can be determined based on the number of pre- and post-preset digestive tract images. The pre- and post-preset number can be understood as the number of digestive tract images preceding and following the first image. For the first digestive tract image acquired by the endoscope 110, since the first digestive tract image does not have preceding images, it can be processed using the number of post-preset digestive tract images relative to the first image. After segmenting multiple digestive tract images using the processing method described in Figure 5, multiple digestive tract segmentation images corresponding to the multiple images can be obtained.
确定该消化道影像与其它消化道分割影像中每个消化道分割影像的重合率,如果重合率越高,表示误分割的概率越小,如果重合率越低,表示误分割的概率越大。其它消化道分割影像可以理解为多个消化道分割影像中除了该消化道分割影像之外的消化道分割影像。The overlap rate between this digestive tract image and each of the other digestive tract segmented images is determined. A higher overlap rate indicates a lower probability of missegmentation, while a lower overlap rate indicates a higher probability of missegmentation. Other digestive tract segmented images can be understood as digestive tract segmented images other than this one.
例如,待确定可信度的消化道分割影像为c,前后预设个数消化道影像对应的多个消化道分割影像包括a、b、d和e,如图11所示的a、b、c、d和e的消化道分割影像。For example, the digestive tract segmentation image to be determined is c, and the multiple digestive tract segmentation images corresponding to the preset number of digestive tract images before and after include a, b, d and e, as shown in Figure 11.
一种确定交叠率的方法为:One method for determining the overlap rate is as follows:
确定某个消化道分割影像的交叠率的时候,可以采用前文中的MIoU来白表征某个消化道分割影像与其它消化道分割影像的交叠率,下面进行具体说明。When determining the overlap rate of a segmented image of a digestive tract, the MIoU mentioned earlier can be used to characterize the overlap rate between a segmented image of a digestive tract and other segmented images of the digestive tract. The following is a detailed explanation.
其中,TP表示真正值,具体表示该消化道分割影像与其它消化道分割影像中每个消化道分割影像的交集;FP表示假正值,具体表示其它消化道分割影像中每个消化道分割影像减掉TP的部分;FN表示假负值,具体表示该消化道分割影像减掉TP的部分。k表示病灶类别的总数量。Where TP represents the true value, specifically the intersection of this digestive tract segmentation image with each of the other digestive tract segmentation images; FP represents the false positive value, specifically the portion of each digestive tract segmentation image minus TP; FN represents the false negative value, specifically the portion of this digestive tract segmentation image minus TP. k represents the total number of lesion categories.
一种确定交叠率的方法为:One method for determining the overlap rate is as follows:
可以采用交并比(Intersection over Union,IoU)表征交叠率,具体计算公式如下:The overlap ratio (IoU) can be used to characterize the overlap rate. The specific calculation formula is as follows:
TP、FP和FN可以参照前文论述的内容,此处不再赘述。TP, FP, and FN can be referred to the previous discussion, and will not be repeated here.
例如,继续参照图11,获得图11中c和a的交叠率为m1,c和b的交叠率为m2,c和d之间的交叠率为m3,c和e之间的交叠率为m4。For example, continuing to refer to Figure 11, we obtain the overlap rate m1 between c and a, the overlap rate m2 between c and b, the overlap rate m3 between c and d, and the overlap rate m4 between c and e in Figure 11.
在获得该消化道分割影像与其它消化道分割影像中每个消化道分割影像的交叠率之后,可以获得多个交叠率,执行S1002,可以根据多个交叠率确定该消化道分割影像的可信度。下面执行S1002的方式进行说明。After obtaining the overlap rate between the segmented digestive tract image and each other segmented digestive tract images, multiple overlap rates can be obtained. Executing S1002 allows the reliability of the segmented digestive tract image to be determined based on these multiple overlap rates. The execution method of S1002 will be explained below.
方式一:Method 1:
确定多个交叠率大于预设阈值的交叠率的个数,如果确定出的个数大于预设个数,确定该消化道分割影像的可信度为高,如果确定出的个数小于或等于预设个数,确定该消化道分割影像的可信度为低。The number of overlap rates greater than a preset threshold is determined. If the determined number is greater than the preset number, the credibility of the digestive tract segmentation image is determined to be high. If the determined number is less than or equal to the preset number, the credibility of the digestive tract segmentation image is determined to be low.
具体的,该方式中根据交叠率大于预设阈值的个数对可信度的高低进行评价,确定该消化道分割影像的可信度为高或者为低。该方式只需确定满足阈值的交叠率即可,确定方式简单。且后期只需标注可信度高或者低,便于后期进行筛选查看等。Specifically, this method evaluates the reliability of a digestive tract segmentation image based on the number of overlap values exceeding a preset threshold, determining whether the image is high or low. This method only requires identifying the overlap values that meet the threshold, making the determination process simple. Furthermore, subsequent labeling of high or low reliability facilitates later screening and review.
例如,继续参照图11,预设个数为3,确定m1,m2和m3大于预设阈值,进而确定该消化道分割影像的可信度为高。For example, referring to Figure 11, with a preset number of 3, we determine that m1, m2, and m3 are greater than a preset threshold, and thus determine that the credibility of the digestive tract segmentation image is high.
方式二:Method 2:
确定多个交叠率的平均值,以平均值作为该消化道分割影像的可信度。The average of multiple overlap rates is determined, and the average value is used as the confidence level of the digestive tract segmentation image.
该方式中,以平均值作为消化道分割影像的可信度,便于比较各个消化道分割影像的可信度的高低。In this method, the average value is used as the reliability of the digestive tract segmentation image, which makes it easier to compare the reliability of each digestive tract segmentation image.
例如,继续参照图11,确定m1,m2,m4和m3的平均值,进而确定该消化道分割影像的平均值。For example, continuing to refer to Figure 11, determine the average values of m1, m2, m4 and m3, and then determine the average value of the digestive tract segmentation image.
在确定该消化道分割影像的可信度之后,可以将该消化道分割影像的可信度标注在消化道分割影像上,便于后期医生查看各个消化道分割影像。After determining the reliability of the digestive tract segmentation image, the reliability of the digestive tract segmentation image can be marked on the digestive tract segmentation image to facilitate doctors' review of each digestive tract segmentation image later.
在一种可能的实施例中,在确定可信度之后,可以删除可信度小于或等于预设可信度的消化道分割影像,可以输出可信度大于预设可信度的消化道分割影像,使得医生查看到的所有消化道分割影像均是可信度较高的消化道分割影像。In one possible embodiment, after determining the confidence level, digestive tract segmentation images with a confidence level less than or equal to a preset confidence level can be deleted, and digestive tract segmentation images with a confidence level greater than the preset confidence level can be output, so that all digestive tract segmentation images viewed by doctors are digestive tract segmentation images with high confidence level.
在获得消化道分割影像之后,或者在获得标注有可信度的消化道分割影像之后,在本申请实施例中,还可以对消化道分割影像进行叠加处理。After obtaining segmented images of the digestive tract, or after obtaining segmented images of the digestive tract labeled with confidence level, in this embodiment of the application, the segmented images of the digestive tract can also be overlaid.
具体的,叠加可以理解为整合两种影像中的有效信息,可以进一步理解为将消化道分割影像中的病灶区域和病灶类别对照叠加在消化道分割影像中的相应区域中,获得包括病灶区域和病灶类别的消化道影像。Specifically, overlay can be understood as integrating the effective information from two images. It can be further understood as superimposing the lesion area and lesion type in the segmented digestive tract image onto the corresponding area in the segmented digestive tract image to obtain a digestive tract image that includes both the lesion area and lesion type.
例如,请参照图12,图12中a表示内窥镜采集的消化道影像,b表示对a中的病灶进行放大之后的示意图,c表示通过encoder-decoder分割模型对b所示的病灶区域进行分割处理后得到的病灶区域,将c叠加至a中,获得如图d所示的包括病灶区域和病灶类别的消化道分割影像。For example, please refer to Figure 12. In Figure 12, a represents the digestive tract image acquired by endoscopy, b represents a schematic diagram after magnifying the lesion in a, and c represents the lesion area obtained after segmenting the lesion area shown in b using an encoder-decoder segmentation model. By superimposing c onto a, a segmented digestive tract image including the lesion area and lesion type is obtained as shown in Figure d.
基于同一发明构思,本申请实施例提供一种消化道影像的处理装置,请参照图13,该处理装置121包括:Based on the same inventive concept, this application provides a processing apparatus for digestive tract images. Referring to FIG13, the processing apparatus 121 includes:
获取单元1301,用于获取待处理的消化道影像;Acquisition unit 1301 is used to acquire images of the digestive tract to be processed;
识别单元1302,用于通过已训练的消化道影像分割模型,获得消化道影像中各个病灶像素点的病灶类别,消化道影像分割模型是根据标识有病灶区域和病灶类别的消化道影像样本训练得到的;The identification unit 1302 is used to obtain the lesion category of each lesion pixel in the digestive tract image through the trained digestive tract image segmentation model. The digestive tract image segmentation model is trained based on digestive tract image samples that are labeled with lesion regions and lesion categories.
分割单元1303,用于根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别的消化道分割影像;其中病灶区域是由相同病灶类别的病灶像素点形成的,病灶区域的病灶类别为形成该病灶区域的像素点的病灶类别。The segmentation unit 1303 is used to obtain a digestive tract segmentation image labeled with lesion region and lesion category based on the lesion category of each lesion pixel; wherein the lesion region is formed by lesion pixels of the same lesion category, and the lesion category of the lesion region is the lesion category of the pixels that form the lesion region.
在一种可能的实施例中,处理装置121包括生成单元1304,其中:In one possible embodiment, the processing device 121 includes a generation unit 1304, wherein:
生成单元1304,用于在根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别消化道分割影像之后,将消化道分割影像叠加至消化道影像中,生成包括确定出的病灶区域和病灶类型的消化道影像。The generation unit 1304 is used to, after obtaining a digestive tract segmentation image with lesion regions and lesion types identified according to the lesion types of each lesion pixel, superimpose the digestive tract segmentation image onto the digestive tract image to generate a digestive tract image including the identified lesion regions and lesion types.
在一种可能的实施例中,处理装置121包括第一确定单元1305和标记单元1306,其中:In one possible embodiment, the processing device 121 includes a first determining unit 1305 and a marking unit 1306, wherein:
第一确定单元1305,用于在根据确定出的各个病灶像素点的病灶类别,获得标识有病灶区域和病灶类别消化道分割影像之后,确定消化道分割影像与针对消化道影像前后预设个消化道影像的消化道分割影像中每个消化道分割影像的交叠率,以及根据确定出的交叠率,确定消化道分割影像的可信度;The first determining unit 1305 is used to determine the overlap rate of the digestive tract segmentation image with each digestive tract segmentation image in the digestive tract segmentation image with the lesion region and lesion category identified according to the lesion category of each lesion pixel, and to determine the credibility of the digestive tract segmentation image based on the determined overlap rate.
标记单元1306,用于在消化道分割影像上标记确定出的可信度。The labeling unit 1306 is used to mark the determined confidence level on the segmented image of the digestive tract.
在一种可能的实施例中,处理装置121还包括训练单元1307,消化道影像样本集包括训练集、验证集和测试集;消化道影像样本集中各个消化道影像样本标注有病灶区域和病灶类别,训练单元1307用于:In one possible embodiment, the processing device 121 further includes a training unit 1307, wherein the digestive tract image sample set includes a training set, a validation set, and a test set; each digestive tract image sample in the digestive tract image sample set is labeled with a lesion region and a lesion category, and the training unit 1307 is used for:
根据训练集中的消化道影像样本,训练消化道影像分割模型;A digestive tract image segmentation model is trained based on digestive tract image samples in the training set.
根据验证集确定针对消化道影像分割模型在多组模型参数下不同分割结果的评价指标结果,确定出针对消化道影像分割模型在多组模型参数下不同分割结果的评价指标结果的多个优选值;Based on the validation set, the evaluation index results of the digestive tract image segmentation model under different segmentation results under multiple sets of model parameters are determined, and multiple optimal values of the evaluation index results of the digestive tract image segmentation model under different sets of model parameters are determined.
根据测试集确定多个优选值中每个优选值对应的模型参数的评价指标结果,直到确定出多个优选值中对应的模型参数的评价指标结果的最优值;Based on the test set, determine the evaluation index results of the model parameters corresponding to each of the multiple optimal values, until the optimal value of the evaluation index results of the model parameters corresponding to the multiple optimal values is determined;
将确定出的最优值所对应的模型参数确定为消化道影像分割模型不同的参数,获得训练完成的消化道影像分割模型。The model parameters corresponding to the determined optimal values are used as different parameters for the digestive tract image segmentation model to obtain the trained digestive tract image segmentation model.
在一种可能的实施例中,训练单元1307具体用于:In one possible embodiment, the training unit 1307 is specifically used for:
以预设误差函数收敛的方向,调整消化道影像分割模型的模型参数;Adjust the model parameters of the digestive tract image segmentation model according to the convergence direction of the preset error function;
其中,预设误差函数是根据交叉熵误差函数和最小化混合误差函数加权得到的,最小化混合误差函数用于表示分割模型针对样本消化道影像中每个像素点的病灶类别的预测结果和针对样本消化道影像每个像素点的所属病灶类别的真实结果之间的相似度。The preset error function is obtained by weighting the cross-entropy error function and the minimized mixed error function. The minimized mixed error function is used to represent the similarity between the segmentation model's prediction of the lesion category of each pixel in the sample digestive tract image and the actual result of the lesion category of each pixel in the sample digestive tract image.
在一种可能的实施例中,消化道影像分割模型包括多个针对不同图像类型的消化道影像样本集分别训练的消化道影像分割模型,处理装置121还包括第二确定单元1308,第二确定单元1308用于:In one possible embodiment, the digestive tract image segmentation model includes multiple digestive tract image segmentation models trained separately for digestive tract image sample sets of different image types. The processing device 121 further includes a second determining unit 1308, which is used for:
在通过已训练的消化道影像分割模型,获得消化道影像中各个病灶像素点的病灶类别之前,识别待处理的消化道影像的图像类型,以及根据消化道影像的图像类型,确定与图像类型关联的消化道影像分割模型;其中,不同的图像类型所关联的消化道影像分割模型不同。Before obtaining the lesion category of each lesion pixel in the digestive tract image through the trained digestive tract image segmentation model, the image type of the digestive tract image to be processed is identified, and the digestive tract image segmentation model associated with the image type is determined according to the image type; different image types are associated with different digestive tract image segmentation models.
作为一种实施例,图13中的生成单元1304、第一确定单元1305、标记单元1306、训练单元1307和第二确定单元1308属于可选的单元。As one embodiment, the generation unit 1304, the first determination unit 1305, the labeling unit 1306, the training unit 1307, and the second determination unit 1308 in FIG13 are optional units.
基于同一发明构思,本申请实施例提供一种医疗系统100,请参照图14,该医疗系统100包括前文论述的内窥镜110、输出模块1401、以及前文论述的处理装置121,处理装置121可以参照前文图13论述的内容,此处不再赘述,其中:Based on the same inventive concept, this application provides a medical system 100. Referring to Figure 14, the medical system 100 includes the endoscope 110 discussed above, the output module 1401, and the processing device 121 discussed above. The processing device 121 can be referred to the content discussed in Figure 13 above, and will not be repeated here. Wherein:
内窥镜110,用于采集待处理的消化道影像,并发送给处理装置121;Endoscope 110 is used to acquire images of the digestive tract to be processed and send them to processing device 121;
输出模块1401,用于输出处理装置获得的消化道分割影像。Output module 1401 is used to output segmented images of the digestive tract obtained by the processing device.
在一种可能的实施例中,医疗系统100中的消化道图像的处理设备120还包括图像筛选模块1402,其中:In one possible embodiment, the digestive tract image processing device 120 in the medical system 100 further includes an image screening module 1402, wherein:
图像筛选模块1402,用于从内窥镜采集的多个消化道影像中,根据已训练的消化道影像筛选识别模型,过滤不符合预设条件的消化道影像,获得待处理的消化道影像,并输出给图像类型识别模块。The image filtering module 1402 is used to filter out digestive tract images that do not meet preset conditions from multiple digestive tract images acquired by endoscopy based on a trained digestive tract image filtering and recognition model, obtain digestive tract images to be processed, and output them to the image type recognition module.
具体的,图像筛选模块1402用于从内窥镜110获得消化道影像,通过预先训练的消化道影像筛选识别模块,将多个消化道影像中不满足预设条件的消化道影像筛掉,可以减少后续处理量,且可以避免这些低质量的影像影响判断结果。消化道影像筛选识别模型可以参照前文论述论述的内容,此处不再赘述。预设条件例如消化道影像的分辨率在预设分辨率范围内、消化道影像的饱和度在预设饱和度范围内,或消化道影像的亮度在预设亮度范围。Specifically, the image filtering module 1402 is used to obtain gastrointestinal images from the endoscope 110. Through a pre-trained gastrointestinal image filtering and recognition module, images that do not meet preset conditions are filtered out from multiple gastrointestinal images. This reduces subsequent processing workload and prevents these low-quality images from affecting the judgment results. The gastrointestinal image filtering and recognition model can be referred to the previous discussion and will not be repeated here. Preset conditions include, for example, the resolution of the gastrointestinal image being within a preset resolution range, the saturation of the gastrointestinal image being within a preset saturation range, or the brightness of the gastrointestinal image being within a preset brightness range.
在一种可能的实施例中,医疗系统100中的消化道图像的处理设备120还包括器官部位识别模块1403,其中:In one possible embodiment, the digestive tract image processing device 120 in the medical system 100 further includes an organ location recognition module 1403, wherein:
器官部位识别模块1403,用于从图像筛选模块获得待处理的消化道影像,并根据已训练的器官分类识别模型,获得消化道影像对应的器官识别结果,并将器官识别结果发送给输出模块1401。The organ part recognition module 1403 is used to obtain the digestive tract image to be processed from the image screening module, and obtain the organ recognition result corresponding to the digestive tract image according to the trained organ classification and recognition model, and send the organ recognition result to the output module 1401.
器官部位识别模块1403用于从图像筛选模块1402获得筛选之后剩余的消化道影像,并根据预先训练的消化道影像器官分类识别模型,识别各个消化道影像对应的器官,并输出器官识别结果,识别出对应的器官,便于医生后续针对不同器官进行诊断。The organ identification module 1403 is used to obtain the remaining digestive tract images after screening from the image screening module 1402, and to identify the organs corresponding to each digestive tract image according to the pre-trained digestive tract image organ classification and recognition model, and output the organ identification results to identify the corresponding organs, so as to facilitate doctors to make subsequent diagnoses for different organs.
作为一种实施例,器官部位识别模块1403也可以在获得器官识别结果之后,将标注有器官识别结果的消化道影像发送给处理装置121,处理装置121在对标注有器官识别结果的消化道影像处理之后,输出携带有器官识别结果、病灶区域、病灶类别的消化道分割影像。As one embodiment, after obtaining the organ identification result, the organ part identification module 1403 can also send the digestive tract image labeled with the organ identification result to the processing device 121. After processing the digestive tract image labeled with the organ identification result, the processing device 121 outputs a digestive tract segmentation image carrying the organ identification result, lesion area, and lesion type.
作为一种实施例,医疗系统100中的图像筛选模块1402和器官部位识别模块1403为可选的模块。As one embodiment, the image screening module 1402 and the organ part recognition module 1403 in the medical system 100 are optional modules.
基于同一发明构思,本申请实施例提供一种计算机设备1500,请参照图15,该计算机设备包括处理器1501和存储器1502。Based on the same inventive concept, this application provides a computer device 1500, as shown in FIG15, which includes a processor 1501 and a memory 1502.
处理器1501可以是一个中央处理单元(central processing unit,CPU),或者为数字处理单元等等。本申请实施例中不限定上述存储器1502和处理器1501之间的具体连接介质。本申请实施例在图15中以存储器1502和处理器1501之间通过总线1503连接,总线1503在图15中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线1503可以分为地址总线、数据总线、控制总线等。为便于表示,图15中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 1501 can be a central processing unit (CPU) or a digital processing unit, etc. This embodiment does not limit the specific connection medium between the memory 1502 and the processor 1501. In Figure 15, the memory 1502 and the processor 1501 are connected via a bus 1503, which is represented by a thick line. The connection methods between other components are only illustrative and not intended to be limiting. The bus 1503 can be an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in Figure 15, but this does not indicate that there is only one bus or one type of bus.
存储器1502可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器1502也可以是非易失性存储器(non-volatilememory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器1502是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器1502可以是上述存储器的组合。Memory 1502 may be volatile memory, such as random-access memory (RAM); memory 1502 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1502 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. Memory 1502 may be a combination of the above-described memories.
处理器1501,用于调用存储器1502中存储的计算机程序时执行如图5~图12中所示的实施例中各设备涉及的方法。The processor 1501 is used to execute the methods involved in the various devices in the embodiments shown in Figures 5 to 12 when calling the computer program stored in the memory 1502.
基于同样的发明构思,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如图5~图12中所示的实施例中各设备涉及的方法。Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the methods involved in the various devices in the embodiments shown in Figures 5 to 12.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims (12)
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40018665A HK40018665A (en) | 2020-10-09 |
| HK40018665B true HK40018665B (en) | 2023-10-13 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110600122B (en) | Digestive tract image processing method and device and medical system | |
| US12154680B2 (en) | Endoscopic image display method, apparatus, computer device, and storage medium | |
| Chiu | A novel approach based on computerized image analysis for traditional Chinese medical diagnosis of the tongue | |
| Xia et al. | Use of artificial intelligence for detection of gastric lesions by magnetically controlled capsule endoscopy | |
| JP7152513B2 (en) | Image recognition method, device, terminal equipment and medical system, and computer program thereof | |
| Pogorelov et al. | Deep learning and hand-crafted feature based approaches for polyp detection in medical videos | |
| Cho et al. | Comparison of convolutional neural network models for determination of vocal fold normality in laryngoscopic images | |
| BR112020008774A2 (en) | APPARATUS TO ASSIST IN IMAGING DIAGNOSIS, METHOD FOR DATA COLLECTION, METHOD TO ASSIST IN IMAGING DIAGNOSIS AND PROGRAM TO ASSIST IN IMAGING DIAGNOSIS | |
| CN111899229A (en) | Advanced gastric cancer auxiliary diagnosis method based on deep learning multi-model fusion technology | |
| WO2022057078A1 (en) | Real-time colonoscopy image segmentation method and device based on ensemble and knowledge distillation | |
| CN110189303B (en) | NBI image processing method based on deep learning and image enhancement and application thereof | |
| JP7550409B2 (en) | Image diagnosis device, image diagnosis method, and image diagnosis program | |
| Liu et al. | TN‐USMA Net: Triple normalization‐based gastrointestinal stromal tumors classification on multicenter EUS images with ultrasound‐specific pretraining and meta attention | |
| Jiang et al. | GlanceSeg: Real-time microaneurysm lesion segmentation with gaze-map-guided foundation model for early detection of diabetic retinopathy | |
| Pogorelov et al. | Deep learning and handcrafted feature based approaches for automatic detection of angiectasia | |
| CN118397280B (en) | Endoscopic gastrointestinal tract image segmentation and recognition system and method based on artificial intelligence | |
| JP7522154B2 (en) | A program for identifying Hanna lesions | |
| Bejakovic et al. | Analysis of Crohn's disease lesions in capsule endoscopy images | |
| Ham et al. | Improvement of gastroscopy classification performance through image augmentation using a gradient-weighted class activation map | |
| Sun et al. | A novel gastric ulcer differentiation system using convolutional neural networks | |
| US20230401700A1 (en) | Systems and methods for identifying images containing indicators of a celiac-like disease | |
| Özbay | Gastrointestinal tract disease classification using residual-inception transformer with wireless capsule endoscopy images segmentation | |
| US20250037278A1 (en) | Method and system for medical endoscopic imaging analysis and manipulation | |
| Li et al. | Wireless capsule endoscopy anomaly classification via dynamic multi-task learning | |
| Fu et al. | Automatic diagnosis model of gastrointestinal diseases based on tongue images |