CT sequence report generation method and system based on multi-instance graph network

Through the multi-instance graph network model, multi-head attention and graph networks are used to extract 3D features of CT sequences, which solves the problem of one-sided information and difficult lesion identification in CT image description, and improves the accuracy and efficiency of reporting.

CN118553368APending Publication Date: 2024-08-27BEIJING UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410640758.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing CT image description methods are mainly based on a single image and ignore the three-dimensional characteristics of CT images, resulting in one-sided information and easy to ignore or misidentify when identifying lesions. Moreover, due to the scarcity and privacy issues of medical data, external knowledge assistance Signals are difficult to construct and are time-consuming and labor-intensive.

Method used

Using the CT sequence report generation method based on multi-instance graph network, through multi-instance module of multi-head attention, graph network module and improved transformer decoder, a multi-instance graph network model is constructed, supervised multi-instance learning is performed, and CT sequence is extracted 3D image features, using graph structure characteristics to generate more accurate medical reports.

Benefits of technology

It improves the accuracy and efficiency of medical image analysis, is superior to single slice features and CNN models, enhances key slice selection and lesion feature learning, improves reporting accuracy, and can better utilize the 3D information of CT sequences to generate detailed medical report.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118553368A
    Figure CN118553368A
Patent Text Reader

Abstract

The invention discloses a CT sequence report generation method and system based on a multi-instance graph network, and the method comprises the steps: constructing a data set of a CT sequence, and carrying out the cutting preprocessing of the data set; the method comprises the following steps of: constructing a multi-instance graph network model by adopting a multi-head attention multi-instance module, a graph network module and an improved transformer decoder; inputting the preprocessed CT sequence and the corresponding text sequence into a multi-instance graph network model for training until a cross entropy loss function is converged to be globally optimal, and completing training; and inputting a to-be-predicted CT sequence into the trained multi-instance graph network model, and generating a text medical report corresponding to the CT sequence. According to the technical scheme, the accuracy and efficiency of medical image analysis are improved, and the accuracy of report generation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image description, and in particular to a CT sequence report generation method based on a multi-instance graph network and a CT sequence report generation system based on a multi-instance graph network. Background Art

[0002] As a highly efficient examination method widely used in clinical practice, CT technology has become a mainstream tool that covers the detection range of almost most organs in the body. It is estimated that hundreds of millions of CT medical imaging examinations are performed every year around the world. This shows the huge task that doctors face when processing medical images and generating corresponding diagnostic reports. Medical professionals need to analyze large amounts of imaging data in a busy working environment to ensure accurate diagnosis and effective treatment of patients.

[0003] These medical images are usually read by well-trained and experienced medical experts. They write text reports to describe the patient's abnormalities and the diseases found. Usually, it takes 5 to 20 minutes for a professional radiologist to read a CT (computed tomography) image and enter the examination results. Many radiologists read hundreds of radiology images every day and write down the examination results for each image. The reading of medical images and the writing of medical reports almost occupy most of the working time of radiologists. This is a difficult and time-consuming task for medical experts. Computer-aided diagnosis technology can help us generate medical reports effectively and reduce the burden.

[0004] Early methods were mainly based on rules and templates. The generated sentences had fixed templates, detected relevant elements such as objects, scenes, and actions in the image, filled in relevant words in the template, and combined them into sentences. Later, people converted the image description task into a retrieval problem based on the assumption that similar images have the same titles. With the rise of deep learning and the use of deep neural networks, image description technology has made great breakthroughs. This method uses an end-to-end trainable network to directly learn the mapping from image to description. In most cases, it adopts an encoder-decoder structure by combining a convolutional neural network (CNN) with a recurrent neural network (RNN).

[0005] Many researchers have done a lot of research on the application of deep learning in medical image description and proposed many practical methods, but they are basically based on X-ray images. In recent years, with the widespread application of CT technology in the medical field, more and more research has been done on CT image description. At present, the best CT image description method was proposed by Mingjie Li et al. in 2022.

[0006] Existing CT image description methods are mainly based on a single image, ignoring the three-dimensional characteristics of CT images. A single image can only provide information on a specific section and cannot fully reflect the distribution of lesions in three-dimensional space. Relying solely on a single image for diagnosis may lead to one-sided information and affect the comprehensive understanding of the disease.

