MRI medical image correction method and system based on convolutional neural network, and computer readable storage medium

Through the MRI medical image correction method based on convolutional neural network, the problem of difficulty in identifying lesions of cerebral lacunar infarction is solved, efficient and accurate lesions recognition and automatic calibration are achieved, and the accuracy and efficiency of diagnosis are improved.

CN119963681AActive Publication Date: 2025-05-09FIRST HOSPITAL AFFILIATED TO GENERAL HOSPITAL OF PLA

Patent Information

Application Number
CN202510151548.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-05-09
Estimated Expiration
2045-02-11

AI Technical Summary

Technical Problem

The lesions of cerebral lacunar infarction are small in size and dispersed in distribution, which are easily overlooked. It is time-consuming and labor-intensive for doctors to manually identify, and are greatly affected by subjective factors, which are prone to misjudgment.

Method used

The MRI medical image correction method based on convolutional neural network is used to evaluate the image quality through signal-to-noise index, contrast and artifact intensity. After pre-processing, the convolutional neural network is used to extract lesion characteristics, locate the lesion area, and perform details enhancement, segmentation, artifact repair and three-dimensional visualization.

Benefits of technology

It realizes efficient and accurate identification of lesions, automatically calibrating lesions, optimizes image segmentation results, removes artifacts, improves image quality, reduces artificial intervention, and improves diagnosis accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963681A_ABST
    Figure CN119963681A_ABST
Patent Text Reader

Abstract

The invention discloses an MRI medical image correction method and system based on a convolutional neural network and a computer readable storage medium, and the method comprises the steps: obtaining a brain MRI medical image, and carrying out the preprocessing; extracting lesion features of the brain lacuna infarction from the preprocessed MRI medical image through a convolutional neural network, and positioning a lesion area of the brain lacuna infarction; performing detail enhancement on the lesion area of the cerebral lacuna infarction, segmenting the lesion area and optimizing a segmentation result; and carrying out artifact restoration on the segmented image, and generating a three-dimensional focus visualization model based on the restored image. According to the method, through processing in multiple aspects such as quality evaluation, lesion recognition, segmentation, artifact repair and three-dimensional visualization of the MRI image, the lesion area can be recognized more efficiently and accurately, the image quality is improved, and an efficient and accurate brain lacuna infarction diagnosis auxiliary tool is provided.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of medical image recognition, and in particular to a convolutional neural network-based MRI medical image correction method, system and computer-readable storage medium. [Background technology]

[0002] Lacunar infarction is a brain lesion caused by small vessel disease, mainly occurring in the basal ganglia, thalamus or brainstem. The clinical symptoms of this disease usually manifest as mild neurological dysfunction or cognitive decline, and the lesions are small and scattered, and are often overlooked. Lacunar infarction is one of the common ischemic cerebrovascular diseases, especially in patients with chronic diseases such as hypertension and diabetes, and the incidence gradually increases with age.

[0003] Usually, lacunar infarction lesions are presented to medical staff in the form of CT images or magnetic resonance images. Compared with CT images, magnetic resonance MRI images are clearer and have a higher detection rate. Therefore, MRI medical images are more popular. However, since lacunar infarction lesions are small in size and located deep in the brain, and are easily covered by other brain structures, manual identification of lacunar infarction by doctors not only consumes a lot of manpower and time, but is also greatly affected by subjective factors such as doctor level and experience, which can easily lead to misjudgment. [Summary of the invention]

[0004] In view of this, embodiments of the present invention provide a convolutional neural network-based MRI medical image correction method, system, and computer-readable storage medium.

[0005] In a first aspect, an embodiment of the present invention provides an MRI medical image correction method based on a convolutional neural network, the method comprising:

[0006] S1. Obtain brain MRI medical images, evaluate their quality by signal-to-noise index, contrast, and artifact intensity, and classify them into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the quality evaluation results, and perform preprocessing on them respectively;

[0007] S2. Extracting the lesion features of lacunar infarction from the preprocessed MRI medical images through a convolutional neural network, and locating the lesion area of ​​the lacunar infarction;

[0008] S3, enhance the details of the lacunar infarction lesion area, segment the lesion area and optimize the segmentation result;

[0009] S4. Perform artifact repair on the segmented image and generate a three-dimensional lesion visualization model based on the repaired image.

[0010] For the aspects and any possible implementation manners described above, a further implementation manner is provided, where S1 specifically includes:

[0011] Obtain a brain MRI medical image and calculate the signal-to-noise index. Among them, SNR represents the signal-to-noise index, μ I represents the signal mean value, N represents the total number of image pixels, I(X) represents the gray value of the pixel at position X in the image, σ n represents the noise standard deviation, M represents the number of pixels in the background area, I b (X) represents the gray value of the pixel in the background area, μ b represents the gray mean value of the background area, which is calculated by the mean value of the pixels in the background area;

[0012] Calculate the contrast-to-noise index. Among them, CNR represents the contrast-to-noise index, μ l represents the mean value of the lesion area, which is calculated by the gray mean value of the pixels in the lesion area. The lesion area is obtained through manual annotation, μ b represents the mean value of the background area; σ n represents the noise standard deviation;

[0013] Calculate the artifact index. Among them, P A (k) represents the power spectrum of the artifact area, represents the Fourier transform of the image in the frequency domain, F a represents the artifact frequency band, P t represents the overall power spectrum of the image, F t represents the complete frequency domain of the image; T represents the number of frequency domain points, the total number of sampling points in the image frequency domain;

[0014] Classify into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the calculation results of the signal-to-noise index, contrast-to-noise index, and artifact index. That is, the high-quality image index: all indexes are within the high-quality range. The high-quality range is SNR > 25, CNR > 5, AI < 0.05; the medium-high-quality image index: at least one index meets the high-quality range, and at least one index meets the medium-quality range; the medium-quality image index: all indexes are within the medium-quality range. The medium-quality range is 15 < SNR ≤ 25, 3 ≤ CNR ≤ 5, 0.05 ≤ AI < 0.15; the low-quality image index: any one index belongs to the low-quality range. The low-quality range is SNR ≤ 15, CNR < 3, AI ≥ 0.15;

[0015] Perform preprocessing respectively.

[0016] For the aspects and any possible implementation manners described above, a further implementation manner is provided. The preprocessing performed separately specifically includes:

[0017] Preprocessing of high-quality images: Normalize the image grayscale values and perform adaptive histogram equalization;

[0018] Preprocessing of medium-to-high-quality images: If 15 < SNR ≤ 25, use non-local means filtering to remove noise; if 3 ≤ CNR ≤ 5, apply adaptive histogram equalization; if 0.05 ≤ AI < 0.15, use frequency-domain band-pass filtering to repair mild artifacts;

[0019] Preprocessing of medium-quality images: Mark the artifact regions in the frequency domain, generate an artifact mask, perform denoising processing on the calibrated artifact regions, and perform adaptive histogram equalization on the denoised images;

[0020] Preprocessing of low-quality images: Analyze the results of the artifact index AI, detect the artifact regions in the frequency domain and generate an artifact mask, calculate the gradient intensity distribution to generate a noise mask, and output the artifact mask and the noise mask;

[0021] After preprocessing, perform image standardization operations uniformly.

[0022] For the aspects and any possible implementation manners described above, a further implementation manner is provided. In S2, the convolutional neural network is used to extract the lesion features of lacunar infarction in the MRI medical image and locate the lesion regions of lacunar infarction, which specifically includes:

