A pulmonary nodule recognition method and system based on artificial intelligence
By combining the YOLOv1 and ViT models with a dual recognition method and utilizing clustering and three-dimensional image block technology, the accuracy of lung nodule recognition is improved, solving the problem of low accuracy in existing technologies, especially the missed detection and misdetection of small nodules, and achieving earlier diagnosis of lung cancer.
Patent Information
- Application Number
- CN202310978944.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-08-04
AI Technical Summary
The existing AI-based lung nodule recognition technology has low accuracy, especially for small nodules, which are easily missed or misdetected. In addition, doctors' recognition is subjective and there are individual differences, leading to inconsistent diagnostic results.
A dual recognition method is adopted. First, the bounding box in the CT image is identified through a preset model to obtain the category weight. Then, clustering and three-dimensional image blocks are extracted. The classification model is used to further confirm the category of lung nodules. The YOLOv1 and ViT models are combined to improve the recognition accuracy.
It effectively identifies small lung nodules, improves recognition accuracy, and reduces missed detections, especially for lung nodules that are difficult to identify or classify. Further confirmation of three-dimensional spatial information prevents missed detection during single CT image recognition.
Smart Images

Figure CN117058447B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to the use of artificial intelligence to identify lung nodules. Background Art
[0002] Lung cancer is one of the most common malignant tumors in the world, and its morbidity and mortality rates remain high. Early detection and treatment of lung cancer are crucial to increasing survival rates and improving patient prognosis. In the early stages of lung cancer, there are often no obvious symptoms, which causes many patients to enter the late stage when discovered, making treatment much more difficult. The appearance of lung nodules is one of the early manifestations of lung cancer, and screening for lung nodules is an important way to detect lung cancer early. Lung nodule screening is to detect the presence of nodules or abnormal lesions in the patient's lungs through imaging tests, such as computed tomography (CT) or X-rays. Through lung nodule screening, doctors can detect abnormal nodules in the patient's lungs early and further evaluate their nature and possibility to determine whether further examination and treatment are needed.
[0003] Currently, the identification of lung nodules relies primarily on physicians, requiring significant time and effort to analyze and potentially risking missed or misdiagnosed lesions. Furthermore, manual interpretation is subject to subjectivity and individual variability, leading to inconsistent diagnostic results and compromising patient treatment outcomes. Physicians also face challenges identifying small nodules or analyzing complex cases. This is particularly true in early-stage lung cancer, where lesions are small and hidden, making them easily overlooked. Furthermore, some benign lung nodules have features similar to those of malignant nodules, making identification challenging. To overcome these limitations, the application of artificial intelligence (AI) in lung nodule identification has attracted widespread attention in recent years. AI technology boasts the ability to process large amounts of data, enabling rapid and accurate feature extraction from complex medical images and assisting physicians in the detection and classification of lung nodules. Deep learning models, particularly convolutional neural networks (CNNs), have demonstrated exceptional performance in lung nodule identification. Training these AI models can improve the accuracy and sensitivity of lung nodule identification, thereby enabling earlier detection and diagnosis of lung cancer, improving treatment success rates, and enhancing patient survival rates. However, the existing AI-based recognition accuracy is not high, especially for small nodules, which may lead to missed detection or false detection. Summary of the Invention
[0004] In order to solve the above problems, the present invention provides a method for identifying pulmonary nodules based on artificial intelligence, which comprises the following steps:
[0005] Acquire a sequence of captured lung CT images, preprocess each image in the sequence, use the preprocessed image as input to a backbone network of a preset model, obtain a tensor output by the backbone network, and a recognition result of a detection head, determine a target vector in the tensor based on the recognition result, and obtain a category weight corresponding to each recognition result based on the target vector; the preset model includes the backbone network and the detection head;
[0006] Obtaining the center coordinates of a bounding box in a recognition result corresponding to each image and the image number in the lung CT image sequence, clustering the center coordinates according to the center coordinates and the number to obtain a cluster center, intercepting multiple regions of a preset size in the lung CT image sequence with the cluster center as the center to form a sequence of image blocks to be identified, and obtaining a cumulative category weight corresponding to the sequence of image blocks to be identified;
[0007] Each image block in the sequence of image blocks to be identified is regarded as a patch, a patch sequence is obtained according to the order of the image blocks in the sequence of image blocks to be identified, the patch sequence is used as input of a classification model to obtain a classification probability, a classification result is obtained according to the classification probability and the accumulated category weight, and the classification result is identified in the lung CT image sequence.
[0008] Preferably, determining the target vector in the tensor according to the recognition result, and obtaining the category weight corresponding to each recognition result according to the target vector, is specifically as follows:
[0009] Get the center coordinates, width, and height of the bounding box in the recognition result, and search the tensor based on the center coordinates, width, and height to obtain the target vector;
[0010] Get the probability value of each category in the target vector and the confidence of each bounding box, according to the formula Calculate the category weight corresponding to each recognition result, where N represents the number of predicted bounding boxes, b_c i represents the confidence of the i-th bounding box, cl j Represents the probability value of the j-th category, where i and j are positive integers.
[0011] Preferably, clustering the center coordinates according to the center coordinates and the numbers to obtain the center of the cluster is specifically:
[0012] Get the center coordinates (x, y) and the number k, and get a point (x, y, k) in three-dimensional coordinates. According to the formula The center points are clustered, where m and n represent the serial numbers of the center coordinates, k is the scale of the lung CT image, and d is the CT inter-slice distance.
[0013] Preferably, the process of intercepting a plurality of regions of preset sizes in the lung CT image sequence with the center of the cluster as the center to form a sequence of image blocks to be identified, and obtaining the cumulative category weights corresponding to the sequence of image blocks to be identified is as follows:
[0014] Constructing a cube with a length, width, and height of L, W, and H with the center of the cluster as the center, retaining the image blocks in the cube in the lung CT image sequence, and arranging the image blocks according to the sequence numbers of the lung CT images in which the image blocks are located to obtain a sequence of image blocks to be identified;
[0015] The center coordinates included in the cluster are obtained, each center coordinate corresponds to a recognition result, and then the category weight of each recognition result is obtained. The weights corresponding to the same category in the category weights are added together to obtain the cumulative category weight of the image block sequence to be recognized.
[0016] Preferably, the classification result is obtained according to the classification probability and the accumulated category weight, specifically:
[0017] According to the formula p i =k1*class i +k2*weight i Calculate the probability of each category and select the category with the largest probability as the classification result; where i is a positive integer and 1≤i≤I, I represents the number of categories; class i Indicates the classification probability of the i-th category; weight i represents the cumulative category weight of the i-th category; k1 and k2 represent weights.
[0018] Preferably, the preset model is a YOLOv1 model; and the classification model is a ViT model.
[0019] In another embodiment, the present invention provides an artificial intelligence-based pulmonary nodule recognition system, the system comprising the following modules:
[0020] a first recognition module configured to acquire a sequence of captured lung CT images, preprocess each image in the sequence, use the preprocessed image as input to a backbone network of a preset model, obtain a tensor output by the backbone network, and a recognition result of a detection head, determine a target vector in the tensor based on the recognition result, and obtain a category weight corresponding to each recognition result based on the target vector; the preset model includes the backbone network and the detection head;
[0021] a processing module, configured to obtain the center coordinates of a bounding box in a recognition result corresponding to each image and the image number in the lung CT image sequence, cluster the center coordinates according to the center coordinates and the number to obtain a cluster center, intercept a plurality of regions of a preset size in the lung CT image sequence with the cluster center as the center to form a sequence of image blocks to be recognized, and obtain a cumulative category weight corresponding to the sequence of image blocks to be recognized;
[0022] The second recognition module is configured to treat each image block in the sequence of image blocks to be recognized as a patch, obtain a patch sequence according to the order of the image blocks in the sequence of image blocks to be recognized, use the patch sequence as input to a classification model to obtain a classification probability, obtain a classification result based on the classification probability and the accumulated category weight, and identify the classification result in the lung CT image sequence.
[0023] Preferably, determining the target vector in the tensor according to the recognition result, and obtaining the category weight corresponding to each recognition result according to the target vector, is specifically as follows:
[0024] Get the center coordinates, width, and height of the bounding box in the recognition result, and search the tensor based on the center coordinates, width, and height to obtain the target vector;
[0025] Get the probability value of each category in the target vector and the confidence of each bounding box, according to the formula Calculate the category weight corresponding to each recognition result, where N represents the number of predicted bounding boxes, b_c i represents the confidence of the i-th bounding box, cl j Represents the probability value of the j-th category, where i and j are positive integers.
[0026] Preferably, clustering the center coordinates according to the center coordinates and the numbers to obtain the center of the cluster is specifically:
[0027] Get the center coordinates (x, y) and the number k, and get a point (x, y, k) in three-dimensional coordinates. According to the formula The center points are clustered, where m and n represent the serial numbers of the center coordinates, k is the scale of the lung CT image, and d is the CT inter-slice distance.
[0028] Preferably, the process of intercepting a plurality of regions of preset sizes in the lung CT image sequence with the center of the cluster as the center to form a sequence of image blocks to be identified, and obtaining the cumulative category weights corresponding to the sequence of image blocks to be identified is as follows:
[0029] Constructing a cube with a length, width, and height of L, W, and H with the center of the cluster as the center, retaining the image blocks in the cube in the lung CT image sequence, and arranging the image blocks according to the sequence numbers of the lung CT images in which the image blocks are located to obtain a sequence of image blocks to be identified;
[0030] The center coordinates included in the cluster are obtained, each center coordinate corresponds to a recognition result, and then the category weight of each recognition result is obtained. The weights corresponding to the same category in the category weights are added together to obtain the cumulative category weight of the image block sequence to be recognized.
[0031] Preferably, the classification result is obtained according to the classification probability and the accumulated category weight, specifically:
[0032] According to the formula p i =k1*class i +k2*weight i Calculate the probability of each category and select the category with the largest probability as the classification result; where i is a positive integer and 1≤i≤I, I represents the number of categories; class i Indicates the classification probability of the i-th category; weight i represents the cumulative category weight of the i-th category; k1 and k2 represent weights.
[0033] Preferably, the preset model is a YOLOv1 model; and the classification model is a ViT model.
[0034] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0035] The present invention uses a dual recognition method to identify lung nodules, in which the first recognition is based on a single CT image, and the second recognition is to extract the three-dimensional spatial information of each lung nodule based on the first recognition result. The present invention can not only identify small lung nodules, but also effectively improve the recognition accuracy rate. It also has a good recognition rate for lung nodules that are difficult to identify or difficult to classify. Moreover, once the corresponding tiny lung nodules are identified in a single CT image, they will be further identified spatially in the second recognition, preventing the missed detection when selecting a single CT image to identify lung nodules. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0037] Figure 1 This is a flow chart of Example 1;
[0038] Figure 2 It is the structural diagram of the preset model;
[0039] Figure 3 Schematic diagram of selecting a sequence of image blocks to be identified through a cube;
[0040] Figure 4 This is the structural diagram of the classification model. DETAILED DESCRIPTION
[0041] In this document, relational terms such as first and second, etc., are used only 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 "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making creative efforts are within the scope of protection of the present invention.
[0043] Example 1
[0044] The present invention provides a method for identifying pulmonary nodules based on artificial intelligence, such as Figure 1 As shown, the method includes the following steps:
[0045] S1, obtaining a sequence of captured lung CT images, preprocessing each image in the sequence, using the preprocessed image as input to a backbone network of a preset model, obtaining a tensor output by the backbone network and a recognition result of a detection head, determining a target vector in the tensor based on the recognition result, and obtaining a category weight corresponding to each recognition result based on the target vector; the preset model includes a backbone network and a detection head;
[0046] CT imaging is a commonly used imaging method for examining lung nodules. It uses X-rays to obtain cross-sectional images of the lungs and can provide high-resolution images. A lung CT scan will produce multiple CT images, which constitute an image sequence. Generally, CT images are .DCM files. In addition to the CT image, they also include information such as time and layer thickness. The file name of the CT image is the serial number of the shooting.
[0047] Each CT image is preprocessed, including but not limited to format conversion, noise reduction, etc., and then used as the input of a pre-set model. The pre-set model consists of two parts: a backbone network and a detection head. Figure 2 As shown. Preferably, the preset model is YOLOv1, wherein the backbone network is the backbone network of YOLOv1, and the detection head is the detection head of YOLOv1. The backbone network will output a tensor, such as Figure 2 As shown, the tensor consists of multiple vectors, where each vector represents an image cell in YOLOv1. The so-called cell means that YOLOv1 divides the input image into grid cells, and the grid corresponds to the vector one-to-one. The vector includes the probability of each classification ( Figure 2 A), the confidence of each bounding box ( Figure 2 B), the center coordinates (x, y) of the bounding box, and the length and width ( Figure 2 Chinese C) etc.
[0048] After the preset model is used, the recognition results will be obtained. Each recognition result corresponds to a bounding box. The bounding box is selected from multiple bounding boxes. The bounding box corresponds to a vector in the tensor. If the recognition result of a CT image has multiple bounding boxes, there will be multiple target vectors.
[0049] The target vector contains the result information of the preset model recognition, such as the probability of each classification, which is helpful for further analysis. The present invention further extracts the relevant information obtained by the preset model for subsequent analysis and understanding. Specifically, in an optional embodiment, the target vector in the tensor is determined based on the recognition result, and the category weight corresponding to each recognition result is obtained based on the target vector, specifically:
[0050] Get the center coordinates, width, and height of the bounding box in the recognition result, and search the tensor based on the center coordinates, width, and height to obtain the target vector;
[0051] The center coordinates, width, and height corresponding to each bounding box are unique in the tensor, and the target vector can be obtained through the center coordinates, width, and height of the bounding box.
[0052] Get the probability value of each category in the target vector and the confidence of each bounding box, according to the formula Calculate the category weight corresponding to each recognition result, where N represents the number of predicted bounding boxes, b_c i represents the confidence of the i-th bounding box, cl j Represents the probability value of the j-th category, where i and j are positive integers.
[0053] The target vector includes the probability value of each category or classification. The larger the probability, the more likely it is that the lung nodule is of this category. For example, the lung nodules are divided into two categories, one is benign and the other is malignant, with corresponding probability values of 0.8 and 0.2 respectively. The confidence of the bounding box indicates the degree of confidence that the bounding box contains the lung nodule. This parameter is usually calculated using IoU. There can be multiple detection boxes corresponding to a grid, and each detection box has a confidence. The present invention adopts The class weight corresponding to each recognition result is calculated. For example, in the third CT image, the recognition result has two bounding boxes. The class weight for the first class, benign, is: (0.8*0.2+0.8*0.7) / 2, where 0.8 represents the probability value of the first class, and 0.2 and 0.7 represent the confidence levels of bounding boxes 1 and 2, respectively. Similarly, the class weight for the second class, malignant, can be calculated. According to the above method, the class weight corresponding to a lung nodule in the recognition result of this CT image is (0.36, 0.09). If multiple lung nodules are identified in this CT image, the class weight for each identified lung nodule is obtained. The class weight corresponding to each recognition result refers to the class weight of each identified lung nodule. Each CT image has 0, 1, or more class weights, but each identified lung nodule only corresponds to one class weight. The class weight includes the results of the preset model recognition, which is helpful for the subsequent three-dimensional identification of the specific type of lung nodule.
[0054] S2, obtaining the center coordinates of the bounding box in the recognition result corresponding to each image and the image number in the lung CT image sequence, clustering the center coordinates according to the center coordinates and the number to obtain the center of the cluster, intercepting multiple areas of preset sizes in the lung CT image sequence with the cluster center as the center to form a sequence of image blocks to be recognized, and obtaining the cumulative category weight corresponding to the sequence of image blocks to be recognized;
[0055] The images in the CT image sequence are continuous. If there is a lung nodule, the same or similar position in the adjacent CT images will also be identified. The CT image sequence has multiple CT images, which results in many identified bounding boxes. The center coordinates can be clustered based on the center coordinates and the CT image sequence to obtain the center of the cluster. In a specific embodiment, the center coordinates are clustered based on the center coordinates and the number to obtain the center of the cluster, specifically:
[0056] Get the center coordinates (x, y) and the number k, and get a point (x, y, k) in three-dimensional coordinates. According to the formula The center points are clustered, where m and n represent the sequence numbers of the center coordinates, k is the ratio scale of the lung CT image, and d is the CT layer spacing. mn In a more detailed embodiment, a threshold d is set and d mn Those smaller than d are grouped into one category, where d mn Represents the distance between the mth center coordinate and the nth center coordinate.
[0057] In another embodiment, the clustering results are further filtered. Specifically, clustering results in which the center coordinates of the clusters are less than a preset number, for example, the preset number is 1, may be filtered out.
[0058] In fact, a cluster can represent a lung nodule, such as Figure 3 As shown, the region of a plurality of preset sizes in the lung CT image sequence is intercepted with the center of the cluster as the center to form a sequence of image blocks to be identified, and the cumulative category weight corresponding to the sequence of image blocks to be identified is obtained, specifically:
[0059] Constructing a cube with a length, width, and height of L, W, and H with the center of the cluster as the center, retaining the image blocks in the cube in the lung CT image sequence, and arranging the image blocks according to the sequence numbers of the lung CT images in which the image blocks are located to obtain a sequence of image blocks to be identified;
[0060] like Figure 3 As shown in Figure 2, a cube is constructed to intercept image blocks in the image sequence. These image blocks constitute a three-dimensional sequence of lung nodules. Each image block is a part of the CT image. Figure 3 In the example, a portion of the CT images numbered 2, 3, 4, and 5 are intercepted. However, since the cube does not intersect with the CT images numbered 1 and 6, the image block sequence to be identified does not include the image blocks of the CT images numbered 1 and 6.
[0061] The center coordinates included in the cluster are obtained, each center coordinate corresponds to a recognition result, and then the category weight of each recognition result is obtained. The weights corresponding to the same category in the category weights are added together to obtain the cumulative category weight of the image block sequence to be recognized.
[0062] There are multiple center coordinates in a cluster, such as Figure 3 As shown, it includes the center coordinates of the CT images numbered 2-5, that is, the recognition results of multiple images included in the cluster. Since each recognition result corresponds to a category weight, the category weights corresponding to all the center coordinates included in the cluster are added together to obtain the cumulative category weight of the image block sequence to be identified.
[0063] For example, a cluster has two center coordinates, and the corresponding category weights are: (0.36, 0.09) and (0.54, 0.31). The weights corresponding to the same category in the category weights are added together to obtain a cumulative category weight of (0.9, 0.4). In this way, each cluster, that is, each lung nodule, corresponds to a cumulative category weight in three dimensions.
[0064] S3: Treat each image block in the sequence of image blocks to be identified as a patch, obtain a patch sequence according to the order of the image blocks in the sequence of image blocks to be identified, use the patch sequence as input to a classification model to obtain a classification probability, obtain a classification result based on the classification probability and the accumulated category weight, and identify the classification result in the lung CT image sequence.
[0065] The sequence of image blocks to be identified can be regarded as the three-dimensional form of lung nodules. Each image block is two-dimensional, and multiple image blocks constitute a three-dimensional form. Embed each image block to obtain the corresponding patch, such as Figure 4 As shown, the patch sequence is input into a classification model such as ViT to obtain the probability of each classification.
[0066] In an optional embodiment, the classification result is obtained according to the classification probability and the accumulated category weight, specifically:
[0067] According to the formula p i =k1*class i +k2*weight i Calculate the probability of each category and select the category with the largest probability as the classification result; where i is a positive integer and 1≤i≤I, I represents the number of categories; class i Indicates the classification probability of the i-th category; weight i represents the cumulative category weight of the i-th category; k1 and k2 represent weights.
[0068] Among them, class iIt is the recognition result of the classification model on a sequence of image blocks to be identified. If there are classifications, benign and malignant, then I = 2, weight i The accumulated class weights from S2. In one embodiment, k1>k2, and in a more specific embodiment, k1=0.8, k2=0.1. In another embodiment, k1 and k2 are set as learnable parameters.
[0069] Example 2
[0070] The present invention provides an artificial intelligence-based pulmonary nodule recognition system, which includes the following modules:
[0071] a first recognition module configured to acquire a sequence of captured lung CT images, preprocess each image in the sequence, use the preprocessed image as input to a backbone network of a preset model, obtain a tensor output by the backbone network, and a recognition result of a detection head, determine a target vector in the tensor based on the recognition result, and obtain a category weight corresponding to each recognition result based on the target vector; the preset model includes the backbone network and the detection head;
[0072] a processing module, configured to obtain the center coordinates of a bounding box in a recognition result corresponding to each image and the image number in the lung CT image sequence, cluster the center coordinates according to the center coordinates and the number to obtain a cluster center, intercept a plurality of regions of a preset size in the lung CT image sequence with the cluster center as the center to form a sequence of image blocks to be recognized, and obtain a cumulative category weight corresponding to the sequence of image blocks to be recognized;
[0073] The second recognition module is configured to treat each image block in the sequence of image blocks to be recognized as a patch, obtain a patch sequence according to the order of the image blocks in the sequence of image blocks to be recognized, use the patch sequence as input to a classification model to obtain a classification probability, obtain a classification result based on the classification probability and the accumulated category weight, and identify the classification result in the lung CT image sequence.
[0074] Optionally, determining the target vector in the tensor according to the recognition result, and obtaining the category weight corresponding to each recognition result according to the target vector, is specifically as follows:
[0075] Get the center coordinates, width, and height of the bounding box in the recognition result, and search the tensor based on the center coordinates, width, and height to obtain the target vector;
[0076] Get the probability value of each category in the target vector and the confidence of each bounding box, according to the formula Calculate the category weight corresponding to each recognition result, where N represents the number of predicted bounding boxes, b_c i represents the confidence of the i-th bounding box, cl j Represents the probability value of the j-th category, where i and j are positive integers.
[0077] Preferably, clustering the center coordinates according to the center coordinates and the numbers to obtain the center of the cluster is specifically:
[0078] Get the center coordinates (x, y) and the number k, and get a point (x, y, k) in three-dimensional coordinates. According to the formula The center points are clustered, where m and n represent the serial numbers of the center coordinates, k is the scale of the lung CT image, and d is the CT inter-slice distance.
[0079] Optionally, the process of intercepting a plurality of regions of a preset size in the lung CT image sequence with the center of the cluster as the center to form a sequence of image blocks to be identified, and obtaining the cumulative category weight corresponding to the sequence of image blocks to be identified is specifically as follows:
[0080] Constructing a cube with a length, width, and height of L, W, and H with the center of the cluster as the center, retaining the image blocks in the cube in the lung CT image sequence, and arranging the image blocks according to the sequence numbers of the lung CT images in which the image blocks are located to obtain a sequence of image blocks to be identified;
[0081] The center coordinates included in the cluster are obtained, each center coordinate corresponds to a recognition result, and then the category weight of each recognition result is obtained. The weights corresponding to the same category in the category weights are added together to obtain the cumulative category weight of the image block sequence to be recognized.
[0082] Optionally, obtaining a classification result according to the classification probability and the accumulated category weight is specifically:
[0083] According to the formula p i =k1*class i +k2*weight i Calculate the probability of each category and select the category with the largest probability as the classification result; where i is a positive integer and 1≤i≤I, I represents the number of categories; class i Indicates the classification probability of the i-th category; weight i represents the cumulative category weight of the i-th category; k1 and k2 represent weights.
[0084] Example 3
[0085] The present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the method described in the first embodiment is implemented.
[0086] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by a combination of hardware and software. Based on this understanding, the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A lung nodule recognition method based on artificial intelligence, characterized in that: The method comprises the following steps: Acquire a sequence of captured lung CT images, preprocess each image in the sequence, use the preprocessed image as input to a backbone network of a preset model, obtain a tensor output by the backbone network, and a recognition result of a detection head, determine a target vector in the tensor based on the recognition result, and obtain a category weight corresponding to each recognition result based on the target vector; the preset model includes the backbone network and the detection head; Obtaining the center coordinates of a bounding box in a recognition result corresponding to each image and the image number in the lung CT image sequence, clustering the center coordinates according to the center coordinates and the number to obtain a cluster center, intercepting multiple regions of a preset size in the lung CT image sequence with the cluster center as the center to form a sequence of image blocks to be identified, and obtaining a cumulative category weight corresponding to the sequence of image blocks to be identified; Taking each image block in the sequence of image blocks to be identified as a patch, obtaining a patch sequence according to the order of the image blocks in the sequence of image blocks to be identified, using the patch sequence as input to a classification model to obtain a classification probability, obtaining a classification result based on the classification probability and the accumulated class weight, and marking the classification result in the lung CT image sequence; The method comprises intercepting a plurality of regions of a preset size in the lung CT image sequence with the center of the cluster as the center to form a sequence of image blocks to be identified, and obtaining a cumulative category weight corresponding to the sequence of image blocks to be identified, specifically: constructing a cube with a length, width, and height of L, W, and H with the center of the cluster as the center, retaining the image blocks in the cube in the lung CT image sequence, arranging the image blocks according to the sequence numbers of the lung CT images in which the image blocks are located to obtain a sequence of image blocks to be identified; obtaining the center coordinates included in the cluster, each center coordinate corresponding to a recognition result, and then obtaining a category weight for each recognition result, and adding the weights corresponding to the same category in the category weights to obtain the cumulative category weight of the sequence of image blocks to be identified; The classification result is obtained according to the classification probability and the accumulated category weight, specifically: According to the formula Calculate the probability of each category and select the category with the largest probability as the classification result; where i is a positive integer, and ,I represents the number of categories; represents the classification probability of the i-th category; represents the cumulative category weight of the i-th category; 、 Represents weight.
2. The method according to claim 1, wherein The target vector in the tensor is determined according to the recognition result, and the category weight corresponding to each recognition result is obtained according to the target vector, specifically: Obtain the center coordinates, width, and height of the bounding box in the recognition result, and search the tensor based on the center coordinates, width, and height to obtain the target vector; Get the probability value of each category in the target vector and the confidence of each bounding box, according to the formula Calculate the category weight corresponding to each recognition result, where N represents the number of predicted bounding boxes. represents the confidence of the i-th bounding box, Represents the probability value of the j-th category, where i and j are positive integers.
3. The method according to claim 1, wherein The clustering of the center coordinates according to the center coordinates and the numbers to obtain the center of the cluster is specifically as follows: Get the center coordinates (x, y) and the number k, and get a point (x, y, k) in three-dimensional coordinates. According to the formula The center points are clustered, where m and n represent the serial numbers of the center coordinates, k is the scale of the lung CT image, and d is the CT inter-slice distance.
4. The method according to claim 1, wherein The preset model is the YOLOv1 model; the classification model is the ViT model.
5. A pulmonary nodule recognition system based on artificial intelligence, characterized in that: The system includes the following modules: a first recognition module configured to acquire a sequence of captured lung CT images, preprocess each image in the sequence, use the preprocessed image as input to a backbone network of a preset model, obtain a tensor output by the backbone network, and a recognition result of a detection head, determine a target vector in the tensor based on the recognition result, and obtain a category weight corresponding to each recognition result based on the target vector; the preset model includes the backbone network and the detection head; a processing module, configured to obtain the center coordinates of a bounding box in a recognition result corresponding to each image and the image number in the lung CT image sequence, cluster the center coordinates according to the center coordinates and the number to obtain a cluster center, intercept a plurality of regions of a preset size in the lung CT image sequence with the cluster center as the center to form a sequence of image blocks to be recognized, and obtain a cumulative category weight corresponding to the sequence of image blocks to be recognized; a second recognition module, configured to treat each image block in the sequence of image blocks to be recognized as a patch, obtain a patch sequence according to the order of the image blocks in the sequence of image blocks to be recognized, use the patch sequence as input to a classification model to obtain a classification probability, obtain a classification result based on the classification probability and the accumulated class weight, and identify the classification result in the lung CT image sequence; The method comprises intercepting a plurality of regions of a preset size in the lung CT image sequence with the center of the cluster as the center to form a sequence of image blocks to be identified, and obtaining a cumulative category weight corresponding to the sequence of image blocks to be identified, specifically: constructing a cube with a length, width, and height of L, W, and H with the center of the cluster as the center, retaining the image blocks in the cube in the lung CT image sequence, and arranging the image blocks according to the sequence numbers of the lung CT images in which the image blocks are located to obtain the sequence of image blocks to be identified; Obtaining the center coordinates included in the cluster, each center coordinate corresponds to a recognition result, and then obtaining the category weight of each recognition result, and adding the weights corresponding to the same category in the category weights to obtain the cumulative category weight of the sequence of image blocks to be recognized; The classification result is obtained according to the classification probability and the accumulated category weight, specifically: According to the formula Calculate the probability of each category and select the category with the highest probability as the classification result; Where i is a positive integer, and ,I represents the number of categories; represents the classification probability of the i-th category; represents the cumulative category weight of the i-th category; 、 Represents weight.
6. The system according to claim 5, wherein: The target vector in the tensor is determined according to the recognition result, and the category weight corresponding to each recognition result is obtained according to the target vector, specifically: Obtain the center coordinates, width, and height of the bounding box in the recognition result, and search the tensor based on the center coordinates, width, and height to obtain the target vector; Get the probability value of each category in the target vector and the confidence of each bounding box, according to the formula Calculate the category weight corresponding to each recognition result, where N represents the number of predicted bounding boxes. represents the confidence of the i-th bounding box, Represents the probability value of the j-th category, where i and j are positive integers.
7. The system according to claim 5, wherein: The clustering of the center coordinates according to the center coordinates and the numbers to obtain the center of the cluster is specifically as follows: Get the center coordinates (x, y) and the number k, and get a point (x, y, k) in three-dimensional coordinates. According to the formula ; The center points are clustered, where m and n represent the serial numbers of the center coordinates, k is the scale of the lung CT image, and d is the CT inter-slice distance.
Citation Information
Patent Citations
System and Method for Joint Classification Using Feature Space Cluster Labels
US20090092299A1
Image recognition method and related device
WO2020168647A1