Image report generation method based on X-ray chest radiography and related equipment

The medical imaging report generation technology is encoded and decoded through deep learning networks, which solves the problems of text degradation and insufficient fine-grained exploration of features, improves the accuracy and reliability of reports, and reduces text repetition rates.

CN118571401AInactive Publication Date: 2024-08-30PEKING UNIVERSITY THIRD HOSPITAL (THE THIRD CLINICAL MEDICAL SCHOOL OF PEKING UNIVERSITY)
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411058757.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing medical imaging report generation technology has shortcomings in accuracy and reliability, especially due to the text degradation problem caused by the maximum likelihood estimation method and the neglect of fine-grained exploration of image and text features, resulting in unnecessary unnecessary errors in the generated report. repeat.

Method used

The prior knowledge graph, chest X-ray and clinical information are encoded through the deep learning network, decoders and algorithms are used to limit text generation, reduce the repetition rate, and the distance between the output value and the true value is improved through the loss function to improve medical science. Accuracy and reliability of imaging reporting.

Benefits of technology

It improves the accuracy and reliability of medical imaging report generation, reduces the repetition rate of text generation, and generates reports with greater diversity and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118571401A
    Figure CN118571401A
Patent Text Reader

Abstract

The invention provides an X-ray chest radiography-based image report generation method and related equipment, and is applied to the technical field of data processing. According to the method, to-be-detected image information and an initial image report generation model matched with a target chest radiograph image are obtained, the to-be-detected image information comprises the chest radiograph image of a target patient and clinical information of the target patient, and the initial image report generation model comprises an encoder and a decoder; obtaining a training sample set for training the initial image report generation model; processing the training sample set based on a preset processing rule to generate a training set and a verification set; training the initial image report generation model based on the training set and the verification set, and generating a target image report generation model; processing the target chest radiograph image based on a target image report generation model to generate fused visual features and text coding features; and processing the fused visual features and the text coding features based on a target image report generation model to generate an image diagnosis report.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method for generating an image report based on an X-ray chest film and related equipment. Background Art

[0002] Medical imaging reports are the main medium for radiologists to convey patients' medical scan results and diagnostic results, and have important reference value for clinical diagnosis and treatment. Therefore, radiologists need to write these reports accurately and in detail. In recent years, image-text matching methods based on deep learning have made great breakthroughs, which can be roughly divided into one-to-one global matching methods and many-to-many fine-grained matching methods; one-to-one global matching methods usually extract global feature representations of images and sentences, and then embed the global features of images and sentences into a joint space, and measure their similarity through the feature distance of the joint space. This method represents the entire image or text with a global vector, ignoring that the key information in the image may be a few key areas or the key information in the text may be a key word. It lacks fine-grained exploration of image and text features, resulting in mediocre performance.

[0003] In addition, the current research on medical imaging report generation technology is still in its infancy. In existing medical imaging report generation schemes, medical knowledge graphs are usually used for subtasks such as classification, but they are not integrated into the model, resulting in low accuracy and reliability of medical imaging report generation. Most existing text generation works use maximum likelihood estimation (MLE) to train language models. However, this modeling method usually leads to text degradation problems, that is, the generated radiology reports often contain unnecessary text repetitions, which may appear at the word level, phrase level, or sentence level. In previous work related to automatic report generation, no work has been specifically studied on this issue.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of this application is to provide an imaging report generation method based on chest X-ray films and related equipment, which at least overcomes the problems existing in the prior art to a certain extent, uses a deep learning network to encode the features of a priori knowledge graph, chest X-ray, and clinical information, decodes the received encoded information through a decoder, and uses an algorithm to limit text generation during the decoding process to reduce the repetition rate of text generation. During model training, the distance between the output value and the true value is continuously improved through a loss function, thereby improving the accuracy and reliability of medical imaging report generation.

