Multi-category medical image recognition method and system
By constructing a category discrimination vector based on the structural and texture features of image patches, and combining the relational spectrum matrix and Fisher LDA method, the problem of insufficient recognition accuracy and generalization ability of existing medical image recognition methods under different imaging conditions and noise interference is solved, and the morphological invariance and robustness are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANG SU AI YING YI LIAO KE JI YOU XIAN GONG SI
- Filing Date
- 2026-03-18
- Publication Date
- 2026-04-21
AI Technical Summary
Existing medical image recognition methods struggle to achieve morphological invariance, perturbation robustness, and discrimination enhancement when faced with challenges such as large differences in imaging conditions, complex tissue structures, and variable lesion morphology. Furthermore, their discrimination ability is limited in high-dimensional feature spaces, making it difficult to balance recognition accuracy and generalization ability.
By constructing a category discrimination vector based on image block structure features and texture features, and combining relation spectrum matrix eigenvalue decomposition and Fisher LDA method, a morphologically invariant description vector is constructed. Furthermore, by random gray-level perturbation and variance processing, the stability and sensitivity of feature expression are enhanced. Finally, the logical values of each category are output by combining the final recognition vector.
It significantly improves the morphological invariance and robustness of medical image recognition, enhances the ability to distinguish weak lesions and imaging noise, and improves the recognition accuracy and generalization ability across samples and imaging conditions.
Smart Images