[0023] Use multi-scale Gaussian filtering to extract background information from the preprocessed MRI medical image, calculate the residual maps at different scales, and adopt a weighted fusion strategy to fuse the residual maps at multiple scales to obtain the final noise residual map, R(x,y) = E(x,y) - G(x,y,γ), where R(x,y) represents the noise residual map, E(x,y) represents the input MRI medical image, G(x,y,γ) represents the result after Gaussian blurring of the input image, and γ represents the scale parameter of Gaussian filtering;

[0024] Use the improved scale-invariant feature transform algorithm to detect the key points in the final noise residual map and calculate the gradient histogram for each key point to generate a feature vector. The key point detection formula is: P i (x,y,δ) represents the key point at position (x,y) and scale δ, L(x,y,δ) represents the image value in the scale space, and Δδ represents the scale change amount;

[0025] Based on the key point matching results, the geometric consistency check method is used to eliminate false matches and mark the suspected lesion area. The geometric consistency check formula is defined as: (P i ,P j ) represents two pairs of matching key points, ‖P i -P j ‖ represents the Euclidean distance between two points, τ represents the distance threshold, and θ i and θ j represents the direction angle of the key point, and Δθ represents the direction angle difference;

[0026] Use a sliding window to divide the image into multiple small blocks, calculate the similarity between the features of each small block and the neighboring area, and mark the area with high similarity as a potential lesion area;

[0027] A boundary map is generated based on the lesion boundary information extracted from the potential lesion area. The boundary map and the preprocessed MRI medical image are fused to form a multi-channel input. A convolutional neural network based on the U-Net architecture is constructed and trained to introduce the attention mechanism combined with the SE module. The convolutional neural network model is used to identify lacunar infarction lesions and output a global feature map containing lesion area information.

[0028] The output global features are fused with the local key point matching results to generate the final lesion area mask.

[0029] According to the above aspects and any possible implementation, an implementation is further provided, wherein the S3 performs detail enhancement on the lacunar infarction lesion area, specifically comprising:

[0030] The generated lesion area mask is used to crop the residual images at different scales, and the cropped residual images are re-fused according to the weights to generate a local multi-scale residual image, where R c =R k ·M m , k∈{3,5,7}, R c Represents the cropped multi-scale residual map, R k represents the residual map of the kth scale, M m represents the lesion area mask, α k Represents the weight of each scale, R l represents the local multi-scale residual map;

[0031] The local multi-scale residual map and the global feature map are fused to generate a preliminary saliency map, and the gradient information in the global feature map is used to enhance the lesion boundary. The enhanced saliency map is normalized to the range of [0, 1], where S i =R l +λFg , S e =S i +η▽F g , S i represents the preliminary saliency map, F g represents the global feature map, λ represents the weight of the global feature map, S e represents the enhanced saliency map, η represents the gradient enhancement weight, ▽F g Represents the gradient information of the global feature map, calculated using the Sobel operator;

[0032] The saliency map is weightedly fused with the preprocessed MRI medical image pixel by pixel to obtain a fused image with a prominent lesion area, where I e =I·(1+δS f ), I represents the preprocessed MRI image, S f represents the normalized saliency map, I e represents the fused image, and δ represents the weighting factor of the saliency map.

[0033] According to the above aspects and any possible implementation, an implementation is further provided, wherein segmenting the lesion area and optimizing the segmentation result in S3 specifically includes:

[0034] Based on the threshold segmentation of the saliency map, a preliminary segmentation mask is generated, where M b represents the preliminary segmentation mask, T represents the segmentation threshold;

[0035] Morphological operations are applied to the fused image to optimize the morphological features of the lesion area. The edge noise is removed by corrosion operation, using a 3×3 kernel and iterating 2 times. The small holes in the lesion area are repaired by dilation operation, using a 5×5 kernel and iterating 2 times. The edge area is smoothed using a morphological filter, using an elliptical kernel with a size of 5×5 to generate the final detail-enhanced image.

[0036] Combined with the final detail enhanced image, the preliminary mask is enhanced, and the preliminary segmentation result containing the lesion area is generated through the enhanced preliminary mask, where M e =M b ·(1+θI e ′), θ represents the enhancement weight, M e represents the enhanced preliminary segmentation mask, I e ′ represents the final detail-enhanced image;

[0037] A deep Q network is used to optimize the segmentation strategy, where the state s is defined t , the characteristics of the current segmentation result, including: the current segmentation mask M t , saliency map S f, fused image I e ; Action a t , the action space includes the following operations: adjust the boundary: boundary expansion or boundary contraction, smooth the area: boundary smoothing, adjust the segmentation threshold: increase or decrease the threshold; reward r t , r t =w 1 ·r i +w 2 ·r o , w 1 、w 2 represents the weight, S represents the current mask M t The total number of pixels, ΔM t Indicates the current segmentation mask M t The boundary gradient amplitude of

[0038] The constructed deep Q network structure is:

[0039] Input layer: The input dimension is 128x128x2, including the current segmentation mask and saliency map;

[0040] Hidden layer: two convolutional layers: convolution kernel size 3x3, number of channels 32 and 64 respectively, activation function is ReLU, one fully connected layer: mapping convolution features to action space;

[0041] Output layer: The action space size is 5, each action corresponds to a Q value, and the action corresponding to the maximum Q value is selected for execution;

[0042] DQN training and optimization:

[0043] Initialization: Randomly initialize DQN network parameters, set up experience replay pool, store state, action, reward and next state;

[0044] Training process: State initialization: From the enhanced preliminary segmentation mask M e Start with the initial state M t , action selection: in the current state s t , select action a based on ∈-greedy strategy t , environment interaction: perform action a t , get the next state s t+1 and reward r t , Experience replay: Sampling from the experience pool, updating the Q network parameters, the target Q value is: γ represents the discount factor, and the stopping condition is: reaching the maximum number of iterations or the segmentation result converges, maxQ(s t+1 ,a) means in the next state s t+1 , the maximum Q value of all possible actions a;

[0045] Output: Optimized segmentation mask M o The segmentation result of the lesion area after DQN optimization;

[0046] Use the optimized segmentation mask to generate the final segmentation image I s , where I s =M o I e .

[0047] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the performing of artifact repair on the segmented image in S4 specifically includes:

[0048] Obtain input images for training the Generative Adversarial Network (GAN), including the final segmented image and the preprocessed MRI medical image I o , and annotate artifact data;

[0049] Define the generator:

[0050] Input: The frequency domain of the final segmented image generated by Fourier transform, where F(I s )=Φ(I s ), Φ(·) represents Fourier transform, F(I s ) indicates that it contains the frequency information of the image;

[0051] Architecture: The encoder part includes several convolutional layers to extract frequency domain features, the feature processing part focuses on artifact features through the attention mechanism module, and the decoder part includes several deconvolutional layers to reconstruct the repaired frequency domain features into the artifact repaired frequency domain image;

[0052] Output: The frequency domain image of the artifact repaired output repair image, where I r =Φ -1 (F r ), F r represents the frequency domain image after artifact repair, I r Indicates the repaired image;

[0053] Define the discriminator:

[0054] Input: The spatial domain input is the original image and the repaired image, and the frequency domain input is Φ(I r ) and Φ(I o );

[0055] Architecture: The spatial domain branch extracts spatial features through three convolutional layers, the frequency domain branch extracts frequency domain features through three convolutional layers, and the fusion layer combines the spatial domain and frequency domain features through a fully connected layer to determine the authenticity of the restored image;

