Knee joint MRI image classification method based on artificial intelligence
By preprocessing, affine registration and regional boundary extraction of knee MRI images, combined with multi-objective distinction model and pixel difference matrix analysis, the existing technology has solved the problem of small data sets, low data quality and readable deep learning models in the existing technology. The poor performance problem realizes high-precision knee MRI image classification and automatic segmentation.
Patent Information
- Application Number
- CN202411612973.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-25
AI Technical Summary
The existing knee MRI image classification technology based on artificial intelligence faces the problems of small data sets, low data quality, and uneven image quality. The readability and interpretability of deep learning models are poor, making it difficult to achieve automated image segmentation and labeling. .
A method of knee MRI image classification based on artificial intelligence is proposed, including preprocessing, affine registration, regional boundary extraction, multi-objective distinction model and pixel difference matrix analysis, and other steps are used to realize the knee MRI image. Automatic segmentation and precise classification.
It improves the alignment accuracy and segmentation accuracy of knee MRI images, reduces the need for doctors to operate manually, and improves the accuracy and consistency of image classification.
Smart Images

Figure CN119516269A_ABST
Abstract
Description
Technical Field
[0001] The invention proposes a knee joint MRI image classification method based on artificial intelligence, and relates to the technical field of image classification. Background Art
[0002] The knee joint is composed of bones, cartilage, ligaments, meniscus and other tissues. It is one of the largest and most complex joints in the human body and plays an extremely important role in maintaining normal human activities. With the continuous improvement of living standards, people's demand for sports and entertainment is also increasing, and the incidence of knee sports injuries is also increasing. Knee sports injuries are mostly concentrated in soft tissues such as cartilage, ligaments, and menisci. If diagnosis and treatment are not timely, it will cause reduced stability of the knee joint and accelerate the occurrence of knee osteoarthritis. Magnetic resonance imaging (MRI) is an important imaging method for the diagnosis and treatment of knee diseases. It is often used in clinical practice to evaluate internal diseases of the knee joint, especially lesions in areas such as effusion, meniscus, and ligaments. Such as Figure 1 Shown is a schematic diagram of ligament strain determined by MRI images of the knee joint.
[0003] The artificial intelligence-based knee MRI image classification method mainly includes deep learning technology, which can automatically identify image features and be used for medical image analysis. Image segmentation is an important step in the artificial intelligence-based knee MRI image classification method, which involves separating different tissues and structures in the image. The artificial intelligence-based knee MRI image classification method can be used for automatic segmentation of knee MRI images to improve the accuracy and efficiency of segmentation. Deep learning technology is mainly used in the fields of image segmentation, reconstruction and synthesis in knee MRI image processing to improve the accuracy of image segmentation and image quality, thereby improving classification efficiency and accuracy.
[0004] The current technical problems of artificial intelligence-based knee MRI image classification technology include:
[0005] The dataset is relatively small, the data quality is not high, and the image quality is uneven; the alignment and registration accuracy of knee MRI images at different time points or in different modalities is not high, and the regional contours cannot be accurately defined, resulting in a decrease in the accuracy of image regional segmentation.
[0006] The readability and interpretability of deep learning models are poor: most models are implemented end-to-end, lack reasonable explanations and judgment bases, and cannot achieve automated image segmentation and labeling. Doctors still need to manually distinguish and judge, which increases subjective errors and reduces the consistency and accuracy of judgments. The segmentation and grade judgment of knee MRI images are not accurate enough, and most models can only stay at the qualitative level. Summary of the invention
[0007] In order to solve the above technical problems, the present invention proposes a knee joint MRI image classification method based on artificial intelligence, comprising the following steps:
[0008] S1. Preprocessing knee joint MRI images;
[0009] S2, performing affine registration on the preprocessed knee joint MRI image and the reference image to obtain a registered MRI image aligned with the reference image;
[0010] S3, extracting the region boundary of the registered MRI image, determining the boundary feature points on the region boundary, and performing region segmentation on the MRI image according to the boundary feature points;
[0011] S4, inputting the multiple region images obtained by segmentation into a multi-target discrimination model to perform category labeling of the region images;
[0012] S5. Compare each region image marked with a category with standard region images of different levels of the corresponding category, construct a pixel difference matrix, calculate the similarity focus of each pixel difference matrix, and determine the level of the region image based on the similarity focus.
[0013] Furthermore, in step S5, the corresponding pixel difference value C of the pixel point (i, j) in the pixel difference matrix ij (L) is expressed as:
[0014] C ij (L)=‖U ij -F ij (L) ‖ 2 ;
[0015] Pixel difference value C ij (L) represents the pixel value U of the pixel point (i, j) in the region image I ij The pixel value F of the pixel point (i, j) at the same position as the standard area image J of level L ij (L) The square of the difference.
[0016] Furthermore, the elements whose pixel difference values in the pixel difference matrix are less than the lower threshold are set to 0, the elements whose pixel difference values are greater than the upper threshold are set to 1, and the other elements are set to 0.5; the absolute value of the difference between the ratio of the elements whose element value is 0 to the elements whose element value is 0.5 in the reset pixel difference matrix and the ratio of the elements whose element value is 0 to the elements whose element value is 1 in the difference matrix is calculated, and the absolute value is the similarity focus; the similarity focus of the regional image and the standard regional images of different levels L are calculated respectively, and the L corresponding to the similarity focus higher than the similarity threshold represents the level L to which the regional image belongs.
[0017] Furthermore, the lower threshold C of the pixel difference 下 (L) is expressed as:
[0018]
[0019] Pixel difference upper threshold C 上 (L) is expressed as:
[0020]
[0021] Where N is the number of elements in the pixel difference matrix.
[0022] 5. The method for classifying knee joint MRI images based on artificial intelligence according to claim 1, wherein step S3 comprises:
[0023] S31: using an edge detection algorithm, extracting the boundary of the registered MRI image to obtain the boundary line of the registered MRI image;
[0024] S32: using a gradient matrix algorithm, determining boundary feature points of the registration MRI image;
[0025] S33: Segment the MRI image into regions according to the boundary feature points to obtain a plurality of region images.
[0026] Furthermore, in step S4, the multi-target distinction model outputs category labeling results of the regional image, and the categories include: effusion, ligament and meniscus.
[0027] Furthermore, the levels L of the regional images representing effusion are: 0 none, 1 a small amount, 2 a moderate amount, 3 a large amount; the levels L of the regional images representing ligaments are: 0 normal, 1 rupture, 2 degeneration; the levels L of the regional images representing meniscus are: 0 normal, 1 first-level injury, 2 second-level injury, 3 third-level injury.
[0028] Furthermore, in step S4, the multi-target discrimination model adopts an attention mechanism, and the attention mechanism is used to cut each region image into multiple small tiles through a downsampling block, and each small tile is transformed through three independent linear layers to generate Q, K and V, wherein Q represents the query of the current pixel in the small tile to other pixels, K represents the key of each pixel in the small tile, and V represents the actual value of each pixel in the small tile;
[0029] Calculate the dot product of Q and K and divide the dot product result by the scaling factor Finally, the result is input into the Softmax function to normalize the attention score;
[0030] Multiple small patches are integrated through the upsampling block, V is weighted with the normalized attention score to obtain a weighted average, and the input region image is mapped to the most suitable subspace, thereby realizing the category labeling of the region image.
[0031] Compared with the prior art, the present invention has the following beneficial technical effects:
[0032] 1. Preprocess the knee joint MRI image, and perform affine registration on the preprocessed knee joint MRI image and the reference image to obtain a registered MRI image aligned with the reference image; so that the knee joint MRI images at different time points or different modalities can be compared and analyzed in the same spatial coordinate system, thereby improving the alignment accuracy of the image.
[0033] 2. Extract the region boundaries of the registered MRI image, determine the boundary feature points on the region boundaries, and segment the MRI image based on the boundary feature points; by accurately extracting the region boundaries and feature points, the region contours can be defined more accurately, thereby improving the accuracy of image segmentation.
[0034] 3. Input the multiple regional images obtained by segmentation into the multi-target differentiation model to perform category labeling of the regional images. Deep learning technology is used to realize automated image segmentation and labeling, which reduces the workload of doctors, improves efficiency, and may reduce subjective errors and improve the consistency and accuracy of judgments. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 This is a schematic diagram of ligament strain determined by MRI images of the knee joint;
[0037] Figure 2 A schematic diagram of the process of the knee joint MRI image classification method based on artificial intelligence of the present invention;
[0038] Figure 3 A schematic diagram of the process of preprocessing a knee joint MRI image according to the present invention;
[0039] Figure 4 It is a schematic diagram of the process of performing regional segmentation on MRI images of the present invention;
[0040] Figure 5 Schematic diagram of the attention mechanism of the present invention;
[0041] Figure 6 The data is used to verify the accuracy of image classification using the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] In the drawings of the specific embodiments of the present invention, in order to better and more clearly describe the working principles of the various components in the system, the connection relationship of the various parts in the device is shown, which only clearly distinguishes the relative position relationship between the various components, and cannot constitute a limitation on the signal transmission direction, connection sequence and structural size, size and shape of each part within the component or structure.
[0044] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0045] Example 1
[0046] like Figure 2 FIG. 1 is a flow chart of a method for classifying knee joint MRI images based on artificial intelligence according to Example 1. The method for classifying knee joint MRI images comprises the following steps:
[0047] S1. Preprocess knee joint MRI images.
[0048] In medical image analysis, preprocessing is a crucial step that can improve image quality, reduce noise, and provide accurate input for subsequent analysis.
[0049] In a preferred embodiment, if Figure 3 As shown, the preprocessing methods include: standardizing pixel intensity, unifying the direction of the image anatomical coordinate system, adjusting the image size, and translating the image centroid to the image center.
[0050] S11: Normalized pixel intensity.
[0051] The purpose of standardizing pixel intensity is to convert the scanning results of different imaging devices into a unified intensity standard to eliminate the impact caused by device differences.
[0052] Specifically, the original knee MRI image is read, and the mean and standard deviation of the intensity of all pixels in the MRI image are calculated. A linear transformation is applied so that the mean of the pixel intensity is 0 and the standard deviation is 1. The standardized pixel intensity is rescaled to the original grayscale range, usually 0 to 255.
[0053] S12: Unify the MRI image coordinate system direction.
[0054] The purpose of unifying the coordinate system direction of MRI images is to ensure that the coordinate system directions of all MRI images are consistent, which is convenient for subsequent image registration and comparison.
[0055] Specifically, the current coordinate system orientation of the MRI image is determined, and the image coordinate system is converted to a standard orientation (e.g., RAS+: right-left, anterior-posterior, superior-inferior) using functions in an image processing library (such as SPM, FSL, or a custom script).
[0056] S13: Adjust the size of the MRI image.
[0057] The purpose of MRI image resizing is to adjust MRI images of different resolutions to a uniform size for batch processing and analysis.
[0058] Specifically, a target image size (eg, 256×256×256) is determined, and an interpolation method (eg, nearest neighbor interpolation, bilinear interpolation, or cubic interpolation) is used to resample the MRI image to reach the target size.
[0059] S14: translating the MRI image centroid to the MRI image center.
[0060] The purpose of translating the centroid of the MRI image to the center of the MRI image is to ensure that the geometric center of the MRI image is aligned with the center of the image matrix, which helps with subsequent image registration and feature extraction.
[0061] Specifically, the coordinate mean of all pixels in the MRI image whose pixel values are greater than 0 is calculated to obtain the centroid of the MRI image. The vector from the centroid to the center of the MRI image is calculated, and the entire MRI image is translated according to the vector so that the centroid coincides with the center of the MRI image.
[0062] S2. Perform affine registration on the preprocessed knee joint MRI image and the reference image to obtain a registered MRI image aligned with the reference image.
[0063] The preprocessed knee joint MRI image is affinely registered with the reference image to obtain the deformation field between the knee joint MRI image and the target area. The deformation field is applied to deform the knee joint MRI image to obtain a registered MRI image aligned with the reference image.
[0064] Specifically, affine transformation parameters are calculated, including translation, rotation, scaling, shearing, etc. Affine transformation is applied so that the MRI image is geometrically aligned with the reference image.
[0065] Using non-rigid registration techniques such as B-spline, thin plate spline, flow deformation registration, etc., the deformation field is calculated. The deformation field describes the pixel mapping from the initial position to the target position. The deformation field can be represented as a series of displacement vectors of control points or as a vector field.
[0066] The deformation field is applied to deform the knee joint MRI image, and the deformed pixel values are calculated by an interpolation method such as nearest neighbor interpolation, bilinear interpolation or high-order interpolation to obtain a registered MRI image aligned with the reference image.
[0067] Specifically, the affine transformation parameters between the MRI image and the reference image are estimated and based on the affine transformation parameters, the knee joint MRI image and the reference image are affinely registered.
[0068] Its affine registration model is as follows:
[0069]
[0070] where x s ,y s Respectively represent the horizontal and vertical coordinates of the sth pixel in the MRI image; r ,y r They represent the corresponding pixel coordinates after transformation by the affine transformation model; t a , t b , t x , t c , t d , t y is the affine transformation parameter, including translation, rotation, scaling, shearing, t a and t b Can represent the rotation parameter in affine transformation, t x is the translation parameter along the x-axis, t y is the translation parameter along the y-axis, t c represents the scaling parameter, t d Represents the shearing parameter.
[0071] S3. Extract the region boundary of the registered MRI image, determine the boundary feature points on the region boundary, and perform region segmentation on the MRI image according to the boundary feature points. Figure 4 As shown, the following steps are included:
[0072] S31: Using an edge detection algorithm, extract the boundary of the registered MRI image to obtain the boundary line of the registered MRI image.
[0073] First, the registered MRI images are subjected to noise removal. Edge detection algorithms are very sensitive to noise, so before edge detection, the registered MRI images are usually smoothed to remove noise.
[0074] Specifically, a Gaussian blur filter is applied to the registered MRI images for denoising, and an appropriate Gaussian kernel size and standard deviation are selected to balance noise suppression and edge preservation.
[0075] Second, the gradient magnitude of the registered MRI images is calculated to determine the edge strength.
[0076] Specifically, the Sobel operator is used to calculate the gradient strength in the horizontal and vertical directions of the denoised registered MRI image, and then the total gradient amplitude of each pixel in the registered MRI image is calculated, that is, the square root of the sum of the squares of the horizontal and vertical gradients.
[0077] Next, the gradient directions of the registered MRI images are calculated to determine the directions of the edges, which helps to link the edge segments.
[0078] Specifically, for each pixel point of the registered MRI image, its gradient direction, that is, the direction of maximum increase in gradient amplitude, is calculated. The gradient direction will be used for edge tracking and linking.
[0079] Preferably, in order to mark the edge with a set of sparse points, non-maximum suppression is required. At each pixel in the registered MRI image, its surrounding neighbors are checked and the edge strength of the pixel is retained only when the gradient amplitude is locally maximum.
[0080] Finally, edge tracking is performed, and edge segments are connected through gradient direction and double threshold conditions to form continuous edges.
[0081] Specifically, starting from strong edges, edges are tracked until they intersect with other edges or edges of the image. During the tracking process, if weak edges with consistent gradient directions are found, they are added to the edges.
[0082] S32: Using a gradient matrix algorithm, determine the boundary feature points of the registered MRI image.
[0083] In order to obtain stable boundaries and eliminate the impact of shorter boundaries on algorithm performance, all boundaries in the registered MRI images are sorted by length.
[0084] The longest M boundaries are selected as candidate boundaries, and then boundary feature points are extracted for the candidate boundaries. If the number of boundaries in the image is less than M, boundary feature points are extracted for all boundaries in the image.
[0085] Boundary feature point detection based on grayscale matrix is used to identify feature points on the image boundary. Here, the grayscale matrix is a matrix used to describe the grayscale features of the local area of the image.
[0086] The definition of the boundary feature point detection method based on the gray matrix is as follows:
[0087] R(t) = det[M(t)];
[0088] Where M(t) is the grayscale matrix and det(·) represents the determinant of the matrix.
[0089] To explain the definition of M(t), let any boundary in the image be E(t) = (X(t), Y(t));
[0090] Where X(t) and Y(t) are the coordinates of pixel point t on the boundary, and the grayscale matrix M of each pixel on the boundary is calculated as follows:
[0091]
[0092] Among them, I x and I y It is the grayscale component of the grayscale I of the image at pixel t in the x and y directions;
[0093]
[0094] According to the preset threshold, the local extreme value of R(t)=det[M(t)] is obtained. If R(t) is a local maximum value, the pixel point t is marked as a boundary feature point.
[0095] The method for determining the local extreme value is as follows: for each pixel point t, obtain the response value R(t) of all pixels in its neighborhood, and compare the response value R(t) of the edge pixel point with the response values of all other pixels in the neighborhood. If R(t) is a local maximum, this may indicate that the pixel point t is a boundary feature point.
[0096] Preferably, according to the need, the quality of the feature points is improved according to the preset threshold. Only when R(t) is greater than the preset threshold, the corresponding pixel point is considered as a boundary feature point, and the feature points are filtered by the preset threshold.
[0097] S33. According to the boundary feature points, the MRI image is segmented into regions to obtain multiple regional images.
[0098] S4. Input the multiple region images obtained by segmentation in step S3 into the multi-target discrimination model to perform category labeling on the region images.
[0099] like Figure 5Shown is a schematic diagram of the multi-target discrimination model.
[0100] In a preferred embodiment, the multi-target discrimination model adopts an attention mechanism.
[0101] The attention mechanism formula is as follows:
[0102]
[0103] Among them, the Softmax function is used to normalize the attention score.
[0104] The attention mechanism can focus on information in different representation subspaces at the same time. This mechanism enriches the representation of input information by splitting the representation of query Q, key K, value V into different subspaces, processing them in parallel, and then merging the results.
[0105] In the attention mechanism formula, the input information usually consists of three parts: query (Q), key (K) and value (V). These three parts are obtained from the input region image through linear transformation.
[0106] Query Q: represents the query of the current pixel to other pixels, which is used to measure the relationship with other pixels.
[0107] Key K: represents the key of each pixel in the pixel set, which is used to match the query.
[0108] Value V: represents the actual value of each pixel in the data pixel set, and its importance is determined by the matching degree between the query and the key.
[0109] The input region image is first transformed by three different linear transformations (given by the weight matrix W Q , W K and W V The query, key and value are generated by the attention layer. In the case of attention, the query, key and value usually come from the pixel dataset of the same input region image.
[0110] Specifically, in the attention mechanism, the input region image is first divided into multiple small tiles, and attention calculation is performed independently on each small tile.
[0111] As shown in the figure, each region image is cut into multiple 16×16 small blocks through a down sampling block.
[0112] Specifically, Figure 5 As shown, the attention mechanism calculation process for each small block is as follows:
[0113] First, the input patch is transformed through three separate linear layers to generate the query Q, key K, and value V.
[0114] Then, the dot product of Q and K is calculated to get the attention score. In order to prevent the dot product result from being too large, the dot product result is divided by a scaling factor (is the key vector K dimension d K square root of ).
[0115] Next, the attention scores are normalized by the Softmax function so that the sum of the scores at each position is 1.
[0116] Finally, the 16×16 small tiles are integrated through the up sampling block, and V is weighted with the normalized attention score to obtain the weighted average, which is the output representation of the current position, that is, the input regional image is mapped to the most suitable subspace. Different subspaces represent different categories, such as effusion volume, ligament, and half moon.
[0117] After segmentation, color marking is performed and divided into: effusion volume; ligament; meniscus, etc.
[0118] S5. Compare each region image marked with a category with standard region images of different levels of the corresponding category, construct a pixel difference matrix, calculate the similarity focus of each pixel difference matrix, and determine the level of the region image.
[0119] A region image consists of N pixels, each of which has a pixel value. Construct a pixel difference matrix of two images, which represent the region image U marked with the category and the standard region image F of one level of the corresponding category.
[0120] Then the pixel difference value corresponding to the pixel point (i, j) in the pixel difference matrix is C ij (L) is expressed as:
[0121] C ij (L)=‖U ij -F ij (L) ‖ 2 ;
[0122] Pixel difference value C ij (L) represents the pixel value U of the pixel point (i, j) in the region image I ij The pixel value F of the pixel point (i, j) at the same position as the standard area image J of level L ij (L) The square of the difference.
[0123] The elements whose pixel difference values in the pixel difference matrix are less than the lower threshold are set to 0, the elements whose pixel difference values are greater than the upper threshold are set to 1, and the other elements are set to 0.5; the absolute value of the difference between the ratio of the elements with element values of 0 to the elements with element values of 0.5 in the reset pixel difference matrix and the ratio of the elements with element values of 0 to the elements with element values of 1 in the difference matrix is calculated, which is the similarity focus degree.
[0124] In a preferred embodiment, the lower threshold value C of the pixel difference value is 下 (L) is expressed as:
[0125]
[0126] The upper threshold C of the pixel difference value 上 (L) is expressed as:
[0127]
[0128] Where N is the number of elements in the pixel difference matrix.
[0129] In image classification, the similarity focus of two similar images should be higher than the similarity threshold. The similarity focus of the regional image and the standard regional image of different levels L is calculated respectively. When it is higher than the similarity threshold, the corresponding L is the level L of the regional image marked with the category.
[0130] For example, the levels L of the regional images representing effusion are: 0 none, 1 a small amount, 2 a moderate amount, 3 a large amount; the levels L of the regional images representing ligaments are: 0 normal, 1 rupture, 2 degeneration; the levels L of the regional images representing meniscus are: 0 normal, 1 first-level injury, 2 second-level injury, 3 third-level injury.
[0131] Through the above steps, this method can effectively utilize the pixel difference mean information of the image and improve the accuracy and robustness of image classification.
[0132] Example 2
[0133] In the actual test and verification process, the artificial intelligence-based knee joint MRI image classification method of the present invention is used to detect the grade judgment of the meniscus in the knee joint MRI image. The accuracy statistics are as follows: Figure 6 As shown in the figure, the input data is divided into sagittal plane of knee MRI image and coronal plane of knee MRI image, and the data is divided into training set, validation set and test set; MM is medial meniscus; LM is lateral meniscus. This data shows that the knee MRI image classification method based on artificial intelligence has practical application value.
[0134] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0135] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0136] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0137] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0138] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A knee joint MRI image classification method based on artificial intelligence, characterized in that: The steps include: S1. Preprocessing knee joint MRI images; S2, performing affine registration on the preprocessed knee joint MRI image and the reference image to obtain a registered MRI image aligned with the reference image; S3, extracting the region boundary of the registered MRI image, determining the boundary feature points on the region boundary, and performing region segmentation on the MRI image according to the boundary feature points; S4, inputting the multiple region images obtained by segmentation into a multi-target discrimination model to perform category labeling of the region images; S5. Compare each region image marked with a category with standard region images of different levels of the corresponding category, construct a pixel difference matrix, calculate the similarity focus of each pixel difference matrix, and determine the level of the region image based on the similarity focus.
2. The method for classifying knee joint MRI images based on artificial intelligence according to claim 1, characterized in that: In step S5, the pixel difference value C corresponding to the pixel point (i, j) in the pixel difference matrix ij (L) is expressed as: Pixel difference value C ij (L) represents the pixel value U of the pixel point (i, j) in the region image I ij The pixel value F of the pixel point (i, j) at the same position as the standard area image J of level L ij (L) The square of the difference.
3. The method for classifying knee joint MRI images based on artificial intelligence according to claim 2, characterized in that: The elements whose pixel difference values in the pixel difference matrix are less than the lower threshold are set to 0, the elements whose pixel difference values are greater than the upper threshold are set to 1, and the other elements are set to 0.5; the absolute value of the difference between the ratio of the elements whose element value is 0 to the elements whose element value is 0.5 in the reset pixel difference matrix and the ratio of the elements whose element value is 0 to the elements whose element value is 1 in the difference matrix is calculated, and the absolute value is the similarity focus degree; The similarity focusing degrees between the regional image and the standard regional images of different levels L are calculated respectively, and the L corresponding to the similarity focusing degree being higher than the similarity threshold represents the level L to which the regional image belongs.
4. The method for classifying knee joint MRI images based on artificial intelligence according to claim 3, characterized in that: The lower threshold C of pixel difference 下 (L) is expressed as: Pixel difference upper threshold C 上 (L) is expressed as: Where N is the number of elements in the pixel difference matrix.
5. The method for classifying knee joint MRI images based on artificial intelligence according to claim 1, characterized in that: The step S3 comprises: S31: using an edge detection algorithm, extracting the boundary of the registered MRI image to obtain the boundary line of the registered MRI image; S32: using a gradient matrix algorithm, determining boundary feature points of the registration MRI image; S33: Segment the MRI image into regions according to the boundary feature points to obtain a plurality of region images.
6. The method for classifying knee joint MRI images based on artificial intelligence according to claim 3, characterized in that: In step S4, the multi-target distinction model outputs category labeling results of the regional image, and the categories include: effusion, ligament and meniscus.
7. The method for classifying knee joint MRI images based on artificial intelligence according to claim 6, characterized in that: The levels L of the regional images representing effusion are: 0 none, 1 a small amount, 2 a moderate amount, 3 a large amount; the levels L of the regional images representing ligaments are: 0 normal, 1 rupture, 2 degeneration; the levels L of the regional images representing meniscus are: 0 normal, 1 first-grade injury, 2 second-grade injury, 3 third-grade injury.
8. The method for classifying knee joint MRI images based on artificial intelligence according to claim 1, characterized in that: In step S4, the multi-target discrimination model adopts an attention mechanism, which cuts each region image into multiple small tiles through a downsampling block, and each small tile is transformed through three independent linear layers to generate Q, K and V, where Q represents the query of the current pixel in the small tile to other pixels, K represents the key of each pixel in the small tile, and V represents the actual value of each pixel in the small tile; Calculate the dot product of Q and K and divide the dot product result by the scaling factor Finally, the result is input into the Softmax function to normalize the attention score; Multiple small patches are integrated through the upsampling block, V is weighted with the normalized attention score to obtain a weighted average, and the input region image is mapped to the most suitable subspace, thereby realizing the category labeling of the region image.