Figure CN121904036A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image classification technology, specifically to a method and system for recognizing multi-category medical images. Background Technology
[0002] Medical image recognition is an important research direction in the field of computer-aided diagnosis. By automatically analyzing and classifying medical images, it can assist doctors in quickly and accurately identifying lesion types. Existing technologies have accumulated some expertise in medical image feature extraction and classification methods, such as extracting shallow features like texture and shape and combining them with traditional classifiers, or building end-to-end classification models based on deep learning. However, in real-world clinical scenarios, medical images often exhibit significant differences in imaging conditions, complex tissue structures, and varied lesion morphologies. Features from a single image patch are insufficient to stably represent the essential differences between different categories, and existing methods do not adequately consider the spatial coupling relationships between local image structures, easily leading to a lack of holistic and invariant feature representation. Furthermore, existing recognition methods are less robust to minor perturbations such as image grayscale fluctuations and noise interference, and the classifier's discriminative ability in high-dimensional feature spaces is limited, making it difficult to simultaneously achieve recognition accuracy and generalization ability in multi-class tasks. Therefore, how to construct a medical image recognition method that combines morphological invariance, perturbation robustness, and discriminative enhancement capabilities remains a key problem that urgently needs to be solved in current technological development.
[0003] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a multi-category medical image recognition method and system to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A multi-category medical image recognition method, comprising the following steps: Step 1: Obtain multiple medical images labeled with category tags, and after unifying their size, divide each medical image into image blocks of equal size; Step 2: For each medical image, extract the texture and structural features of each image patch, and construct a class discrimination vector based on the structural and texture features. Construct a relation spectrum matrix based on the distance between the class discrimination vectors of any number of image patches in all image patches of the medical image, and construct a morphological invariant description vector based on the eigenvalues of the relation spectrum matrix. Step 3: Apply N random micro-perturbations to the image patch and calculate the corresponding invariant description vector. Perform variance processing on the morphological invariant description vector after applying random micro-perturbations to obtain the morphological perturbation description vector. Concatenate the morphological perturbation description vector with the morphological invariant description vector to obtain the description vector. Step 4: Based on the description vector of each medical image, construct an image recognition subspace using the Fisher LDA method, map the medical image to the recognition subspace to obtain the final recognition vector. The subspace has weight vectors corresponding to each category, and the final recognition vector is combined to output the logical value of each category. Step 5: Determine the predicted category of the medical image based on the logical values of each category, and train the weight vector of each category based on the predicted category and category label.
[0006] Furthermore, the medical image is a grayscale image; The texture features include the contrast, dissimilarity, homogeneity, energy, and entropy of the gray-level co-occurrence matrix of the image patch; the structural features include the anisotropy and energy of the image patch structure tensor. The category differentiation vector is a vector formed by concatenating the structural features and texture features after maximum and minimum normalization.
[0007] Furthermore, the logic for obtaining the anisotropy and energy of the image patch structure tensor is as follows: The structure tensor is a 2x2 matrix. For each pixel of the image patch, calculate its horizontal gradient and vertical gradient. Calculate the square of the horizontal gradient of each pixel, called the horizontal gradient square. Calculate the sum of the horizontal gradient squares of all pixels, which is used as the 1x1 element of the structure tensor. Calculate the square of the vertical gradient of each pixel, called the vertical gradient square. Calculate the sum of the vertical gradient squares of all pixels, which is used as the 2x2 element of the structure tensor. Calculate the product of the horizontal and vertical gradients of each pixel, called the combined gradient product. Calculate the sum of the combined gradient products of all pixels, which is used as the 1x2 and 2x1 elements of the structure tensor. For a structure tensor, calculate its two eigenvalues and sum them as the energy of the structure tensor. Calculate the absolute difference between the two eigenvalues and divide it by the energy of the structure tensor to obtain the anisotropy of the structure tensor.
[0008] Furthermore, the logic for constructing the relation spectrum matrix is as follows: each image block of the same medical image is numbered; for the class distinction vectors of any two image blocks, the numbers of these two image blocks are used as the indexes of the rows and columns of the relation spectrum matrix; the L2 squared distance between the class distinction vectors of the two medical images is calculated; and the L2 squared distance is used as the element of the relation spectrum matrix to construct the relation spectrum matrix.
[0009] Furthermore, the logic for constructing the morphologically invariant descriptive vector is as follows: calculate the eigenvalues of the relation spectrum matrix, sort the eigenvalues of the relation spectrum matrix in descending order, group medical images with the same category label into one category, count the total number of categories of all medical images, called the total number of categories, and use the eigenvalues of the first total number of categories to construct the morphologically invariant descriptive vector.
[0010] Furthermore, the logic for obtaining the morphological perturbation description vector is as follows: for each pixel in the image, in Select a random number and add 1 to it. This is called the adjustment ratio. The gray value is adjusted to be the product of the adjustment ratio and the original gray value of the pixel. For each medical image after perturbation, calculate its invariant descriptor vector. For all invariant descriptor vectors after perturbation in the same image, calculate the variance of the corresponding eigenvalues with the same sorting result. This is called the perturbation variance. Based on the sorting result, construct the morphological perturbation descriptor vector from the morphological invariant descriptor vector.
[0011] Furthermore, based on the description vector of each medical image, the logic for constructing the image recognition subspace using the Fisher LDA method is as follows: Obtain the description vector of the medical image; calculate the mean of all description vectors, called the global mean; for medical images belonging to the same class, calculate the mean of the description vectors of the same class of medical images, called the intra-class mean; construct the intra-class scatter matrix and the inter-class scatter matrix based on all description vectors, the global mean, and the intra-class mean, respectively; obtain the subspace mapping matrix based on the multidimensional Fisher discrimination criterion; and obtain the generalized eigenvalues of the intra-class scatter matrix minus the inter-class scatter matrix based on the subspace mapping matrix; sort the generalized eigenvalues, calling the number of features in the description vector the description feature number; extract the generalized eigenvalues of the first description feature number; and construct the subspace mapping vector according to the sorting order; calculate the product of the transpose of the subspace mapping vector and the description vector as the final recognition matrix; calculate the eigenvalues of the final recognition matrix; and construct the final recognition vector using the eigenvalues of the final recognition matrix.
[0012] Furthermore, the logic for constructing the final recognition vector from the eigenvalues of the final recognition matrix is as follows: the final recognition vector is a row vector with the number of elements equal to the number of descriptive features. If the number of eigenvalues in the final recognition matrix is equal to the number of descriptive features, the eigenvalues are arranged in descending order to form the final recognition vector. If the number of eigenvalues in the final recognition matrix is not equal to the number of descriptive features, the eigenvalues are arranged in descending order, and eigenvalues that are less than the number of descriptive features are set to 0, thus constructing the final recognition vector.
[0013] Furthermore, the logic of combining the weight vectors of each category with the final recognition vector to output the logical value of each category is as follows: the weight vector is a column vector with the number of elements equal to the number of descriptive features. The final recognition vector is multiplied by the weight vector of the corresponding category to obtain the logical value of the category.
[0014] The present invention further provides a multi-category medical image recognition system, the system being used to implement the aforementioned multi-category medical image recognition method, specifically including: The image segmentation module is used to acquire multiple medical images labeled with category tags, and after unifying their size, divide each medical image into image blocks of equal size; The morphological analysis module is used to extract the texture and structural features of each image patch for each medical image, and construct a class discrimination vector based on the structural and texture features. It constructs a relation spectrum matrix based on the distance between the class discrimination vectors of any number of image patches in all image patches of the medical image, and constructs a morphological invariant description vector based on the eigenvalues of the relation spectrum matrix. The perturbation analysis module is used to apply N random micro-perturbations to the image patch and calculate the corresponding invariant description vector. The variance of the morphological invariant description vector after applying random micro-perturbations is processed to obtain the morphological perturbation description vector. The morphological perturbation description vector is then concatenated with the morphological invariant description vector to obtain the description vector. The logic output module is used to construct an image recognition subspace based on the description vector of each medical image and the Fisher LDA method, and to map the medical image to the recognition subspace to obtain the final recognition vector. The subspace has weight vectors corresponding to each category, and the logic values of each category are output by combining the final recognition vector. The weight training module is used to determine the predicted category of a medical image based on the logical values of each category, and to train the weight vector for each category based on the predicted category and category label.
[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention constructs a class discrimination vector based on image block structural and texture features, and further constructs a relation spectrum matrix and its eigenvalue decomposition based on inter-block feature distances. This achieves a stable spectral representation of the global spatial morphological topology of medical images, effectively overcoming the influence of image block arrangement and local positional changes on feature expression, and significantly improving the morphological invariance of features across samples and imaging conditions. Simultaneously, by applying random gray-level perturbations to the image and statistically analyzing the perturbation variance of the morphologically invariant description vector, this invention extends the static structural representation into a perturbation-enhanced representation that combines stability and sensitivity. This effectively amplifies the response differences between lesion areas and normal tissues, enhancing the method's ability to discriminate weak lesions and imaging noise. Furthermore, this invention combines Fisher LDA to construct a discriminative subspace and projects the original description vector to the optimal discriminative direction. Through further feature decomposition, it obtains a final recognition vector with concentrated energy and independent coordinates, reducing feature dimensionality while improving inter-class separability and classifier generalization ability. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a set of lung CT image recognition results from the present invention; Figure 3 This is a schematic diagram of the overall system structure of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0018] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0019] Example: Please see Figures 1-3 The present invention provides a technical solution: A multi-category medical image recognition method, comprising the following steps: Step 1: Obtain multiple medical images labeled with category tags, and after unifying their size, divide each medical image into image blocks of equal size; The category labels include, but are not limited to, labels for normal lungs, pneumonia, pulmonary fibrosis, and pulmonary nodules.
[0020] The size of medical images is uniformly set to 224 × 224 pixels, and the size of image blocks is set to 28 × 28 pixels.
[0021] Step 2: For each medical image, extract the texture and structural features of each image patch, and construct a class discrimination vector based on the structural and texture features. Construct a relation spectrum matrix based on the distance between the class discrimination vectors of any number of image patches in all image patches of the medical image, and construct a morphological invariant description vector based on the eigenvalues of the relation spectrum matrix. Furthermore, the medical image is a grayscale image; The texture features include the contrast, dissimilarity, homogeneity, energy, and entropy of the gray-level co-occurrence matrix of image patches; Constructing a gray-level co-occurrence matrix and extracting the corresponding texture features is a current technique, specifically: The gray-level co-occurrence matrix is represented as follows: In the formula, CLCM represents the gray-level co-occurrence matrix. This represents the number of times a pixel with gray level q is paired with an adjacent pixel with gray level p in an image patch, where p and q are both gray levels. ; The gray-level co-occurrence matrix is normalized, and based on the normalized gray-level co-occurrence matrix, contrast, dissimilarity, homogeneity, energy, and entropy are calculated using the following formulas: In the formula, Represents the normalized result Contrast, Dissimilarity, Homogeneity, Energy, and Entropy represent contrast, dissimilarity, homogeneity, energy, and entropy, respectively. This is a correction number; The structural features include the anisotropy and energy of the image patch structure tensor; Furthermore, the logic for obtaining the anisotropy and energy of the image patch structure tensor is as follows: The structure tensor is a 2x2 matrix. For each pixel of the image patch, calculate its horizontal gradient and vertical gradient. Calculate the square of the horizontal gradient of each pixel, called the horizontal gradient square. Calculate the sum of the horizontal gradient squares of all pixels, which is used as the 1x1 element of the structure tensor. Calculate the square of the vertical gradient of each pixel, called the vertical gradient square. Calculate the sum of the vertical gradient squares of all pixels, which is used as the 2x2 element of the structure tensor. Calculate the product of the horizontal and vertical gradients of each pixel, called the combined gradient product. Calculate the sum of the combined gradient products of all pixels, which is used as the 1x2 and 2x1 elements of the structure tensor. For a structure tensor, calculate its two eigenvalues and sum them as the energy of the structure tensor. Calculate the absolute difference between the two eigenvalues and divide it by the energy of the structure tensor to obtain the anisotropy of the structure tensor.
[0022] The category differentiation vector is a vector formed by concatenating the structural features and texture features after maximum and minimum normalization.
[0023] Furthermore, the logic for constructing the relation spectrum matrix is as follows: each image block of the same medical image is numbered; for the class distinction vectors of any two image blocks, the numbers of these two image blocks are used as the indexes of the rows and columns of the relation spectrum matrix; the L2 squared distance between the class distinction vectors of the two medical images is calculated; and the L2 squared distance is used as the element of the relation spectrum matrix to construct the relation spectrum matrix.
[0024] Furthermore, the logic for constructing the morphologically invariant descriptive vector is as follows: calculate the eigenvalues of the relation spectrum matrix, sort the eigenvalues of the relation spectrum matrix in descending order, group medical images with the same category label into one category, count the total number of categories of all medical images, called the total number of categories, and use the eigenvalues of the first total number of categories to construct the morphologically invariant descriptive vector.
[0025] The essence of constructing the relation spectrum matrix and extracting its eigenvalues is to first represent the structural coupling relationship between image blocks in a medical image as an inter-block similarity matrix. This matrix describes the overall spatial morphological topology, rather than the texture intensity and structural intensity of a single point. Since the matrix itself depends on the arrangement order of the blocks and lacks stability, eigenvalue decomposition is performed on it. By utilizing the property that eigenvalues remain unchanged under similarity transformation, the original relation structure is transformed into a morphologically invariant spectral representation that is independent of the block division position and arrangement, thereby obtaining a stable global structure and texture. Furthermore, only the first "number of categories" of eigenvalues are retained in descending order because the first few eigenvalues correspond to the main structural energy and dominant morphological modes, determining the macroscopic differences between categories. Subsequent small eigenvalues mostly reflect local noise and perturbation information, with very low discriminative contribution. Retaining them would increase dimensionality and the risk of overfitting. Therefore, truncating to the "number of categories" dimension can achieve noise reduction, compression, and stable discrimination while preserving the core morphological differences. This makes the resulting descriptive vector both morphologically invariant and class-separable, thereby significantly improving the robustness and generalization ability of multi-class medical image recognition.
[0026] Step 3: Apply N random micro-perturbations to the image patch and calculate the corresponding invariant description vector. Perform variance processing on the morphological invariant description vector after applying random micro-perturbations to obtain the morphological perturbation description vector. Concatenate the morphological perturbation description vector with the morphological invariant description vector to obtain the description vector. Furthermore, the logic for obtaining the morphological perturbation description vector is as follows: for each pixel in the image, in Select a random number and add 1 to it. This is called the adjustment ratio. The gray value is adjusted to be the product of the adjustment ratio and the original gray value of the pixel. For each medical image after perturbation, calculate its invariant descriptor vector. For all invariant descriptor vectors after perturbation in the same image, calculate the variance of the corresponding eigenvalues with the same sorting result. This is called the perturbation variance. Based on the sorting result, construct the morphological perturbation descriptor vector from the morphological invariant descriptor vector.
[0027] By applying [ to each pixel of the medical image] The random grayscale perturbation of 2%, 2% simulates the illumination fluctuations, sensor noise, and subtle physiological changes in tissues that are common in real imaging processes. After each perturbation, the morphological invariant descriptor vector is recalculated, and the variance of the same ordered feature values under multiple perturbations is statistically analyzed to obtain the perturbation variance, which quantifies the sensitivity of each principal morphological mode to subtle intensity changes. This expands the morphological invariant descriptor, which originally only reflects the "static spatial structure," into a morphological perturbation descriptor vector that simultaneously characterizes "structural stability and response elasticity." Stable tissue regions show small spectral value changes and low variance under perturbation, while lesion boundaries, abnormal proliferation, or comorbid coupling regions exhibit significant spectral fluctuations and increased variance due to the instability of local gradients and structural coupling. Therefore, this method can actively amplify the response differences between lesion regions and normal tissues, achieving noise suppression, enhancement of weak lesions, and robust and consistent characterization across devices / illumination conditions. Ultimately, it improves the discrimination sensitivity, stability, and generalization ability of multi-class medical image recognition.
[0028] Step 4: Based on the description vector of each medical image, construct an image recognition subspace using the Fisher LDA method, map the medical image to the recognition subspace to obtain the final recognition vector. The subspace has weight vectors corresponding to each category, and the final recognition vector is combined to output the logical value of each category. Furthermore, based on the description vector of each medical image, the logic of constructing the image recognition subspace using the Fisher LDA method is as follows: obtain the description vector of the medical image, calculate the mean of all description vectors, called the global mean, for medical images belonging to the same class, calculate the mean of the description vectors of the same class of medical images, called the intra-class mean, and construct the intra-class scatter matrix and the inter-class scatter matrix based on all description vectors, the global mean, and the intra-class mean, respectively. Constructing the intra-class scatter matrix and the inter-class scatter matrix is a common technique in Fisher LDA methods, and the formula is as follows: in, For and These are the intra-class scatter matrix and the inter-class scatter matrix, respectively. Let be the description vector of the j-th medical image with the i-th category label. The within-class mean of the i-th category label. The global mean. Let be the number of medical images with the i-th category label, where i is the index of the category label and j is the index of the medical image.
[0029] Based on the multidimensional Fisher criterion, a subspace mapping matrix is obtained, and based on the subspace mapping matrix, the generalized eigenvalues of the intra-class scatter matrix and the inter-class scatter matrix are obtained. Fisher's criterion is: in, To optimize the objective, The subspace mapping matrix; Solve When W is at its smallest value, W is the subspace mapping matrix. In the Fisher LDA method, the generalized eigenvalues can be obtained by solving the following equation: in, These are the generalized eigenvalues of the intra-class scatter matrix and the inter-class scatter matrix.
[0030] The generalized eigenvalues are sorted, and the number of features in the description vector is called the description feature number. The generalized eigenvalues of the previous description feature number are extracted and formed into a subspace mapping vector according to the sorting order. The product of the transpose of the subspace mapping vector and the description vector is calculated as the final recognition matrix. The eigenvalues of the final recognition matrix are calculated and the eigenvalues of the final recognition matrix are used to form the final recognition vector.
[0031] The generalized eigenvalues are sorted, and the top "number of descriptive features" eigenvalues are selected to form a subspace mapping vector. Essentially, this directly measures the inter-class-intra-class separation capability of each discriminative direction using the magnitude of the generalized eigenvalues. Only the main direction with the strongest discriminative capability is retained to remove weak discriminative dimensions and noise directions, achieving adaptive dimensionality reduction and energy concentration of the discriminative subspace. Subsequently, this mapping vector is multiplied by the morphological description vector, which is equivalent to reprojecting the original structural features into the optimal discriminative subspace, completing the directional transformation from "structural expression" to "discriminative expression," so that the features retain only the category-related variation components. Further eigenvalue decomposition of the resulting final recognition matrix and the formation of the final recognition vector from its eigenvalues spectrify the projected correlation structure, eliminating the influence of coordinate basis and arrangement order, and obtaining a compact representation that is rotation-invariant, scale-stable, and has a clear energy order. This simultaneously achieves noise suppression, dimensionality compression, discriminative enhancement, and stable and consistent representation across samples.
[0032] Furthermore, based on the description vector of each medical image, the logic for constructing the image recognition subspace using the Fisher LDA method is as follows: Obtain the description vector of the medical image; calculate the mean of all description vectors, called the global mean; for medical images belonging to the same class, calculate the mean of the description vectors of the same class of medical images, called the intra-class mean; construct the intra-class scatter matrix and the inter-class scatter matrix based on all description vectors, the global mean, and the intra-class mean, respectively; obtain the subspace mapping matrix based on the multidimensional Fisher discrimination criterion; and obtain the generalized eigenvalues of the intra-class scatter matrix minus the inter-class scatter matrix based on the subspace mapping matrix; sort the generalized eigenvalues, calling the number of features in the description vector the description feature number; extract the generalized eigenvalues of the first description feature number; and construct the subspace mapping vector according to the sorting order; calculate the product of the transpose of the subspace mapping vector and the description vector as the final recognition matrix; calculate the eigenvalues of the final recognition matrix; and construct the final recognition vector using the eigenvalues of the final recognition matrix.
[0033] Step 5: Determine the predicted category of the medical image based on the logical values of each category, and train the weight vector of each category based on the predicted category and category label.
[0034] Training the weight vectors for each category can be done using existing techniques. This embodiment illustrates one method (supervised learning combined with multi-class logistic regression), the specific process of which is as follows: For each medical image, its final recognition vector is compared with each category. The corresponding weight vectors are multiplied by a dot product to obtain the logical value for that category. Then, a softmax function is applied to the logical values of all categories to convert them into the predicted probability distribution of the image belonging to each category, and the category with the highest probability is taken as the predicted category. Next, the true category label of the image is used as the supervision signal, and the cross-entropy loss function is used to measure the difference between the prediction and the truth. Finally, the gradient of the loss function with respect to each weight is calculated through the backpropagation algorithm, and the weight vector is iteratively updated along the negative gradient direction using stochastic gradient descent (SGD) or its variants (such as Adam), so that images belonging to the category receive higher logical values, and images not belonging to the category have their logical values reduced, thereby gradually optimizing the decision boundary of each category.
[0035] Please see Figure 2 After training the weight parameters, a set of lung CT images were used to identify them using this method. Figure 2 In the text, a, b, c, and d represent the labels for normal lung condition, pneumonia, pulmonary fibrosis, and pulmonary nodules, respectively, all of which are consistent with the doctor's actual assessment of the condition.
[0036] Please see Figure 3 The present invention further provides a multi-category medical image recognition system, the system being used to implement the aforementioned multi-category medical image recognition method, specifically including: The image segmentation module is used to acquire multiple medical images labeled with category tags, and after unifying their size, divide each medical image into image blocks of equal size; The morphological analysis module is used to extract the texture and structural features of each image patch for each medical image, and construct a class discrimination vector based on the structural and texture features. It constructs a relation spectrum matrix based on the distance between the class discrimination vectors of any number of image patches in all image patches of the medical image, and constructs a morphological invariant description vector based on the eigenvalues of the relation spectrum matrix. The perturbation analysis module is used to apply N random micro-perturbations to the image patch and calculate the corresponding invariant description vector. The variance of the morphological invariant description vector after applying random micro-perturbations is processed to obtain the morphological perturbation description vector. The morphological perturbation description vector is then concatenated with the morphological invariant description vector to obtain the description vector. The logic output module is used to construct an image recognition subspace based on the description vector of each medical image and the Fisher LDA method, and to map the medical image to the recognition subspace to obtain the final recognition vector. The subspace has weight vectors corresponding to each category, and the logic values of each category are output by combining the final recognition vector. The weight training module is used to determine the predicted category of a medical image based on the logical values of each category, and to train the weight vector for each category based on the predicted category and category label.
[0037] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0038] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0039] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0040] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that cannot be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for recognizing multiple categories of medical images, characterized in that, The specific steps include: Step 1: Obtain multiple medical images labeled with category tags, and after unifying their size, divide each medical image into image blocks of equal size; Step 2: For each medical image, extract the texture and structural features of each image patch, and construct a class discrimination vector based on the structural and texture features. Construct a relation spectrum matrix based on the distance between the class discrimination vectors of any number of image patches in all image patches of the medical image, and construct a morphological invariant description vector based on the eigenvalues of the relation spectrum matrix. Step 3: Apply N random micro-perturbations to the image patch and calculate the corresponding invariant description vector. Perform variance processing on the morphological invariant description vector after applying random micro-perturbations to obtain the morphological perturbation description vector. Concatenate the morphological perturbation description vector with the morphological invariant description vector to obtain the description vector. Step 4: Based on the description vector of each medical image, construct an image recognition subspace using the Fisher LDA method, map the medical image to the recognition subspace to obtain the final recognition vector. The subspace has weight vectors corresponding to each category, and the final recognition vector is combined to output the logical value of each category. Step 5: Determine the predicted category of the medical image based on the logical values of each category, and train the weight vector of each category based on the predicted category and category label.
2. The multi-category medical image recognition method according to claim 1, characterized in that: The medical image is a grayscale image; The texture features include the contrast, dissimilarity, homogeneity, energy, and entropy of the gray-level co-occurrence matrix of the image patch; the structural features include the anisotropy and energy of the image patch structure tensor. The category differentiation vector is a vector formed by concatenating the structural features and texture features after maximum and minimum normalization.
3. The multi-category medical image recognition method according to claim 2, characterized in that: The logic for obtaining the anisotropy and energy of the image patch structure tensor is as follows: The structure tensor is a 2x2 matrix. For each pixel of the image patch, calculate its horizontal gradient and vertical gradient. Calculate the square of the horizontal gradient of each pixel, called the horizontal gradient square. Calculate the sum of the horizontal gradient squares of all pixels, which is used as the 1x1 element of the structure tensor. Calculate the square of the vertical gradient of each pixel, called the vertical gradient square. Calculate the sum of the vertical gradient squares of all pixels, which is used as the 2x2 element of the structure tensor. Calculate the product of the horizontal and vertical gradients of each pixel, called the combined gradient product. Calculate the sum of the combined gradient products of all pixels, which is used as the 1x2 and 2x1 elements of the structure tensor. For a structure tensor, calculate its two eigenvalues and sum them as the energy of the structure tensor. Calculate the absolute difference between the two eigenvalues and divide it by the energy of the structure tensor to obtain the anisotropy of the structure tensor.
4. The multi-category medical image recognition method according to claim 1, characterized in that: The logic for constructing the relation spectrum matrix is as follows: number each image block of the same medical image; for any two image blocks, use the numbers of these two image blocks as the indexes of the rows and columns of the relation spectrum matrix; calculate the L2 squared distance between the class distinction vectors of the two medical images; and use the L2 squared distance as the element of the relation spectrum matrix to construct the relation spectrum matrix.
5. The multi-category medical image recognition method according to claim 1, characterized in that: The logic for constructing the morphologically invariant descriptive vector is as follows: calculate the eigenvalues of the relation spectrum matrix, sort the eigenvalues of the relation spectrum matrix in descending order, group medical images with the same category label into one category, count the total number of categories of all medical images, called the total number of categories, and use the eigenvalues of the first total number of categories to construct the morphologically invariant descriptive vector.
6. The multi-category medical image recognition method according to claim 5, characterized in that: The logic for obtaining the morphological perturbation description vector is as follows: for each pixel in the image, in Select a random number and add 1 to it. This is called the adjustment ratio. The gray value is adjusted to be the product of the adjustment ratio and the original gray value of the pixel. For each medical image after perturbation, calculate its invariant descriptor vector. For all invariant descriptor vectors after perturbation in the same image, calculate the variance of the corresponding eigenvalues with the same sorting result. This is called the perturbation variance. Based on the sorting result, construct the morphological perturbation descriptor vector from the morphological invariant descriptor vector.
7. The multi-category medical image recognition method according to claim 6, characterized in that: The logic for constructing an image recognition subspace based on the description vector of each medical image and the Fisher LDA method is as follows: Obtain the description vector of the medical image; calculate the mean of all description vectors, called the global mean; for medical images belonging to the same class, calculate the mean of the description vectors of the same class of medical images, called the intra-class mean; construct the intra-class scatter matrix and the inter-class scatter matrix based on all description vectors, the global mean, and the intra-class mean, respectively; obtain the subspace mapping matrix based on the multidimensional Fisher discrimination criterion; and obtain the generalized eigenvalues of the intra-class scatter matrix minus the inter-class scatter matrix based on the subspace mapping matrix; sort the generalized eigenvalues, and call the number of features in the description vector the description feature number; extract the generalized eigenvalues of the first description feature number and construct the subspace mapping vector according to the sorting order; calculate the product of the transpose of the subspace mapping vector and the description vector as the final recognition matrix; calculate the eigenvalues of the final recognition matrix; and construct the final recognition vector using the eigenvalues of the final recognition matrix.
8. The multi-category medical image recognition method according to claim 7, characterized in that: The logic for constructing the final recognition vector from the eigenvalues of the final recognition matrix is as follows: The final recognition vector is a row vector with the number of elements equal to the number of descriptive features. If the number of eigenvalues in the final recognition matrix is equal to the number of descriptive features, the eigenvalues are arranged in descending order to form the final recognition vector. If the number of eigenvalues in the final recognition matrix is not equal to the number of descriptive features, the eigenvalues are arranged in descending order. Eigenvalues that are less than the number of descriptive features are set to 0, and the final recognition vector is constructed.
9. The multi-category medical image recognition method according to claim 1, characterized in that: The logic of combining the weight vectors of each category with the final recognition vector to output the logical value of each category is as follows: the weight vector is a column vector with the number of elements equal to the number of descriptive features. The final recognition vector is multiplied by the weight vector of the corresponding category to obtain the logical value of the category.
10. A multi-category medical image recognition system, characterized in that: The system is used to implement the multi-category medical image recognition method according to any one of claims 1-9, specifically including: The image segmentation module is used to acquire multiple medical images labeled with category tags, and after unifying their size, divide each medical image into image blocks of equal size; The morphological analysis module is used to extract the texture and structural features of each image patch for each medical image, and construct a class discrimination vector based on the structural and texture features. It constructs a relation spectrum matrix based on the distance between the class discrimination vectors of any number of image patches in all image patches of the medical image, and constructs a morphological invariant description vector based on the eigenvalues of the relation spectrum matrix. The perturbation analysis module is used to apply N random micro-perturbations to the image patch and calculate the corresponding invariant description vector. The variance of the morphological invariant description vector after applying random micro-perturbations is processed to obtain the morphological perturbation description vector. The morphological perturbation description vector is then concatenated with the morphological invariant description vector to obtain the description vector. The logic output module is used to construct an image recognition subspace based on the description vector of each medical image and the Fisher LDA method, and to map the medical image to the recognition subspace to obtain the final recognition vector. The subspace has weight vectors corresponding to each category, and the logic value of each category is output by combining the final recognition vector. The weight training module is used to determine the predicted category of a medical image based on the logical values of each category, and to train the weight vector for each category based on the predicted category and category label.