[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.

[0007] According to one aspect of the present application, a method for generating an image report based on an X-ray chest film is provided, comprising: obtaining image information to be detected and an initial image report generation model that matches a target chest X-ray image, wherein the image information to be detected includes a chest X-ray image of a target patient and clinical information of the target patient; obtaining a training sample set for training the initial image report generation model, wherein the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, and the chest images to be trained include clinical information of different patients; processing the training sample set based on preset processing rules to generate a training set and a verification set; training the initial image report generation model based on the training set and the verification set to generate a target image report generation model; processing the target chest X-ray image based on the target image report generation model to generate fused visual features and text encoding features; processing the fused visual features and the text encoding features based on the target image report generation model to generate an image diagnosis report.

[0008] In one embodiment of the present application, the acquisition of a training sample set for training an initial imaging report generation model includes: acquiring a preset chest X-ray report data set; processing the chest X-ray report data set to obtain radioactive features and correlation co-occurrence frequencies; processing the radioactive features and the correlation co-occurrence frequencies to generate correlation matrix information; and generating a priori knowledge graph for characterizing chest images based on the correlation matrix information.

[0009] In one embodiment of the present application, the processing of the radioactive features and the correlation co-occurrence frequency to generate correlation matrix information includes: the method includes a calculation formula for calculating the correlation co-occurrence frequency, and the calculation formula is: ;in, Representation concept and Concept Number of co-occurrences at the report level. Representation concept The total number of occurrences. Representation concept Concept of appearance Frequency of occurrence. Based on co-occurrence frequency A correlation matrix can be constructed :The method includes a calculation formula for calculating the correlation matrix, and the calculation formula is: ;in, is the co-occurrence frequency threshold, if Greater than or equal to threshold , then the concept To concept There is a correlation, otherwise there is no correlation.

[0010] In one embodiment of the present application, the training sample set is processed based on preset processing rules to generate a training set and a verification set, including: extracting features from the training sample set to generate an original feature library; dividing the training sample set according to the original feature library to generate a training set and a verification set; using a classifier to predict each verification set divided from the original feature library to determine a prediction result; using a preset algorithm to train each training set divided from the original feature library to obtain a verification set class prediction result.

[0011] In one embodiment of the present application, the initial image report generation model is trained based on the training set and the validation set to generate a target image report generation model, including: processing the training set based on a window constrained contrast learning loss method to generate a word unit vector value; training the initial image report generation model based on the word unit vector value to generate a target image report generation model; wherein the window constrained contrast learning loss method includes a calculation formula for obtaining a word unit vector value, and the calculation formula is: ;in, is the window constraint parameter, represents the feature representation of the i-th generated word, Represents the feature representation of the j-th generated word.

[0012] In one embodiment of the present application, the target chest X-ray image is processed based on the target image report generation model to generate fused visual features and text coding features, including: the target image report generation model includes a calculation formula for obtaining fused visual features, and the calculation formula is: ;in, represents the i-th label value of the current sample, represents the probability value of the i-th element, and k is the classification probability of k main nodes; the target image report generation model includes a calculation formula for obtaining text encoding features, and the calculation formula is: ; Where T represents the total number of disease keywords used for classification supervision.

[0013] In one embodiment of the present application, the target image report generation model processes the fused visual features and the text encoding features to generate an image diagnosis report, including: obtaining a report generation loss function; processing the fused visual features and the text encoding features based on the report generation loss function to generate an image diagnosis report; the target image includes a generation model including a calculation formula for obtaining a report generation loss function, and the calculation formula is: ; Among them, yij∈{0,1} represents the label value of the jth word in the dictionary corresponding to the i-th word unit, which is 1 if it is the word, otherwise it is 0, and pij∈{0,1} is the probability that the i-th word unit corresponds to the j-th word in the dictionary.

[0014] Another aspect of the present application is an image report generation device based on an X-ray chest film, characterized in that it includes: an acquisition module, used to acquire image information to be detected and an initial image report generation model that matches a target chest X-ray image, wherein the image information to be detected includes a chest X-ray image of a target patient and clinical information of the target patient; acquiring a training sample set for training the initial image report generation model, wherein the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, and the chest images to be trained include clinical information of different patients; a processing module, used to process the training sample set based on preset processing rules to generate a training set and a verification set; training the initial image report generation model based on the training set and the verification set to generate a target image report generation model; processing the target chest X-ray image based on the target image report generation model to generate fused visual features and text encoding features; processing the fused visual features and the text encoding features based on the target image report generation model to generate an image diagnosis report.

[0015] According to another aspect of the present application, an electronic device is provided, characterized in that it comprises: a first processor; and a memory for storing executable instructions of the first processor; wherein the first processor is configured to implement the above-mentioned method for generating an image report based on a chest X-ray by executing the executable instructions.

[0016] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a second processor, the above-mentioned method for generating an image report based on a chest X-ray is implemented.

[0017] According to another aspect of the present application, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a third processor, the computer program implements the above-mentioned method for generating an image report based on a chest X-ray.

[0018] The present application provides an image report generation method based on an X-ray chest film and related equipment, wherein a server obtains image information to be detected and an initial image report generation model that matches a target chest X-ray image, wherein the image information to be detected includes a chest X-ray image of a target patient and clinical information of the target patient, and the initial image report generation model includes an encoder and a decoder; a training sample set for training the initial image report generation model is obtained, wherein the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, wherein the chest images to be trained include clinical information of different patients; the training sample set is processed based on preset processing rules to generate a training set and a verification set; the initial image report generation model is trained based on the training set and the verification set to generate a target image report generation model; the target chest X-ray image is processed based on the target image report generation model to generate fused visual features and text encoding features; the fused visual features and text encoding features are processed based on the target image report generation model to generate an image diagnosis report. A deep learning network is used to encode the features of prior knowledge graphs, chest X-rays, and clinical information. The received encoded information is decoded by a decoder. During the decoding process, an algorithm is used to limit text generation and reduce the repetition rate of text generation. During model training, the distance between the output value and the true value is continuously improved through the loss function, thereby improving the accuracy and reliability of medical imaging report generation.

[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of a method for generating an image report based on an X-ray chest film provided in an embodiment of the present application is shown; Figure 2 A schematic structural diagram of an imaging report generating device based on an X-ray chest film provided in an embodiment of the present application is shown; Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown; Figure 4 A schematic diagram of a storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0021] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0022] Combine the following Figure 1To describe the method for generating an image report based on an X-ray chest film according to an exemplary embodiment of the present application. It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this regard. On the contrary, the embodiments of the present application can be applied to any applicable scenario.

[0023] In one embodiment, the present application also proposes a method for generating an imaging report based on a chest X-ray and related equipment. Figure 1 The following schematically shows a flow chart of a method for generating an image report based on an X-ray chest film according to an embodiment of the present application. Figure 1 As shown, the method is applied to a server, comprising: S101, obtaining image information to be detected and an initial image report generation model that matches the target chest X-ray image.