[0007] Secondly, a CT scan contains up to two to three hundred slices, most of which do not contain lung window information or lesion information and have no reference value during diagnosis. Manual screening of valuable slices is a very time-consuming and labor-intensive task. How to automatically learn slices containing lesion information from a large number of redundant CT slices is also one of the issues that need to be considered urgently.

[0008] Third, medical images are different from natural images. Doctors generally focus on lesion information, which accounts for a very small proportion of the entire image. Especially when the contrast between the lesions and the surrounding normal tissues is low, it is easy to ignore or misidentify these lesions.

[0009] Fourth, due to the scarcity of medical data and the involvement of data privacy and security issues, building external knowledge-assisted signals is not easy and is time-consuming and laborious. Summary of the invention

[0010] In response to the above problems, the present invention provides a CT sequence report generation method and system based on a multi-instance graph network. CT sequence features are acquired through a supervised multi-instance learning method, 3D image data are processed through a graph neural network, and richer feature information is extracted using the graph structure characteristics, thereby improving the accuracy and efficiency of medical image analysis. By combining the multi-instance method with the graph neural network, the 3D information of the CT sequence can be better utilized to generate more accurate medical reports. The report generation method is superior to single slice features and only based on CNN model feature extraction in terms of key slice selection and lesion feature learning. The selection of key slices and the learning of spatial positions between slices enhance the semantic details and feature relationships of the CT sequence, thereby improving the accuracy of report generation.

[0011] To achieve the above object, the present invention provides a method for generating a CT sequence report based on a multi-instance graph network, comprising:

[0012] Constructing a data set of CT sequences, and performing cropping preprocessing on the data set;

[0013] A multi-instance graph network model is constructed using a multi-head attention multi-instance module, a graph network module, and an improved transformer decoder;

[0014] Input the preprocessed data set and the corresponding text sequence into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training;

[0015] The CT sequence to be predicted is input into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence.

[0016] In the above technical solution, preferably, the specific method of constructing a multi-instance graph network model using a multi-head attention multi-instance module, a graph network module and an improved transformer decoder includes:

[0017] The multi-instance module is used to extract slice features from the CT sequence, calculate the attention score of each slice of the CT sequence through a multi-head attention mechanism, learn the weights of different slices of the CT sequence, and obtain key slices;

[0018] The graph network module is used to determine the features of the key slices, and to construct a timing graph according to the timing relationship between the features to determine the timing features of the CT sequence;

[0019] The transformer decoder is used to determine the word with the highest probability in each time step according to the temporal characteristics of the CT sequence, and use the determined words to predict the word with the highest probability in the next time step according to the preset time step, so as to comprehensively generate a text description.

[0020] In the above technical solution, preferably, in the timing graph constructed by the graph network module for the features of the key slices, the graph nodes are represented by the features of each slice, the relationship between the graph nodes is represented by an adjacency matrix, and the graph network module is provided with a hyperparameter, and the value of the adjacency matrix is ​​determined by whether each slice is connected to the hyperparameter number of slices before and after it.

[0021] In the above technical solution, preferably, the preprocessed data set and the corresponding text sequence are input into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training. The specific training process includes:

[0022] The CT sequence in the data set is taken as input and the corresponding text sequence of the real medical report is taken as the label. The output of the model is the predicted medical text sequence. The cross-entropy loss function measures the gap between the predicted output of the model and the real label. Through multiple iterations, forward propagation, loss calculation, back propagation and parameter update are repeated. The model gradually learns the mapping relationship between the input and the label. In each training step, by continuously minimizing the loss function, the model parameters will be adjusted in the direction of making the predicted value closer to the real label until the cross-entropy loss function converges to the global optimum, so that the difference between the text medical report generated by the trained multi-instance graph network model for the CT sequence and the actual medical report is minimized, thereby realizing the training of the multi-instance graph network model.

[0023] In the above technical solution, preferably, the step of inputting the CT sequence to be predicted into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence includes:

[0024] For a CT sequence to be predicted, the CT sequence is clipped and preprocessed, and the preprocessed CT sequence is input into the trained multi-instance graph network model;

[0025] The multi-instance graph network model obtains the key slices of the CT sequence and determines the temporal relationship between the slices. The decoder determines the word with the highest probability in each time step according to the temporal relationship, and uses the determined words to predict the word with the highest probability in the next time step according to the preset time step, obtains the predicted words for all time steps, and generates a text medical report corresponding to the CT sequence.

[0026] The present invention also proposes a CT sequence report generation system based on a multi-instance graph network, which uses the CT sequence report generation method based on a multi-instance graph network disclosed in any one of the above technical solutions, including:

[0027] A data set preprocessing module, used for constructing a data set of a CT sequence and performing cropping preprocessing on the data set;

[0028] A learning model building module for building a multi-instance graph network model using a multi-head attention multi-instance module, a graph network module, and an improved transformer decoder;

[0029] A model training learning module is used to input the preprocessed data set and the corresponding text sequence into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training;

[0030] The model generates a report module, which is used to input the CT sequence to be predicted into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence.

[0031] In the above technical solution, preferably, the learning model construction module is specifically used for:

[0032] The multi-instance module is used to extract slice features from the CT sequence, calculate the attention score of each slice of the CT sequence through a multi-head attention mechanism, learn the weights of different slices of the CT sequence, and obtain key slices;

[0033] The graph network module is used to determine the features of the key slices, and to construct a timing graph according to the timing relationship between the features to determine the timing features of the CT sequence;

[0034] The transformer decoder is used to determine the word with the highest probability in each time step according to the temporal characteristics of the CT sequence, and use the determined words to predict the word with the highest probability in the next time step according to the preset time step, so as to comprehensively generate a text description.

[0035] In the above technical solution, preferably, in the timing graph constructed by the graph network module for the features of the key slices, the graph nodes are represented by the features of each slice, the relationship between the graph nodes is represented by an adjacency matrix, and the graph network module is provided with a hyperparameter, and the value of the adjacency matrix is ​​determined by whether each slice is connected to the hyperparameter number of slices before and after it.

[0036] In the above technical solution, preferably, the model training learning module is specifically used for:

[0037] The CT sequence in the data set is taken as input and the corresponding text sequence of the real medical report is taken as the label. The output of the model is the predicted medical text sequence. The cross-entropy loss function measures the gap between the predicted output of the model and the real label. Through multiple iterations, forward propagation, loss calculation, back propagation and parameter update are repeated. The model gradually learns the mapping relationship between the input and the label. In each training step, by continuously minimizing the loss function, the model parameters will be adjusted in the direction of making the predicted value closer to the real label until the cross-entropy loss function converges to the global optimum, so that the difference between the text medical report generated by the trained multi-instance graph network model for the CT sequence and the actual medical report is minimized, thereby realizing the training of the multi-instance graph network model.

[0038] In the above technical solution, preferably, the model generating report module is specifically used for:

[0039] For a CT sequence to be predicted, the CT sequence is clipped and preprocessed, and the preprocessed CT sequence is input into the trained multi-instance graph network model;

[0040] The multi-instance graph network model obtains the key slices of the CT sequence and determines the temporal relationship between the slices. The decoder determines the word with the highest probability in each time step according to the temporal relationship, and uses the determined words to predict the word with the highest probability in the next time step according to the preset time step, obtains the predicted words for all time steps, and generates a text medical report corresponding to the CT sequence.

[0041] Compared with the prior art, the beneficial effects of the present invention are as follows: CT sequence features are acquired through a supervised multi-instance learning method, 3D image data are processed through a graph neural network, and richer feature information is extracted using graph structure characteristics, thereby improving the accuracy and efficiency of medical image analysis. The combination of a multi-instance method and a graph neural network can better utilize the 3D information of the CT sequence to generate more accurate medical reports. It is superior to single-slice features and report generation methods based only on CNN model feature extraction in terms of key slice selection and lesion feature learning. The selection of key slices and the learning of spatial positions between slices enhance the semantic details and feature relationships of the CT sequence, thereby improving the accuracy of report generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic flow chart of a method for generating a CT sequence report based on a multi-instance graph network disclosed in an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of a framework logic of a method for generating a CT sequence report based on a multi-instance graph network disclosed in an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of the architecture of a multi-instance graph network model disclosed in an embodiment of the present invention;

[0045] Figure 4 A schematic diagram of the adjacency of slices according to hyper parameters disclosed in an embodiment of the present invention;

[0046] Figure 5 A text generation logic diagram of an improved transformer decoder disclosed in an embodiment of the present invention;

[0047] Figure 6 A schematic diagram of text generation logic of an improved transformer decoder in a training process disclosed in an embodiment of the present invention;

[0048] Figure 7 A text generation logic diagram of an improved transformer decoder in an implementation process disclosed in an embodiment of the present invention;

[0049] Figure 8A schematic diagram of modules of a CT sequence report generation system based on a multi-instance graph network disclosed in an embodiment of the present invention.