[0056] Output: discrimination result, used to measure the quality of the restored image;

[0057] Define the loss function:

[0058] The generator loss includes pixel difference, frequency domain difference and adversarial loss, where L g =ω 1 ·‖I r -I o ‖ 1 +ω 2 ·||F r -F(I o )|| 2 +ω 3 ·L GAN , L GAN represents the adversarial loss, ω 1 ,ω 2 and ω 3 represents the weight hyperparameter;

[0059] The discriminator loss is the adversarial loss between the real image and the artifact repaired image, where L d = -Ε[log(D(I o ))]-Ε[log(1-D(I r ))],D(I o ) represents the authenticity judgment of the discriminator on the original image, D(I r ) represents the discriminator’s judgment on the authenticity of the restored image;

[0060] GAN training steps:

[0061] Initialization: Randomly initialize the parameters of the generator and discriminator, use the Adam optimizer, and set the learning rate to 10 -4 ;

[0062] Training process: Training the discriminator: input the preprocessed MRI medical image and the repaired image, and update the discriminator parameters; Training the generator: optimize the generator through the adversarial loss fed back by the discriminator and the difference loss between the repaired image and the original image; alternately update the generator and the discriminator until the loss function converges;

[0063] Output result: Generate a repaired image.

[0064] According to the above aspects and any possible implementation, an implementation is further provided, wherein generating a three-dimensional lesion visualization model based on the repaired image in S4 specifically includes:

[0065] Extract the lesion area based on the repaired image, stack the lesion area slice by slice, and generate three-dimensional voxel data;

[0066] The Marching Cubes algorithm is used to extract isosurfaces from the 3D voxel data, generate the surface mesh of the 3D lesion model, color the 3D model, and map the colors according to the saliency map of the lesion area;

[0067] Generate a three-dimensional lesion visualization model.

[0068] In a second aspect, an embodiment of the present invention provides an MRI medical image correction system based on a convolutional neural network using the above method, the system comprising:

[0069] A preprocessing module is used to obtain brain MRI medical images, perform quality assessment based on signal-to-noise index, contrast, and artifact intensity, and classify them into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the quality assessment results, and perform preprocessing on them respectively;

[0070] A lesion recognition module is used to extract the lesion features of lacunar infarction from the preprocessed MRI medical images through a convolutional neural network, and locate the lesion area of ​​the lacunar infarction;

[0071] Enhanced segmentation module, used to enhance the details of the lacunar infarction lesion area, segment the lesion area and optimize the segmentation results;

[0072] The visualization module is used to repair artifacts in the segmented image and generate a three-dimensional lesion visualization model based on the repaired image.

[0073] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps described in the above method are completed.

[0074] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps of the above method.

[0075] One of the above technical solutions has the following beneficial effects:

[0076] The present invention proposes an MRI medical image correction method, system and computer-readable storage medium based on a convolutional neural network. Through multiple processing steps such as MRI image quality assessment, lesion identification, segmentation, artifact repair, and three-dimensional visualization, compared with traditional methods, the present invention can more efficiently and accurately identify lesion areas, automatically calibrate lesions, and optimize image segmentation results. At the same time, it can remove artifacts, improve image quality, reduce human intervention, and maximize the accuracy of diagnosis. It realizes image processing and automatic diagnosis, and provides an efficient and accurate diagnostic auxiliary tool for cerebral lacunar infarction through intelligent image processing.

Brief Description of the Drawings

[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in 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.

[0078] Figure 1 It is a flow chart of the MRI medical image correction method S1-S4 based on convolutional neural network provided in an embodiment of the present invention;

[0079] Figure 2 This is a functional block diagram of an MRI medical image correction system based on a convolutional neural network provided in an embodiment of the present invention. [Specific implementation method]

[0080] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. 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. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0081] Please refer to Figure 1 , which is a flow chart of the MRI medical image correction method S1-S4 based on convolutional neural network provided in an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0082] S1. Obtain brain MRI medical images, evaluate their quality by signal-to-noise index, contrast, and artifact intensity, and classify them into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the quality evaluation results, and perform preprocessing on them respectively;

[0083] S2. Extracting the lesion features of lacunar infarction from the preprocessed MRI medical images through a convolutional neural network, and locating the lesion area of ​​the lacunar infarction;

[0084] S3, enhance the details of the lacunar infarction lesion area, segment the lesion area and optimize the segmentation result;

[0085] S4. Perform artifact repair on the segmented image and generate a three-dimensional lesion visualization model based on the repaired image.

[0086] The present invention uses MRI image quality assessment, lesion identification, segmentation, artifact repair, three-dimensional visualization and other processing steps. Compared with traditional methods, the present invention can more efficiently and accurately identify lesion areas, automatically calibrate lesions, optimize image segmentation results, remove artifacts, improve image quality, reduce human intervention, maximize diagnostic accuracy, realize image processing and automatic diagnosis, and provide an efficient and accurate diagnostic auxiliary tool for cerebral lacunar infarction through intelligent image processing.

[0087] In a preferred embodiment of the present invention, the S1 specifically includes:

[0088] Obtain brain MRI medical images and calculate the signal-to-noise index. Where SNR represents the signal-to-noise ratio, μ I represents the signal mean, N represents the total number of pixels in the image, I(X) represents the grayscale value of the pixel position X in the image, σ n represents the noise standard deviation, M represents the number of pixels in the background area, and I b (X) represents the gray value of the background area pixel, μ b Represents the grayscale mean of the background area, which is calculated by the mean of the pixels in the background area;

[0089] Calculate the contrast-to-noise index, Where CNR is the contrast noise ratio, μ l represents the mean value of the lesion area, which is calculated by the grayscale mean of the pixels in the lesion area. The lesion area is obtained by manual annotation, μ b represents the mean value of the background area; σ n represents the noise standard deviation;

[0090] Calculate the artifact index, Among them, P A (k) represents the power spectrum of the artifact area, Represents the Fourier transform of the image in the frequency domain, F a Indicates the artifact frequency band, P t Represents the overall power spectrum of the image, F t Represents the complete frequency domain of the image; T represents the number of frequency domain points, the total number of sampling points in the image frequency domain;

[0091] Classify as high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the calculation results of the signal-to-noise index, contrast-to-noise index, and artifact index. That is, the high-quality image metrics: all metrics are within the high-quality range, and the high-quality range is SNR > 25, CNR > 5, AI < 0.05; the medium-high-quality image metrics: at least one metric meets the high-quality range, and at least one metric meets the medium-quality range; the medium-quality image metrics: all metrics are within the medium-quality range, and the medium-quality range is 15 < SNR ≤ 25, 3 ≤ CNR ≤ 5, 0.05 ≤ AI < 0.15; the low-quality image metrics: any one metric belongs to the low-quality range, and the low-quality range is SNR ≤ 15, CNR < 3, AI ≥ 0.15;

[0092] Perform preprocessing separately.

[0093] The present invention performs quality assessment and grading on brain MRI medical images according to the signal-to-noise index, contrast-to-noise index, and artifact index. Among them, SNR can reflect the overall noise level of the image, CNR is used to measure the contrast difference between the lesion and the background area, and AI quantitatively evaluates the interference degree of artifacts on the image. The multi-index cooperation improves the characterization accuracy of the MRI image quality, making the classification result more objective and accurate, so as to facilitate the subsequent targeted preprocessing of brain MRI medical images of different qualities. According to the calculation results of SNR, CNR, and AI, the images are automatically divided into four grades: high-quality images, medium-high-quality images, medium-quality images, and low-quality images. Each quality grade matches the corresponding denoising, enhancement, or band-pass filtering repair strategy. The flexible processing strategy adopted for different image qualities not only performs preliminary processing to improve the accuracy of subsequent analysis but also avoids overprocessing.