[0024] In one embodiment, the image information to be detected includes a chest X-ray image of the target patient and clinical information of the target patient, wherein the clinical information of the target patient includes information contained in the application form issued by the clinical department when the target patient comes for treatment (for example, symptoms such as chest pain and cough), and the chest X-ray image of the target patient is the image information obtained from the latest physical examination of the target patient, which is processed by a subsequent target image report generation model to generate a diverse image report.

[0025] S102, obtaining a training sample set for training an initial image report generation model.

[0026] In one embodiment, the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, wherein the chest images to be trained include clinical information of different patients. The training sample set includes information of several standard substances. In addition, the data of the training sample set includes patient data from different hospitals, and is divided into a training group (281 cases) and an internal test group (122 cases) at a ratio of 7:3 using a random number table method, wherein the identification information is used to characterize the attributes of various types of material information, and the initial image report generation model is trained based on the training sample set with identification information to generate a target image report generation model. Specifically, the data classification result corresponding to the training sample set is obtained, because the classification result of each training sample set can be determined in advance, and the data can be directly obtained from the outside. Compare the prediction result with the data classification result to determine the first comparison result; compare the prediction result of the validation set class with the data classification result to determine the second comparison result; judge whether the second comparison result meets the preset requirements with the first comparison result. When the preset requirements are met, it indicates that the detection result of the current image report generation model is relatively accurate. At this time, the current image report generation model can be used as the target image report generation model.

[0027] In another embodiment, the dataset used in the experiment is the Chinese Chest X-ray Report Generation Dataset (CCXRD). The evaluation indicators adopt indicators in the field of natural language generation (NLG), including BLEU, METEOR, ROUGE-L and CIDEr. In order to comprehensively evaluate the clinical effectiveness (CE), the F1 score, precision and recall rate of the generated report containing the disease were calculated. At the same time, the applicant also reported the evaluation results at the macro and micro levels. In order to evaluate the text quality of the generated report, the applicant used the rep-n indicator to evaluate the repetition of the report, and used the diversity indicator to measure the diversity of the text.

[0028] In the comparative experiments, due to the fact that some models are not public or cannot be reproduced, only three advanced algorithms, R2Gen, Fluent and Prior, are compared compared with the comparative experiments on English datasets. As shown in Table 1, the model proposed in this paper outperforms the comparative algorithms in all NLG indicators.

[0029]

[0030] Table 1 compares the NLG indicators of this study and recent studies on Chinese datasets, as shown above.

[0031] Table 2 shows the results of macro and micro F1 scores, and our method performs best in both metrics. However, R2Gen performs best in the micro precision metric, which shows that its memory-driven module does a better job of retaining the information of the two main categories of "no obvious abnormality" and "increased lung texture", resulting in the model's excellent performance in generating this category, thereby improving micro precision, but this is also reflected in the lower performance of macro precision. This shows that the high value of micro precision does not fully represent the superiority of the model due to the high proportion of normal samples and "increased lung texture" samples in the dataset. Compared with the baseline model Fluent, our method has improved both precision and recall, thanks to the use of prior knowledge to enhance the image representation ability, resulting in high-quality text reports. At the same time, the macro F1 value of the Chinese dataset is 0.2814, which is lower than 0.4199 of the English dataset. This is mainly due to the uneven distribution of Chinese data and the small proportion of multiple disease labels. The micro F1 value is 0.7194, which is higher than 0.5904 of the English dataset. This is mainly due to the large proportion of labels "no obvious abnormality" and "increased lung texture" in the dataset. The generation accuracy of this label significantly affects the micro F1 value, which is also a notable feature of the Chinese dataset constructed in this paper.

[0032]

[0033] Table 2 is a comparison of the clinical effect indicators of this study and recent studies on the Chinese data set, as shown above.

[0034] The data in Table 3 show that the proposed method has achieved the best performance in all text degradation indicators. Compared with the Prior method, although both use prior knowledge, the window-constrained contrastive learning algorithm proposed in this paper has achieved significant improvements in solving the text degradation problem, and the generated text has higher diversity. Although the baseline model Fluent performs worst in the text diversity indicator, the proposed method achieves the highest text diversity due to the use of the window-constrained contrastive learning algorithm, which further confirms the effectiveness of the proposed algorithm.

[0035]

[0036] Table 3 is a comparison of text degradation indicators between this study and recent studies on Chinese datasets, as shown above.

[0037] In another embodiment, a preset chest X-ray report data set is obtained; the chest X-ray report data set is processed to obtain radiological features and correlation co-occurrence frequencies; the radiological features and correlation co-occurrence frequencies are processed to generate correlation matrix information; and a prior knowledge graph for characterizing chest images is generated based on the correlation matrix information. Radiological concepts and their correlations are extracted from the chest X-ray report data set using data mining, and the relationship between medical concepts is established to form a prior knowledge graph. Then, domain experts check one by one whether the correlation between concepts is established, complete the calibration of the correlation matrix, and thus complete the construction of the prior knowledge graph.

[0038] In another embodiment, the present invention further includes a calculation formula for calculating the correlation co-occurrence frequency, wherein the specific calculation formula is: ; in, Representation concept and Concept Report the number of co-occurrences. Representation concept The total number of occurrences. Representation concept Concept of appearance Frequency of occurrence. Based on co-occurrence frequency A correlation matrix can be constructed : In addition, the present invention also includes a calculation formula for calculating the correlation matrix, and the specific calculation formula is: ; in, is the co-occurrence frequency threshold, if Greater than or equal to threshold , then the concept To concept There is a correlation, otherwise there is no correlation. Domain experts check one by one whether the correlation between concepts is established, complete the calibration of the correlation matrix, and thus complete the construction of the prior knowledge graph.

