Medical image identification device and medical image identification method
By extracting the lesion coordinates from lung images, matching them with the anatomical structure, and analyzing the lesion characteristics, the problem of inaccurate positioning of abnormal lung parts in existing technologies is solved, and efficient and accurate lung lesion detection is achieved.
Patent Information
- Application Number
- CN202510588276.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-09-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing medical image recognition devices and methods are unable to accurately locate abnormal areas when identifying lung tumors or inflammation characteristics, resulting in a high misdiagnosis rate, increasing patient monitoring items and doctor workload, and reducing diagnosis and treatment efficiency.
By obtaining pre-processed data of the target image, extracting the matching degree between the lesion coordinates and the lung anatomical structure diagram, and combining the lesion characteristics with the typical characteristics of lung cancer or pneumonia, lesion analysis and matching verification are performed to generate an accurate detection report.
It improves the accuracy of lung image analysis, reduces patient monitoring items and physician workload, reduces misdiagnosis rate, and improves diagnosis and treatment efficiency.
Smart Images

Figure CN120725960A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image analysis, and in particular to a medical image recognition device and a medical image recognition method. Background Art
[0002] With the development of medical technology, medical imaging plays an increasingly important role in disease diagnosis and treatment. The proposal of medical image recognition devices and methods aims to improve the analysis efficiency and accuracy of medical images, help doctors better conduct risk assessment and treatment decisions, and have important clinical application value. They can improve the analysis and recognition efficiency of medical images, provide doctors with accurate reference data, and thus improve the quality of medical services. Through automated image recognition, the workload of doctors can be reduced, the diagnostic efficiency can be improved, and the recognition ability enhanced by deep learning can be used to reduce the misdiagnosis rate of image recognition, realize the remote transmission and analysis of images, and promote the rational allocation of medical resources in remote areas.
[0003] The medical image recognition device and method use medical imaging equipment to obtain high-quality medical images, pre-process the acquired images to improve the accuracy of subsequent analysis, use deep learning algorithms to extract important features in medical images, input the extracted features into a trained model for classification and recognition, output recognition results, mark suspicious lesion areas, and generate corresponding reports. Doctors review the results of automatic recognition and make final diagnosis and treatment decisions based on clinical information. The algorithm model is regularly updated and iterated, new data is introduced, recognition accuracy is improved, feedback from doctors is collected, the user interface and interactive experience are optimized, and multiple imaging data are combined for multimodal analysis to improve overall diagnostic accuracy.
[0004] Existing medical image recognition devices and methods are unable to determine the specific location of the abnormal part in the lungs when the lung images have tumor characteristics or inflammatory characteristics. They are unable to judge the patient's specific symptoms based on the specific location of the abnormal part in the lungs, and are unable to generate a lung anatomical structure diagram of the patient based on the patient's own conditions, thereby more accurately judging the specific location of the abnormal part in the lungs. This increases the patient's monitoring items and testing time, increases the doctor's workload, reduces the efficiency of diagnosis and treatment, and makes the test results less accurate, the misdiagnosis rate is high, and the hospital increases unnecessary traffic. Its practicality has certain limitations. Summary of the Invention
[0005] The present invention provides a medical image recognition device and a medical image recognition method, which are used to promote the solution of the problems raised in the background technology.
[0006] The present invention provides the following technical solution: a medical image recognition method, comprising:
[0007] S1. Obtain target analysis data of target image;
[0008] S2. If the target analysis data shows no abnormality, a test report is generated;
[0009] S3. If the target analysis data is detected as abnormal, extract the abnormal part;
[0010] S4. Analyze the abnormal area:
[0011] S41. Obtain all coordinate positions of the lesion area in the target image, define them as lesion coordinates, and form a coordinate set of the lesion, recorded as coordinate:
[0012] coordinate={(xu1, yv1, zw)1, (xu2, yv2, zw2),...};
[0013] S42. Obtain an anatomical diagram of the lungs, labeled lungs;
[0014] S43. Extract the position coordinates of each structure in the lung anatomical structure diagram:
[0015] lungs={lunglobe, Pulmonary segment, bronchials,...};
[0016] S44. Calculate the matching degree between the lesion coordinates and each anatomical structure, denoted as Matching degree:
[0017]
[0018] Where d(c, as) is the Euclidean distance between the lesion coordinates and the anatomical structure, c is the lesion coordinates, as is the position coordinates of each anatomical structure in the lung anatomy diagram, and ε is a constant;
[0019] S45. Set a comparison function to determine the region to which the abnormal part belongs:
[0020]
[0021] Among them, threshold is the comparison threshold, which is used to determine the region to which the abnormal part belongs.
[0022] As a medical image recognition method of the present invention, wherein: the target analysis data of the target image is obtained, including preprocessing the target image, specifically:
[0023] Obtain a lung image of the target patient, which is designated as the target image and denoted as I;
[0024] Extract each pixel point in the target image in sequence as the target pixel point;
[0025] Get the position of the target pixel in the target image, recorded as (i, j);
[0026] Set up a search window, marked as S;
[0027] Extract each pixel point in the search window S in turn and define it as the search pixel point;
[0028] Get the position of the search pixel in the target image, recorded as (k, l);
[0029] Among them, searchWindowSize is a parameter used to define the search window size;
[0030] Set a filter function to denoise the target image and form a denoised image, which is recorded as I 去噪 :
[0031]
[0032] Among them, ω((i, j), (k, l)) is the weight between the target pixel (i, j) and the search pixel (k, l), and the specific calculation formula is:
[0033]
[0034] Where exp(·) is an exponential function used to convert the mean square error into a weight value, h is the filter strength parameter used to control the degree of noise removal, N(i, j) is the neighborhood block centered on the target pixel (i, j), and N(k, l) is the neighborhood block centered on the search pixel (k, l).
[0035] Among them, MSE(N(i, j), N(k, l)) is the mean square error between two neighboring blocks, which is used to calculate the similarity between two neighboring blocks. The specific calculation formula is:
[0036]
[0037] Where m×n is the size of the neighborhood block, and I(x, y) represents the grayscale value of the pixel (x, y);
[0038] Get the horizontal template and vertical template, respectively denoted as G x and G y ;
[0039] Set a sharpening function to enhance the denoised image to form an enhanced image, which is recorded as I 增强 :
[0040] I 增强 =I去噪 +α·I Sobel ;
[0041] Among them, α is a parameter that controls the sharpening strength;
[0042] Among them, I Sobel is the gradient amplitude, and the specific formula is:
[0043]
[0044] Among them, * represents the convolution operation, I 去噪 *G x Is G x Template and denoised image I 去噪 The horizontal gradient obtained by the convolution operation, I 去噪 *G y G y Template and denoised image I 去噪 The vertical gradient obtained by convolution operation;
[0045] Then the enhanced image I 增强 That is, the image after preprocessing the target image is defined as the processed image and marked as I 预处理 .
[0046] As a medical image recognition method of the present invention, wherein: the target analysis data of the target image is obtained, including extracting disease features in the image, specifically:
[0047] Get the horizontal template and vertical template, respectively denoted as G x and G y ;
[0048] Get the processed image, marked as I 预处理 ;
[0049] Set an edge function, perform edge analysis on the target image, and generate the edge features of the target image, marked as E Sobel :
[0050]
[0051] Among them, E Sobel The Sobel operator is used to calculate the gradient of the image in the horizontal and vertical directions, and then the gradients in these two directions are synthesized to obtain the final gradient amplitude. 预处理 *G x Is G x Template and processed image I 预处理 The horizontal gradient obtained by the convolution operation, I 预处理 *G y Is G y Template and processed image I预处理 The vertical gradient obtained by convolution operation;
[0052] Set the comparison value range;
[0053] If the gradient amplitude E Sobel If it is within the contrast value range, the target image gradient is judged to be normal;
[0054] If the gradient amplitude E Sobel If it is outside the contrast value range, the target image gradient is judged to be abnormal;
[0055] Through the gray-level co-occurrence matrix calculation function greycomatrix, a gray-level co-occurrence matrix is constructed, denoted as GLCM:
[0056] GLCM=greycomatrix(I 预处理 ,distance,direction,Grayscale,symmetry,Normalization);
[0057] Among them, I 预处理 It processes images, distance is the distance between pixel pairs, direction is the direction between pixel pairs, Grayscale is the grayscale level of the image, symmetry is whether to consider symmetry, and Normalization is whether to normalize the matrix;
[0058] Calculate the contrast of the gray-level co-occurrence matrix GLCM, denoted as contrast:
[0059]
[0060] Where N is the gray level, a is the row of the gray level co-occurrence matrix GLCM, and b is the column of the gray level co-occurrence matrix GLCM;
[0061] Calculate the correlation of the gray-level co-occurrence matrix GLCM, denoted as correlation:
[0062]
[0063] Among them, a is the row of the gray-level co-occurrence matrix GLCM, b is the column of the gray-level co-occurrence matrix GLCM, μ a is the row mean, μ b is the mean of the column, σ a is the standard deviation of the row, σ b is the standard deviation of the column;
[0064] Calculate the energy of the gray-level co-occurrence matrix GLCM, denoted as energy:
[0065]
[0066] Calculate the entropy of the gray-level co-occurrence matrix GLCM, denoted as entropy:
[0067]
[0068] Set up a sorting function to perform texture analysis on the target image and generate the texture features of the target image, marked as T 纹理 :
[0069] T 纹理 =(contrast, correlation, energy, entropy);
[0070] Set contrast texture set;
[0071] If the comparison texture set contains T 纹理 , then the target image texture is judged to be normal;
[0072] If the comparison texture set does not contain T 纹理 , then the target image texture is judged to be abnormal;
[0073] The target image is segmented into a binary image using the segmentation algorithm (·), denoted as B:
[0074] B=segmentation algorithm(I 预处理 );
[0075] Among them, the lesion area is marked as 1 and the background area is marked as 0;
[0076] If all areas in the binary image B are marked as 0, and the target image gradient is normal, and the target image texture is normal, then the target analysis data is judged to be detected without abnormality;
[0077] If there is an area marked as 1 in the binary image B, or the target image gradient is abnormal, or the target image texture is abnormal, the target analysis data is determined to be abnormal, and the area marked as 1 in the binary image B is identified as the abnormal part.
[0078] As a medical image recognition method of the present invention, the lesion analysis of the abnormal part also includes shape analysis and lesion identification, specifically:
[0079] Obtain binary image B;
[0080] Calculate the area of the lesion in the target image, denoted as Area:
[0081]
[0082] Among them, I M and I N is the number of rows and columns of the image, B(I i , I j ) is the binary image matrix after segmentation, I i and I j are the row and column numbers in the image matrix;
[0083] Calculate the perimeter of the lesion in the target image, denoted as Perimeter:
[0084]
[0085] Calculate the circularity of the lesion in the target image, denoted as Circularity:
[0086]
[0087] Calculate the long axis and short axis of the lesion in the target image, denoted as Long axis and Short axis respectively:
[0088]
[0089] Where λ1 and λ2 are the eigenvalues of the major and minor axes of the ellipse generated by least squares fitting of the lesion area;
[0090] Calculate the eccentricity of the lesion in the target image, denoted as Eccentricity:
[0091]
[0092] Calculate the compactness of the lesion in the target image, denoted as Compactness:
[0093]
[0094] The lesions are classified by the classification function:
[0095] Classification = SVM(B);
[0096] Among them, SVM(·) is a classification function, and SVM is a machine learning algorithm;
[0097] The area, perimeter, circularity, major axis, minor axis, eccentricity, and compactness of the lesion in the target image are integrated to generate the shape feature of the lesion in the target image, which is marked as S:
[0098] S=(Area, Perimeter, Circularity, Longaxis, Shortaxis, Eccentricity, Compactness).
[0099] As a medical image recognition method described in the present invention, if P=P1, the abnormal part is determined to be in the normal area, and a normal analysis and verification is performed, specifically:
[0100] Obtain the shape features S and texture features T of the lesion in the target image 纹理 And the edge feature E Sobel ;
[0101] Get the typical characteristic data of lung cancer and generate the first feature set, denoted as characteristiccancer:
[0102] characteristiccancer={c_c1,c_c2};
[0103] Get all the typical characteristic data of pneumonia and integrate them to generate the second feature set, labeled as characteristicinflammation:
[0104] characteristicinflammation={c_i1, c_i2};
[0105] Set up a matching function to calculate the matching degree between the lesion features and the disease features of lung cancer:
[0106] Matching degree characteristiccancer =Match(S, T 纹理 , E Sobel , characteristiccancer);
[0107] Set up a matching function to calculate the matching degree between the lesion features and the disease features of pneumonia:
[0108] Matching degree characteristicinflammation =Match(S, T 纹理 , E Sobel , characteristicinflammation);
[0109] Set matching threshold;
[0110] Calculate the matching degree of lesion features and determine the conclusion:
[0111]
[0112] If F=F1, a lung cancer detection report is generated;
[0113] If F=F2, a pneumonia test report is generated;
[0114] If F=F0, then it is determined that P=P2.
[0115] As a medical image recognition method described in the present invention, if P=P2, the abnormal part is determined to be in the disputed area, and auxiliary analysis and verification are performed, including matching verification analysis, specifically:
[0116] Get the matching degree;
[0117] Get the coordinates of the lesion, denoted as c;
[0118] Obtain the position coordinates of each anatomical structure in the lung anatomy diagram, denoted as as;
[0119] Calculate the similarity between each lesion coordinate and each anatomical structure:
[0120] SI c,as =β·Matching degree(c,as)+γ·SH c,as +θ·TE c,as ;
[0121] Where β, γ, and θ represent the weights of distance, shape, and texture similarity, respectively, satisfying β + γ + θ = 1. Matchingdegree(c, as) represents the distance similarity between the lesion coordinates c and the anatomical structure as.
[0122] Among them, SH c,as is the shape similarity between the lesion coordinates c and the anatomical structure as, and the specific formula is:
[0123]
[0124] Among them, f c is the shape eigenvalue of the lesion coordinate c, f as is the shape characteristic value of the anatomical structure as;
[0125] Among them, TE c,as is the texture similarity between the lesion coordinates c and the anatomical structure as, and the specific formula is:
[0126]
[0127] Among them, fe c is the texture feature value of the lesion coordinate c, fe as is the texture feature value of the anatomical structure as;
[0128] Get the number of lesion coordinates in the lesion area, denoted as n_c;
[0129] Get the number of anatomical structures in the lung anatomy diagram, denoted as n_as;
[0130] Initialize a matching matrix X;
[0131] Calculate the optimized matching matrix X:
[0132]
[0133] Among them, X c,as Indicates whether the lesion coordinates c match the anatomical structure as. argmax is a mathematical symbol used to find the matching matrix X that maximizes the sum of the matching degrees. The optimized matching matrix X contains constraints, specifically:
[0134] For each c;
[0135] For each as;
[0136] Traverse the optimized matching matrix X and extract all X c,as =1, get the quantity of that position and record it as Match quantity;
[0137] By comparing the functions, we can determine the region to which the abnormal part belongs again:
[0138]
[0139] Among them, threshold is the comparison threshold, which is used to determine the region to which the abnormal part belongs;
[0140] If P=P2 is obtained when the region to which the abnormal part belongs is determined again, parameter verification analysis is performed.
[0141] As a medical image recognition method described in the present invention, the parameter verification analysis is specifically as follows:
[0142] Obtain the physiological data of the target patient, recorded as Ph:
[0143] Ph = {Ph1, Ph2, Ph3};
[0144] Obtain the lung appearance data of the target patient, denoted as AL:
[0145] AL = {AL1, AL2, AL3};
[0146] The physiological data is normalized by the normalization function:
[0147]
[0148] The lung appearance data is normalized using the normalization function:
[0149]
[0150] Obtain a standard lung anatomical model, labeled SLM 标准 ;
[0151] The standard lung anatomical model is normalized using the normalization function:
[0152]
[0153] Set a size adjustment function Adjust_Si(·) to adjust the size of the normalized lung anatomical model:
[0154] SLM 调整 =Adjust_Si(SLM 归一化 , AL 归一化 );
[0155] Set a scaling function Adjust_Pr(·) to scale the resized lung anatomical model:
[0156] SLM 预处理 =Adjust_Pr(SLM 调整 , AL 归一化 );
[0157] Set a conversion function Convert_Fo(·) to convert the resized lung anatomical model and key anatomical features to generate the initial anatomical structure diagram:
[0158] SLM 初始 =Convert_Fo(SLM 预处理 , F_E 解剖 );
[0159] The key anatomical features are extracted from the initial anatomical structure image through the feature extraction function Extract(·):
[0160] F_E 解剖 =Extract(SLM 初始 );
[0161] The feature fusion function Fusion(·) is used to fuse physiological data, lung appearance data, and key anatomical features:
[0162] FE 融合 =Fusion(Ph 归一化 , AL归一化 , F_E 解剖 );
[0163] Use the U-Net model and perform model training and optimization;
[0164] Among them, U-Net = Encoder-Decoder structure;
[0165] Extract the patient's lung anatomy map SLM 患者 ;
[0166] The patient's lung anatomy SLM 患者 Update to the lung anatomy diagram and repeat S4;
[0167] If S4 is repeated and P=P2 is obtained, the matching verification analysis is repeated;
[0168] If P=P2 is obtained when the region to which the abnormal part belongs is determined again in the matching verification analysis, the experimental parameter analysis is performed.
[0169] As a medical image recognition method described in the present invention, wherein: the model training and optimization are specifically:
[0170] Get the true anatomical structure of the lungs, denoted as SLM 真实 ;
[0171] The loss function measures the difference between the probability distribution predicted by the model and the true label:
[0172]
[0173] Among them, nq is the lung anatomy map SLM 真实 Pixels, tr nq is the true label, indicating whether the pixel nq belongs to the target category, pi nq is the probability that the pixel nq predicted by the model belongs to the target category, and Np is the lung anatomical structure map SLM 真实 The total number of pixels;
[0174] By optimizing the function, the Adam optimizer is used to update the parameters:
[0175]
[0176] Among them, τ is the parameter of the model, τ * represents the optimal parameter value, η is the loss function, FE 融合 It is the feature obtained by fusing physiological data, lung appearance data and key anatomical features. It is a symbol that means finding the value of τ that minimizes the objective function among all possible values of the parameter τ.
[0177] The optimized U-Net model is defined as the optimized model, denoted as MO;
[0178] Through the model fusion function, the fusion feature FE 融合 Input into the optimized model MO to generate a fused lung anatomical structure map:
[0179] SLM 个性化 =MO(FE 融合 );
[0180] Set up a validation function to calculate the error between the fused lung anatomy map and the true lung anatomy map:
[0181]
[0182] Where EP is the number of evaluation points, e is the number of evaluation points, and SLM 个性化 (e) is the coordinate of the e-th evaluation point in the fused lung anatomical structure map, SLM 真实 (e) is the coordinate of the e-th evaluation point in the true anatomical structure map, and ||·|| represents the Euclidean distance;
[0183] Setting assessment thresholds;
[0184] If TRE is less than the assessment threshold, the fused lung anatomy map is identified as the patient's lung anatomy map and marked as SLM. 患者 ;
[0185] If TRE ≥ the evaluation threshold, experimental parameter analysis is performed.
[0186] As a medical image recognition method of the present invention, wherein: the experimental parameter analysis is specifically:
[0187] Get the first experimental parameter of the target patient, denoted as W parameter ;
[0188] Set the first parameter threshold, denoted as W threshold ;
[0189] Generate the first judgment conclusion:
[0190]
[0191] If W=W1, a lung cancer detection report is generated;
[0192] If W=W2, the second experimental parameter of the target patient is obtained, which is recorded as RH parameter ;
[0193] Set the second parameter threshold, denoted as RH threshold ;
[0194] Generate the second judgment conclusion:
[0195]
[0196] If RH=RH2, a pneumonia test report is generated;
[0197] If RH=RH1, obtain the third experimental parameter of the target patient, which is recorded as DI;
[0198] Generate the third judgment conclusion:
[0199]
[0200] Among them, N means no, Y means yes;
[0201] If DI=DI1, a lung cancer detection report is generated;
[0202] If DI=DI2, the fourth experimental parameter of the target patient is obtained, which is recorded as TM parameter ;
[0203] Set the fourth parameter threshold, denoted as TM threshold ;
[0204] Generate the fourth judgment conclusion:
[0205]
[0206] If TM=TM1, a pneumonia test report is generated;
[0207] If TM=TM2, a lung cancer detection report is generated.
[0208] The present invention further discloses a medical image recognition device for executing the medical image recognition method, which includes:
[0209] Data acquisition module: used to collect lung images of target patients;
[0210] Data processing module: used to pre-process the lung images of target patients;
[0211] Feature analysis module: used to determine whether the target patient's lung images contain tumor features or inflammatory features;
[0212] Data matching module: used to analyze abnormal parts and determine their belonging areas;
[0213] Auxiliary verification module: Used to determine whether the analysis of the abnormal area is accurate when the lesion is located in the overlapping area of common lung cancer and pneumonia, and to combine multiple data to assist in determining the patient's specific condition.
[0214] The present invention has the following beneficial effects:
[0215] 1. The medical image recognition device and method process lung images to determine whether there are tumor features or inflammatory features in the lung images. If there are tumor features or inflammatory features in the lung images, the site with the tumor features or inflammatory features is identified as an abnormal site. The specific location of the abnormal site in the lungs is determined by obtaining a lung anatomical structure diagram. The symptom characteristics of lung cancer and pneumonia are obtained to determine whether the lesion is located in an overlapping area where lung cancer and pneumonia commonly occur. If the lesion is not in an overlapping area where lung cancer and pneumonia commonly occur, the patient's specific symptoms are determined based on the typical symptom characteristics of lung cancer and pneumonia. This reduces the number of monitoring items for patients, shortens the patient's testing time, reduces the doctor's workload, improves the efficiency of diagnosis and treatment, and makes the test results more accurate, reduces the misdiagnosis rate, and reduces unnecessary traffic in the hospital.
[0216] 2. The medical image recognition device and method, when a lung image has tumor features or inflammatory features, if the lesion is in the overlapping area of common lung cancer and pneumonia locations, obtains a preliminary matching result between the lesion and each anatomical structure in the lung anatomical structure diagram, i.e., a distance-based matching degree calculation result. Further, a graph-matching-based matching degree calculation is performed between the lesion and each anatomical structure in the lung anatomical structure diagram to generate more accurate matching data. Then, based on the regenerated matching data, the specific location of the abnormal part in the lung is determined. If the lesion is not in the overlapping area of common lung cancer and pneumonia locations, the patient's specific symptoms are determined in combination with the typical symptom characteristics of lung cancer and pneumonia. This reduces the patient's monitoring items, shortens the patient's testing time, reduces the doctor's workload, improves the diagnosis and treatment efficiency, and at the same time makes the test results more accurate, reduces the misdiagnosis rate, and reduces unnecessary traffic in the hospital.
[0217] 3. The medical image recognition device and medical image recognition method, when there are tumor characteristics or inflammatory characteristics in the lung image, if the lesion is in the overlapping area of the common onset locations of lung cancer and pneumonia, and the lesion is obtained in the overlapping area of the common onset locations of lung cancer and pneumonia based on the regenerated matching data, by obtaining the patient's physiological data such as height, weight, age, and lung appearance data such as the patient's lung area, circumference, and lung size, combined with the most commonly used lung anatomical structure diagram in the hospital medical database, a personalized lung anatomical structure diagram that best fits the patient is generated. Based on the patient's personalized lung anatomical structure diagram, a preliminary matching result is again performed, that is, a distance-based matching degree calculation result. If the lesion is not in the overlapping area of the common onset locations of lung cancer and pneumonia, the patient's specific symptoms are judged in combination with the typical symptom characteristics of lung cancer and pneumonia. If the lesion is in the overlapping area of lung cancer and pneumonia, the patient's specific symptoms are judged. If the lesion is in the overlapping area of the common onset locations of lung cancer and pneumonia, a matching degree calculation based on graph matching is performed to generate more accurate matching data. If the lesion is not in the overlapping area of the common onset locations of lung cancer and pneumonia, the patient's specific symptoms are judged in combination with the typical symptom characteristics of lung cancer and pneumonia. If the lesion is still in the overlapping area of the common onset locations of lung cancer and pneumonia, the patient's specific symptoms are judged by obtaining laboratory parameters such as the patient's white blood cell count. This takes into account the individual differences of patients and avoids detection errors caused by differences between individual patients and the most commonly used lung anatomical structure diagrams in the hospital medical database, which may lead to misdiagnosis. It makes the test results more accurate, reduces the misdiagnosis rate, reduces the number of monitoring items for patients, shortens the patient's testing time, reduces the workload of doctors, improves the diagnosis and treatment efficiency, and reduces unnecessary traffic in the hospital. BRIEF DESCRIPTION OF THE DRAWINGS
[0218] Figure 1 This is a flow chart of the medical image recognition method of the present invention;
[0219] Figure 2 This is a block diagram of a medical image recognition device that executes the medical image recognition method of the present invention. DETAILED DESCRIPTION
[0220] 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.
[0221] Example 1: A medical image recognition method, see Figure 1 ,include:
[0222] S1. Obtain target analysis data of target image;
[0223] S2. If the target analysis data shows no abnormality, a test report is generated, indicating that no inflammation or tumor is found in the target patient's lungs;
[0224] S3. If the target analysis data is detected as abnormal, extract the abnormal part;
[0225] S4. Analyze the abnormal area:
[0226] S41. Obtain all coordinate positions of the lesion area in the target image, define them as lesion coordinates, and form a coordinate set of the lesion, recorded as coordinate:
[0227] coordinate={(xu1, yv1, zw)1, (xu2, yv2, zw2),...};
[0228] Among them, xu, yv, and zw represent the position coordinates of the lesion in three-dimensional space;
[0229] S42. Obtain a lung anatomical structure diagram, labeled as lungs, wherein the lung anatomical structure diagram is a commonly used lung anatomical structure diagram extracted from a hospital medical database;
[0230] S43. Extract the position coordinates of each structure in the pulmonary anatomical structure diagram, including lung lobe coordinates, lung segment coordinates, and bronchial coordinates. The position coordinates of each structure in the pulmonary anatomical structure diagram are actually the position coordinates of the center point corresponding to each anatomical structure in the pulmonary anatomical structure diagram:
[0231] lungs={lunglobe, Pulmonary segment, bronchials,...};
[0232] S44. Calculate the matching degree between the lesion coordinates and each anatomical structure, denoted as Matching degree:
[0233]
[0234] Where d(c, as) is the Euclidean distance between the lesion coordinates and the anatomical structure, c is the lesion coordinates, as is the position coordinates of each anatomical structure in the lung anatomy diagram, and ε is a constant and is extremely small. For example, ε is 1 to avoid division by zero errors.
[0235] S45. Set a comparison function to determine the region to which the abnormal part belongs:
[0236]
[0237] Among them, threshold is the comparison threshold, which is used to determine the area to which the abnormal part belongs, that is, to judge whether the lesion is located in the overlapping area of common onset locations of lung cancer and pneumonia, so as to combine data such as typical characteristics of lung cancer and pneumonia to judge the patient's condition and generate a test report.
[0238] If P=P1, the abnormal part is determined to be in the normal area, and normal analysis and verification are performed, specifically:
[0239] Obtain the shape features S and texture features T of the lesion in the target image 纹理 And the edge feature E Sobel ;
[0240] Get the typical characteristic data of lung cancer and generate the first feature set, denoted as characteristiccancer:
[0241] characteristiccancer={c_c1,c_c2};
[0242] Among them, c_c1 is the characteristic of central lung cancer, with masses around the hilum and endobronchial masses, and c_c2 is the characteristic of peripheral lung cancer, with nodules or masses at the edge of the lung, which may be accompanied by spiculation and lobulation;
[0243] Get all the typical characteristic data of pneumonia and integrate them to generate the second feature set, labeled as characteristicinflammation:
[0244] characteristicinflammation={c_i1, c_i2};
[0245] Among them, c_i1 is characteristic of bacterial pneumonia, with consolidation shadows in the lungs, which may be accompanied by air bronchograms; c_i2 is characteristic of viral pneumonia, with ground-glass shadows in the lungs, which may be accompanied by interstitial changes;
[0246] Set up a matching function to calculate the matching degree between the lesion features and the disease features of lung cancer:
[0247] Matching degree characteristiccancer =Match(S, T 纹理 , E Sobel , characteristiccancer);
[0248] Set up a matching function to calculate the matching degree between the lesion features and the disease features of pneumonia:
[0249] Matching degree characteristicinflammation =Match(S, T 纹理 , ESobel , characteristicinflammation);
[0250] Setting a matching threshold, which is a threshold set based on actual testing needs and historical data in the hospital's medical database for determining the degree of matching between lesion characteristics and disease characteristics;
[0251] Calculate the matching degree of lesion features and determine the conclusion:
[0252]
[0253] If F = F1, a lung cancer detection report is generated, which means that a tumor is found in the target patient's lung and he may have lung cancer.
[0254] If F=F2, a pneumonia detection report is generated, which means that inflammation is found in the target patient's lungs and he may have pneumonia;
[0255] If F=F0, then it is determined that P=P2.
[0256] This embodiment also provides that if P=P2, the abnormal part is determined to be in the disputed area, and auxiliary analysis and verification are performed, including matching verification analysis, specifically:
[0257] Get the matching degree;
[0258] Get the coordinates of the lesion, denoted as c;
[0259] Obtain the position coordinates of each anatomical structure in the lung anatomy diagram, denoted as as;
[0260] Calculate the similarity between each lesion coordinate and each anatomical structure:
[0261] SI c,as =β·Matching degree(c,as)+γ·SH c,as +θ·TE c,as ;
[0262] Where β, γ, and θ represent the weights of distance, shape, and texture similarity, respectively, satisfying β + γ + θ = 1. Matchingdegree(c, as) represents the distance similarity between the lesion coordinates c and the anatomical structure as.
[0263] Among them, SH c,as is the shape similarity between the lesion coordinates c and the anatomical structure as, and the specific formula is:
[0264]
[0265] Among them, f cis the shape eigenvalue of the lesion coordinate c, f as is the shape feature value of the anatomical structure as, which includes data such as area, perimeter, and circularity, f c The shape feature S of the lesion is obtained by performing shape analysis and lesion recognition on the lesion area and extracting the shape feature of the lesion. as Shape analysis and lesion recognition are performed on the anatomical structure as to extract shape features of the anatomical structure s, where the shape features S_as of the anatomical structure s are obtained, where S_as = (Area, Perimeter, Circularity, ...);
[0266] Among them, TE c,as is the texture similarity between the lesion coordinates c and the anatomical structure as, and the specific formula is:
[0267]
[0268] Among them, fe c is the texture feature value of the lesion coordinate c, fe as is the texture feature value of the anatomical structure as, and the texture features include contrast, correlation, energy and entropy data, fe c The texture feature T of the lesion is obtained by extracting the disease features in the image and the texture features of the lesion. 纹理 _c, T 纹理 _c=(contrast, correlation, energy, entropy), fe as The texture feature T of the anatomical structure as is obtained by extracting the disease features in the image and the texture features of the anatomical structure as. 纹理 _as,T 纹理 _as=(contrast, correlation, energy, entropy);
[0269] Get the number of lesion coordinates in the lesion area, denoted as n_c;
[0270] Get the number of anatomical structures in the lung anatomy diagram, denoted as n_as;
[0271] Initialize a matching matrix X;
[0272] Calculate the optimized matching matrix X:
[0273]
[0274] Among them, X c,asIndicates whether the lesion coordinates c match the anatomical structure as, that is, whether the two coordinates are consistent. argmax is a mathematical symbol used to find the matching matrix X that maximizes the sum of the matching degrees. The optimized matching matrix X contains constraints, specifically:
[0275] For each c;
[0276] For each as;
[0277] Traverse the optimized matching matrix X and extract all X c,as =1, get the quantity of that position and record it as Match quantity;
[0278] By comparing the functions, we can determine the region to which the abnormal part belongs again:
[0279]
[0280] Among them, threshold is the comparison threshold, which is used to determine the region to which the abnormal part belongs;
[0281] If P=P2 is obtained when the region to which the abnormal part belongs is determined again, parameter verification analysis is performed.
[0282] The parameter verification analysis is specifically as follows:
[0283] Obtain the physiological data of the target patient, recorded as Ph:
[0284] Ph = {Ph1, Ph2, Ph3};
[0285] Among them, Ph1, Ph2, and Ph3 are the patient's height, weight, and age, respectively;
[0286] Obtain the lung appearance data of the target patient, denoted as AL:
[0287] AL = {AL1, AL2, AL3};
[0288] Among them, AL1, AL2, and AL3 are the lung size, circumference, and area of the patient's lungs, respectively;
[0289] The physiological data are normalized by the normalization function to normalize the data to the range of [0,1]:
[0290]
[0291] The lung appearance data is normalized by the normalization function to normalize the data to the range of [0,1]:
[0292]
[0293] Obtain a standard lung anatomical model, labeled SLM 标准 ,The standard lung anatomy model is a model based on the average lung anatomical structure of ,healthy people extracted from the hospital medical database;
[0294] The standard lung anatomical model is normalized using the normalization function:
[0295]
[0296] Set a resizing function Adjust_Si(·) to resize the normalized lung anatomical model to the size of the target patient. Specifically, this is achieved through interpolation image processing technology:
[0297] SLM 调整 =Adjust_Si(SLM 归一化 , AL 归一化 );
[0298] A scaling function Adjust_Pr(·) is set to scale the resized lung anatomical model to match the target patient's scale. Specifically, this can be achieved through affine transformation or other geometric transformations:
[0299] SLM 预处理 =Adjust_Pr(SLM 调整 , AL 归一化 );
[0300] Set a conversion function Convert_Fo(·) to convert the resized lung anatomical model and key anatomical features to generate an initial anatomical structure diagram to convert the model into a format suitable for computational processing, such as point cloud data:
[0301] SLM 初始 =Convert_Fo(SLM 预处理 , F_E 解剖 );
[0302] The feature extraction function Extract(·) is used to extract key anatomical features from the initial anatomical structure map, such as the lung boundary, the location of major bronchi and blood vessels, etc., which serve as reference points for the subsequent generation of the patient's personalized lung anatomical model:
[0303] F_E 解剖 =Extract(SLM 初始 );
[0304] The feature fusion function Fusion(·) is used to fuse physiological data, lung appearance data, and key anatomical features:
[0305] FE 融合 =Fusion(Ph 归一化 , AL 归一化 , F_E 解剖 );
[0306] Use the U-Net model and perform model training and optimization;
[0307] Among them, U-Net = Encoder-Decoder structure. The Encoder-Decoder structure is a model architecture design. It consists of two parts: an encoder and a decoder. The feature maps of the encoder and decoder are combined through skip connections to retain the detailed information of the image. The U-Net model uses the Encoder-Decoder structure for feature extraction, spatial resolution restoration, detail information preservation and multi-scale feature fusion. It can effectively combine the individual characteristics of the patient, improve the accuracy and personalization of the anatomical structure map, and thus generate a personalized lung anatomical structure map of the patient, making the analyzed data more accurate.
[0308] Extract the patient's lung anatomy map SLM 患者 ;
[0309] The patient's lung anatomy SLM 患者 Update to the lung anatomy diagram and repeat S4, that is, re-analyze the patient's lung images to determine whether the location of the tumor or inflammation analyzed previously is accurate, so as to determine whether it is necessary to further diagnose the patient's condition through laboratory parameters such as white blood cell count;
[0310] If S4 is repeated and P=P2 is obtained, the matching verification analysis is repeated. That is, after re-analysis, it is determined that the lesion is still located in the overlapping area of common lung cancer and pneumonia, and the belonging area of the abnormal part is determined again. Multiple verifications are performed to ensure the accuracy of the data, speed up the generation of the test report as much as possible, improve the detection efficiency, and reduce misjudgments;
[0311] If P=P2 is obtained when the region to which the abnormal part belongs is determined again in the matching verification analysis, the experimental parameter analysis is performed.
[0312] The model training and optimization are specifically as follows:
[0313] Get the true anatomical structure of the lungs, denoted as SLM 真实 ;
[0314] The loss function measures the difference between the probability distribution predicted by the model and the true label to minimize the difference between the predicted probability distribution and the true label. When the model's prediction is completely consistent with the true label, the loss value is 0. When the prediction is completely wrong, the loss value approaches infinity:
[0315]
[0316] Among them, nq is the lung anatomy map SLM 真实 Pixels, tr nq Is the true label, the value is 0 or 1, indicating whether the pixel nq belongs to the target category, pi nq is the probability that the pixel nq predicted by the model belongs to the target category, and Np is the lung anatomical structure map SLM 真实 The total number of pixels;
[0317] By optimizing the function, the Adam optimizer is used to update the parameters to minimize the loss function:
[0318]
[0319] Among them, τ is the parameter of the model, τ * represents the optimal parameter value, η is the loss function, FE 融合 It is the feature obtained by fusing physiological data, lung appearance data and key anatomical features. It is a symbol that means finding the value of τ that minimizes the objective function among all possible values of the parameter τ.
[0320] The optimized U-Net model is defined as the optimized model, denoted as MO;
[0321] Through the model fusion function, the fusion feature FE 融合 Input into the optimized model MO to generate a fused lung anatomical structure map:
[0322] SLM 个性化 =MO(FE 融合 );
[0323] Set up a validation function to calculate the error between the fused lung anatomy map and the true lung anatomy map:
[0324]
[0325] Among them, EP is the number of evaluation points, which is used to calculate the average error to ensure the representativeness of the evaluation results, e is the evaluation point, SLM 个性化 (e) is the coordinate of the e-th evaluation point in the fused lung anatomical structure map, which represents the point position in the generated anatomical structure map and is used for comparison with the true anatomical structure map.真实 (e) is the coordinate of the e-th evaluation point in the true anatomical structure map, which is used as the “true” label to evaluate the accuracy of the generated anatomical structure map. ||·|| represents the Euclidean distance, that is, the straight-line distance between two points, which quantifies the error between the fused lung anatomical structure map and the true anatomical structure map. TRE is the target registration error, which is an important indicator for evaluating the accuracy of the registration algorithm and is used to evaluate the accuracy of image registration.
[0326] Setting an evaluation threshold, wherein the evaluation threshold is a maximum value of an acceptable target registration error for data accuracy set based on historical experience;
[0327] If TRE is less than the assessment threshold, the fused lung anatomy map is identified as the patient's lung anatomy map and marked as SLM. 患者 ;
[0328] If TRE ≥ the evaluation threshold, experimental parameter analysis is performed.
[0329] This embodiment also provides the analysis of the experimental parameters, specifically:
[0330] Get the first experimental parameter of the target patient, denoted as W parameter , the first experimental parameter is white blood cell count;
[0331] Set the first parameter threshold, denoted as W threshold , the first parameter threshold is the maximum value that the white blood cell count can reach under normal circumstances;
[0332] Generate the first judgment conclusion:
[0333]
[0334] If W = W1, a lung cancer test report is generated, which means that the target patient's white blood cell count is not elevated, and a tumor is found in the lungs, indicating that the patient may have lung cancer.
[0335] If W=W2, the second experimental parameter of the target patient is obtained, which is recorded as RH parameter , the second experimental parameter is the red blood cell count and hemoglobin concentration, that is, the target patient's white blood cell count is elevated and further diagnosis of the patient's condition is required;
[0336] Set the second parameter threshold, denoted as RH threshold , the second parameter threshold is the minimum value that the red blood cell count and hemoglobin concentration can reach under normal circumstances;
[0337] Generate the second judgment conclusion:
[0338]
[0339] If RH=RH2, a pneumonia test report is generated, which means that the target patient's red blood cell count has not decreased, the hemoglobin concentration has not decreased, and inflammation is found in the lungs, and he may have pneumonia;
[0340] If RH=RH1, then obtain the third experimental parameter of the target patient, denoted as DI. The third experimental parameter is the patient's underlying disease, that is, to determine whether the patient has an underlying disease that can cause a decrease in red blood cell count and hemoglobin concentration. That is, the target patient has a decreased red blood cell count and a decreased hemoglobin concentration, and further diagnosis of the patient's condition is required;
[0341] Generate the third judgment conclusion:
[0342]
[0343] Among them, N means no, Y means yes;
[0344] If DI = DI1, a lung cancer test report is generated, indicating that the target patient has no underlying disease that would cause a decrease in red blood cell count and hemoglobin concentration, and a tumor is found in the lungs, indicating that the patient may have lung cancer.
[0345] If DI=DI2, the fourth experimental parameter of the target patient is obtained, which is recorded as TM parameter The fourth experimental parameter is a tumor marker, which means that the target patient has an underlying disease that causes a decrease in red blood cell count and hemoglobin concentration, and further diagnosis of the patient's condition is required;
[0346] Set the fourth parameter threshold, denoted as TM threshold , the fourth parameter threshold is the maximum value that the tumor marker can reach under normal circumstances;
[0347] Generate the fourth judgment conclusion:
[0348]
[0349] If TM = TM1, a pneumonia test report is generated, which means that the target patient's tumor markers are not elevated, and inflammation is found in the lungs, indicating that the patient may have pneumonia.
[0350] If TM=TM2, a lung cancer detection report is generated, which means that the target patient's tumor markers are elevated and a tumor is found in the lungs, indicating that the patient may have lung cancer.
[0351] Through the above method, when the lung image has tumor characteristics or inflammatory characteristics, the specific location of the abnormal part in the lung is determined, and the patient's specific symptoms are judged based on the specific location of the abnormal part in the lung. A lung anatomical structure diagram of the patient is generated according to the patient's own condition, thereby more accurately judging the specific location of the abnormal part in the lung, reducing the patient's monitoring items, shortening the patient's testing time, reducing the doctor's workload, and improving the diagnosis and treatment efficiency. At the same time, the test results are more accurate, the misdiagnosis rate is reduced, and unnecessary traffic in the hospital is reduced.
[0352] Example 2: This example is an improvement made on the basis of Example 1. In the medical image recognition method, the step of obtaining target analysis data of the target image includes preprocessing the target image, specifically:
[0353] Acquire a lung image of a target patient, which is defined as a target image and denoted as I, wherein the lung image is a high-resolution CT scan image;
[0354] Extract each pixel point in the target image in sequence as the target pixel point;
[0355] Get the position of the target pixel in the target image, recorded as (i, j);
[0356] Set a search window, marked as S, which is the range of searching for similar neighborhood blocks in the image;
[0357] Extract each pixel point in the search window S in turn and define it as the search pixel point;
[0358] Get the position of the search pixel in the target image, recorded as (k, l);
[0359] Among them, the position range of the search pixel point (k, l) is:
[0360]
[0361] Among them, searchWindowSize is a parameter used to define the search window size;
[0362] Set a filter function to denoise the target image and form a denoised image, which is recorded as I 去噪 :
[0363]
[0364] Among them, ω((i, j), (k, l)) is the weight between the target pixel (i, j) and the search pixel (k, l), and the specific calculation formula is:
[0365]
[0366] Where exp(·) is an exponential function used to convert the mean square error into a weight value, h is the filter strength parameter used to control the degree of noise removal, N(i, j) is the neighborhood block centered on the target pixel (i, j), which determines the range of the local area considered when calculating the similarity, and N(k, l) is the neighborhood block centered on the search pixel (k, l).
[0367] Among them, MSE(N(i, j), N(k, l)) is the mean square error between two neighboring blocks, which is used to calculate the similarity between two neighboring blocks. The specific calculation formula is:
[0368]
[0369] Where m×n is the size of the neighborhood block, I(x, y) represents the grayscale value of the pixel point (x, y), which is used to calculate the similarity and weight between neighborhood blocks, thereby affecting the calculation of the pixel value after denoising; I(u, v) represents the grayscale value of the pixel point (u, v), which is used to calculate the similarity and weight between neighborhood blocks, thereby affecting the calculation of the pixel value after denoising;
[0370] Get the horizontal template and vertical template, respectively denoted as G x and G y , where G x and G y They are the Sobel templates in the horizontal and vertical directions,
[0371] Set a sharpening function to enhance the denoised image to form an enhanced image, which is recorded as I 增强 :
[0372] I 增强 =I 去噪 +α·I Sobel ;
[0373] Among them, α is a parameter that controls the sharpening strength;
[0374] Among them, I Sobel is the gradient amplitude, which is calculated by the Sobel operator and then fused with the denoised image by weighted superposition to obtain the final sharpening result. The specific formula is:
[0375]
[0376] Among them, * represents the convolution operation, I 去噪 *G x Is G x Template and denoised image I 去噪 The horizontal gradient obtained by the convolution operation, I 去噪 *G yG y Template and denoised image I 去噪 The vertical gradient obtained by convolution operation;
[0377] Then the enhanced image I 增强 That is, the image after preprocessing the target image is defined as the processed image and marked as I 预处理 .
[0378] This embodiment also provides that the acquisition of target analysis data of the target image includes extracting disease features in the image, specifically:
[0379] Get the horizontal template and vertical template, respectively denoted as G x and G y ;
[0380] Get the processed image, marked as I 预处理 ;
[0381] Set an edge function, perform edge analysis on the target image, and generate the edge features of the target image, marked as E Sobel , to identify potential lesion boundaries or other important structures:
[0382]
[0383] Among them, E Sobel The Sobel operator is used to calculate the gradient of the image in the horizontal and vertical directions, and then the gradients in these two directions are synthesized to obtain the final gradient amplitude to highlight the edges and details of the image. The square and square root operations in the formula ensure the accuracy of the calculation of the gradient amplitude. 预处理 *G x Is G x Template and processed image I 预处理 The horizontal gradient obtained by the convolution operation, I 预处理 *G y Is G y Template and processed image I 预处理 The vertical gradient obtained by convolution operation;
[0384] Setting a contrast value range, wherein the contrast value range is a range formed by the gradient amplitude with the smallest value to the gradient amplitude with the largest value in all healthy lung images obtained based on all historical test data in the hospital medical database;
[0385] If the gradient amplitude E Sobel If it is within the contrast value range, the target image gradient is judged to be normal;
[0386] If the gradient amplitude E Sobel If it is outside the contrast value range, the target image gradient is judged to be abnormal;
[0387] Through the gray-level co-occurrence matrix calculation function greycomatrix, a gray-level co-occurrence matrix is constructed, denoted as GLCM:
[0388] GLCM=greycomatrix(I 预处理 ,distance,direction,Grayscale,symmetry,Normalization);
[0389] Among them, I 预处理 It processes images. Distance is the distance between pixel pairs, usually 1. Direction is the direction between pixel pairs, usually 0°, 45°, 90°, 135°. Grayscale is the grayscale level of the image, usually 256. Symmetry is whether to consider symmetry, usually True. Normalization is whether to normalize the matrix, usually True.
[0390] Calculate the contrast of the gray-level co-occurrence matrix GLCM, denoted as contrast:
[0391]
[0392] Where N is the gray level, a is the row of the gray level co-occurrence matrix GLCM, and b is the column of the gray level co-occurrence matrix GLCM;
[0393] Calculate the correlation of the gray-level co-occurrence matrix GLCM, denoted as correlation:
[0394]
[0395] Among them, a is the row of the gray-level co-occurrence matrix GLCM, b is the column of the gray-level co-occurrence matrix GLCM, μ a is the row mean, μ b is the mean of the column, σ a is the standard deviation of the row, σ b is the standard deviation of the column;
[0396] Calculate the energy of the gray-level co-occurrence matrix GLCM, denoted as energy:
[0397]
[0398] Calculate the entropy of the gray-level co-occurrence matrix GLCM, denoted as entropy:
[0399]
[0400] Set up a sorting function to perform texture analysis on the target image and generate the texture features of the target image, marked as T 纹理 , by analyzing the texture features in the image, such as contrast, correlation, energy and entropy, to distinguish different types of tissues or lesions:
[0401] T 纹理 =(contrast, correlation, energy, entropy);
[0402] Setting a contrast texture set, wherein the contrast texture set is a feature set formed by integrating all healthy and normal texture features;
[0403] If the comparison texture set contains T 纹理 , then the target image texture is judged to be normal;
[0404] If the comparison texture set does not contain T 纹理 , then the target image texture is judged to be abnormal;
[0405] The target image is segmented into a binary image using the segmentation algorithm (·), denoted as B:
[0406] B=segmentation algorithm(I 预处理 );
[0407] Among them, the lesion area is marked as 1 and the background area is marked as 0;
[0408] If all areas in the binary image B are marked as 0, and the target image gradient is normal, and the target image texture is normal, then the target analysis data is judged to be detected without abnormality;
[0409] If there is an area marked as 1 in the binary image B, or the target image gradient is abnormal, or the target image texture is abnormal, the target analysis data is determined to be abnormal, and the area marked as 1 in the binary image B is identified as the abnormal part.
[0410] This embodiment also provides that the lesion analysis of the abnormal part further includes shape analysis and lesion identification, extracting shape features of the lesion, such as area, perimeter, circularity, etc., to assist in diagnosis, specifically:
[0411] Obtain binary image B;
[0412] Calculate the area of the lesion in the target image, denoted as Area:
[0413]
[0414] Among them, I M and IN is the number of rows and columns of the image, B(I i , I j ) is the binary image matrix after segmentation, I i and I j are the row and column numbers in the image matrix. This formula traverses the entire image matrix and adds the pixel values (1) of all lesion areas to obtain the total area of the lesion;
[0415] Calculate the perimeter of the lesion in the target image, denoted as Perimeter:
[0416]
[0417] The formula estimates the perimeter by calculating the contribution of each boundary pixel, which is those pixels belonging to the lesion area (B(I i , I j )=1) but at least one of the adjacent pixels belongs to the background area (B(I i , I j )=0);
[0418] Calculate the circularity of the lesion in the target image, denoted as Circularity:
[0419]
[0420] The closer the circularity value is to 1, the closer the shape is to a circle;
[0421] Calculate the long axis and short axis of the lesion in the target image, denoted as Long axis and Short axis respectively:
[0422]
[0423] Where λ1 and λ2 are the eigenvalues of the major and minor axes of the ellipse generated by least squares fitting of the lesion area;
[0424] Calculate the eccentricity of the lesion in the target image, denoted as Eccentricity:
[0425]
[0426] Calculate the compactness of the lesion in the target image, denoted as Compactness:
[0427]
[0428] The lesions are classified by the classification function:
[0429] Classification = SVM(B);
[0430] Among them, SVM(·) is a classification function, SVM is a machine learning algorithm, specifically support vector machine;
[0431] The area, perimeter, circularity, major axis, minor axis, eccentricity, and compactness of the lesion in the target image are integrated to generate the shape feature of the lesion in the target image, which is marked as S:
[0432] S=(Area, Perimeter, Circularity, Longaxis, Short axis, Eccentricity, Compactness).
[0433] Embodiment 3: This embodiment also discloses a medical image recognition device for executing the medical image recognition method. Figure 2 ,include:
[0434] Data acquisition module: used to collect lung images of target patients;
[0435] Data processing module: used to pre-process the lung images of target patients;
[0436] Feature analysis module: used to determine whether the target patient's lung images contain tumor features or inflammatory features;
[0437] Data matching module: This module is used to analyze abnormal lesions and determine their region of origin. Specifically, it determines whether the lesion is located in the overlapping region where lung cancer and pneumonia commonly occur. If not, the module determines which disease the lesion is more likely to be based on the lesion's characteristics, combined with the typical characteristics of lung cancer and pneumonia. If it is in the overlapping region, further auxiliary verification is required. Through further detailed analysis of the lesion's location and combined with physiological data such as the patient's age and weight, a lung anatomical structure diagram that better matches the patient's physiological characteristics is regenerated to further determine the lesion's region of origin.
[0438] Auxiliary verification module: Used to determine whether the analysis of the abnormal area is accurate when the lesion is located in the overlapping area of common lung cancer and pneumonia, and to combine multiple data to assist in determining the patient's specific condition.
[0439] In this embodiment, when the lung image has tumor characteristics or inflammatory characteristics, the specific location of the abnormal part in the lung is determined, and the patient's specific symptoms are judged based on the specific location of the abnormal part in the lung. A lung anatomical structure diagram of the patient is generated according to the patient's own condition, thereby more accurately judging the specific location of the abnormal part in the lung, reducing the patient's monitoring items, shortening the patient's testing time, reducing the doctor's workload, and improving the efficiency of diagnosis and treatment. At the same time, the test results are more accurate, the misdiagnosis rate is reduced, and unnecessary traffic in the hospital is reduced.
Claims
1. A medical image recognition method, characterized by: include: S1. Obtain target analysis data of target image; S2. If the target analysis data shows no abnormality, a test report is generated; S3. If the target analysis data is abnormal, extract the abnormal part; S4. Analyze the abnormal area: S41. Obtain all coordinate positions of the lesion area in the target image, define them as lesion coordinates, and form a coordinate set of the lesion, recorded as coordinate: coordinate={(xu1, yv1, zw)1, (xu2, yv2, zw2),...}; S42. Obtain an anatomical diagram of the lungs, labeled lungs; S43. Extract the position coordinates of each structure in the lung anatomical structure diagram: lungs={lunglobe, Pulmonary segment, bronchials,...}; S44. Calculate the matching degree between the lesion coordinates and each anatomical structure, denoted as Matching degree: Where d(c, as) is the Euclidean distance between the lesion coordinates and the anatomical structure, c is the lesion coordinates, as is the position coordinates of each anatomical structure in the lung anatomy diagram, and ε is a constant; S45. Set a comparison function to determine the region to which the abnormal part belongs: Among them, threshold is the comparison threshold, which is used to determine the region to which the abnormal part belongs.
2. The medical image recognition method according to claim 1, wherein: The step of obtaining target analysis data of a target image includes preprocessing the target image, specifically: Obtain a lung image of the target patient, which is designated as the target image and denoted as I; Extract each pixel point in the target image in sequence as the target pixel point; Get the position of the target pixel in the target image, recorded as (i, j); Set up a search window, marked as S; Extract each pixel point in the search window S in turn and define it as the search pixel point; Get the position of the search pixel in the target image, recorded as (k, l); Among them, searchWindowSize is a parameter used to define the search window size; Set a filter function to denoise the target image and form a denoised image, which is recorded as I 去噪 : Among them, ω((i, j), (k, l)) is the weight between the target pixel (i, j) and the search pixel (k, l), and the specific calculation formula is: Where exp(·) is an exponential function used to convert the mean square error into a weight value, h is the filter strength parameter used to control the degree of noise removal, N(i, j) is the neighborhood block centered on the target pixel (i, j), and N(k, l) is the neighborhood block centered on the search pixel (k, l). Among them, MSE(N(i, j), N(k, l)) is the mean square error between two neighboring blocks, which is used to calculate the similarity between two neighboring blocks. The specific calculation formula is: Where m×n is the size of the neighborhood block, and I(x, y) represents the grayscale value of the pixel (x, y); Get the horizontal template and vertical template, respectively denoted as G x and G y ; Set a sharpening function to enhance the denoised image to form an enhanced image, which is recorded as I 增强 : I 增强 =I 去噪 +α·I Sobel ; Among them, α is a parameter that controls the sharpening strength; Among them, I Sobel is the gradient amplitude, and the specific formula is: Among them, * represents the convolution operation, I 去噪 *G x Is G x Template and denoised image I 去噪 The horizontal gradient obtained by the convolution operation, I 去噪 *G y G y Template and denoised image I 去噪 The vertical gradient obtained by convolution operation; Then the enhanced image I 增强 That is, the image after preprocessing the target image is defined as the processed image and marked as I 预处理 .
3. The medical image recognition method according to claim 2, characterized in that: The acquisition of target analysis data of the target image includes extracting disease features in the image, specifically: Get the horizontal template and vertical template, respectively denoted as G x and G y ; Get the processed image, marked as I 预处理 ; Set an edge function, perform edge analysis on the target image, and generate the edge features of the target image, marked as E Sobel : Among them, E Sobel The Sobel operator is used to calculate the gradient of the image in the horizontal and vertical directions, and then the gradients in these two directions are synthesized to obtain the final gradient amplitude. 预处理 *G x Is G x Template and processed image I 预处理 The horizontal gradient obtained by the convolution operation, I 预处理 *G y Is G y Template and processed image I 预处理 The vertical gradient obtained by convolution operation; Set the comparison value range; If the gradient amplitude E Sobel If it is within the contrast value range, the target image gradient is judged to be normal; If the gradient amplitude E Sobel If it is outside the contrast value range, the target image gradient is judged to be abnormal; Through the gray-level co-occurrence matrix calculation function greycomatrix, a gray-level co-occurrence matrix is constructed, denoted as GLCM: GLCM=greycomatrix(I 预处理 ,distance,direction,Grayscale,symmetry,Normalization); Among them, I 预处理 It processes images, distance is the distance between pixel pairs, direction is the direction between pixel pairs, Grayscale is the grayscale level of the image, symmetry is whether to consider symmetry, and Normalization is whether to normalize the matrix; Calculate the contrast of the gray-level co-occurrence matrix GLCM, denoted as contrast: Where N is the gray level, a is the row of the gray level co-occurrence matrix GLCM, and b is the column of the gray level co-occurrence matrix GLCM; Calculate the correlation of the gray-level co-occurrence matrix GLCM, denoted as correlation: Among them, a is the row of the gray-level co-occurrence matrix GLCM, b is the column of the gray-level co-occurrence matrix GLCM, μ a is the row mean, μ b is the mean of the column, σ a is the standard deviation of the row, σ b is the standard deviation of the column; Calculate the energy of the gray-level co-occurrence matrix GLCM, denoted as energy: Calculate the entropy of the gray-level co-occurrence matrix GLCM, denoted as entropy: Set up a sorting function to perform texture analysis on the target image and generate the texture features of the target image, marked as T 纹理 : T 纹理 =(contrast,correlation,energy,entropy); Set contrast texture set; If the comparison texture set contains T 纹理 , then the target image texture is judged to be normal; If the comparison texture set does not contain T 纹理 , then the target image texture is judged to be abnormal; The target image is segmented into a binary image using the segmentation algorithm (·), denoted as B: B=segmentation algorithm(I 预处理 ); Among them, the lesion area is marked as 1 and the background area is marked as 0; If all areas in the binary image B are marked as 0, and the target image gradient is normal, and the target image texture is normal, then the target analysis data is judged to be detected without abnormality; If there is an area marked as 1 in the binary image B, or the target image gradient is abnormal, or the target image texture is abnormal, the target analysis data is determined to be abnormal, and the area marked as 1 in the binary image B is identified as the abnormal part.
4. The medical image recognition method according to claim 1, wherein: The lesion analysis of the abnormal part also includes shape analysis and lesion identification, specifically: Obtain binary image B; Calculate the area of the lesion in the target image, denoted as Area: Among them, I M and I N is the number of rows and columns of the image, B(I i , I j ) is the binary image matrix after segmentation, I i and I j are the row and column numbers in the image matrix; Calculate the perimeter of the lesion in the target image, denoted as Perimeter: Calculate the circularity of the lesion in the target image, denoted as Circularity: Calculate the long axis and short axis of the lesion in the target image, denoted as Long axis and Short axis respectively: Where λ1 and λ2 are the eigenvalues of the major and minor axes of the ellipse generated by least squares fitting of the lesion area; Calculate the eccentricity of the lesion in the target image, denoted as Eccentricity: Calculate the compactness of the lesion in the target image, denoted as Compactness: The lesions are classified by the classification function: Classification = SVM(B); Among them, SVM(·) is a classification function, and SVM is a machine learning algorithm; The area, perimeter, circularity, major axis, minor axis, eccentricity, and compactness of the lesion in the target image are integrated to generate the shape feature of the lesion in the target image, which is marked as S: S = (Area, Perimeter, Circularity, Longaxis, Shortaxis, Eccentricity, Compactness).
5. The medical image recognition method according to claim 1, wherein: If P=P1, the abnormal part is determined to be in the normal area, and normal analysis and verification are performed, specifically: Obtain the shape features S and texture features T of the lesion in the target image 纹理 And the edge feature E Sobel ; Get the typical characteristic data of lung cancer and generate the first feature set, denoted as characteristiccancer: characteristiccancer={c_c1, c_c2}; Get all the typical characteristic data of pneumonia and integrate them to generate the second feature set, labeled as characteristicinflammation: characteristicinflammation={c_i1, c_i2}; Set up a matching function to calculate the matching degree between the lesion features and the disease features of lung cancer: Matching degree characteristiccancer =Match(S,T 纹理 ,E Sobel ,characteristiccancer); Set up a matching function to calculate the matching degree between the lesion features and the disease features of pneumonia: Matching degree characteristicinflammation =Match(S,T 纹理 ,E Sobel ,characteristicinflammation); Set matching threshold; Calculate the matching degree of lesion features and determine the conclusion: If F=F1, a lung cancer detection report is generated; If F=F2, a pneumonia test report is generated; If F=F0, then it is determined that P=P2.
6. A medical image recognition method according to claims 1-5, characterized in that: If P=P2, the abnormal part is determined to be in the disputed area, and auxiliary analysis and verification are performed, including matching verification analysis, specifically: Get the matching degree; Get the coordinates of the lesion, denoted as c; Obtain the position coordinates of each anatomical structure in the lung anatomy diagram, denoted as as; Calculate the similarity between each lesion coordinate and each anatomical structure: SI c,as =β·Matching degree(c,as)+c·SH c,as +θ·TE c,as ; Where β, γ, and θ represent the weights of distance, shape, and texture similarity, respectively, satisfying β + γ + θ = 1. Matchingdegree(c, as) represents the distance similarity between the lesion coordinates c and the anatomical structure as. Among them, SH c,as is the shape similarity between the lesion coordinates c and the anatomical structure as, and the specific formula is: Among them, f c is the shape eigenvalue of the lesion coordinate c, f as is the shape characteristic value of the anatomical structure as; Among them, TE c,as is the texture similarity between the lesion coordinates c and the anatomical structure as, and the specific formula is: Among them, fe c is the texture feature value of the lesion coordinate c, fe as is the texture feature value of the anatomical structure as; Get the number of lesion coordinates in the lesion area, denoted as n_c; Get the number of anatomical structures in the lung anatomy diagram, denoted as n_as; Initialize a matching matrix X; Calculate the optimized matching matrix X: Among them, X c,as Indicates whether the lesion coordinates c match the anatomical structure as. argmax is a mathematical symbol used to find the matching matrix X that maximizes the sum of the matching degrees. The optimized matching matrix X contains constraints, specifically: For each c; For each as; Traverse the optimized matching matrix X and extract all X c,as =1, get the quantity of that position, recorded as Matchquantity; By comparing the functions, we can determine the region to which the abnormal part belongs again: Among them, threshold is the comparison threshold, which is used to determine the region to which the abnormal part belongs; If P=P2 is obtained when the region to which the abnormal part belongs is determined again, parameter verification analysis is performed.
7. The medical image recognition method according to claim 6, characterized in that: The parameter verification analysis is specifically as follows: Obtain the physiological data of the target patient, recorded as Ph: Ph = {Ph1, Ph2, Ph3}; Obtain the lung appearance data of the target patient, denoted as AL: AL = {AL1, AL2, AL3}; The physiological data is normalized by the normalization function: The lung appearance data is normalized using the normalization function: Obtain a standard lung anatomical model, labeled SLM 标准 ; The standard lung anatomical model is normalized using the normalization function: Set a size adjustment function Adjust_Si(·) to adjust the size of the normalized lung anatomical model: SLM 调整 =Adjust_Si(SLM 归一化 ,AL 归一化 ); Set a scaling function Adjust_Pr(·) to scale the resized lung anatomical model: SLM 预处理 =Adjust_Pr(SLM 调整 ,AL 归一化 ); Set a conversion function Convert_Fo(·) to convert the resized lung anatomical model and key anatomical features to generate the initial anatomical structure diagram: SLM 初始 =Convert_Fo(SLM 预处理 ,F_E 解剖 ); The key anatomical features are extracted from the initial anatomical structure image through the feature extraction function Extract(·): F_E 解剖 =Extract(SLM 初始 ); The feature fusion function Fusion(·) is used to fuse physiological data, lung appearance data, and key anatomical features: FE 融合 =Fusion(Ph 归一化 ,AL 归一化 ,F_E 解剖 ); Use the U-Net model and perform model training and optimization; Among them, U-Net = Encoder-Decoder structure; Extract the patient's lung anatomy map SLM 患者 ; The patient's lung anatomy SLM 患者 Update to the lung anatomy diagram and repeat S4; If S4 is repeated and P=P2 is obtained, the matching verification analysis is repeated; If P=P2 is obtained when the region to which the abnormal part belongs is determined again in the matching verification analysis, the experimental parameter analysis is performed.
8. The medical image recognition method according to claim 7, characterized in that: The model training and optimization are specifically as follows: Get the true lung anatomy map, denoted as SLM 真实 ; The loss function measures the difference between the probability distribution predicted by the model and the true label: Among them, nq is the lung anatomy map SLM 真实 Pixels, tr nq is the true label, indicating whether the pixel nq belongs to the target category, pi nq is the probability that the pixel nq predicted by the model belongs to the target category, and Np is the lung anatomical structure map SLM 真实 The total number of pixels; By optimizing the function, the Adam optimizer is used to update the parameters: Among them, τ is the parameter of the model, τ * represents the optimal parameter value, η is the loss function, FE 融合 It is the feature obtained by fusing physiological data, lung appearance data and key anatomical features. It is a symbol that means finding the value of τ that minimizes the objective function among all possible values of the parameter τ. The optimized U-Net model is defined as the optimized model, denoted as MO; Through the model fusion function, the fusion feature FE 融合 Input into the optimized model MO to generate a fused lung anatomical structure map: SLM 个性化 =MO(FE 融合 ); Set up a validation function to calculate the error between the fused lung anatomy map and the true lung anatomy map: Where EP is the number of evaluation points, e is the number of evaluation points, and SLM 个性化 (e) is the coordinate of the e-th evaluation point in the fused lung anatomical structure map, SLM 真实 (e) is the coordinate of the e-th evaluation point in the true anatomical structure map, and ||·|| represents the Euclidean distance; Setting assessment thresholds; If TRE is less than the assessment threshold, the fused lung anatomy map is identified as the patient's lung anatomy map and marked as SLM. 患者 ; If TRE ≥ the evaluation threshold, experimental parameter analysis is performed.
9. The medical image recognition method according to claim 7, characterized in that: The experimental parameter analysis is specifically as follows: Get the first experimental parameter of the target patient, denoted as W parameter ; Set the first parameter threshold, denoted as W threshold ; Generate the first judgment conclusion: If W=W1, a lung cancer detection report is generated; If W=W2, the second experimental parameter of the target patient is obtained, which is recorded as RH parameter ; Set the second parameter threshold, denoted as RH threshold ; Generate the second judgment conclusion: If RH=RH2, a pneumonia test report is generated; If RH=RH1, obtain the third experimental parameter of the target patient, which is recorded as DI; Generate the third judgment conclusion: Among them, N means no, Y means yes; If DI=DI1, a lung cancer detection report is generated; If DI=DI2, the fourth experimental parameter of the target patient is obtained, which is recorded as TM parameter ; Set the fourth parameter threshold, denoted as TM threshold ; Generate the fourth judgment conclusion: If TM=TM1, a pneumonia test report is generated; If TM=TM2, a lung cancer detection report is generated.
10. A medical image recognition device for executing the medical image recognition method according to claim 1, characterized in that: include: Data acquisition module: used to collect lung images of target patients; Data processing module: used to pre-process the lung images of target patients; Feature analysis module: used to determine whether the target patient's lung images contain tumor features or inflammatory features; Data matching module: used to analyze abnormal parts and determine their belonging areas; Auxiliary verification module: Used to determine whether the analysis of the abnormal area is accurate when the lesion is located in the overlapping area of common lung cancer and pneumonia, and to combine multiple data to assist in determining the patient's specific condition.