[0094] In the preferred embodiment of the present invention, the separately performing preprocessing specifically includes:

[0095] Preprocessing of high-quality images: Normalize the image gray value and perform adaptive histogram equalization;

[0096] Preprocessing of medium-high-quality images: If 15 < SNR ≤ 25, use non-local means filtering to remove noise; if 3 ≤ CNR ≤ 5, apply adaptive histogram equalization; if 0.05 ≤ AI < 0.15, use frequency-domain band-pass filtering to repair mild artifacts;

[0097] Preprocessing of medium-quality images: Mark the artifact area in the frequency domain, generate an artifact mask, perform denoising processing on the calibrated artifact area, and perform adaptive histogram equalization on the denoised image;

[0098] Preprocessing of low-quality images: Through the artifact index AI analysis results, detect the artifact area in the frequency domain and generate an artifact mask, calculate the gradient intensity distribution to generate a noise mask, and output the artifact mask and noise mask;

[0099] After preprocessing, the images are uniformly standardized.

[0100] The embodiments of the present invention implement differentiated and targeted preprocessing strategies between high, medium-high, medium and low quality images, and perform unified standardized operations after all images are processed, which greatly improves the accuracy, automation and robustness of subsequent lesion detection and analysis; it performs detailed processing on problems such as noise, insufficient contrast, artifact interference, etc. that exist in images of different qualities, which can not only fully retain useful information, but also avoid invalid or excessive global operations, laying a foundation for the stability and accuracy of subsequent operations.

[0101] It should be noted that the image standardization operation may include adjusting the brightness and contrast of different images to a uniform range through grayscale standardization, standardizing the pixel values ​​of the images to a uniform range, and normalizing the mean and standard deviation.

[0102] In a preferred embodiment of the present invention, S2 extracts the lesion features of lacunar infarction from the MRI medical image through a convolutional neural network, and locates the lesion area of ​​the lacunar infarction, specifically including:

[0103] Use multi-scale Gaussian filtering to extract background information from the preprocessed MRI medical image, calculate the residual map at different scales, and use a weighted fusion strategy to fuse the residual maps of multiple scales to obtain the final noise residual map, R(x,y)=E(x,y)-G(x,y,γ), where R(x,y) represents the noise residual map, E(x,y) represents the input MRI medical image, G(x,y,γ) represents the result of the input image after Gaussian blur, and γ represents the scale parameter of the Gaussian filter;

[0104] The improved scale-invariant feature transformation algorithm is used to detect the key points in the final noise residual image, and the gradient histogram is calculated for each key point to generate a feature vector. The key point detection formula is: P i (x, y, δ) represents the key point at position (x, y) and scale δ, L(x, y, δ) represents the image value in the scale space, and Δδ represents the scale change;

[0105] Based on the key point matching results, the geometric consistency check method is used to eliminate false matches and mark the suspected lesion area. The geometric consistency check formula is defined as: (P i ,P j) represents two pairs of matching key points, ||P i -P j || represents the Euclidean distance between two points, τ represents the distance threshold, and θ i and θ j represents the direction angle of the key point, and Δθ represents the direction angle difference;

[0106] Use a sliding window to divide the image into multiple small blocks, calculate the similarity between the features of each small block and the neighboring area, and mark the area with high similarity as a potential lesion area;

[0107] A boundary map is generated based on the lesion boundary information extracted from the potential lesion area. The boundary map and the preprocessed MRI medical image are fused to form a multi-channel input. A convolutional neural network based on the U-Net architecture is constructed and trained to introduce the attention mechanism combined with the SE module. The convolutional neural network model is used to identify lacunar infarction lesions and output a global feature map containing lesion area information.

[0108] The output global features are fused with the local key point matching results to generate the final lesion area mask.

[0109] The embodiment of the present invention performs Gaussian filtering of different scales on the preprocessed MRI medical image to obtain background estimation images at multiple scales, and then subtracts the background estimation images from the original image to generate multiple residual images; a weighted fusion strategy is used to integrate the residual images at multiple scales into a final noise residual image, which not only retains the edge features of small lesions, but also suppresses the global noise as much as possible; compared with using only a single scale filter, it can more effectively highlight the tiny lesion information in the brain tissue; in the final noise residual image, an improved scale-invariant feature transform (SIFT) algorithm is used to detect key points and calculate the gradient histogram, which can maintain stable detection of feature points under changes in scale and rotation; compared with traditional SIFT, the improved method The method is more suitable for areas with smooth changes and small grayscale differences on MRI images, reducing false feature points caused by noise, artifacts or excessive similarity of tissue edges, thereby improving the detection accuracy of lesion areas; based on the key point matching results, the geometric consistency verification method is used to double-check the distance and direction of paired key points, which can effectively eliminate the problems of non-real matching or cross-structure matching; compared with simple threshold screening or similarity-based filtering, geometric consistency verification can comprehensively consider the rationality of spatial layout, greatly reduce false detection caused by mismatching, and improve the reliability and specificity of marking potential lesion areas; around the suspected lesion area detected, a sliding window is further used to divide the image into several small blocks , similarity calculation is performed on small block features; areas with high feature similarity are automatically marked as potential lesions, reducing the omission of local areas around defective tissues. This operation complements the key point feature detection and provides additional detection support for lesions that are difficult to detect at large scales or with fuzzy boundaries, further improving the perception of lacunar infarction lesions; the preprocessed MRI medical image and the lesion boundary map are fused into multi-channel input, which can realize parallel learning of grayscale features and boundary information in the convolutional neural network. Multi-channel fusion enables the network to pay attention to the local information of the lesion contour in the early feature extraction stage. The U-Net structure combined with the SE attention mechanism module can better allocate channel weights in the encoding-decoding process. In the process, the attention to the lesion area is enhanced and the background interference irrelevant to the lesion is suppressed. The improved network can "attention" weighted channel-level features while maintaining the advantages of the original U-Net snapshot connection, so that the lesion area identification is more accurate and the details are clearer; the global feature map output by the network is fused with the local matching results previously obtained by key points and geometric consistency verification, combining the network's high-level semantic understanding of the overall lesion and the precise positioning ability of traditional feature detection. This fusion strategy can effectively make up for the possible edge blur or tiny area omission in the CNN recognition process, ensuring that the lesion edge and subtle lesion sites can still be reliably detected and segmented, and finally generating a more complete and accurate lesion area mask.

[0110] In a preferred embodiment of the present invention, the convolutional neural network model construction method is as follows:

[0111] U-Net model construction:

[0112] Input layer: The input image size is 128x128x2, and the 2 channels contain the boundary map and the preprocessed MRI medical image;

[0113] Encoder: The encoder consists of 4 convolutional blocks;

[0114] Each convolution block includes: convolution layer: each convolution layer uses a 3x3 convolution kernel and a ReLU activation function, and the number of convolutions gradually increases with the number of layers; maximum pooling layer: a 2x2 pooling kernel is used for downsampling; SE module: weighted adjustment of channel features; CBAM module: a CBAM module is added after the SE module; channel number setting: starting from the first layer, the number of channels of the convolution layer is 32, 64, 128, and 256 respectively;

[0115] The bottleneck layer includes: two 3x3 convolutional layers with 512 channels and ReLU activation function; SE module; CBAM module;