[0039] In another embodiment, in the stage of constructing the prior knowledge graph, the number of high-frequency radiology concepts m is set to 40. When , the co-occurrence frequency threshold τ is set to 0.5, and the pre-trained Densenet121 is used as the image encoder. The input image size is 256×256 pixels, and the image enhancement only uses the rotation operation; Dropout is set to 0.2. The graph convolution network uses a two-layer GCN network, the number of nodes in the prior knowledge graph is 40, and the feature dimension e is 256. The text encoder uses an 8-head single-layer Transformer layer, the dictionary size is 1000, the number of feedforward neurons is 256, and the vector embedding dimension is also 256. The classifier B uses an attention network with a 256-dimensional embedding vector. The number of output label categories t is 114, of which the first 14 represent the disease label categories of the dataset, and the last 100 represent the high-frequency medical terms obtained by statistics. In the generator part, the number of Transformer layers N is 12, the dictionary size v is 1000, and the feature dimension is is 256. Window parameters in window-constrained contrastive learning The value is 4 and the window size is 9. The Adam optimizer is used for model training, with a learning rate of 3e-4, a weight decay rate of 1e-2, a training cycle of 50 epochs, a data batch size of 8, and the AutoTokenizer of the bert-base-chinese model for Chinese word segmentation, with a dictionary size of 21,128.

[0040] S103, processing the training sample set based on preset processing rules to generate a training set and a validation set.

[0041] In one implementation, feature extraction is performed on the training sample set to generate an original feature library; the training sample set is divided according to the original feature library to generate a training set and a validation set; a classifier is used to predict each validation set divided by the original feature library to determine the prediction result; a preset algorithm is used to train each training set divided in the original feature library to obtain a validation set class prediction result. Standard material information is processed based on preset processing rules to generate standardized features, wherein standardized features are features of samples or motifs with clear and known material composition; standardized features are processed based on preset feature screening and dimensionality reduction rules to generate original features; and a number of original features are used to generate an original feature library.

[0042] In another embodiment, the standard material information is processed based on preset processing rules to generate standardized features, wherein the standardized features are features of chest organs with clear and known material composition; the standardized features are processed based on preset feature screening and dimensionality reduction rules to generate original features; and a number of original features are used to generate an original feature library. Feature extraction is performed on the training data set to generate an original feature library, wherein the feature extraction includes four features: original features, statistical features, frequency domain features, and time domain features. The extracted common features are specifically introduced as follows: Original features: The original features are the collected data, after preprocessing, using all the information in each sample data matrix for model training. In order not to lose sample information, each curve of the sample Xi is directly unfolded and stretched into a row vector. Statistical features: Statistical features consider the changing trend of all data points on the curve. By extracting statistical features, the dimension of the data sample can be reduced, which is convenient for analyzing genetic data and accelerating the convergence speed during model training. The extracted statistical features include maximum value, minimum value, mean, variance, and standard deviation. Frequency domain features: Perform wavelet transform on the data set, and use the coefficients obtained by the second-order wavelet transform as new features to form frequency domain features. Time domain features: Time domain features are mainly based on the time perspective to invent the changing laws of signals and systems. Time domain features can reflect the information of curve data in time changes. This process mainly extracts the first-order forward difference of the data set to form the first-order difference time domain features, and uses the exponential moving average feature processing method.

[0043] S104: Training the initial image report generation model based on the training set and the validation set to generate a target image report generation model.

[0044] In one implementation, a training set is processed based on a window-constrained contrastive learning loss method to generate word-unit vector values; an initial image report generation model is trained based on the word-unit vector values ​​to generate a target image report generation model.

[0045] The target image report generation model includes an encoder and a decoder, which represents the feature obtained by the encoder. As input, generate a radiology report with decoding: ;in, is a radiology report generator, which consists of N Transformer layers and an attention module. The attention weight of the generator output is , represents the probability of the model generating a text sequence, l represents the sequence length, and v represents the dictionary size. is the feature representation corresponding to the generator output text sequence, that is, the word vector value corresponding to each word in the sequence, The dimension of the feature representation. The radiology report generator outputs the text sequence probability At the same time, it also outputs the feature representation of each word in the text sequence , which is expanded to .in, Indicates The feature representation corresponding to the generated word.

[0046] Among them, the window-constrained contrastive learning loss method includes a calculation formula for obtaining the word element vector value, and the specific calculation formula is: ;in, is the window constraint parameter, setting the window size to . The optimization goal is to make is similar only to itself, and the characteristic representation Dissimilarities enable the model to be calibrated in the word-unit representation space, prompting the image report generation model to learn discriminative and isotropic word vector representations; represents the feature representation of the i-th generated word, Represents the feature representation of the j-th generated word.

[0047] In another embodiment, multiple data groups are extracted from the training set, wherein each data group includes a preset number of data samples, wherein at least one data sample includes identification information, and the data corresponding to the identification information may be an X-ray chest image with different lesion types. The initial image report generation model is trained based on the data samples in the multiple data groups to generate a trained image report generation model.