[0050] In the figure, the corresponding relationship between each component and the reference numeral is as follows:

[0051] 1. Dataset preprocessing module, 2. Learning model building module, 3. Model training and learning module, 4. Model report generation module. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0054] like Figure 1 and Figure 2 As shown, a method for generating a CT sequence report based on a multi-instance graph network according to the present invention includes:

[0055] Construct a CT sequence data set and perform cropping and preprocessing on the data set;

[0056] A multi-instance graph network model is constructed using a multi-head attention multi-instance module, a graph network module, and an improved transformer decoder;

[0057] The preprocessed data set and the corresponding text sequence are input into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training;

[0058] The CT sequence to be predicted is input into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence.

[0059] In this embodiment, CT sequence features are acquired through a supervised multi-instance learning method, 3D image data is processed through a graph neural network, and richer feature information is extracted using graph structure characteristics, thereby improving the accuracy and efficiency of medical image analysis. The combination of a multi-instance method and a graph neural network can better utilize the 3D information of the CT sequence to generate more accurate medical reports. It is superior to single-slice features and report generation methods based only on CNN model feature extraction in terms of key slice selection and lesion feature learning. The selection of key slices and the learning of spatial positions between slices enhance the semantic details and feature relationships of the CT sequence, thereby improving the accuracy of report generation.

[0060] Specifically, multiple instance learning (MIL) is a supervised learning method that takes as input a series of labeled "packages", each of which includes many instances. It allows the model to learn instance class labels from package class labels, and has achieved good results in weak label learning. Graph neural networks (GNNs) have shown great potential in processing unstructured data and reasoning about information in graph structures. Graph neural networks can directly process 3D image data and use the characteristics of graph structures to extract richer feature information, thereby improving the accuracy and efficiency of medical image analysis.

[0061] The present invention improves the accuracy of acquiring semantic information of 3D CT sequences through a multi-instance graph network model, thereby improving the accuracy of report generation.

[0062] First, construct the data set. Since the number of samples is extremely unbalanced, cases with less than 10 CT slices can be deleted. Considering that there are many slices in the CT sequence that do not contain lung windows at the front and back, they have no reference value. According to the proportion, only the middle 1 / 3 of the slices in the CT sequence can be retained to form the final data set.

[0063] Then, the data set is preprocessed. Since the lung window in the CT slice only occupies the central part of the entire image and the rest is irrelevant noise, the center position of the image can be found and cropped according to the inscribed square of its inscribed circle.

[0064] Then, the obtained dataset is input into the multi-instance graph network model for learning. In the multi-instance graph network model, the features of the most important 32 slices are learned from the 1 / 3 slices of each case through the multi-instance module, and then the relationship between these 32 features in the time dimension (i.e. the front and back position relationship) is learned through the graph network module. The finally learned CT slice features are sent to the decoder to realize the text generation task and obtain the text medical report corresponding to the CT sequence.

[0065] like Figure 3As shown, in the above implementation, preferably, the specific method of constructing a multi-instance graph network model using a multi-head attention multi-instance module, a graph network module and an improved transformer decoder includes:

[0066] The multi-instance module is used to extract slice features from the CT sequence, calculate the attention score of each slice of the CT sequence through the multi-head attention mechanism, learn the weights of different slices of the CT sequence, and obtain the key slices;

[0067] The graph network module is used to determine the features of key slices and construct a timing graph based on the temporal relationship between the features to determine the temporal features of the CT sequence;

[0068] The transformer decoder is used to determine the word with the highest probability at each time step according to the temporal characteristics of the CT sequence, and use the determined words to predict the word with the highest probability at the next time step according to the preset time step, and comprehensively generate a text description.

[0069] Specifically, in order to solve the problem that a single CT slice cannot obtain complete and comprehensive lesion information, and when using the entire CT sequence for learning, there is too much redundant information, which is not conducive to quickly and accurately capturing its features, and other issues that affect the accuracy of medical image description, the present invention adopts a multi-instance graph network model. First, the entire CT sequence is learned using a multi-instance module to find multiple key instances, i.e., key slices. Then, the graph network module is used to learn the sequence relationship between slices, thereby utilizing the third-dimensional temporal features of the CT sequence, and finally input into the decoder for the text generation task. The training goal of this model is to train a decoder that can generate a corresponding text description report output for a given CT sequence Images(1,,,n) input.