[0116] The decoder includes: upsampling layer: 2x2 upsampling is used; skip connection: fusion with the feature map of the corresponding layer in the encoder; convolution layer: two 3x3 convolution layers are followed by each upsampling to extract features and further restore spatial information; SE module: SE module is applied after each convolution operation; CBAM module: CBAM module is applied after each convolution operation; channel number setting: starting from the bottleneck layer, the number of channels of the convolution layer is 256, 128, 64, and 32 respectively;

[0117] Output layer: Convolution layer: Use a 1x1 convolution layer to map all channel features into a single channel output; Activation function: The output passes through the Sigmoid activation function to limit the value of each pixel to the range of [0, 1], indicating 1 for the lesion area and 0 for the non-lesion area;

[0118] Loss function: A combined loss function combining the Dice loss function and the cross entropy loss function is used to optimize the performance of the model. The combined loss function is defined as L T =α·L D +β·L C , Among them, α represents the weight factor of Dice loss, β represents the weight factor of cross entropy loss, and L D represents the improved weighted Dice loss function, which is used to optimize the segmentation accuracy of the lesion area. Crepresents the improved weighted cross entropy loss function, which is used to optimize the pixel-by-pixel classification accuracy, N represents the total number of pixels in the image, and p i represents the probability value of the i-th pixel predicted by the model, g i represents the value of the i-th pixel in the true label, w i represents the weight factor, which controls the contribution of the i-th pixel to the loss;

[0119] Training: Use the Adam optimizer, set the initial learning rate, and gradually reduce it through learning rate decay; set the batch size to 16, use GPU to accelerate training, and set the number of training rounds to 80-100 rounds;

[0120] 20% of the training data is divided into validation sets to evaluate model performance;

[0121] The SE module is implemented through the following steps: global average pooling is performed on the input feature map to generate global features for each channel; the global features are weighted through two fully connected layers, the first fully connected layer reduces the number of channels to 1 / 16 of the original, the activation function is ReLU, and the second fully connected layer restores the number of channels to the original value, the activation function is Sigmoid; the weighted channel weights are multiplied element by element with the input feature map to complete the recalibration of the channel features;

[0122] The CBAM module is implemented through the following steps: Channel attention mechanism: perform global average pooling and global maximum pooling on the feature map to generate two channel descriptions respectively; input these two descriptions into the fully connected layer to generate channel weights, and use the Sigmoid activation function to normalize the weights; use the generated channel weights to weight the channels of the input feature map; Spatial attention mechanism: perform maximum pooling and average pooling on the feature map along the channel dimension to generate two spatial descriptions; generate spatial weights after processing the spatial description through the convolutional layer, and normalize the spatial weights using the Sigmoid activation function; use the generated spatial weights to weight each position of the feature map.

[0123] The embodiment of the present invention strengthens the allocation of attention to the lesion area at both the channel and spatial levels through the combination of the SE module and the CBAM module, greatly reducing the situations of mis-segmentation and missed segmentation, and ensuring that small and dispersed lacunar infarction lesions can also be accurately captured; the jump connection of the U-Net structure ensures the retention of details during image segmentation, and the deep bottleneck features help the network understand the higher-level lesion semantic environment, and the two complement each other to avoid the common boundary blur and structure missing problems under simple structures; the combined loss and weighting strategy can effectively combat the inherent disadvantage that the lesions account for a very small proportion in brain MRI, so that the network maintains sensitivity to these small target features, and improves the applicability and reliability in clinical diagnosis; due to the Adam optimizer and the appropriate learning rate decay strategy, the network can converge to a better solution faster, and at the same time show excellent consistency and stability on the verification set, which is conducive to wide promotion to different MRI image data sets and hospital environments; therefore, the convolutional neural network model of the present invention has obvious advantages such as high accuracy, strong robustness, and fast convergence.

[0124] In a preferred embodiment of the present invention, the S3 performs detail enhancement on the lacunar infarction lesion area, specifically including:

[0125] The generated lesion area mask is used to crop the residual images at different scales, and the cropped residual images are re-fused according to the weights to generate a local multi-scale residual image, where R c =R k ·M m , k∈{3,5,7}, R c Represents the cropped multi-scale residual map, R k represents the residual map of the kth scale, M m represents the lesion area mask, α k Represents the weight of each scale, R l represents the local multi-scale residual map;

[0126] The local multi-scale residual map and the global feature map are fused to generate a preliminary saliency map, and the gradient information in the global feature map is used to enhance the lesion boundary. The enhanced saliency map is normalized to the range of [0, 1], where S i =R l +λF g , S e =S i +η▽F g , S i represents the preliminary saliency map, F g represents the global feature map, λ represents the weight of the global feature map, S e represents the enhanced saliency map, η represents the gradient enhancement weight, ▽F gRepresents the gradient information of the global feature map, calculated using the Sobel operator;

[0127] The saliency map is weightedly fused with the preprocessed MRI medical image pixel by pixel to obtain a fused image with a prominent lesion area, where I e =I·(1+δS f ), I represents the preprocessed MRI image, S f represents the normalized saliency map, I e represents the fused image, and δ represents the weighting factor of the saliency map.

[0128] The embodiment of the present invention performs multi-scale detail enhancement only on the lesion area through cropping and multi-scale fusion, thereby minimizing ineffective enhancement of normal brain tissue and highlighting the lesion details that are truly of diagnostic value; the local multi-scale residual map and the global feature map are combined, and gradient information is used for boundary enhancement, which can take into account both subtle structures and overall layout, accurately highlight the lesions, and reduce boundary errors; the final output fused image is more readable for clinicians, and the lesion area is highlighted against the background of the original image, which can effectively shorten the time doctors spend looking for lesions and reduce the risk of missing small lesions.

[0129] In a preferred embodiment of the present invention, segmenting the lesion area and optimizing the segmentation result in S3 specifically includes:

[0130] Based on the threshold segmentation of the saliency map, a preliminary segmentation mask is generated, where M b represents the preliminary segmentation mask, T represents the segmentation threshold;

[0131] Morphological operations are applied to the fused image to optimize the morphological features of the lesion area. The edge noise is removed by corrosion operation, using a 3×3 kernel and iterating 2 times. The small holes in the lesion area are repaired by dilation operation, using a 5×5 kernel and iterating 2 times. The edge area is smoothed using a morphological filter, using an elliptical kernel with a size of 5×5 to generate the final detail-enhanced image.

[0132] Combined with the final detail enhanced image, the preliminary mask is enhanced, and the preliminary segmentation result containing the lesion area is generated through the enhanced preliminary mask, where M e =M b ·(1+θI e ′), θ represents the enhancement weight, M e represents the enhanced preliminary segmentation mask, I e ′ represents the final detail-enhanced image;

[0133] A deep Q network is used to optimize the segmentation strategy, where the state s is defined t , the characteristics of the current segmentation result, including: the current segmentation mask Mt , saliency map S f , fused image I e ; Action a t , the action space includes the following operations: adjust the boundary: boundary expansion or boundary contraction, smooth the area: boundary smoothing, adjust the segmentation threshold: increase or decrease the threshold; reward r t , r t =w 1 ·r i +w 2 ·r o , w 1 、w 2 represents the weight, S represents the current mask M t The total number of pixels, ΔM t Indicates the current segmentation mask M t The boundary gradient amplitude of

[0134] The constructed deep Q network structure is:

[0135] Input layer: The input dimension is 128x128x2, including the current segmentation mask and saliency map;