[0048] In addition, since the data for training the imaging report generation model may be too small and the proportion of each stage in the training data is uneven, the Stable Diffusion model is used to generate chest images. First, based on the real image used as the target distribution, that is, the stable distribution, according to the principle of the stable diffusion model, a stable diffusion model suitable for chest image generation is constructed. The model consists of multiple deconvolution layers and other neural network layers, and the chest image is reversely generated through the reverse diffusion process. During the training process, starting from the stable distribution (that is, the real image distribution), the stable diffusion model is used for the reverse diffusion process. The reverse diffusion process will gradually blur the image until the virtual chest image corresponding to the stable distribution is obtained. The virtual chest image generated in this way has the corresponding characteristic information, which can be used for subsequent lesion judgment and material component identification.

[0049] In the process of back diffusion, noise is introduced to control the diversity and randomness of the generated chest images. By adjusting the intensity of the noise, the clarity and style of the generated images can be affected, thereby obtaining more diverse virtual chest images. In addition, the initial noise is set. Specifically, this initial noise can be random Gaussian noise or uniformly distributed noise. The purpose is to introduce some randomness in the early stage of generating images to encourage the model to generate diverse initial images. Next, the noise intensity is adjusted and gradually reduced during the generation process. This can be achieved by controlling the noise parameters in the generation network or gradually reducing the standard deviation of the added noise during the training process. Gradually reducing the intensity of the noise helps the model gradually improve the clarity and quality of the image during the generation process. By introducing initial noise and gradually reducing the intensity of the noise, the model can generate more random and diverse images, which helps to generate a series of chest images with different features or cases, and helps to stabilize the distribution of more comprehensive learning data for the diffusion model. The trained model is more likely to cope with the input of noise or incomplete information, thereby improving the robustness of the model and making it more suitable for various uncertain factors in the real world.

[0050] The trained image report generation model is processed based on the validation set to generate a test result; if the data sample containing identification information in the test result indicates that the radiation dose of the current area is in an abnormal state, the trained image report generation model is used as the target image report generation model.

[0051] S105, processing the target chest X-ray image based on the target image report generation model to generate fused visual features and text coding features.

[0052] In one implementation, the multi-view image encoder encodes the target chest X-ray image and inputs the image into the graph convolutional network with the medical prior knowledge obtained above, thereby obtaining a fused visual feature. Prior knowledge loss function , this loss function is designed to enable the graph convolutional network module to better integrate prior knowledge and image information to enhance the image encoder capability. The graph convolutional network module obtains visual features containing prior knowledge After that, node selection is performed to obtain , and feed it into classifier A to get the probability of each class: , the network structure of classifier A A fully connected network. is the classification probability of k main nodes. The target image report generation model includes a calculation formula for obtaining fused visual features. The specific calculation formula is: ,in, ∈{0,1} represents the i-th label value of the current sample, which is 1 if the label exists, otherwise it is 0. is the probability value of the i-th element, is the classification probability of k main nodes.

[0053] In another embodiment, in the text encoding part, the clinical information is input into the text encoder to obtain the text encoding features, and the clinical information loss function , this loss function is designed to enable the text encoder to fully acquire clinical text information and better integrate it with visual features. From a clinical perspective, this is consistent with the practice that radiologists usually use clinical information as an aid and guide when observing new chest radiographs. The classification probability can be obtained through classifier B Based on this, the clinical information loss function can be defined ,The target image report generation model includes a calculation formula for obtaining text encoding features, and the specific calculation formula is: , where T represents the total number of disease keywords used for classification supervision.

[0054] S106: Process the fused visual features and the text encoding features based on the target image report generation model to generate an image diagnosis report.

[0055] In one implementation, obtaining a report generates a loss function This loss function supervises the consistency between the report text generated by the model and the reference report text. It is the basic loss function for all chest radiograph report automatic generation tasks. The above content describes in detail how to obtain the generated text probability from the generator. .

[0056] Based on the report generation loss function, the fused visual features and text encoding features are processed to generate an image diagnosis report; during training, the text probability obtained in the generator is used to calculate the generation loss to supervise the generation of the image diagnosis report text, and during inference, the image diagnosis report is generated based on the probability distribution search. In addition, the target image includes a generation model including a calculation formula for obtaining the report generation loss function, which is: , where yij∈{0,1} represents the label value of the jth word in the dictionary corresponding to the i-th word. If it is the word, it is 1, otherwise it is 0. pij∈{0,1} is the probability that the i-th word corresponds to the jth word in the dictionary. The final imaging diagnosis report example is as follows: the bilateral lung fields are clear, no obvious consolidation shadows are found in the lungs, the hilar shadows are not large, the mediastinum is centered, the size and shape of the heart shadow are normal, the bilateral diaphragmatic surfaces are smooth, and the costophrenic angles are sharp.

[0057] In the present application, the server obtains the image information to be detected and the initial image report generation model that matches the target chest X-ray image, wherein the image information to be detected includes the chest X-ray image of the target patient and the clinical information of the target patient; obtains a training sample set for training the initial image report generation model, wherein the training sample set includes a prior knowledge graph for characterizing the chest image and the chest image to be trained, wherein the chest image to be trained includes the clinical information of different patients; processes the training sample set based on preset processing rules to generate a training set and a verification set; trains the initial image report generation model based on the training set and the verification set to generate a target image report generation model; processes the target chest X-ray image based on the target image report generation model to generate fused visual features and text encoding features; processes the fused visual features and text encoding features based on the target image report generation model to generate an image diagnosis report. A deep learning network is used to encode the features of prior knowledge graphs, chest X-rays, and clinical information. The received encoded information is decoded by a decoder. During the decoding process, an algorithm is used to limit text generation and reduce the repetition rate of text generation. During model training, the distance between the output value and the true value is continuously improved through the loss function, thereby improving the accuracy and reliability of medical imaging report generation.