[0070] Among them, the multi-instance module can select key slices from numerous CT slices (usually two or three hundred). The input of this module is the patient-level CT sequence, and the input feature dimension is [batch, MLI_nums, channel, height, width]. The first is batch, the second is the number of instances in the package (the number of CT scan slices for each patient's one-time scan), which varies here (because the number of CT slices for different patients may be different), the third is the number of image channels, and the last two dimensions are height and width. Through the multi-instance module, we learn the most important 32 slices from these 1 / 3 slices and input them into the subsequent tasks. Specifically, for the input CT sequence images with the dimension images ∈ R[batch, MLI_nums, channel, height, width], the slice features fea ∈ R[batch, MLI_nums, 2048, 7, 7] are extracted using resnet-101. The attention scores scores ∈ R[MLI_nums, 1] of each instance slice are calculated through the multi-head attention mechanism and normalized. The top_k = 32 CT slices with the highest attention scores are found, and their features fea ∈ R[batch, 32, 2048] are returned.

[0071] For example, use resnet101 to extract slice features from CT sequence packages with different numbers, learn the weights of different slices in each package through multi-head attention, and finally set parameters to retain the 32 most important slices. The features of these 32 slices are F = {f1, f2... f32}, where F ∈ R n*d (n = 32, d = 2048) are input into the graph network GAT.

[0072] As Figure 4 shown, among them, the graph network module can learn the relationships between different slices and utilize the time dimension of the slices to guide text generation. The features fea ∈ R[batch, 32, 2048] of the key slices are obtained by the multi-instance module. A temporal graph is constructed for these 32 slices. The graph nodes are represented by the features of each slice. Each graph will have 32 nodes. The relationship between nodes is represented by an adjacency matrix A, where A ∈ (0,1)32*32. The value of A is determined by whether each slice is connected to several of its previous and subsequent slices. Here, a hyperparameter M is set. If the slice corresponding to the current node is adjacent to the previous and next M slices, that is, |i - j| < M, then Aij is set to 1, otherwise it is set to 0.

[0073] Preferably, in the temporal graph G(A, F) constructed by the graph network module for the features of the key slices, where the graph nodes are represented by the features of each slice, the relationship between the graph nodes is represented by an adjacency matrix, A ∈ (0,1)n*n The adjacency matrix is ​​set with a hyperparameter in the graph network module. The value of the adjacency matrix A is determined by whether each slice is connected to the hyperparameter number of slices before and after it. The hyperparameter M is set. If the slice corresponding to the current node is adjacent to the M slices before and after it, then A ij is set to 1, otherwise it is set to 0, where |ij| <M。

[0074] Specifically, the graph network module constructs a graph based on the key slice features fea∈R[batch,32,2048], and each slice sequence (one batch corresponds to one CT sequence) will get a node feature sequence representation node∈R[32,2048] and an adjacency matrix representation A∈(0,1) 32*32 The obtained node feature sequence is represented as node∈R[32,2048], and the adjacency matrix is ​​represented as A∈(0,1) 32*32 , input into the GAT network, learn the final representation of the central node, and finally each graph is output as graph∈R[32,2048], and the entire network output is graphs∈R[batch,32,2048].

[0075] like Figure 5 As shown, the decoder module can generate a text description based on the image features. Since the transformer can handle long sequence dependencies well, it is used as the decoder of the present invention and is improved. The decoder has two inputs, one is the image feature and the other is the text feature. In the standard codec structure, a multi-head attention mechanism with an attention gate is used to replace the ordinary multi-head attention mechanism. Existing studies have proved that the attention gate is effective in the codec. Compared with the traditional multi-head attention mechanism, the multi-head attention mechanism with an attention gate performs a layer of attention processing on the obtained attention result and the query on the basis of the traditional multi-head attention mechanism, so that the obtained attention result pays more attention to the information related to the query.

[0076] Among them, the final output of the multi-head attention based on the attention gate is Let i be called the information vector, which is the result of query and multi-head attention. The linear transformation g is called the attention gate, which is the result of query and multi-head attention. Linear transformation, and then the filtered attention obtained by nonlinear operation sigmoid, the specific formula is:

[0077]

[0078]

[0079] in, and are all learnable weights, b i 、b g is the bias term, and σ is the sigmoid function.

[0080] like Figure 6 As shown in the figure, during the training process, the decoder module inputs the entire text sequence [batch, seq_len, tgt_dim], where seq_len is the text length, that is, how many words there are, and tgt_dim is the text embedding dimension. At this time, it is equivalent to having data for each time step, and the next word for each time step can be predicted at the same time. The output of the model is [batch, seq_len, vocab_size], where vocab_size is the vocabulary size, and each vocab_size dimension represents the probability of each word in the vocabulary. The word with the highest probability is the word predicted at the corresponding position. Finally, the prediction result and the original text sequence, that is, the true value, are used for cross entropy loss and continuous optimization.

[0081] like Figure 7 As shown, during the implementation process, a text starting value is initialized (that is, the first word of the text, the default subscript is 0, and we also set the first word of each sentence to 0 during training). Specifically, the starting value [batch, 1, tgt_dim] is input into the decoder, and the decoder will obtain a probability distribution of the next word [batch, 1, vocab_size]; then the subscript with the largest probability in [1, vocab_size] of each batch is calculated, and the corresponding word is the next word to be predicted; finally, the predicted word and the first word are connected into a sequence, and then input into the decoder. At this time, the input dimension is [batch, 2, vocab_size], and so on, until the generated sequence reaches the preset maximum length seq_len.

[0082] In the above implementation, preferably, the preprocessed data set and the corresponding text sequence are input into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training. The specific training process includes:

[0083] The CT sequence in the data set is taken as input and the corresponding text sequence of the real medical report is taken as the label. The output of the model is the predicted medical text sequence. The cross-entropy loss function measures the gap between the predicted output of the model and the real label. Through multiple iterations, forward propagation, loss calculation, back propagation and parameter update are repeated. The model gradually learns the mapping relationship between the input and the label. In each training step, by continuously minimizing the loss function, the model parameters will be adjusted in the direction of making the predicted value closer to the real label until the cross-entropy loss function converges to the global optimum, so that the difference between the text medical report generated by the trained multi-instance graph network model for the CT sequence and the actual medical report is minimized, thereby realizing the training of the multi-instance graph network model.

[0084] In this embodiment, a cross entropy loss function is used to measure the difference between the description generated by the model and the actual description. The loss function is as follows:

[0085]

[0086] in,

[0087] L: Cross entropy loss value, which is the objective function value that needs to be minimized.

[0088] N: number of samples, which indicates the total number of samples in the training data set.

[0089] T: sequence length, which represents the number of words (or other units) in each generated medical report.

[0090] C: Vocabulary size, which indicates the total number of possible words.

[0091] y i,t,c : The true label of the i-th sample corresponding to the vocabulary c at the t-th time step. If the true vocabulary of the i-th sample at the t-th time step is c, then y i,t,c =1; otherwise y i,t,c =0.

[0092] p i,t,c : The model predicts the probability that the i-th sample belongs to vocabulary c at the t-th time step. This probability is usually obtained by passing the model's output through a softmax activation function, satisfying 0≤p i,t,c ≤1 and

[0093]

[0094] In the above implementation, preferably, the CT sequence to be predicted is input into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence. The specific process includes:

[0095] For the CT sequence to be predicted, the CT sequence is cropped and preprocessed, and the preprocessed CT sequence is input into the trained multi-instance graph network model;

[0096] The multi-instance graph network model obtains the key slices of the CT sequence and determines the temporal relationship between the slices. The decoder determines the word with the highest probability in each time step based on the temporal relationship, and uses the determined words to predict the word with the highest probability in the next time step according to the preset time step. The predicted words for all time steps are obtained, and a text medical report corresponding to the CT sequence is generated.

[0097] like Figure 8 As shown, the present invention also proposes a CT sequence report generation system based on a multi-instance graph network, applying the CT sequence report generation method based on a multi-instance graph network disclosed in any one of the above embodiments, including:

[0098] Dataset preprocessing module 1, used to construct the CT sequence data set and perform cropping preprocessing on the data set;

[0099] Learning model building module 2, used to build a multi-instance graph network model using a multi-head attention multi-instance module, a graph network module and an improved transformer decoder;

[0100] Model training learning module 3, used to input the preprocessed data set and the corresponding text sequence into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training;

[0101] The model generation report module 4 is used to input the CT sequence to be predicted into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence.

[0102] In the above implementation, preferably, the learning model building module 2 is specifically used for:

[0103] The multi-instance module is used to extract slice features from the CT sequence, calculate the attention score of each slice of the CT sequence through the multi-head attention mechanism, learn the weights of different slices of the CT sequence, and obtain the key slices;

[0104] The graph network module is used to determine the features of key slices and construct a timing graph based on the temporal relationship between the features to determine the temporal features of the CT sequence;

[0105] The transformer decoder is used to determine the word with the highest probability at each time step according to the temporal characteristics of the CT sequence, and use the determined words to predict the word with the highest probability at the next time step according to the preset time step, and comprehensively generate a text description.

[0106] In the above embodiment, preferably, in the timing graph constructed by the graph network module for the features of the key slices, the graph nodes are represented by the features of each slice, the relationship between the graph nodes is represented by an adjacency matrix, and the graph network module is provided with a hyperparameter, and the value of the adjacency matrix is ​​determined by whether each slice is connected to the hyperparameter number of slices before and after it.

[0107] In the above implementation, preferably, the model training learning module 3 is specifically used for:

[0108] The CT sequence in the data set is taken as input and the corresponding text sequence of the real medical report is taken as the label. The output of the model is the predicted medical text sequence. The cross-entropy loss function measures the gap between the predicted output of the model and the real label. Through multiple iterations, forward propagation, loss calculation, back propagation and parameter update are repeated. The model gradually learns the mapping relationship between the input and the label. In each training step, by continuously minimizing the loss function, the model parameters will be adjusted in the direction of making the predicted value closer to the real label until the cross-entropy loss function converges to the global optimum, so that the difference between the text medical report generated by the trained multi-instance graph network model for the CT sequence and the actual medical report is minimized, thereby realizing the training of the multi-instance graph network model.

[0109] In the above implementation, preferably, the model generating report module 4 is specifically used for:

[0110] For the CT sequence to be predicted, the CT sequence is cropped and preprocessed, and the preprocessed CT sequence is input into the trained multi-instance graph network model;

[0111] The multi-instance graph network model obtains the key slices of the CT sequence and determines the temporal relationship between the slices. The decoder determines the word with the highest probability in each time step based on the temporal relationship, and uses the determined words to predict the word with the highest probability in the next time step according to the preset time step. The predicted words for all time steps are obtained, and a text medical report corresponding to the CT sequence is generated.

[0112] According to the CT sequence report generation system based on a multi-instance graph network disclosed in the above-mentioned embodiment, the functions to be implemented by each module thereof correspond to the respective steps in the CT sequence report generation method based on a multi-instance graph network disclosed in the above-mentioned embodiment. During the implementation process, the operation is performed with reference to the above-mentioned embodiment, which will not be repeated here.

[0113] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating CT sequence reports based on a multi-instance graph network, characterized in that: include: Constructing a data set of CT sequences, and performing cropping preprocessing on the data set; A multi-instance graph network model is constructed using a multi-head attention multi-instance module, a graph network module, and an improved transformer decoder; Input the preprocessed data set and the corresponding text sequence into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training; The CT sequence to be predicted is input into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence.

2. The method for generating CT sequence reports based on a multi-instance graph network according to claim 1, characterized in that: The specific method of constructing a multi-instance graph network model using a multi-head attention multi-instance module, a graph network module and an improved transformer decoder includes: The multi-instance module is used to extract slice features from the CT sequence, calculate the attention score of each slice of the CT sequence through a multi-head attention mechanism, learn the weights of different slices of the CT sequence, and obtain key slices; The graph network module is used to determine the features of the key slices, and to construct a timing graph according to the timing relationship between the features to determine the timing features of the CT sequence; The transformer decoder is used to determine the word with the highest probability in each time step according to the temporal characteristics of the CT sequence, and use the determined words to predict the word with the highest probability in the next time step according to the preset time step, so as to comprehensively generate a text description.

3. The method for generating CT sequence reports based on a multi-instance graph network according to claim 2, characterized in that: In the timing graph constructed by the graph network module for the features of key slices, the graph nodes are represented by the features of each slice, and the relationships between the graph nodes are represented by an adjacency matrix. The graph network module is provided with a hyperparameter, and the value of the adjacency matrix is ​​determined by whether each slice is connected to the hyperparameter number of slices before and after it.

4. The method for generating CT sequence reports based on a multi-instance graph network according to claim 3, characterized in that: The preprocessed data set and the corresponding text sequence are input into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training. The specific training process includes: The CT sequence in the data set is taken as input and the corresponding text sequence of the real medical report is taken as the label. The output of the model is the predicted medical text sequence. The cross-entropy loss function measures the gap between the predicted output of the model and the real label. Through multiple iterations, forward propagation, loss calculation, back propagation and parameter update are repeated. The model gradually learns the mapping relationship between the input and the label. In each training step, by continuously minimizing the loss function, the model parameters will be adjusted in the direction of making the predicted value closer to the real label until the cross-entropy loss function converges to the global optimum, so that the difference between the text medical report generated by the trained multi-instance graph network model for the CT sequence and the actual medical report is minimized, thereby realizing the training of the multi-instance graph network model.

5. The method for generating CT sequence reports based on a multi-instance graph network according to claim 4, characterized in that: The CT sequence to be predicted is input into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence. The specific process includes: For a CT sequence to be predicted, the CT sequence is clipped and preprocessed, and the preprocessed CT sequence is input into the trained multi-instance graph network model; The multi-instance graph network model obtains the key slices of the CT sequence and determines the temporal relationship between the slices. The decoder determines the word with the highest probability in each time step according to the temporal relationship, and uses the determined words to predict the word with the highest probability in the next time step according to the preset time step, obtains the predicted words for all time steps, and generates a text medical report corresponding to the CT sequence.

6. A CT sequence report generation system based on a multi-instance graph network, characterized in that: The method for generating a CT sequence report based on a multi-instance graph network as claimed in any one of claims 1 to 5 comprises: A data set preprocessing module, used for constructing a data set of a CT sequence and performing cropping preprocessing on the data set; A learning model building module for building a multi-instance graph network model using a multi-head attention multi-instance module, a graph network module, and an improved transformer decoder; A model training learning module is used to input the preprocessed data set and the corresponding text sequence into the multi-instance graph network model for training until the cross entropy loss function converges to the global optimum to complete the training; The model generates a report module, which is used to input the CT sequence to be predicted into the trained multi-instance graph network model to generate a text medical report corresponding to the CT sequence.

7. The CT sequence report generation system based on multi-instance graph network according to claim 6, characterized in that: The learning model building module is specifically used for: The multi-instance module is used to extract slice features from the CT sequence, calculate the attention score of each slice of the CT sequence through a multi-head attention mechanism, learn the weights of different slices of the CT sequence, and obtain key slices; The graph network module is used to determine the features of the key slices, and to construct a timing graph according to the timing relationship between the features to determine the timing features of the CT sequence; The transformer decoder is used to determine the word with the highest probability in each time step according to the temporal characteristics of the CT sequence, and use the determined words to predict the word with the highest probability in the next time step according to the preset time step, so as to comprehensively generate a text description.

8. The CT sequence report generation system based on multi-instance graph network according to claim 7, characterized in that: In the timing graph constructed by the graph network module for the features of key slices, the graph nodes are represented by the features of each slice, and the relationships between the graph nodes are represented by an adjacency matrix. The graph network module is provided with a hyperparameter, and the value of the adjacency matrix is ​​determined by whether each slice is connected to the hyperparameter number of slices before and after it.

9. The CT sequence report generation system based on multi-instance graph network according to claim 8, characterized in that: The model training learning module is specifically used for: The CT sequence in the data set is taken as input and the corresponding text sequence of the real medical report is taken as the label. The output of the model is the predicted medical text sequence. The cross-entropy loss function measures the gap between the predicted output of the model and the real label. Through multiple iterations, forward propagation, loss calculation, back propagation and parameter update are repeated. The model gradually learns the mapping relationship between the input and the label. In each training step, by continuously minimizing the loss function, the model parameters will be adjusted in the direction of making the predicted value closer to the real label until the cross-entropy loss function converges to the global optimum, so that the difference between the text medical report generated by the trained multi-instance graph network model for the CT sequence and the actual medical report is minimized, thereby realizing the training of the multi-instance graph network model.

10. The CT sequence report generation system based on multi-instance graph network according to claim 9, characterized in that: The model generation report module is specifically used for: For a CT sequence to be predicted, the CT sequence is clipped and preprocessed, and the preprocessed CT sequence is input into the trained multi-instance graph network model; The multi-instance graph network model obtains the key slices of the CT sequence and determines the temporal relationship between the slices. The decoder determines the word with the highest probability in each time step according to the temporal relationship, and uses the determined words to predict the word with the highest probability in the next time step according to the preset time step, obtains the predicted words for all time steps, and generates a text medical report corresponding to the CT sequence.

Citation Information

Cited By

  • Medical image report generation method and system based on multi-feature enhancement

    CN119623423A

  • A medical image report generation method and system based on multi-feature enhancement

    CN119623423B