[0136] Hidden layer: two convolutional layers: convolution kernel size 3x3, number of channels 32 and 64 respectively, activation function is ReLU, one fully connected layer: mapping convolution features to action space;

[0137] Output layer: The action space size is 5, each action corresponds to a Q value, and the action corresponding to the maximum Q value is selected for execution;

[0138] DQN training and optimization:

[0139] Initialization: Randomly initialize DQN network parameters, set up experience replay pool, store state, action, reward and next state;

[0140] Training process: State initialization: From the enhanced preliminary segmentation mask M e Start with the initial state M t , action selection: in the current state s t , select action a based on ∈-greedy strategy t , environment interaction: perform action a t , get the next state s t+1 and reward r t , Experience replay: Sampling from the experience pool, updating the Q network parameters, the target Q value is: γ represents the discount factor, and the stopping condition is: reaching the maximum number of iterations or the segmentation result converges, maxQ(s t+1 ,a) means in the next state s t+1, the maximum Q value of all possible actions a;

[0141] Output: Optimized segmentation mask M o The segmentation result of the lesion area after DQN optimization;

[0142] Use the optimized segmentation mask to generate the final segmentation image I s , where I s =M o I e .

[0143] The embodiment of the present invention realizes rapid noise removal and cavity repair through morphological and threshold fusion, and retains key details of the lesion; since the lacunar infarction lesions of different patients may have various shapes, scattered sizes and positions, and the DQN strategy of the present invention can adaptively learn the optimal operation, and the morphological operation ensures the flexibility of correction, the overall process shows stronger robustness to lesions of various shapes, and has excellent adaptability to lesions of different sizes and shapes. Among them, the present invention sets actions and based on the reward function, the network can automatically select the optimal operation, and the iterative process based on trial-feedback can adaptively improve the accuracy of the segmentation boundary, which not only reduces the missed segmentation area but also avoids the over-segmentation phenomenon; the reward function comprehensively considers the current number of mask pixels and the boundary gradient amplitude. When the mask boundary fits the real contour of the lesion, its gradient amplitude is often high and the area is also within a reasonable range. If the mask is over-expanded or contracted, it will lead to a low gradient amplitude or a sudden change in the area, thereby obtaining a lower reward. The lightweight DQN structure with two convolutional layers and one fully connected layer can not only fully extract the local features of the current mask and the saliency map, but also speed up the training iteration speed, reduce the amount of calculation, and can be flexibly deployed in a conventional GPU environment; in the process of repeated interaction with the environment, DQN gradually converges to the global optimal or suboptimal segmentation strategy. Doctors or researchers do not need to manually set multiple corrosion / expansion or threshold fine-tuning, which reduces subjective errors, and the generated segmentation results are more consistent and objective in different batches of images.

[0144] In a preferred embodiment of the present invention, performing artifact repair on the segmented image in S4 specifically includes:

[0145] Obtain input images for training the Generative Adversarial Network (GAN), including the final segmented image and the preprocessed MRI medical image I o , and annotate artifact data;

[0146] Define the generator:

[0147] Input: The frequency domain of the final segmented image generated by Fourier transform, where F(I s )=Φ(I s ), Φ(·) represents Fourier transform, F(Is ) indicates that it contains the frequency information of the image;

[0148] Architecture: The encoder part includes several convolutional layers to extract frequency domain features, the feature processing part focuses on artifact features through the attention mechanism module, and the decoder part includes several deconvolutional layers to reconstruct the repaired frequency domain features into the artifact repaired frequency domain image;

[0149] Output: The frequency domain image of the artifact repaired output repair image, where I r =Φ -1 (F r ), F r represents the frequency domain image after artifact repair, I r Indicates the repaired image;

[0150] Define the discriminator:

[0151] Input: The spatial domain input is the original image and the repaired image, and the frequency domain input is Φ(I r ) and Φ(I o );

[0152] Architecture: The spatial domain branch extracts spatial features through three convolutional layers, the frequency domain branch extracts frequency domain features through three convolutional layers, and the fusion layer combines the spatial domain and frequency domain features through a fully connected layer to determine the authenticity of the restored image;

[0153] Output: discrimination result, used to measure the quality of the restored image;

[0154] Define the loss function:

[0155] The generator loss includes pixel difference, frequency domain difference and adversarial loss, where L g =ω 1 ·||I r -I o || 1 +ω 2 ·||F r -F(I o )|| 2 +ω 3 ·L GAN , L GAN represents the adversarial loss, ω 1 ,ω 2 and ω 3 represents the weight hyperparameter;

[0156] The discriminator loss is the adversarial loss between the real image and the artifact repaired image, where L d = -Ε[log(D(I o ))]-Ε[log(1-D(I r ))],D(I o) represents the authenticity judgment of the discriminator on the original image, D(I r ) represents the discriminator’s judgment on the authenticity of the restored image;

[0157] GAN training steps:

[0158] Initialization: Randomly initialize the parameters of the generator and discriminator, use the Adam optimizer, and set the learning rate to 10 -4 ;

[0159] Training process: Training the discriminator: input the preprocessed MRI medical image and the repaired image, and update the discriminator parameters; Training the generator: optimize the generator through the adversarial loss fed back by the discriminator and the difference loss between the repaired image and the original image; alternately update the generator and the discriminator until the loss function converges;

[0160] Output result: Generate a repaired image.

[0161] The embodiment of the present invention uses the dual repair mechanism of GAN in the frequency domain and the spatial domain, and uses the attention module to perform refined learning on the artifact features, which greatly reduces the interference of various forms of artifacts on the image, making the repaired image more realistic and clearer in detail. Among them, the encoder part uses several convolutional layers to extract frequency domain features, and then focuses on the artifact frequency band through the attention mechanism module to suppress or reconstruct the abnormal spectral components caused by the artifacts; the decoder part then restores the repaired frequency domain features to the spatial domain by inverse Fourier transform, ensuring that the artifacts are effectively removed or weakened while maximizing the retention of key information in the MRI image; the dual discrimination of the spatial domain and the frequency domain by the discriminator can avoid the repair deviation that may occur only in the spatial domain or only in the frequency domain, and improve the discrimination and correction capabilities of various types of artifacts; the repaired MRI image not only reduces noise and artifacts, but also retains the subtle features of the original lesions and brain structures; after the GAN training is completed, the images can be processed in batches without manually adjusting the filter parameters or the bandpass range; it is universal for different types of MRI artifacts.

[0162] In a preferred embodiment of the present invention, generating a three-dimensional lesion visualization model based on the repaired image in S4 specifically includes:

[0163] Extract the lesion area based on the repaired image, stack the lesion area slice by slice, and generate three-dimensional voxel data;

[0164] The Marching Cubes algorithm is used to extract isosurfaces from the 3D voxel data, generate the surface mesh of the 3D lesion model, color the 3D model, and map the colors according to the saliency map of the lesion area;

[0165] Generate a three-dimensional lesion visualization model.

[0166] The embodiment of the present invention generates a three-dimensional lesion visualization model based on the repaired MRI image. The three-dimensional model can help doctors understand the spatial distribution of lesions in the brain from multiple perspectives, facilitate the judgment of the relationship between lesions and key brain regions, blood vessels and other structures, and improve the accuracy of diagnosis and surgical planning.

[0167] It should be noted that, according to actual needs, other algorithms and methods can also be used to generate a three-dimensional lesion visualization model based on the repaired image.

[0168] The embodiments of the present invention further provide device embodiments for implementing the steps and methods in the above method embodiments.