[0058] Optionally, in another embodiment of the method of the present application, the processing of the training sample set based on a preset processing rule to generate a training set and a validation set further includes: Dividing the training set to generate a number of numerical samples; Obtain any number of samples of several categories in the training set; Generate adjacent samples based on the distance between the any number of number-class samples and other number-class samples of the same category, wherein the adjacent samples include a preset number of the any number of number-class samples; Sampling the adjacent samples to generate a preset number of sampling samples; Based on any minority class sample and each sampling sample, multiple data groups are generated, wherein each data group includes a preset number of data samples.

[0059] In one embodiment, the distance between any number of smaller number of class samples and each other number of smaller number of class samples of the same category can be Euclidean distance or other cosine distance, which is not specifically limited here. All other number of smaller number of class samples can be arranged in order from near to far distance from any other number of smaller number of class samples, and then the data in the first few positions of the arrangement result are selected as adjacent samples. The purpose of sampling is to increase the number of minority class samples to achieve a balance between the number of minority class samples and the number of majority class samples in the initial sample set. Here, oversampling can be achieved by a sampling algorithm, which is not specifically limited here. After oversampling, multiple groups of data groups can be determined based on the results obtained by oversampling and combined with the training set. At this time, the number of descriptive data samples corresponding to each attribute category label in the data group is equivalent, and there are no number of smaller number of class samples or number of larger number of class samples. In this embodiment, the training set is first preliminarily divided, and then the number of smaller number of class samples is merged with the number of larger number of class samples.

[0060] Optionally, in another embodiment of the method of the present application, the step of sampling the adjacent samples to generate a preset number of sampled samples includes: Determining a sampling ratio based on the number of samples of each category in the training set; Based on the sampling ratio, determining a sampling ratio; The adjacent samples are sampled based on the sampling ratio to generate a preset number of sampling samples.

[0061] In one implementation, first obtain which data groups are included in the training set, confirm how many number class samples there are in each data group, and determine the sampling ratio according to the number of number class samples in each data group, and then use the sampling ratio to determine the sampling ratio. The sampling ratio can be set as needed, for example, it can be 50% or other ratios, which are not specifically limited here. Finally, use the sampling ratio to sample a preset number of adjacent samples to obtain a specified number of sampled samples, and all other smaller number of number class samples can be arranged in order from near to far in terms of distance from any smaller number of number class samples, and then select the preset number of samples ranked first in the arrangement result as neighboring samples, and the preset number can be set according to actual conditions, which is not specifically limited here. Based on any smaller number of number class samples and each sampled sample, a new sample is generated and used as a new data group, so that the balance effect between the smaller number of data groups and the other larger number of data groups can be further improved.

[0062] By applying the above technical solution, the server obtains the image information to be detected and the initial image report generation model matching the target chest X-ray image, wherein the image information to be detected includes the chest X-ray image of the target patient and the clinical information of the target patient; obtains a preset chest X-ray report data set; processes the chest X-ray report data set to obtain radioactive features and correlation co-occurrence frequencies; processes the radioactive features and the correlation co-occurrence frequencies to generate correlation matrix information; the method includes a calculation formula for calculating the correlation co-occurrence frequency, and the calculation formula is: :It also includes the calculation formula for calculating the correlation matrix, the calculation formula is .

[0063] A priori knowledge graph for characterizing chest images is generated based on relevant matrix information, wherein the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, wherein the chest images to be trained include clinical information of different patients; feature extraction is performed on the training sample set to generate an original feature library; the training sample set is divided according to the original feature library to generate a training set and a validation set; a classifier is used to predict each validation set divided by the original feature library to determine the prediction result; a preset algorithm is used to train each training set divided in the original feature library to obtain a validation set class prediction result; the training set is processed based on a window constrained contrast learning loss method to generate a word element vector value; an initial image report generation model is trained based on the word element vector value to generate a target image report generation model; wherein the window constrained contrast learning loss method includes a calculation formula for obtaining the word element vector value, and the calculation formula is: .

[0064] The target chest X-ray image is processed based on the target image report generation model to generate fused visual features and text encoding features; the target image report generation model includes a calculation formula for obtaining the fused visual features, and the calculation formula is: ; The target image report generation model includes a calculation formula for obtaining text encoding features, and the calculation formula is: ; Obtain a report generation loss function; Based on the report generation loss function, process the fused visual features and text encoding features to generate an image diagnosis report; The target image includes a generation model including a calculation formula for obtaining a report generation loss function, and the calculation formula is: . A deep learning network is used to encode the features of the prior knowledge graph, chest X-ray, and clinical information. The decoder is used to decode the received encoded information. During the decoding process, an algorithm is used to limit text generation and reduce the repetition rate of text generation. During model training, the distance between the output value and the true value is continuously improved through the loss function, thereby improving the accuracy and reliability of medical imaging report generation.

[0065] In one embodiment, if Figure 2 As shown, the present application also provides an imaging report generating device based on an X-ray chest film, comprising: The acquisition module 201 is used to acquire image information to be detected and an initial image report generation model that matches a target chest X-ray image, wherein the image information to be detected includes a chest X-ray image of a target patient and clinical information of the target patient; and to acquire a training sample set for training the initial image report generation model, wherein the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, wherein the chest images to be trained include clinical information of different patients; The processing module 202 is used to process the training sample set based on preset processing rules to generate a training set and a verification set; train the initial image report generation model based on the training set and the verification set to generate a target image report generation model; process the target chest X-ray image based on the target image report generation model to generate fused visual features and text coding features; process the fused visual features and the text coding features based on the target image report generation model to generate an image diagnosis report.

