Medical ultrasonic image section automatic classification method
By enhanced the characteristics of the medical ultrasound image and the weight assignment, the problem of invalid features in existing technologies increases the complexity of model complexity and reduce the accuracy of classification, and realizes more efficient image cutting automatic classification.
Patent Information
- Application Number
- CN202411304357.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing automatic classification technology of medical ultrasound image sections, deep learning models will introduce a large number of invalid or irrelevant features when extracting feature, increasing the complexity of model training and reducing classification accuracy.
By pre -processing and enhancement of the input ultrasonic surface images, and randomly select training samples from different types of images for characteristics and weight calculations, give the training set weights for the weight of each sample weighted features, and use support vector machines (SVM) Classified models are trained and classified.
Through the weight assignment and weighted processing of features, the model complexity is reduced, the accuracy of the classification of the cutting image is improved, and the negative effects of unrelated features on the classification results are avoided.
Smart Images

Figure BDA0005049893380000021 
Figure BDA0005049893380000022 
Figure BDA0005049893380000031
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ultrasonic image processing, and more specifically, to an automatic classification method for medical ultrasonic image sections. Background Art
[0002] Medical imaging technology can realize a wide range of cardiac examination methods, including SPECT, PET, CT, MRI, ultrasound and other modalities. Doctors can diagnose suspicious lesions found in medical ultrasound cross-sectional images.
[0003] At present, during the diagnosis process, doctors count the results of different sections and finally get the corresponding indicators. They need to manually select which image section the current image belongs to, which increases the workload. Therefore, doctors are assisted in making judgments by automatically identifying and classifying sections. Existing classification technologies usually use deep learning training models to achieve classification. When counting image features, a large amount of feature data describing the image will be extracted. However, not all feature data have effective prediction functions, and there are inefficient features and irrelevant features. Some features not only increase the complexity of model training, but also seriously affect the accuracy of section image classification. Summary of the invention
[0004] In order to overcome the above-mentioned defects, the present invention provides a method for automatic classification of medical ultrasound image sections. The technical problem to be solved by the present invention is: the existing classification technology usually uses a deep learning training model to achieve classification. When counting the image features, a large amount of feature data describing the image will be extracted. However, not all feature data have effective prediction functions. There are inefficient features and irrelevant features. Some features not only increase the complexity of model training, but also seriously affect the accuracy of section image classification.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for automatically classifying sections of medical ultrasound images, comprising the following steps:
[0006] S1, inputting a standard ultrasound cross-section image as an input image, resizing the input image and cropping it to a set length and width to obtain a preprocessed image of the input image, performing image compression processing on the preprocessed image, and performing feature enhancement on the image;
[0007] S2. Randomly select M images from different categories of pre-processed images as training samples, normalize the features of each training sample, and calculate the feature weight;
[0008] S3, assigning feature weights to each sample in the training set for calculation to obtain the weight of the weighted features of each sample;
[0009] S4, using the weights of weighted features to train the SVM classification model;
[0010] S5. When classifying unlabeled images, weight the unlabeled images with the feature weights of each category, and use the trained SVM classification model to classify and determine the image category.
[0011] As a further solution of the present invention: in S1, Gaussian smoothing processing and Hessian matrix processing are used to enhance the features of the image.
[0012] As a further solution of the present invention: the specific application steps of S2 are as follows:
[0013] The following formula is used to normalize the features:
[0014]
[0015] where x l represents the lth feature of a sample in a certain category of the sample set, x l ′ represents x l After normalization, m1 is the minimum value of the lth feature in the sample set, M l is the corresponding maximum value;
[0016] Assume n j is the number of samples in the jth class of the sample set, L is the characteristic dimension of the sample, then sample i is x i ={x il ,x i2 ,...,x iL},w i ={w il ,w i2 ,...,w iL} represents feature weight;
[0017] Then calculate the standard deviation of the feature, assuming that the standard deviation of the lth dimension of category j in the sample set is σ l , calculated by the following formula:
[0018]
[0019] x il is the lth feature of the i-th sample with image category j in the sample set, is the average value of the feature of this dimension;
[0020] Since the importance of a feature is inversely proportional to the degree of dispersion of the feature distribution, the higher the dispersion, the lower the importance of the feature. On the contrary, if the dispersion is low, that is, the standard deviation is small, the importance of the feature is high. l To indicate the importance of features, e l ∈[0,1], its calculation formula is:
[0021]
[0022] When a feature of a certain dimension is densely distributed, its standard deviation is small. If the feature value is the same, the standard deviation is zero, and e l is 1, σ l The larger the value, the corresponding e l The smaller it is, the less important the feature is. The specific calculation method for each sample and each dimension is as follows:
[0023]
[0024] The weight obtained by formula (4) is used to weight the features of each dimension.
[0025] As a further solution of the present invention: the calculation formula in S3 is as follows:
[0026] x i ' l =w jl ·x il (5)
[0027] w jl is the weight of the lower l features of a certain type of image, x il is the lth eigenvalue of the i-th image sample of this type of image in the sample set, x i ' l For x il Updated feature weights.
[0028] As a further solution of the present invention: the specific application steps in S4 are as follows:
[0029] Using K(x i ,x j )=φ(x i )·φ(x j ) is a kernel function, and is used to match samples by calculating the distance between sample features. Different weighting matrices are used to weight each image category. Let x i and x j They belong to two different categories, and their corresponding weighted matrices are E and P respectively. The weighted kernel function is expressed as:
[0030]
[0031] E and P are the feature weight matrices of the two categories, and the weight matrix is a diagonal matrix. The specific expression is:
[0032]
[0033] Where E and P are calculated by formula (4). Different image categories obtain different weighting matrices. The following formula is used to determine the final category of the image:
[0034]
[0035] In the formula, p(w j |B) indicates that the SVM classification model classifies image B into category w j The probability of N is the total number of tagged words.
[0036] The beneficial effects of the present invention are as follows: by randomly selecting M images from preprocessed images of different categories as training samples, and normalizing the features of each training sample, and performing feature weight calculation, the feature weight is assigned to each sample in the training set for calculation, and the weight of the weighted feature of each sample is obtained, and the weight of the weighted feature is used to train the SVM classification model, so that the importance of the feature corresponding to the category is measured according to the discrete degree of the low-level feature distribution of the image, the feature weight with high correlation is increased, and the feature weight with low correlation is reduced, so as to avoid the subsequent model being dominated by weakly correlated or unwanted features. The present invention selects a feature weight suitable for each category, embeds the weighted feature into the SVM classification model for image classification, and can reduce the complexity of the SVM classification model and improve the accuracy of section image classification. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] The present invention provides a method for automatically classifying sections of medical ultrasound images, comprising the following steps:
[0039] S1, inputting a standard ultrasound cross-section image as an input image, resizing the input image and cropping it to a set length and width to obtain a preprocessed image of the input image, performing image compression processing on the preprocessed image, and performing feature enhancement on the image;
[0040] In S1, Gaussian smoothing and Hessian matrix processing are used to enhance the image features.
[0041] S2. Randomly select M images from different categories of pre-processed images as training samples, normalize the features of each training sample, and calculate the feature weight;
[0042] The specific application steps of S2 are as follows:
[0043] The following formula is used to normalize the features:
[0044]
[0045] where x l represents the lth feature of a sample in a certain category of the sample set, x l ′ represents x l After normalization, m1 is the minimum value of the lth feature in the sample set, M l is the corresponding maximum value;
[0046] Assume n j is the number of samples in the jth class of the sample set, L is the characteristic dimension of the sample, then sample i is x i ={x il ,x i2 ,...,x iL},w i ={w il ,w i2 ,...,w iL} represents feature weight;
[0047] Then calculate the standard deviation of the feature, assuming that the standard deviation of the lth dimension of category j in the sample set is σ l , calculated by the following formula:
[0048]
[0049] x il is the lth feature of the i-th sample with image category j in the sample set, is the average value of the feature of this dimension;
[0050] Since the importance of a feature is inversely proportional to the degree of dispersion of the feature distribution, the higher the dispersion, the lower the importance of the feature. On the contrary, if the dispersion is low, that is, the standard deviation is small, the importance of the feature is high. l To indicate the importance of features, e l ∈[0,1], its calculation formula is:
[0051]
[0052] When a feature of a certain dimension is densely distributed, its standard deviation is small. If the feature value is the same, the standard deviation is zero, and e l is 1, σ l The larger the value, the corresponding e l The smaller it is, the less important the feature is. The specific calculation method for each sample and each dimension is as follows:
[0053]
[0054] The weight obtained by formula (4) is used to weight the features of each dimension.
[0055] S3, assigning feature weights to each sample in the training set for calculation to obtain the weight of the weighted features of each sample;
[0056] The calculation formula in S3 is as follows:
[0057] x i ' l =w jl ·x il (5)
[0058] w jl is the weight of the lower l features of a certain type of image, x il is the lth eigenvalue of the i-th image sample of this type of image in the sample set, x i ' l For x il Updated feature weights.
[0059] S4, using the weights of weighted features to train the SVM classification model;
[0060] The specific application steps in S4 are as follows:
[0061] Using K(x i ,x j )=φ(x i )·φ(x j ) is a kernel function, and is used to match samples by calculating the distance between sample features. Different weighting matrices are used to weight each image category. Let x i and x j They belong to two different categories, and their corresponding weighted matrices are E and P respectively. The weighted kernel function is expressed as:
[0062]
[0063] E and P are the feature weight matrices of the two categories, and the weight matrix is a diagonal matrix. The specific expression is:
[0064]
[0065] Where E and P are calculated by formula (4). Different image categories obtain different weighting matrices. The following formula is used to determine the final category of the image:
[0066]
[0067] In the formula, p(w j |B) indicates that the SVM classification model classifies image B into category w j The probability of N is the total number of tagged words.
[0068] S5. When classifying unlabeled images, weight the unlabeled images with the feature weights of each category, and use the trained SVM classification model to classify and determine the image category.
[0069] Embodiment 1:
[0070] A method for automatically classifying sections of medical ultrasound images comprises the following steps:
[0071] S1, inputting a standard ultrasound cross-section image as an input image, resizing the input image and cropping it to a set length and width to obtain a preprocessed image of the input image, performing image compression processing on the preprocessed image, and performing feature enhancement on the image;
[0072] S2. Randomly select M images from different categories of pre-processed images as training samples, normalize the features of each training sample, and calculate the feature weight;
[0073] S3, assigning feature weights to each sample in the training set for calculation to obtain the weight of the weighted features of each sample;
[0074] S4, using the weights of weighted features to train the SVM classification model;
[0075] S5. When classifying unlabeled images, weight the unlabeled images with the feature weights of each category, and use the trained SVM classification model to classify and determine the image category.
[0076] Embodiment 2:
[0077] In S1, Gaussian smoothing and Hessian matrix processing are used to enhance the image features.
[0078] The specific application steps of S2 are as follows:
[0079] The following formula is used to normalize the features:
[0080]
[0081] where x l represents the lth feature of a sample in a certain category of the sample set, x l ′ represents x l After normalization, m1 is the minimum value of the lth feature in the sample set, M l is the corresponding maximum value;
[0082] Assume n j is the number of samples in the jth class of the sample set, L is the characteristic dimension of the sample, then sample i is x i ={x il ,x i2 ,...,x iL},w i ={w il ,w i2 ,...,w iL} represents feature weight;
[0083] Then calculate the standard deviation of the feature, assuming that the standard deviation of the lth dimension of category j in the sample set is σ l , calculated by the following formula:
[0084]
[0085] x il is the lth feature of the i-th sample with image category j in the sample set, is the average value of the feature of this dimension;
[0086] Since the importance of a feature is inversely proportional to the degree of dispersion of the feature distribution, the higher the dispersion, the lower the importance of the feature. On the contrary, if the dispersion is low, that is, the standard deviation is small, the importance of the feature is high. l To indicate the importance of features, e l ∈[0,1], its calculation formula is:
[0087]
[0088] When a feature of a certain dimension is densely distributed, its standard deviation is small. If the feature value is the same, the standard deviation is zero, and e l is 1, σ l The larger the value, the corresponding e l The smaller it is, the less important the feature is. The specific calculation method for each sample and each dimension is as follows:
[0089]
[0090] The weight obtained by formula (4) is used to weight the features of each dimension.
[0091] The calculation formula in S3 is as follows:
[0092] x i ' l =w jl ·x il (5)
[0093] w jl is the weight of the lower l features of a certain type of image, x il is the lth eigenvalue of the i-th image sample of this type of image in the sample set, x i ' l For x il Updated feature weights.
[0094] The specific application steps in S4 are as follows:
[0095] Using K(x i ,x j )=φ(x i )·φ(x j ) is a kernel function, and is used to match samples by calculating the distance between sample features. Different weighting matrices are used to weight each image category. Let x i and x j They belong to two different categories, and their corresponding weighted matrices are E and P respectively. The weighted kernel function is expressed as:
[0096]
[0097] E and P are the feature weight matrices of the two categories, and the weight matrix is a diagonal matrix. The specific expression is:
[0098]
[0099] Where E and P are calculated by formula (4). Different image categories obtain different weighting matrices. The following formula is used to determine the final category of the image:
[0100]
[0101] In the formula, p(w j |B) indicates that the SVM classification model classifies image B into category w j The probability of N is the total number of tagged words.
[0102] Working principle:
[0103] A standard ultrasound cross-section image is input as an input image, the input image is resized and cropped to a set length and width to obtain a preprocessed image of the input image, the preprocessed image is compressed, and the image is feature enhanced, and Gaussian smoothing and Hessian matrix processing are used to enhance the image features, M images are randomly selected from preprocessed images of different categories as training samples, and the features of each training sample are normalized, and feature weight calculation is performed. The specific implementation method is as follows:
[0104] The following formula is used to normalize the features:
[0105]
[0106] where x l represents the lth feature of a sample in a certain category of the sample set, x l ′ represents x l After normalization, m1 is the minimum value of the lth feature in the sample set, M lis the corresponding maximum value;
[0107] Assume n j is the number of samples in the jth class of the sample set, L is the characteristic dimension of the sample, then sample i is x i ={x il ,x i2 ,...,x iL},w i ={w il ,w i2 ,...,w iL} represents feature weight;
[0108] Then calculate the standard deviation of the feature, assuming that the standard deviation of the lth dimension of category j in the sample set is σ l , calculated by the following formula:
[0109]
[0110] x il is the lth feature of the i-th sample with image category j in the sample set, is the average value of the feature of this dimension;
[0111] Since the importance of a feature is inversely proportional to the degree of dispersion of the feature distribution, the higher the dispersion, the lower the importance of the feature. On the contrary, if the dispersion is low, that is, the standard deviation is small, the importance of the feature is high. l To indicate the importance of features, e l ∈[0,1], its calculation formula is:
[0112]
[0113] When a feature of a certain dimension is densely distributed, its standard deviation is small. If the feature value is the same, the standard deviation is zero, and e l is 1, σ l The larger the value, the corresponding e l The smaller it is, the less important the feature is. The specific calculation method for each sample and each dimension is as follows:
[0114]
[0115] The weight obtained by the above formula is used to weight the features of each dimension;
[0116] Secondly, the feature weight is assigned to each sample in the training set for calculation to obtain the weight of the weighted feature of each sample. The calculation formula is: i ' l =w jl ·x il , and then the weight of the weighted feature is used to train the SVM classification model. The specific implementation method is as follows:
[0117] Using K(x i ,x j )=φ(x i )·φ(x j ) is a kernel function, and is used to match samples by calculating the distance between sample features. Different weighting matrices are used to weight each image category. Let x i and x j They belong to two different categories, and their corresponding weighted matrices are E and P respectively. The weighted kernel function is expressed as:
[0118]
[0119] E and P are the feature weight matrices of the two categories, and the weight matrix is a diagonal matrix. The specific expression is:
[0120]
[0121] Where E and P are calculated by formula (4). Different image categories obtain different weighting matrices. The following formula is used to determine the final category of the image:
[0122] label(B)=max arg(p(w j |B))
[0123] j=1,2,...,N
[0124] In the formula, p(w j |B) indicates that the SVM classification model classifies image B into category w j The probability of, N represents the total number of labeled words;
[0125] When classifying unlabeled images, the unlabeled images are weighted by the feature weights of each category, and the trained SVM classification model is used to classify and determine the image category.
[0126] In summary, the present invention randomly selects M images from preprocessed images of different categories as training samples, normalizes the features of each training sample, and calculates feature weights, assigns feature weights to each sample in the training set for calculation, obtains the weight of the weighted features of each sample, and uses the weights of the weighted features to train the SVM classification model. Thus, the importance of the feature corresponding to the category is measured according to the discrete degree of the low-level feature distribution of the image, the weights of features with high correlation are increased, and the weights of features with low correlation are reduced, so as to avoid the subsequent model being dominated by weakly correlated or unwanted features. The present invention selects a feature weight suitable for each category, embeds the weighted features into the SVM classification model for image classification, and can reduce the complexity of the SVM classification model and improve the accuracy of section image classification.
[0127] Finally, a few points should be explained: Although the present invention has been described in detail above with general descriptions and specific embodiments, on the basis of the present invention, the above embodiments are only used to illustrate the technical solution of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for automatic classification of sections of medical ultrasound images, characterized in that: The following steps are involved: S1, inputting a standard ultrasound cross-section image as an input image, resizing the input image and cropping it to a set length and width to obtain a preprocessed image of the input image, performing image compression processing on the preprocessed image, and performing feature enhancement on the image; S2. Randomly select M images from different categories of pre-processed images as training samples, normalize the features of each training sample, and calculate the feature weight; S3, assigning feature weights to each sample in the training set for calculation to obtain the weight of the weighted features of each sample; S4, using the weights of weighted features to train the SVM classification model; S5. When classifying unlabeled images, weight the unlabeled images with the feature weights of each category, and use the trained SVM classification model to classify and determine the image category.
2. The method for automatic classification of medical ultrasound image sections according to claim 1, characterized in that: In S1, Gaussian smoothing and Hessian matrix processing are used to enhance the features of the image.
3. The method for automatic classification of medical ultrasound image sections according to claim 1, characterized in that: The specific application steps of S2 are as follows: The following formula is used to normalize the features: where x l represents the lth feature of a sample in a certain category of the sample set, x l ′ represents x l After normalization, m1 is the minimum value of the lth feature in the sample set, M l is the corresponding maximum value; Assume n j is the number of samples in the jth class of the sample set, L is the characteristic dimension of the sample, then sample i is x i ={x il ,x i2 ,...,x iL },w i ={w il ,w i2 ,...,w iL } represents feature weight; Then calculate the standard deviation of the feature, assuming that the standard deviation of the lth dimension of category j in the sample set is σ l , calculated by the following formula: x il is the lth feature of the i-th sample with image category j in the sample set, is the average value of the feature of this dimension; Since the importance of a feature is inversely proportional to the degree of dispersion of the feature distribution, the higher the dispersion, the lower the importance of the feature. On the contrary, if the dispersion is low, that is, the standard deviation is small, the importance of the feature is high. l To indicate the importance of features, e l ∈[0,1], its calculation formula is: When a feature of a certain dimension is densely distributed, its standard deviation is small. If the feature value is the same, the standard deviation is zero, and e l is 1, σ l The larger the value, the corresponding e l The smaller it is, the less important the feature is. The specific calculation method for each sample and each dimension is as follows: The weight obtained by formula (4) is used to weight the features of each dimension.
4. The method for automatic classification of medical ultrasound image sections according to claim 3, characterized in that: The calculation formula in S3 is as follows: x i ′ l =w jl ·x il (5) w jl is the weight of the lower l features of a certain type of image, x il is the lth eigenvalue of the i-th image sample of this type of image in the sample set, x i ' l For x il Updated feature weights.
5. The method for automatic classification of medical ultrasound image sections according to claim 4, characterized in that: The specific application steps in S4 are as follows: Using K(x i ,x j )=φ(x i )·φ(x j ) is a kernel function, and is used to match samples by calculating the distance between sample features. Different weighting matrices are used to weight each image category. Let x i and x j They belong to two different categories, and their corresponding weighted matrices are E and P respectively. The weighted kernel function is expressed as: E and P are the feature weight matrices of the two categories, and the weight matrix is a diagonal matrix. The specific expression is: Where E and P are calculated by formula (4). Different image categories obtain different weighting matrices. The following formula is used to determine the final category of the image: In the formula, p(w j B) indicates that the SVM classification model classifies image B into category w j The probability of N is the total number of tagged words.