[0169] Please refer to Figure 2 , which is a functional block diagram of the MRI medical image correction system based on convolutional neural network provided by an embodiment of the present invention, such as Figure 2 As shown, the MRI medical image correction system based on convolutional neural network includes:

[0170] A preprocessing module is used to obtain brain MRI medical images, perform quality assessment based on signal-to-noise index, contrast, and artifact intensity, and classify them into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the quality assessment results, and perform preprocessing on them respectively;

[0171] A lesion recognition module is used to extract the lesion features of lacunar infarction from the preprocessed MRI medical images through a convolutional neural network, and locate the lesion area of ​​the lacunar infarction;

[0172] Enhanced segmentation module, used to enhance the details of the lacunar infarction lesion area, segment the lesion area and optimize the segmentation results;

[0173] The visualization module is used to repair artifacts in the segmented image and generate a three-dimensional lesion visualization model based on the repaired image.

[0174] Since each unit module in this embodiment can execute Figure 1 For the method shown in the embodiment, the part not described in detail in this embodiment can be referred to Figure 1 Related instructions.

[0175] In a preferred embodiment of the present invention, a computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps of the above method are completed.

[0176] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0177] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A MRI medical image correction method based on convolutional neural network, characterized in that: The method includes: S1. Obtain brain MRI medical images, perform quality assessment through signal-to-noise ratio, contrast, and artifact intensity, classify them into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the quality assessment results, and perform preprocessing respectively; S2. Extract the lesion features of cerebral lacunar infarction from the preprocessed MRI medical images through a convolutional neural network, and locate the lesion area of cerebral lacunar infarction; S3. Enhance the details of the cerebral lacunar infarction lesion area, segment the lesion area, and optimize the segmentation result; S4. Repair the artifacts of the segmented image, and generate a three-dimensional lesion visualization model based on the repaired image.

2. The method according to claim 1, characterized in that The specific content of S1 includes: Obtain brain MRI medical images and calculate the signal-to-noise index. Where SNR is the signal-to-noise ratio, μ I represents the signal mean, N represents the total number of pixels in the image, I(X) represents the grayscale value of the pixel position X in the image, σ n represents the noise standard deviation, M represents the number of pixels in the background area, and I b (X) represents the grayscale value of the background area pixel, μ b Represents the grayscale mean of the background area, which is calculated by the mean of the pixels in the background area; Calculate the contrast-to-noise index, Where CNR is the contrast noise ratio, μ l represents the mean value of the lesion area, which is calculated by the grayscale mean of the pixels in the lesion area. The lesion area is obtained by manual annotation, μ b represents the mean value of the background area; σ n represents the noise standard deviation; Calculate the artifact index, Among them, P A (k) represents the power spectrum of the artifact area, Represents the Fourier transform of the image in the frequency domain, F a Indicates the artifact frequency band, P t Represents the overall power spectrum of the image, F t Represents the complete frequency domain of the image; T represents the number of frequency domain points, the total number of sampling points in the image frequency domain; Classify them into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the calculation results of the signal-to-noise ratio, contrast-noise ratio, and artifact index. That is, the high-quality image index: all indexes are within the high-quality range, and the high-quality range is SNR>25, CNR>5, AI<0.05; the medium-high-quality image index: at least one index meets the high-quality range, and at least one index meets the medium-quality range; the medium-quality image index: all indexes are within the medium-quality range, and the medium-quality range is 15<SNR≤25, 3≤CNR≤5, 0.05≤AI<0.15; the low-quality image index: any one index belongs to the low-quality range, and the low-quality range is SNR≤15, CNR<3, AI≥0.15; Perform preprocessing respectively.

3. The method according to claim 2, characterized in that The specific content of the respective preprocessing includes: Preprocessing of high-quality images: Normalize the image gray value and perform adaptive histogram equalization; Preprocessing of medium-high-quality images: If 15<SNR≤25, use non-local means filtering to remove noise; if 3≤CNR≤5, apply adaptive histogram equalization; if 0.05≤AI<0.15, use frequency-domain band-pass filtering to repair mild artifacts; Preprocessing of medium-quality images: Mark the artifact area in the frequency domain, generate an artifact mask, denoise the calibrated artifact area, and perform adaptive histogram equalization on the denoised image; Preprocessing of low-quality images: Through the analysis result of the artifact index AI, detect the artifact area in the frequency domain and generate an artifact mask, calculate the gradient intensity distribution to generate a noise mask, and output the artifact mask and the noise mask; After preprocessing, perform image standardization operations uniformly.

4. The method according to claim 1, characterized in that: The specific content of S2 is to extract the lesion features of cerebral lacunar infarction from the MRI medical images through a convolutional neural network and locate the lesion area of cerebral lacunar infarction, including: Use multi-scale Gaussian filtering to extract background information from the preprocessed MRI medical images, calculate the residual maps at different scales, and adopt a weighted fusion strategy to fuse the residual maps of multiple scales to obtain the final noise residual map, R(x,y)=E(x,y)-G(x,y,γ), where R(x,y) represents the noise residual map, E(x,y) represents the input MRI medical image, G(x,y,γ) represents the result after the input image is Gaussian blurred, and γ represents the scale parameter of Gaussian filtering; The improved scale-invariant feature transformation algorithm is used to detect the key points in the final noise residual image, and the gradient histogram is calculated for each key point to generate a feature vector. The key point detection formula is: P i (x, y, δ) represents the key point at position (x, y) and scale δ, L(x, y, δ) represents the image value in the scale space, and Δδ represents the scale change; Based on the key point matching results, the geometric consistency check method is used to eliminate false matches and mark the suspected lesion area. The geometric consistency check formula is defined as: (P i ,P j ) represents two pairs of matching key points, ||P i -P j || represents the Euclidean distance between two points, τ represents the distance threshold, and θ i and θ j represents the direction angle of the key point, and Δθ represents the direction angle difference; Use a sliding window to divide the image into multiple small blocks, calculate the similarity between the features of each small block and the neighboring area, and mark the area with high similarity as a potential lesion area; A boundary map is generated based on the lesion boundary information extracted from the potential lesion area. The boundary map and the preprocessed MRI medical image are fused to form a multi-channel input. A convolutional neural network based on the U-Net architecture is constructed and trained to introduce the attention mechanism combined with the SE module. The convolutional neural network model is used to identify lacunar infarction lesions and output a global feature map containing lesion area information. The output global features are fused with the local key point matching results to generate the final lesion area mask.

5. The method according to claim 4, characterized in that In the S3, the details of the lacunar infarction lesion area are enhanced, specifically including: The generated lesion area mask is used to crop the residual images at different scales, and the cropped residual images are re-fused according to the weights to generate a local multi-scale residual image, where R c =R k ·M m , k∈{3,5,7}, R c Represents the cropped multi-scale residual map, R k represents the residual map of the kth scale, M m represents the lesion area mask, α k Represents the weight of each scale, R l represents the local multi-scale residual map; The local multi-scale residual map and the global feature map are fused to generate a preliminary saliency map, and the gradient information in the global feature map is used to enhance the lesion boundary. The enhanced saliency map is normalized to the range of [0, 1], where S i =R l +λF g , S i represents the preliminary saliency map, F g represents the global feature map, λ represents the weight of the global feature map, S e represents the enhanced saliency map, η represents the gradient enhancement weight, Represents the gradient information of the global feature map, calculated using the Sobel operator; The saliency map is weightedly fused with the preprocessed MRI medical image pixel by pixel to obtain a fused image with a prominent lesion area, where I e =I·(1+δS f ), I represents the preprocessed MRI image, S f represents the normalized saliency map, I e represents the fused image, and δ represents the weighting factor of the saliency map.