[0066] In another embodiment of the present application, the processing module 202 is configured to obtain a training sample set for training the initial imaging report generation model, including: Obtain a preset chest X-ray report data set; Processing the chest X-ray report data set to obtain radiological features and correlation co-occurrence frequencies; Processing the radioactive features and the co-occurrence frequencies of the related phenomena to generate correlation matrix information; A priori knowledge graph for characterizing chest images is generated based on the relevant current matrix information.

[0067] In another embodiment of the present application, the processing module 202 is configured to process the radioactive features and the correlation co-occurrence frequencies to generate correlation matrix information, including: The method includes a calculation formula for calculating the correlation co-occurrence frequency, and the calculation formula is: ; in, Representation concept and Concept Number of co-occurrences at the report level. Representation concept The total number of occurrences. Representation concept Concept of appearance Frequency of occurrence. Based on co-occurrence frequency A correlation matrix can be constructed : The method includes a calculation formula for calculating a correlation matrix, which is: ; in, is the co-occurrence frequency threshold, if Greater than or equal to threshold , then the concept To concept There is a correlation, otherwise there is no correlation.

[0068] In another embodiment of the present application, the processing module 202 is configured to process the training sample set based on a preset processing rule to generate a training set and a validation set, including: Extracting features from the training sample set to generate an original feature library; Divide the training sample set according to the original feature library to generate a training set and a validation set; Use the classifier to divide the original feature library into various verification sets for prediction and determine the prediction results; Use the preset algorithm to divide the original feature library into various training sets for training and obtain the prediction results of the validation set class.

[0069] In another embodiment of the present application, the processing module 202 is configured to train the initial image report generation model based on the training set and the validation set to generate a target image report generation model, including: Processing the training set based on a window-constrained contrastive learning loss method to generate word-unit vector values; Training the initial image report generation model based on the word element vector value to generate a target image report generation model; The window-constrained contrastive learning loss method includes a calculation formula for obtaining a word element vector value, and the calculation formula is: ; in, is the window constraint parameter, represents the feature representation of the i-th generated word, Represents the feature representation of the j-th generated word.

[0070] In another embodiment of the present application, the processing module 202 is configured to process the target chest X-ray image based on the target image report generation model to generate fused visual features and text coding features, including: The target image report generation model includes a calculation formula for obtaining fused visual features, and the calculation formula is: ; in, represents the i-th label value of the current sample, represents the probability value of the i-th element in Pprior, and k is the classification probability of k main nodes; The target image report generation model includes a calculation formula for obtaining text encoding features, and the calculation formula is: ; Among them, T represents the total number of disease keywords used for classification supervision.

[0071] In another embodiment of the present application, the processing module 202 is configured to process the fused visual features and the text encoding features based on the target image report generation model to generate an image diagnosis report, including: Get report to generate loss function; Processing the fused visual features and the text encoding features based on the report generation loss function to generate an imaging diagnosis report; The target image includes a generation model including a calculation formula for obtaining a report generation loss function, the calculation formula is: ; Among them, yij∈{0,1} represents the label value of the jth word in the dictionary corresponding to the i-th word unit, which is 1 if it is the word, otherwise it is 0, and pij∈{0,1} is the probability that the i-th word unit corresponds to the j-th word in the dictionary.

[0072] The present application embodiment provides an electronic device, such as Figure 3 As shown, the electronic device 3 includes a first processor 300, a memory 301, a bus 302 and a communication interface 303. The first processor 300, the communication interface 303 and the memory 301 are connected via the bus 302. The memory 301 stores a computer program that can be run on the first processor 300. When the first processor 300 runs the computer program, it executes the image report generation method based on the X-ray chest film provided in any of the aforementioned embodiments of the present application.

[0073] The memory 301 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 303 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0074] The bus 302 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 301 is used to store a program, and the first processor 300 executes the program after receiving an execution instruction. The image report generation method based on a chest X-ray film disclosed in any implementation of the embodiment of the present application may be applied to the first processor 300, or implemented by the first processor 300.

[0075] The first processor 300 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 300. The above-mentioned first processor 300 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be embodied as a hardware decoding processor to execute, or a combination of hardware and software modules in the decoding processor to execute. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 301, and the first processor 300 reads the information in the memory 301 and completes the steps of the above method in combination with its hardware.

[0076] The electronic device provided in the above-mentioned embodiment of the present application and the method for generating an image report based on an X-ray chest film provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0077] The present application embodiment provides a computer-readable storage medium, such as Figure 4 As shown, the computer-readable storage medium 401 stores a computer program, and when the computer program is read and executed by the second processor 402, the aforementioned method for generating an image report based on a chest X-ray is implemented.

[0078] The technical solution of the embodiment of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device (which may be an air conditioner, a refrigeration device, a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0079] The computer-readable storage medium provided in the above-mentioned embodiment of the present application and the method for generating an image report based on an X-ray chest film provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0080] An embodiment of the present application provides a computer program product, including a computer program, wherein the computer program is executed by a third processor to implement the method described above.

[0081] The computer program product provided in the above-mentioned embodiments of the present application and the method for generating an image report based on an X-ray chest film provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0082] It should be noted that, in this application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or still includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0083] Each embodiment in the present application is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the evaluation of the imaging report generation method based on chest X-ray films, electronic devices, electronic devices, and readable storage medium embodiments, since they are basically similar to the above-mentioned imaging report generation method based on chest X-ray films, the description is relatively simple, and the relevant parts can be referred to the partial description of the above-mentioned imaging report generation method based on chest X-ray films.

[0084] Although the present application is disclosed as above, the present application is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application shall be subject to the scope defined by the claims.

Claims

1. A method for generating an image report based on an X-ray chest film, characterized in that: include: Acquire image information to be detected and an initial image report generation model that matches a target chest X-ray image, wherein the image information to be detected includes a chest X-ray image of a target patient and clinical information of the target patient; Acquire a training sample set for training an initial imaging report generation model, wherein the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, and the chest images to be trained include clinical information of different patients; Processing the training sample set based on preset processing rules to generate a training set and a validation set; Training the initial image report generation model based on the training set and the validation set to generate a target image report generation model; Processing the target chest X-ray image based on the target image report generation model to generate fused visual features and text coding features; The fused visual features and the text encoding features are processed based on the target image report generation model to generate an image diagnosis report.

2. The method according to claim 1, characterized in that The step of obtaining a training sample set for training an initial imaging report generation model includes: Obtain a preset chest X-ray report data set; Processing the chest X-ray report data set to obtain radiological features and correlation co-occurrence frequencies; Processing the radioactive features and the co-occurrence frequencies of the related phenomena to generate correlation matrix information; A priori knowledge graph for characterizing chest images is generated based on the relevant current matrix information.

3. The method according to claim 2, characterized in that The processing of the radioactive features and the correlation co-occurrence frequencies to generate correlation matrix information includes: The method includes a calculation formula for calculating the correlation co-occurrence frequency, and the calculation formula is: ; in, Representation concept and Concept The number of co-occurrences at the report level, Representation concept The total number of occurrences, Representation concept Concept of appearance Frequency of occurrence: The method includes a calculation formula for calculating a correlation matrix, which is: ; in, is the co-occurrence frequency threshold, if Greater than or equal to threshold , then the concept To concept There is a correlation, otherwise there is no correlation.

4. The method according to claim 1, characterized in that The processing of the training sample set based on the preset processing rules to generate a training set and a validation set includes: Extracting features from the training sample set to generate an original feature library; Divide the training sample set according to the original feature library to generate a training set and a validation set; Use the classifier to divide the original feature library into various verification sets for prediction and determine the prediction results; Use the preset algorithm to divide the original feature library into various training sets for training and obtain the prediction results of the validation set class.

5. The method according to claim 1, characterized in that The step of training the initial image report generation model based on the training set and the validation set to generate a target image report generation model includes: Processing the training set based on a window-constrained contrastive learning loss method to generate word-unit vector values; Training the initial image report generation model based on the word element vector value to generate a target image report generation model; The window-constrained contrastive learning loss method includes a calculation formula for obtaining a word element vector value, and the calculation formula is: ; in, is the window constraint parameter, represents the feature representation of the i-th generated word, Represents the feature representation of the j-th generated word.

6. The method according to claim 1, characterized in that The target chest X-ray image is processed based on the target image report generation model to generate fused visual features and text coding features, including: The target image report generation model includes a calculation formula for obtaining fused visual features, and the calculation formula is: ; in, represents the i-th label value of the current sample, represents the probability value of the i-th element, and k is the classification probability of the k main nodes; The target image report generation model includes a calculation formula for obtaining text encoding features, and the calculation formula is: ; Among them, T represents the total number of disease keywords used for classification supervision.

7. The method according to claim 1, characterized in that The step of processing the fused visual features and the text encoding features based on the target image report generation model to generate an image diagnosis report includes: Get report to generate loss function; Processing the fused visual features and the text encoding features based on the report generation loss function to generate an imaging diagnosis report; The target image includes a generation model including a calculation formula for obtaining a report generation loss function, the calculation formula is: ; in, ∈{0,1} indicates that the label value of the i-th word corresponds to the j-th word in the dictionary. If it is the word, it is 1, otherwise it is 0. ∈{0,1} is the probability that the i-th word corresponds to the j-th word in the dictionary.

8. An imaging report generating device based on chest X-ray, characterized in that: The device comprises: An acquisition module is used to acquire image information to be detected and an initial image report generation model that matches a target chest X-ray image, wherein the image information to be detected includes a chest X-ray image of a target patient and clinical information of the target patient; and to acquire a training sample set for training the initial image report generation model, wherein the training sample set includes a priori knowledge graph for characterizing chest images and chest images to be trained, wherein the chest images to be trained include clinical information of different patients; A processing module is used to process the training sample set based on preset processing rules to generate a training set and a verification set; train the initial image report generation model based on the training set and the verification set to generate a target image report generation model; process the target chest X-ray image based on the target image report generation model to generate fused visual features and text coding features; process the fused visual features and the text coding features based on the target image report generation model to generate an image diagnosis report.

9. An electronic device, characterized in that: include: a first processor; and a memory for storing executable instructions of the first processor; Wherein, the first processor is configured to execute the method for generating an image report based on a chest X-ray film as described in any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the second processor, the method for generating an image report based on an X-ray chest film according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Decision tree generation method based on large language model and related equipment

    CN119227784A

  • A decision tree generation method based on large language model and related equipment

    CN119227784B