6. The method according to claim 5, characterized in that Segmenting the lesion area and optimizing the segmentation result in S3 specifically includes: Based on the threshold segmentation of the saliency map, a preliminary segmentation mask is generated, where M b represents the preliminary segmentation mask, T represents the segmentation threshold; Morphological operations are applied to the fused image to optimize the morphological features of the lesion area. The edge noise is removed by corrosion operation, using a 3×3 kernel and iterating 2 times. The small holes in the lesion area are repaired by dilation operation, using a 5×5 kernel and iterating 2 times. The edge area is smoothed using a morphological filter, using an elliptical kernel with a size of 5×5 to generate the final detail-enhanced image. Combined with the final detail enhanced image, the preliminary mask is enhanced, and the preliminary segmentation result containing the lesion area is generated through the enhanced preliminary mask, where M e =M b ·(1+θI e ′), θ represents the enhancement weight, M e represents the enhanced preliminary segmentation mask, I e ′ represents the final detail-enhanced image; A deep Q network is used to optimize the segmentation strategy, where the state s is defined t , the characteristics of the current segmentation result, including: the current segmentation mask M t , saliency map S f , fused image I e ; Action a t , the action space includes the following operations: adjust the boundary: boundary expansion or boundary contraction, smooth the area: boundary smoothing, adjust the segmentation threshold: increase or decrease the threshold; reward r t , r t =w1·r i +w2·r o , w1, w2 represent weights, S represents the current mask M t The total number of pixels, ΔM t Indicates the current segmentation mask M t The boundary gradient amplitude of The constructed deep Q network structure is: Input layer: The input dimension is 128x128x2, including the current segmentation mask and saliency map; Hidden layer: two convolutional layers: convolution kernel size 3x3, number of channels 32 and 64 respectively, activation function is ReLU, one fully connected layer: mapping convolution features to action space; Output layer: The action space size is 5, each action corresponds to a Q value, and the action corresponding to the maximum Q value is selected for execution; DQN training and optimization: Initialization: Randomly initialize DQN network parameters, set up experience replay pool, store state, action, reward and next state; Training process: State initialization: From the enhanced preliminary segmentation mask M e Start with the initial state M t , action selection: in the current state s t , select action a based on ∈-greedy strategy t , environment interaction: perform action a t , get the next state s t+1 and reward r t , Experience replay: Sampling from the experience pool, updating the Q network parameters, the target Q value is: γ represents the discount factor, and the stopping condition is: reaching the maximum number of iterations or the segmentation result converges, maxQ(s t+1 ,a) means in the next state s t+1 , the maximum Q value of all possible actions a; Output: Optimized segmentation mask M o The segmentation result of the lesion area after DQN optimization; Use the optimized segmentation mask to generate the final segmentation image I s , where I s =M o I e .

7. The method according to claim 6, characterized in that In S4, the segmented image is repaired by performing artifact repair, which specifically includes: Obtain input images for training the Generative Adversarial Network (GAN), including the final segmented image and the preprocessed MRI medical image I o , and annotate artifact data; Define the generator: Input: The frequency domain of the final segmented image generated by Fourier transform, where F(I s )=Φ(I s ), Φ(·) represents Fourier transform, F(I s ) indicates that it contains the frequency information of the image; Architecture: The encoder part includes several convolutional layers to extract frequency domain features, the feature processing part focuses on artifact features through the attention mechanism module, and the decoder part includes several deconvolutional layers to reconstruct the repaired frequency domain features into the artifact repaired frequency domain image; Output: The frequency domain image of the artifact repaired output repair image, where I r =Φ -1 (F r ), F r represents the frequency domain image after artifact repair, I r Indicates the repaired image; Define the discriminator: Input: The spatial domain input is the original image and the repaired image, and the frequency domain input is Φ(I r ) and Φ(I o ); Architecture: The spatial domain branch extracts spatial features through three convolutional layers, the frequency domain branch extracts frequency domain features through three convolutional layers, and the fusion layer combines the spatial domain and frequency domain features through a fully connected layer to determine the authenticity of the restored image; Output: discrimination result, used to measure the quality of the restored image; Define the loss function: The generator loss includes pixel difference, frequency domain difference and adversarial loss, where L g =ω1·||I r -I o ||1+ω2·||F r -F(I o )||2+ω3·L GAN , L GAN represents adversarial loss, ω1, ω2, and ω3 represent weight hyperparameters; The discriminator loss is the adversarial loss between the real image and the artifact repaired image, where L d = -Ε[log(D(I o ))]-Ε[log(1-D(I r ))],D(I o ) represents the authenticity judgment of the discriminator on the original image, D(I r ) represents the discriminator’s judgment on the authenticity of the restored image; GAN training steps: Initialization: Randomly initialize the parameters of the generator and discriminator, use the Adam optimizer, and set the learning rate to 10 -4 ; Training process: Training the discriminator: input the preprocessed MRI medical image and the repaired image, and update the discriminator parameters; Training the generator: optimize the generator through the adversarial loss fed back by the discriminator and the difference loss between the repaired image and the original image; alternately update the generator and the discriminator until the loss function converges; Output result: Generate a repaired image.

8. The method according to claim 7, characterized in that The S4 generates a three-dimensional lesion visualization model based on the repaired image, specifically comprising: Extract the lesion area based on the repaired image, stack the lesion area slice by slice, and generate three-dimensional voxel data; The Marching Cubes algorithm is used to extract isosurfaces from the 3D voxel data, generate the surface mesh of the 3D lesion model, color the 3D model, and map the colors according to the saliency map of the lesion area; Generate a three-dimensional lesion visualization model.

9. An MRI medical image correction system based on a convolutional neural network using the method according to any one of claims 1 to 9, characterized in that: include: A preprocessing module is used to obtain brain MRI medical images, perform quality assessment based on signal-to-noise index, contrast, and artifact intensity, and classify them into high-quality images, medium-high-quality images, medium-quality images, and low-quality images according to the quality assessment results, and perform preprocessing on them respectively; A lesion recognition module is used to extract the lesion features of lacunar infarction from the preprocessed MRI medical images through a convolutional neural network, and locate the lesion area of ​​the lacunar infarction; Enhanced segmentation module, used to enhance the details of the lacunar infarction lesion area, segment the lesion area and optimize the segmentation results; The visualization module is used to repair artifacts in the segmented image and generate a three-dimensional lesion visualization model based on the repaired image.

10. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Adaptive medical ultrasonic image denoising method based on biological vision mechanism

    CN108629752A

  • Artifact correction method of cardiac coronary artery image, and readable storage medium

    CN111223158A

  • Skin disease image lesion segmentation method based on deep convolutional neural network

    CN112132833A

  • Cavity gap type cerebral infarction recognition system based on three-dimensional refined residual network

    CN115115628A

  • Method and equipment for detecting surface defects of power battery module

    CN115690013A

Cited By

  • Laparoscope real-time identification method for ovarian endometriosis cyst

    CN120339275A

  • A real-time laparoscopic identification method for ovarian endometriomas

    CN120339275B

  • Medical image reconstruction method and system based on deep learning

    CN120355603A

  • A medical image reconstruction method and system based on deep learning

    CN120355603B

  • Rib shielding ultrasonic image analysis method and system

    CN120451155A