Magnetic resonance imaging image processing method and device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202610213342.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-13
- Publication Date
- 2026-08-28
AI Technical Summary
该方法在公开数据集上取得了较高的准确率,但仍存在若干局限:首先,该模型依赖单一数据域进行训练,对不同设备、不同扫描条件下的数据普适性较差
Smart Images

Figure CN122657537A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of magnetic resonance imaging technology, and in particular to a magnetic resonance imaging image processing method, apparatus, storage medium, and electronic device. Background Technology
[0002] Magnetic Resonance Imaging (MRI) images, as non-invasive imaging techniques rich in structural information, are crucial tools for analyzing pathological changes in the brain. With the development of artificial intelligence and deep learning, models such as convolutional neural networks and attention mechanisms can be used to analyze pathological features from MRI images to determine corresponding pathological categories. However, due to the subtle and complex signal changes in neurodegenerative diseases within MRI images, model performance is highly susceptible to variations in data sources. For example, differences in hospitals, scanning equipment, field strengths, and acquisition protocols can lead to significant shifts in MRI image distribution. This results in models performing well on the training set but significantly degrading on external central datasets, a phenomenon known as "domain shift." MRI image processing has become one of the core bottlenecks hindering the clinical application of artificial intelligence in medical imaging.
[0003] In related technologies, a typical model utilizes a Fully Convolutional Network (FCN)-PD framework. It employs U-Net to segment brain MRI images, uses an autoencoder for denoising, and combines this with an EfficientNet to extract local texture features. Furthermore, it uses an attention module to capture global information before inputting it into a fully connected classifier. This process enables MRI image category recognition. While this method has achieved high accuracy on publicly available datasets, it still has several limitations: First, the model relies on a single data domain for training, resulting in poor generalizability across different devices and scanning conditions. For example, if the distribution of the input MRI image data differs from the training samples, the model's performance will significantly decrease, exhibiting obvious overfitting characteristics. Second, the model lacks explicit constraints on physiological structures during the learning process. The regions of interest for the fully convolutional network are often scattered across non-pathologically relevant areas such as gray-white matter boundaries or brain contours, rather than brain regions closely related to pathology, such as the substantia nigra, globus pallidus, and striatum. While this feature extraction method can improve classification accuracy, it makes it difficult to explain the model's discrimination criteria, reducing clinical interpretability. Furthermore, existing models are typically trained and validated at the slice level. If the data partitioning is not rigorous, data leakage is very likely to occur, meaning that different slices of the same subject are assigned to the training and testing sets, further exaggerating the model's performance.
[0004] On the other hand, the imaging manifestations of pathology are highly dependent on the spatial distribution of neurodegenerative changes in different brain regions, and deep learning models that rely solely on global feature extraction struggle to capture these subtle differences. Furthermore, conventional MRI images exhibit significant variations in signal intensity, noise levels, and artifact characteristics under different field strengths, further reducing the model's robustness on multi-center data. Although some studies have attempted to mitigate the domain shift problem using adversarial learning or normalization techniques, these methods often ignore the physical characteristics of MRI images, failing to achieve effective content-style decoupling in the feature space, and failing to fully utilize anatomical priors to limit the model's focus to pathology-related regions.
[0005] In summary, existing MRI image analysis methods face three key challenges: first, insufficient model generalization performance due to cross-center data domain differences; second, lack of explicit structural constraints based on pathological sites, resulting in poor model interpretability; and third, the training data partitioning and feature learning mechanisms are not robust enough, easily introducing implicit biases. Summary of the Invention
[0006] In view of this, the present invention provides a magnetic resonance imaging image processing method, apparatus, storage medium, and electronic device.
[0007] Specifically, the present invention is achieved through the following technical solution: According to a first aspect of the present invention, a magnetic resonance imaging (MRI) image processing method is provided, the MRI image processing method comprising: The original 3D MRI images were spatially aligned and sized normalized to obtain normalized MRI images; Normalized MRI images are segmented to obtain a set of masked images containing multiple regions of interest, including: substantia nigra, striatum, and globus pallidus. Dual-stream factorization coding is performed on the brain tissue data corresponding to the masked image set to obtain pathology-related content features and imaging domain-related style features. Reconstruction is then performed based on the content features and style features to obtain the reconstructed image. Based on the reconstructed image, dual-stream factorization coding is performed, and the obtained dual-stream codes are physically perturbed and adversarially aligned to obtain perturbation features; Based on the perturbation features and the pre-trained classification model, the classification corresponding to the original three-dimensional MRI image is obtained.
[0008] Optionally, the step of performing spatial alignment and size normalization on the original three-dimensional MRI image to obtain a normalized MRI image includes: A rigid transformation matrix was used to transform the original 3D MRI images to the standard Montreal Neuroscience Institute space to obtain registered images; The intensity of the registered images was normalized using the Z-score standardization method to obtain normalized MRI images.
[0009] Optionally, before obtaining a normalized MRI image after spatial alignment and size normalization of the original three-dimensional MRI image, the method further includes: Brain extraction is performed on the size-normalized images. Brain tissue volume data is obtained by combining a pre-set threshold segmentation with morphological closing operations to serve as the normalized MRI images.
[0010] Optionally, the step of segmenting the normalized MRI image to obtain a masked image set containing multiple regions of interest includes: The downsampling path of the deep segmentation network based on the U-Net structure obtains high-level features through multi-layer convolution and performs max pooling on the high-level features. The upsampling path of the deep segmentation network based on the U-Net structure restores spatial resolution by using deconvolution and feature concatenation to obtain a mask image set.
[0011] Optionally, the step of performing dual-stream factorization encoding on the brain tissue data corresponding to the masked image set to obtain pathology-related content features and imaging domain-related style features, and then reconstructing the image based on the content and style features, includes: A shared feature extraction layer is used to extract low-level texture and spatial structure features from brain tissue data corresponding to the masked image set to obtain a basic representation. The basic representation is dissected and functionally extracted using a content encoder to obtain content features that characterize the anatomical and functional features. In addition, the basic representation is image-based extracted using a style encoder to obtain style features that characterize the imaging features. The anatomical and functional features and the imaging features are statistically independent of each other. Reconstruction is performed based on content and style features to obtain reconstructed images.
[0012] Optionally, the dual-stream factorization coding includes a pre-built site discriminator and feature orthogonality constraints, and the method further includes: Based on a pre-built site discriminator, the underlying representations for dissection and function extraction are discriminated to remove domain information from the acquired content features; and, The content features and style features obtained through discrimination are subject to orthogonal constraints to improve the independence of the acquired content features and style features.
[0013] Optionally, the step of physically perturbing and adversarially aligning the acquired dual-stream codes to obtain perturbation features includes: Style samples are obtained by perturbing the style features of dual-stream coding based on a pre-set differentiable style perturbation operator. Based on pre-set style feature stability constraints, adversarial alignment is performed on style samples to ensure that perturbation samples and style features are similar in distribution rather than completely random, thereby obtaining perturbation features.
[0014] According to a second aspect of the present invention, a magnetic resonance imaging image processing apparatus is provided, the magnetic resonance imaging image processing apparatus comprising: The normalization module is used to perform spatial alignment and size normalization on the original 3D MRI images to obtain normalized MRI images; The segmentation module is used to segment normalized MRI images and obtain a masked image set containing multiple regions of interest, including: substantia nigra, striatum, and globus pallidus; The image reconstruction module is used to perform dual-stream factorization encoding on the brain tissue data corresponding to the masked image set, obtain content features related to pathology and style features related to the imaging domain, and reconstruct the image based on the content features and style features. The coding module is used to perform dual-stream factorization coding based on the reconstructed image, and to perform physical perturbation and adversarial alignment on the acquired dual-stream code to obtain perturbation features; The classification acquisition module is used to acquire the classification corresponding to the original three-dimensional MRI image based on the perturbation features and the pre-trained classification model.
[0015] According to a third aspect of the present invention, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the magnetic resonance imaging image processing method in any possible implementation of the first aspect.
[0016] According to a fourth aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the magnetic resonance imaging image processing method in any possible implementation of the first aspect. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0019] Figure 1 A schematic flowchart of a magnetic resonance imaging image processing method provided in an embodiment of the present invention; Figure 2 The left part of the illustrated flowchart of a magnetic resonance imaging image processing method provided in an embodiment of the present invention; Figure 3 The right part of the illustrated flowchart of a magnetic resonance imaging image processing method provided in an embodiment of the present invention is a schematic diagram. Figure 4 This is a schematic diagram of dual-stream factorization coding and multi-layer alignment in a magnetic resonance imaging image processing method provided in an embodiment of the present invention; Figure 5 The embodiments of the present invention are based on Figure 4 A magnified view of a portion of the image; Figure 6 This is a schematic diagram of a magnetic resonance imaging image processing device provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Among related technologies, the model that utilizes the Fully Convolutional Network (FCN)-PD framework, employs U-Net for brain region segmentation, uses an autoencoder for noise reduction, combines it with an EfficientNet to extract local texture features, and uses an attention module to capture global information before inputting it into a fully connected classifier to achieve MRI image category recognition has the following technical shortcomings: Cross-central region offset problem. Different equipment and scanning conditions lead to differences in the distribution of MRI features in MRI images, resulting in poor model generalization ability.
[0022] The existing models suffer from insufficient correlation with pathological features. They lack physiological constraints and tend to focus on non-lesion areas.
[0023] Overfitting and data leakage issues. Slice-level training is prone to object mixing.
[0024] The problem lies in the lack of physical modeling. Differences in MRI imaging are overlooked in related techniques.
[0025] To address the shortcomings of the aforementioned MRI image analysis, this embodiment proposes an MRI image processing method that simultaneously achieves domain-invariant feature extraction and physiological site alignment. For the problem of cross-center domain shift, factorization coding and style perturbation are used to achieve device-independent domain-invariant feature extraction. To address the insufficient relevance of pathological features, this embodiment introduces site alignment mechanisms based on brain regions such as the substantia nigra and striatum, focusing features on pathological areas. To address overfitting and data leakage, this embodiment uses patient-level consistency constraints to ensure consistent predictions across multiple slices of the same subject, improving robustness. To address the lack of physical modeling, this embodiment introduces a physical perturbator in the style branch to simulate noise and bias changes, achieving physical-level domain generalization. This allows the model to capture key pathological signals even under multi-center conditions, achieving more stable and interpretable automatic identification.
[0026] In this embodiment, MRI image data preprocessing and brain region segmentation are fundamental steps in MRI image analysis. These processes unify raw structural MRI images from different centers and devices into a standardized input format, providing a stable data foundation for subsequent factorized feature extraction and domain generalization learning. This avoids the significant differences in scanning parameters, field intensity, spatial resolution, and signal-to-noise ratio between multi-center MRI images. Directly inputting these images into the network model would introduce severe domain shift problems, making it difficult to generalize the learned features across different sites. Therefore, the preprocessing in this embodiment not only completes routine data cleaning and standardization but also achieves a unified mapping of image space, intensity, and anatomical structure at the algorithmic level.
[0027] See Figure 1 This invention provides a magnetic resonance imaging image processing method. Figure 2 The left part of the illustrated flowchart of a magnetic resonance imaging image processing method provided in an embodiment of the present invention; Figure 3 The diagram on the right is a schematic flowchart of a magnetic resonance imaging image processing method provided in an embodiment of the present invention.
[0028] Combination Figures 1 to 3 The method may include the following steps: S101. Perform spatial alignment and size normalization on the original three-dimensional MRI images to obtain normalized MRI images; In this embodiment, as an optional implementation, the original three-dimensional MRI image is a brain three-dimensional MRI image. In the specific implementation process, the original three-dimensional MRI image (three-dimensional MRI image data) undergoes spatial alignment and size normalization. As an optional implementation, the original three-dimensional MRI image undergoes spatial alignment and size normalization processing to obtain a normalized MRI image, including: A11 uses a rigid transformation matrix to transform the original 3D MRI images to the standard Montreal Neuroscience Institute space to obtain registered images; In this embodiment, the original 3D MRI image is denoted as Iraw(x,y,z). A rigid transformation matrix, Trigid, is used for registration to eliminate differences in subject head posture and scanning angle, aligning the image to the standard Montreal Neurological Institute (MNI) space. The registered image after spatial alignment is denoted as:
[0029] in, To register the image, The original three-dimensional MRI image, It is a rigid transformation matrix.
[0030] A12, using the Z-score standardization method, intensity normalization was performed on the registered images to obtain normalized MRI images.
[0031] In this embodiment, the registered images undergo intensity normalization to eliminate differences in imaging intensity scale between different devices. As an optional embodiment, the Z-score normalization method is used for intensity normalization.
[0032] in, For normalized MRI images, and , respectively, are the mean and standard deviation of the I-th registered image.
[0033] In this embodiment, by performing size normalization processing, i.e. intensity normalization processing, the consistency of the registered images in grayscale distribution can be effectively ensured, which is beneficial to the stable convergence of neural network feature learning.
[0034] In this embodiment, as an optional embodiment, after spatial alignment and size normalization of the original three-dimensional MRI image and before obtaining the normalized MRI image, the method further includes: Brain extraction is performed on the size-normalized images. Brain tissue volume data is obtained by combining a pre-set threshold segmentation with morphological closing operations to serve as the normalized MRI images.
[0035] In this embodiment, to reduce background noise and non-brain tissue interference, brain extraction (skull-stripping) is further performed on the normalized MRI images. A key pathological brain region mask (Mbrain) is pre-generated using a method combining improved threshold segmentation and morphological closing operations, thereby obtaining a clean brain region. As an optional embodiment, brain tissue volume data is obtained using the following formula as the optimized normalized MRI image:
[0036] in, For brain tissue data, This is a mask (set) of key pathological brain regions corresponding to brain extraction operations. In this embodiment, the masking operation can effectively eliminate interference from skull, skin, and other irrelevant tissues on brain feature extraction, ensuring that the focus can be placed on neural tissue information in subsequent learning.
[0037] S102. Segment the normalized MRI images to obtain a set of masked images containing multiple regions of interest, including: substantia nigra, striatum and globus pallidus. In this embodiment, after obtaining normalized MRI images or standardized brain images (brain tissue data), as an optional implementation, a deep segmentation network based on a U-Net structure is used for automatic brain region segmentation. The input to the deep segmentation network is the preprocessed normalized MRI images or brain tissue data, and the output is a set of masked images of multiple regions of interest. }, which is the set of key pathological brain regions masked, where k∈{1,2,3}, corresponding to the substantia nigra, striatum, and globus pallidus, respectively.
[0038] In this embodiment, as an optional implementation, the normalized MRI image is segmented to obtain a masked image set containing multiple regions of interest, including: The downsampling path of the deep segmentation network based on the U-Net structure obtains high-level features through multi-layer convolution and performs max pooling on the high-level features. The upsampling path of the deep segmentation network based on the U-Net structure restores spatial resolution by using deconvolution and feature concatenation to obtain a mask image set.
[0039] In this embodiment, as an optional embodiment, the loss function of the deep segmentation network ( The weighted Dice coefficient and cross-entropy are used in a hybrid form:
[0040] Where P is the mask probability map predicted (output) by the deep segmentation network, which includes a set of masked images of multiple classes; G is the true class label of the normalized MRI image; and λ is the weighting coefficient. This is the cross-entropy loss. This hybrid loss method can simultaneously ensure both the accuracy of brain region boundaries and the overall classification stability.
[0041] In this embodiment, after segmentation, morphological normalization can be further performed to reduce statistical bias in brain region morphology between different centers. Therefore, the method also includes: The masked image set is scaled using the centroid and principal axis length of the masked image set for each region of interest.
[0042] In this embodiment, the brain region mask image set is scale-normalized using the centroid and principal axis length of the mask image set of each Region of Interest (ROI) to maintain geometric consistency under a unified spatial coordinate system. Thus, after morphological normalization (scale normalization), all brain region features can be mapped to a standard space, thereby enabling cross-site comparability in the subsequent physiological site alignment stage.
[0043] In this embodiment, after the aforementioned preprocessing and brain region segmentation process, the original multi-center 3D MRI images are uniformly characterized in terms of spatial structure, signal intensity, and lesion localization. At this point, each original multi-center 3D MRI image is mapped to standardized brain tissue volume data (Ibrain) and its corresponding set of key pathological brain region masks. This can eliminate inconsistencies in imaging and establish cross-center comparable pathological feature benchmarks in anatomical space.
[0044] In this embodiment, unlike traditional image enhancement or simple normalization, the output (brain tissue data) has higher algorithm interpretability: the brain tissue data (Ibrain) retains the whole-brain grayscale structural information, which can be used as input for subsequent models to extract deep representations; while the mask image set corresponding to the ROI { This provides a clear pathological site prior for the deep segmentation network, enabling subsequent feature learning to be structurally targeted. Through this dual design of "data standardization + explicit physiological priors," this embodiment transforms the originally loosely structured multi-source MRI samples into an input space with a unified scale and semantics, creating favorable conditions for feature factorization modeling.
[0045] S103. Perform dual-stream factorization encoding on the brain tissue data corresponding to the masked image set to obtain pathology-related content features and imaging domain-related style features. Reconstruct the image based on the content features and style features to obtain the reconstructed image. In this embodiment, after standardizing and segmenting MRI images, high-level features reflecting pathological changes in the target classification can be further extracted from these structurally consistent images. Traditional deep convolutional networks perform well in a single data domain, but when faced with data from different centers and under different scanning conditions, they often learn pseudo-patterns that depend on device or noise features, leading to a decline in generalization ability.
[0046] Figure 4 This is a schematic diagram of dual-stream factorization coding and multi-layer alignment in a magnetic resonance imaging image processing method provided in an embodiment of the present invention; Figure 5 The embodiments of the present invention are based on Figure 4 A magnified view of a portion of the image.
[0047] like Figure 4 and Figure 5 As shown, this embodiment proposes a two-stream factorization coding method, aiming to achieve explicit decoupling of features from an algorithmic structure perspective. It decomposes the input masked image set into two categories of potential features: "pathology-related content features" and "imaging domain-related style features," thereby isolating domain information from pathological information at the feature level and providing a controllable representation space for subsequent domain generalization and site alignment. As an optional embodiment, two-stream factorization coding is performed based on the brain tissue data corresponding to the masked image set to obtain pathology-related content features and imaging domain-related style features. Reconstruction is then performed based on the content and style features to obtain a reconstructed image, including: A11 utilizes a shared feature extraction layer to extract low-level texture and spatial structure information features from brain tissue data corresponding to the masked image set, thereby obtaining a basic representation. In this embodiment, the dual-stream factorization encoding takes the preprocessed brain tissue data Ibrain as input. First, the basic representation F0=Es(Ibrain) is extracted through a shared feature extraction layer. This shared feature extraction layer consists of several convolutional layers, batch normalization layers, and nonlinear activation functions, which are used to capture general low-level texture and spatial structure information.
[0048] A12, using a content encoder to dissect and extract the function of the basic representation to obtain content features that characterize the anatomical and functional features, and using a style encoder to extract the image of the basic representation to obtain style features that characterize the image features, wherein the anatomical and functional features and the image features are statistically independent of each other. In this embodiment, dual-stream factorization coding is divided into two complementary coding paths at the branch layer: the content encoder Ec(·) and the style encoder. (·). The content encoder extracts anatomical and functional features directly related to the target pathological changes, i.e., content features, while the style encoder captures imaging features caused by differences in scanner model, field strength, noise, or magnetic susceptibility, i.e., style features. The two encoding paths share some convolutional kernel weights at the bottom layer to ensure consistency between feature scale and spatial resolution, but are trained independently at higher levels, enabling the network to achieve decoupled representation in the feature space.
[0049] In this embodiment, for any input sample, its features after dual-stream factorization encoding can be represented as:
[0050]
[0051] in Content features describe domain-invariant features related to the target pathology; Style features describe imaging domain features.
[0052] In this embodiment, as an optional implementation, the training objective is designed to make the content features... With style characteristics They are statistically independent, meaning they satisfy the independence assumption:
[0053] In this embodiment, based on the independence assumption, it can be ensured that the extraction of pathological features according to the dual-stream factorization coding is not affected by domain information, thereby achieving a stable representation across centers.
[0054] In this embodiment, to further ensure that content branches capture only anatomical and pathological changes without incorporating style factors, a feature constraint mechanism based on the information bottleneck concept is introduced. Specifically, an information adjustment term is added to the output of the content encoder to ensure that the encoded content features contain as much as possible sufficient information to aid classification. Through the interoperation of brain tissue data and content features, the optimization objective can be expressed as:
[0055] in, Indicates mutual information, For category labels, such as nigroma, striatum, and globus pallidus; This is the balance coefficient. By minimizing this loss... This causes the network to tend to retain the information most useful for the category task, while discarding redundant patterns related to domain features.
[0056] In this embodiment, the style branch plays two roles during the training phase: first, by modeling the distribution characteristics between different imaging domains, it enables the model to recognize and adapt to diverse scanning conditions; second, it provides a feature injection interface for the subsequent style perturbation module. Specifically, the features extracted by the style encoder... It is mapped to a high-dimensional statistical space, by estimating its mean vector. The overall distribution characteristics of style features are described by the covariance matrix Σs:
[0057] This statistical description can not only be used to simulate inter-domain differences, but also as a constraint in subsequent adversarial training, enabling the model to learn to ignore differences between domains. ,Σs) related feature patterns.
[0058] In this embodiment, the dual-stream factorization coding may further include a pre-built site discriminator and feature orthogonality constraints. The method also includes: Based on a pre-built site discriminator, the underlying representations for dissection and function extraction are discriminated to remove domain information from the acquired content features; and, The content features and style features obtained through discrimination are subject to orthogonal constraints to improve the independence of the acquired content features and style features.
[0059] In this embodiment, to ensure the content features truly possess domain invariance during model training, a site-discriminatory adversarial mechanism is incorporated. Specifically, a site discriminator is fed into the output of content features (anatomical and functional features) to predict which center (category: substantia nigra, striatum, and globus pallidus) the anatomical and functional features originate from. During training, the site discriminator minimizes its classification error, while the content encoder maximizes this classification error through a gradient inversion layer, thereby ensuring the content features... The domain information gradually disappears. Its adversarial loss is defined as:
[0060] in For the sample size, For the number of central categories, For sample labels. When When equilibrium is reached, it indicates that the site discriminator cannot distinguish between... By distinguishing the source of samples, the content features achieve domain independence.
[0061] In this embodiment, to enhance model stability and avoid information leakage between coding branches, feature orthogonality constraints are introduced to maintain... and Independence in the feature space. Its constraint form is:
[0062] in This represents the Frobenius norm. This term encourages the two feature subspaces to maintain approximately orthogonality in high-dimensional representations, further ensuring the purity of content-style separation.
[0063] A13, based on content and style features, is used to reconstruct and obtain the reconstructed image.
[0064] In this embodiment, to achieve factorized learning, feature reconstruction constraints are used to ensure that the information separated by the two encoders can still jointly recover the original image structure. (Reconstruction network reception) and The concatenated vector is used as input to generate the reconstructed image. :
[0065] And by minimizing the reconstruction error:
[0066] This maintains the integrity of the encoded data. The feature reconstruction constraint ensures that the outputs of the two branches are complementary: the content branch focuses on structure and pathology, while the style branch preserves imaging domain characteristics.
[0067] In this embodiment, at the implementation level, dual-stream factorization encoding employs a shared bottom-level convolutional feature extraction layer and an independent high-level feature encoder. The bottom layer contains three convolutional blocks and a max-pooling layer for extracting general morphological information; the high-level encoding part uses a multi-scale convolutional kernel structure in the content branch to enhance the perception of pathological local features, while the style branch introduces instance normalization to better capture differences in scanning conditions. The encoded features are mapped to a 128-dimensional latent space through fully connected layers, and batch normalization and dropout are used during training to prevent overfitting.
[0068] S104. Perform dual-stream factorization coding based on the reconstructed image, and perform physical perturbation and adversarial alignment on the obtained dual-stream code to obtain perturbation features; In this embodiment, the optimization objective of the entire two-stream coding process during the training phase is to jointly minimize the following loss function:
[0069] Among them, each weight Adjustments are made according to task requirements. In this way, through multi-objective optimization, the model can simultaneously ensure reconstruction integrity, feature independence, and domain invariance, thereby achieving robust feature extraction in a cross-center environment.
[0070] In this embodiment, after training with dual-stream factorized encoding, the model forms two complementary representation subspaces in the feature space: one is composed of content features (anatomical and functional features). The first is the pathological structural subspace, which carries key anatomical and functional features; the second is the stylistic features (imaging features). The described imaging domain subspace reflects the imaging bias and physical properties at different scan centers. This factorized structure enables the model to maintain a relatively stable response to domain changes while preserving pathological sensitivity.
[0071] In this embodiment, it is worth noting that the style branch is not simply ignored after feature separation, but is further used to model and regulate the variation patterns of the imaging domain. This is achieved by... Applying controllable perturbations can simulate image features under different equipment, noise levels, or field strengths, thereby artificially expanding the domain distribution during the training phase. This mechanism not only enhances the model's adaptability to real multi-center data but also provides a theoretical and feature foundation for subsequent domain generalization modules based on physical perturbations. Next, the system will introduce physical-level perturbation modeling into this style space, allowing the network to actively "experience" imaging differences during the learning process, thus achieving generalization training that more closely resembles the real scanning environment.
[0072] After completing the two-stream factorization encoding, the model is able to represent pathology-related features and imaging domain features separately in the latent space, including style features. Medical images contain scanning feature information from different centers and devices. However, domain variability in medical images stems not only from shifts in high-level statistical distributions but is also closely related to imaging physics processes, such as field strength variations, magnetic field inhomogeneities, noise injection, and motion artifacts. Traditional adversarial domain adaptation or feature normalization methods can only perform domain matching at the feature level but cannot simulate these complex perturbation processes at the physical generation layer. Therefore, their generalization ability remains limited when facing entirely new devices or imaging protocols. This embodiment constructs a physically perturbation-driven domain generalization mechanism based on style branching, enabling the model to actively experience feature changes under different imaging conditions during the training phase. By applying physically meaningful perturbations to the style space, it achieves true generalization of cross-center data.
[0073] In this embodiment, as an optional implementation, physical perturbation and adversarial alignment are performed on the acquired dual-stream code to obtain perturbation features, including: B1, based on a pre-set differentiable style perturbation operator, perturbs the style features of the dual-stream encoded data to obtain style samples; In this embodiment, the output style features of the style branch in this mechanism Considered as a set of latent variables describing the MRI imaging process, it has an implicit mapping relationship with physical factors such as scanning equipment, field strength, gradient nonlinearity, and noise distribution. To simulate the diversity of imaging conditions, this embodiment designs a differentiable style perturbation operator, whose function is to... The distribution is subjected to controlled perturbation to generate a new set of style samples. The parameter θ controls the intensity and type of the perturbation. The goal of the perturbation operator is not to destroy the statistical stability of style features, but to expand the visible imaging domain of the model while ensuring structural consistency, so that the content branches learn stronger domain invariance during training.
[0074] In this embodiment, as an optional implementation, the style perturbation operator is a family of differentiable functions comprising multiple differentiable functions. For each differentiable function, the style features are perturbed separately, and then concatenated to obtain a style sample. In the imaging physics of MRI, the main factors affecting image style include signal-to-noise ratio (SNR), blur kernel (PSF), bias field inhomogeneity, and grayscale mapping function. To make the perturbation physically plausible, this embodiment formalizes the above factors as a family of differentiable functions, with each factor corresponding to a differentiable function, and performs abstract modeling in the style space. First, for the SNR perturbation, Gaussian noise is injected into the model during the style encoding stage:
[0075]
[0076] in This represents noise intensity, controlling the noise level variation under different scanner or field strength conditions. Secondly, for fuzzy perturbations, this embodiment utilizes convolution kernels to simulate spatial resolution changes caused by gradient nonlinearity, defining the perturbation form as:
[0077] in The model uses a bandwidth-adjustable Gaussian kernel, whose variance represents the degree of ambiguity. By dynamically adjusting the ambiguity during training, the model can learn robust representations at different resolutions in the feature space.
[0078] In this embodiment, the third type of perturbation addresses the problem of bias field inhomogeneity, namely, the spatial non-uniformity of the magnetic field strength. To this end, a low-frequency multiplicative field B(x,y,z) is introduced to modulate the style features as follows:
[0079] in For perturbation weights, It is generated by combining a set of randomly sampled quadratic basis functions. This process is applied periodically during the training phase, enabling the model to learn robustness to brightness shifts and magnetic susceptibility gradients.
[0080] B2, based on pre-set style feature stability constraints, performs adversarial alignment processing on style samples to ensure that perturbation samples and style features are similar in distribution rather than completely random, thereby obtaining perturbation features.
[0081] In this embodiment, the three types of perturbations are applied to the style branch in a random order or jointly during training. To maintain the perturbed style feature distribution within a reasonable range, a style stability constraint term is introduced in each training batch to ensure that the perturbed samples... With the original style The distributions are similar but not completely random. The stability constraint is defined as follows:
[0082] in and These are the feature mean and covariance matrix, respectively, used to measure the global statistical consistency of style features. Through joint optimization... The model can maintain statistical stability of the feature space while the perturbation is enhanced, thus achieving a diverse and controlled domain expansion.
[0083] S105. Based on the perturbation features and the pre-trained classification model, obtain the classification corresponding to the original three-dimensional MRI image.
[0084] In this embodiment, a classification model is pre-trained. The training strategy employs a multi-stage alternating optimization approach: In each training cycle, the content encoder and classifier are first fixed, a perturbation is applied to the style branch, and the stable loss is optimized to expand the domain distribution coverage; subsequently, the perturbation parameters and style branch are fixed, and the content encoder is updated in reverse to maintain classification consistency under different perturbation conditions. The optimization objective of the content encoder can be written as:
[0085] in For classification loss function, These are the weights for the stable terms. Through alternating optimization, the model can learn robust features under dynamically changing domain conditions, thereby achieving true domain generalization.
[0086] In this embodiment, to prevent excessive perturbation from causing the samples to deviate from the true MRI distribution, an adaptive adjustment mechanism is introduced during the sampling process of the perturbation parameters θ={σn,σb,α}. In each training epoch, the system automatically adjusts the perturbation intensity based on the rate of change of the classification loss on the validation set. If the model maintains a low error under the new domain conditions, the perturbation range is gradually increased; otherwise, the perturbation intensity is reduced. The adjustment strategy is as follows:
[0087] in For step size parameters, This represents the change in classification loss. This adaptive process allows the model to focus on hard domain samples in the later stages of training, thereby effectively improving cross-center generalization ability.
[0088] In terms of implementation structure, the style perturbation module is connected in parallel with the style encoder and shares the underlying convolutional features. Perturbation output. Compared with the original style vector The inputs are fed into the corresponding layer of the content encoder and modulated using a feature fusion operator. The modulation process employs an affine transformation:
[0089] in For content feature mapping, and These are the scaling and offset parameters learned through the fully connected layer, respectively. This design exposes the content branch to new domain conditions with each forward propagation, enabling online domain generalization training without the need for explicitly constructing multicenter data.
[0090] In this embodiment, from a physical perspective, the perturbation mechanism is equivalent to reconstructing the imaging process under different MRI devices in the latent feature space, allowing the model to continuously undergo a "virtual cross-center migration" during the training phase. This physically-based domain generalization method differs from traditional image enhancement methods. It does not simply apply noise or filtering to the input image, but uses style latent variables as a carrier to statistically simulate the differences in real devices. Because the perturbation generation process is differentiable and controllable, the network can expand the perceptible imaging domain range while maintaining structural consistency, thereby maintaining a stable response to data with unknown centers during inference.
[0091] However, while physical perturbation significantly improves the model's generalization ability at the imaging domain level, it cannot completely resolve the issue of feature inconsistencies at the physiological structural level between different centers. Domain differences in MRI scans are not only reflected in physical imaging properties but also cause drift in the activation distribution learned by the model in specific brain regions (especially highly relevant areas such as the substantia nigra and striatum). In other words, when the model migrates across centers, it may still exhibit a "lesion focus shift" phenomenon, meaning that the feature responses corresponding to the same pathological structure are inconsistent in different domains. To further enhance the model's alignment consistency at pathological sites, this embodiment introduces a physiological site alignment mechanism after physical perturbation, ensuring that the feature distributions of samples from each center maintain a cooperative mapping relationship within the pathologically relevant brain regions.
[0092] Next, the system will analyze the content features output by the encoder. With predefined brain region masks { Based on this, a cross-domain feature alignment strategy is established. By constraining the consistency of physiological structures at the neural level, a further leap from "domain generalization" to "pathological alignment" is achieved, thereby obtaining stable and interpretable discriminative features in multi-center tasks.
[0093] Within the domain generalization framework constructed using physical perturbation mechanisms, the model has been able to adapt to imaging differences caused by various scanning conditions in the feature space. However, a potential problem remains: even if the style branch is perturbed during training, the features extracted by the content branch may still implicitly contain statistical traces of some scan centers. In other words, although the model can maintain stable performance in different domains, its latent representation may still retain discriminative "site information," leading to a slight domain shift effect during inference. To completely eliminate this implicit domain dependency at the feature distribution level, this embodiment introduces a site discrimination adversarial module into the two-stream coding structure. Through a game-theoretic training mechanism, the content features generated by the encoder are statistically truly distributed and independent of the scan center, thereby constructing a purer pathological representation space.
[0094] This embodiment establishes an adversarial optimization relationship between the content encoder and the site discriminator during training. The feature vector output by the content encoder... It is sent to a separate site discriminator Dd The site discriminator consists of a multi-layer fully connected network whose task is to predict the scan center of the source of the input based on its features. The goal of the site discriminator is to minimize the classification loss, thereby identifying the feature differences between different sites as accurately as possible; while the content encoder receives inverse gradients with opposite signs through a gradient reversal layer (GRL), aiming to make its output indistinguishable from the discriminator. In this way, the two form a zero-sum game in the same feature space, eventually reaching an equilibrium state, where the site discriminator cannot identify the domain source of the sample, while the encoder obtains a domain-indistinguishable content representation.
[0095] In this embodiment, the optimization objective of the site discriminator can be expressed as:
[0096] in For the sample size, For the number of central categories, The sample's ground truth domain label. The content encoder receives gradients via GRL backpropagation. The optimization objective is to maximize this loss. To prevent the site discriminator from overfitting or training oscillations, an entropy regularization term is introduced to encourage the smoothness of the output distribution, defined as:
[0097] This prevents the discriminator from developing excessive bias towards certain domain categories in the early stages, thus maintaining the stability of adversarial training. The joint optimization objective of both is:
[0098]
[0099] λ6 is the balance coefficient, used to adjust the weight of the entropy regularization term.
[0100] As training iterates, the content encoder gradually converges to a domain-insensitive feature distribution under the continuous game of the discriminator, causing samples from different scan centers to tend to mix in the high-dimensional latent space. At this point, the site labels are statistically almost indistinguishable, indicating that the two-stream coding model has eliminated imaging domain information at the global representation level, obtaining a relatively pure pathological representation.
[0101] However, the elimination of global features does not mean that cross-center samples are completely consistent in local physiological structure. Different scanning conditions may still cause slight shifts in feature responses in key brain regions (such as the substantia nigra and striatum). Although such shifts are insufficient for discriminators to recognize, they can affect the model's stable focus on pathological locations. To further enhance the feature alignment of the two-stream coding model at the physiological level, a physiological site alignment module is introduced after the adversarial mechanism to ensure that the feature distribution of different center samples in pathologically relevant regions remains consistent, thereby achieving cross-domain consistency at a finer anatomical scale.
[0102] After the site-discriminatory adversarial mechanism effectively eliminates global domain information in content features, the model obtains a statistically domain-insensitive representation. However, this "global consistency" still has certain blind spots. Even if images from different scanning centers are difficult to distinguish in high-dimensional latent space, they may still exhibit feature drift at the local physiological level—especially in highly correlated brain regions such as the substantia nigra, striatum, and globus pallidus. Such drifts originate from differences in imaging resolution, signal attenuation, and noise patterns, causing slight shifts in the location of the pathological regions the model focuses on across different center data, thus affecting consistency. The physiological site alignment module designed in this embodiment aims to solve this problem, enabling the feature distribution of cross-center samples on key physiological structures to achieve spatial and statistical synergistic consistency, realizing a further leap from domain-level generalization to physiological-level alignment.
[0103] Physiological site alignment module for extracted content features As input, and combined with the brain region mask set obtained during the MRI preprocessing stage { At the feature level, the model's feature consistency in pathology-related regions is explicitly constrained. For any input sample Ii, its content feature mapping is as follows: The ROI mask defines the spatial extent of the target physiological site. Through masking, local feature representations of specific brain regions can be extracted from global features.
[0104] in This represents element-wise multiplication, where k is the brain region category. This operation ensures that the alignment process occurs only in physiologically and pathologically relevant areas, thus avoiding interference from global features.
[0105] After obtaining the brain region features of each center sample, a distribution alignment strategy is employed to make the feature distributions of the same brain region in different domains as similar as possible. Consider two different scanning centers a and b, whose feature distributions on the same brain region k are as follows: and To measure the differences between distributions, we define an alignment loss function:
[0106] Where D(·) is the distribution distance metric. To improve differentiability and computational stability, the Maximum Mean Discrepancy (MMD) is used as the metric. MMD estimates the distribution distance by calculating the mean embedding difference in the reproducing kernel Hilbert space (RKHS).
[0107] in (·) represents the kernel mapping function, and na and nb represent the number of samples in the two domains, respectively. For the kernel space. By minimizing this loss, the model is driven to learn a consistent feature distribution across each key brain region, thereby ensuring representational stability at the anatomical level.
[0108] However, relying solely on global statistical alignment can easily overlook spatial distribution features. This embodiment further introduces structure-sensitive alignment constraints, combining mask boundary information and spatial gradients to measure the morphological consistency of features within brain regions. The spatial consistency term is defined as follows:
[0109] in F represents the feature gradient, which reflects the spatial distribution pattern of feature changes. This term prompts the model to not only match the statistical distribution at the feature layer but also maintain similar activation patterns. The final physiological site alignment loss is a weighted sum of the statistical alignment term and the spatial consistency term:
[0110] in is the balancing coefficient. This loss term is applied to the content encoder through backpropagation, enabling it to learn feature embeddings with consistent physiological semantics in each key brain region.
[0111] During training, the physiological site alignment module is optimized in parallel with the aforementioned physical perturbation mechanism and site adversarial module. Style perturbation continuously generates new domain samples, the adversarial mechanism suppresses domain information, and physiological alignment constraints recalibrate the representation of pathology-related regions in the feature space, ensuring that the model always focuses on the same anatomical structures when faced with data from different centers. Notably, this module does not passively adjust the feature distribution but guides the encoder to actively "transfer" regions of interest during training through inverse gradient constraints. For example, when the model activates a shift in the substantia nigra region of a certain center, the gradient of the MMD term will cause the feature distribution to converge towards the average pattern of other centers, thereby automatically correcting the pathology-related bias. This adaptive mechanism based on physiological priors greatly improves the structural interpretability of the cross-domain model.
[0112] To further ensure the convergence stability of the model, this embodiment employs a multi-scale feature fusion strategy during the alignment process. For feature layers of different resolutions... Calculate separately at each scale And summed using weighted averages:
[0113] Where L is the number of feature layers and αl is the layer weight. This mechanism ensures that the model captures boundary consistency in shallow layers and strengthens semantic consistency in deep layers, thereby achieving comprehensive alignment across different levels of representation space.
[0114] By introducing a physiological site alignment mechanism, the model achieves a consistent mapping of cross-domain features at the structural level, making the representations of key brain regions more focused and physiologically interpretable. At this point, the network not only achieves domain invariance in statistical distribution but also establishes feature alignment relationships at the anatomical scale, ensuring that the model's areas of interest align with clinical diagnostic logic. During training, the system thus acquires the characteristic of "interpretable representation self-alignment," meaning that the pathological response patterns learned by the model remain stable across different centers and imaging conditions.
[0115] However, simply achieving consistency at the structural layer is insufficient to complete the entire task. To further map these aligned features into explicit discrimination results, the system introduces a classification sub-network and a joint optimization strategy. This stage not only integrates the feature outputs of the aforementioned modules but also achieves end-to-end parameter updates through multi-task loss, enabling content encoding, domain alignment, and pathological discrimination to be collaboratively optimized within a unified framework. Next, the design of the joint loss function and the overall optimization mechanism of this embodiment will be described in detail, illustrating how each module achieves the final category recognition under a unified objective.
[0116] During the joint optimization phase, the system needs to further address another clinical-level issue: MRI data from the same subject typically consists of multiple slices or sequences. Although these images originate from the same patient, they exhibit significant differences at different levels. If the model performs feature extraction and classification only at the single-slice level, it is highly susceptible to individual differences and local noise, leading to inconsistent prediction results for the same object across different slices, thereby weakening the reliability of overall category recognition. Therefore, this embodiment introduces a consistency constraint module during model training. By applying consistency constraints simultaneously at the feature layer and prediction layer, the model internally achieves unity between feature representation and discrimination results, ensuring the individual stability and medical rationality of the output results.
[0117] The design philosophy of this module is that for multiple MRI slices or multiple sequence samples belonging to the same object, their content features should maintain a similar distribution in the latent space, and the corresponding classification outputs should also have a consistent probability trend. Specifically, let the sample set of an object p be {Ip,1,Ip,2,…,Ip,np}, and its corresponding content encoding be {zp,1,zp,2,…,zp,np}. To constrain the consistency of these samples at the feature layer, this embodiment defines a feature consistency loss:
[0118]
[0119] This constraint prompts the encoder to maintain a compact distribution of features for the same patient samples during the learning process, thereby avoiding excessive divergence of the model towards samples within an individual. Simultaneously, to ensure consistent prediction results from the classification layer, a probability distribution consistency constraint is further defined:
[0120]
[0121] in For Kullback–Leibler divergence, Let represent the classification prediction distribution of the i-th slice. By minimizing this loss, the model is forced to output similar class probability distributions across all slices of the same object, thereby achieving consistency in class identification at the decision level.
[0122] The two constraints mentioned above together constitute the object-level consistency loss:
[0123] in and This is a balancing coefficient used to adjust the importance of consistency between the feature layer and the prediction layer. During the optimization process, Together with the aforementioned alignment and classification losses, they participate in backpropagation, enabling the encoder and classifier to converge synchronously under dual constraints across samples and across patients.
[0124] This consistency constraint mechanism not only reduces the variance of intra-individual predictions at the mathematical level, but also ensures the coherence of diagnostic logic from a physiological perspective. Pathological progression often exhibits gradual characteristics in the spatial dimension, and different slices of the same object should reflect continuous pathological responses, rather than random fluctuations. By explicitly modeling this cross-slice continuity during training, the model can achieve robust information fusion at the individual level, unifying multi-sequence and multi-layer images into a consistent pathological representation in the feature space.
[0125] Meanwhile, the consistency constraint also acts as a bridge in global optimization: it establishes a flexible connection between domain alignment and classification tasks, enabling the model to achieve a balance between local stability and global discriminativity. Features constrained by this module not only possess cross-domain consistency but also inherent continuity across layers, providing a stable and reliable input foundation for subsequent joint loss optimization and the final classification decision. Next, the system will introduce a multi-task joint optimization strategy in this feature space, enabling each module to converge collaboratively under a unified objective, thereby completing intelligent category diagnosis.
[0126] After object-level consistency constraints ensure the individual stability of features, the system enters the unified optimization phase. At this point, the model's multiple functional modules, including two-stream factorization encoding, physical perturbation domain generalization, site adversarial analysis, physiological site alignment, and patient-level consistency constraints, have each formed independent constraints at the feature level. However, if these modules are trained separately, their objective functions often have potential conflicts, leading to model convergence difficulties or overfitting. To achieve cross-module collaborative optimization, this embodiment designs a multi-task joint loss function system, enabling feature decoupling, domain alignment, and disease classification to evolve together within the same optimization framework, thereby ensuring that the model maintains its generalization ability while possessing clear discriminative power.
[0127] The overall optimization objective is centered on the class loss of the classification, and global consistency is achieved through additional structural and distribution constraints. Let the classifier output of the model be... ,in For the first The content features of each sample, yi, are the true labels. The basic classification loss uses cross-entropy:
[0128] This loss ensures the model maintains its ability to distinguish between the class and the control group during training and is the core driving force of the entire system. Based on this, the constraint terms of each module are superimposed in a regularized manner to form a joint optimization objective. Considering the roles of different modules in the feature space, the overall loss can be expressed as:
[0129] in, To reconstruct constraints, used to maintain feature invertibility; To mitigate losses, ensure that content features are independent of the site; Achieve orthogonal separation between content and style; This represents physiological site alignment constraints, used for structural layer feature consistency. This is an object-level consistency constraint used for stabilizing individual-level features. The weights λi are set empirically in the early stages of training and adaptively adjusted in the later stages to maintain a dynamic balance in the optimization gradients of different modules, preventing any single module from dominating the overall training.
[0130] The key to joint optimization lies in gradient coordination. Since the optimization objectives corresponding to different loss terms have inconsistent directions in high-dimensional space, direct superposition may lead to gradient conflicts, thus affecting convergence speed and model performance. Therefore, a gradient projection optimization (GPO) mechanism is introduced, which orthogonally processes the gradients from different modules during each backpropagation. Specifically, if the gradients from the two loss terms are gi and gj, the optimization direction is updated as follows:
[0131] This operation ensures that the gradients of multiple tasks are as independent as possible during the update process, thereby improving the stability of the optimization.
[0132] Through end-to-end optimization of joint loss, the system achieves stable convergence under multiple constraints. While maintaining reconstruction and decoupling capabilities, the encoder gradually learns a feature space that combines domain invariance and physiological consistency, enabling data from different centers and individuals to form a unified mapping at the latent level. At this point, the classifier completes category discrimination based on this feature space, and its prediction results are consistent both statistically and structurally. The model as a whole exhibits good generalization and robustness.
[0133] However, the optimization process itself only reveals the theoretical convergence and structural consistency of the algorithm. Systematic experimental verification is still needed to quantify its diagnostic performance on real multi-center data. Therefore, after model training, this invention further constructs a multi-dimensional performance verification module to evaluate the model's accuracy, stability, and interpretability, thereby verifying the feasibility and practical value of the joint optimization strategy in clinical scenarios.
[0134] After completing joint optimization training, the system enters the inference phase. At this point, the functional modules of the model have formed stable structural mapping relationships through end-to-end learning. Auxiliary modules used for decoupling and constraint during training are folded into fixed-parameter mappings, retaining only the necessary forward inference paths. The core process of the inference phase includes three steps: feature extraction, cross-domain standardization, and classification. Given an MRI image (Itest) acquired from an arbitrary center, the system first extracts its pathologically relevant features using the content encoder Ec(·).
[0135] At this point, the encoder parameters implicitly include the learning results of multicenter alignment, consistency, and physiological site alignment, so the output features have consistent semantic representation under different imaging conditions.
[0136] Then the system will Input the data into classifier C(·), and calculate the class probability distribution:
[0137] Where p = [p0, p1] corresponds to the predicted probabilities of the classes. The final class label output by the model is... Simultaneously, it provides corresponding confidence scores to aid in the reliability of decision-making. Since the content features have already undergone multi-layer alignment and regularization during the training phase, no domain adaptation or reconstruction process is required during inference, effectively improving the system's computational efficiency. Through this structured inference and deployment design, the system can stably process MRI data from different scanning centers and different field strength devices in practical applications, maintaining consistent feature semantics and interpretable prediction outputs, providing a reliable technical implementation path for category recognition.
[0138] In summary, the category recognition system proposed in this embodiment achieves full automation from image input to pathological category recognition within a structured reasoning and modular deployment framework. The system separates pathological content from domain features through dual-stream factorization coding and constructs a cross-center consistent feature space through the synergistic effects of physical perturbation, site adversarial mechanisms, and physiological site alignment. Combined with patient-level consistency constraints and joint loss optimization, the model maintains high accuracy while exhibiting excellent cross-domain robustness and individual stability. The rapid computation and interpretable output during the inference phase further enhance the feasibility of clinical applications, enabling the system to operate stably in real-world multi-center environments. This method provides an efficient, transparent, and scalable technical path at the level of combining algorithm design with medical imaging, laying a practical foundation for pathological category recognition. It has the following beneficial technical effects: Significantly improves cross-center generalization performance. Through factorization coding and style perturbation mechanisms, it effectively eliminates distribution differences caused by different MRI equipment, field strengths, and scanning parameters, enabling the model to maintain stable performance on multi-center data and significantly improving its practical clinical usability.
[0139] Enhanced pathological relevance and interpretability. By leveraging physiological site alignment mechanisms, model features are concentrated in key lesion areas such as the substantia nigra and striatum, avoiding interference from non-pathological information, resulting in more physiologically meaningful and medically credible identification results.
[0140] Enhance model robustness and reliability. By using object-level consistency constraints, the risks of overfitting and data leakage caused by slice-level training are effectively suppressed, ensuring consistent prediction results for the same subject across different slices and improving model robustness.
[0141] Achieve adaptive generalization at the physical level of MRI. By introducing style perturbators with physical properties, the model can simulate imaging changes such as noise, blur, and bias field during training, improving generalization ability from the physical level of the image and making it more consistent with the real medical imaging mechanism.
[0142] It exhibits excellent compatibility and scalability. It can be seamlessly embedded into existing deep learning diagnostic frameworks (such as FCN, Transformer, etc.) without altering the MRI acquisition process, significantly improving the system's robustness and clinical scalability.
[0143] A dual-stream factorized coding structure is employed. By separating content factors and style factors, domain-invariant representations of MRI features are achieved, enabling the model to maintain stable category recognition capabilities under different scanning equipment, field strengths, and center conditions.
[0144] A domain generalization mechanism based on physical perturbations is proposed. An MRI physical property perturbation is introduced into the style branch to simulate noise, blur, bias field, and signal-to-noise ratio changes, thereby enhancing the model's cross-domain generalization ability from the physical level of image generation.
[0145] Physiological site alignment constraint mechanism. Using key brain regions such as the substantia nigra, striatum, and globus pallidus as priors, the consistency of the representation of pathological regions through the feature distribution alignment constraint model makes the diagnostic results more physiologically grounded and interpretable.
[0146] Based on the same inventive concept, such as Figure 6 As shown, this embodiment of the invention also provides a magnetic resonance imaging image processing device, the device comprising: The normalization module 201 is used to perform spatial alignment and size normalization on the original three-dimensional MRI images to obtain normalized MRI images; In this embodiment, as an optional embodiment, the normalization module 201 is specifically used for: A rigid transformation matrix was used to transform the original 3D MRI images to the standard Montreal Neuroscience Institute space to obtain registered images; The intensity of the registered images was normalized using the Z-score standardization method to obtain normalized MRI images.
[0147] In this embodiment, as another optional embodiment, the normalization module 201 is further used for: Brain extraction is performed on the size-normalized images. Brain tissue volume data is obtained by combining a pre-set threshold segmentation with morphological closing operations to serve as the normalized MRI images.
[0148] The segmentation module 202 is used to segment the normalized MRI image and obtain a masked image set containing multiple regions of interest, including: substantia nigra, striatum and globus pallidus; In this embodiment, as an optional embodiment, the segmentation module 202 is specifically used for: The downsampling path of the deep segmentation network based on the U-Net structure obtains high-level features through multi-layer convolution and performs max pooling on the high-level features. The upsampling path of the deep segmentation network based on the U-Net structure restores spatial resolution by using deconvolution and feature concatenation to obtain a mask image set.
[0149] The image reconstruction module 203 is used to perform dual-stream factorization encoding based on the brain tissue data corresponding to the masked image set, obtain content features related to pathology and style features related to the imaging domain, and reconstruct the image based on the content features and style features to obtain the reconstructed image. In this embodiment, as an optional embodiment, the image reconstruction module 203 is specifically used for: A shared feature extraction layer is used to extract low-level texture and spatial structure features from brain tissue data corresponding to the masked image set to obtain a basic representation. The basic representation is dissected and functionally extracted using a content encoder to obtain content features that characterize the anatomical and functional features. In addition, the basic representation is image-based extracted using a style encoder to obtain style features that characterize the imaging features. The anatomical and functional features and the imaging features are statistically independent of each other. Reconstruction is performed based on content and style features to obtain reconstructed images.
[0150] In this embodiment, as another optional embodiment, the image reconstruction module 203 is further used for: Based on a pre-built site discriminator, the underlying representations for dissection and function extraction are discriminated to remove domain information from the acquired content features; and, The content features and style features obtained through discrimination are subject to orthogonal constraints to improve the independence of the acquired content features and style features.
[0151] The encoding module 204 is used to perform dual-stream factorization encoding based on the reconstructed image, and to perform physical perturbation and adversarial alignment on the acquired dual-stream code to obtain perturbation features; In this embodiment, as an optional embodiment, the encoding module 204 is specifically used for: Style samples are obtained by perturbing the style features of dual-stream coding based on a pre-set differentiable style perturbation operator. Based on pre-set style feature stability constraints, adversarial alignment is performed on style samples to ensure that perturbation samples and style features are similar in distribution rather than completely random, thereby obtaining perturbation features.
[0152] The classification acquisition module 205 is used to acquire the classification corresponding to the original three-dimensional MRI image based on the perturbation features and the pre-trained classification model.
[0153] Based on the same inventive concept, embodiments of the present invention also provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the magnetic resonance imaging image processing method in any of the above possible implementations.
[0154] Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0155] Based on the same inventive concept, see [link to inventive concept] Figure 7 This invention also provides an electronic device, including a memory 101 (e.g., non-volatile memory), a processor 102, and a computer program stored on the memory 101 and executable on the processor 102. When the processor 102 executes the program, it implements the steps of the magnetic resonance imaging image processing method in any of the above possible implementations, which can be equivalent to the aforementioned magnetic resonance imaging image processing device. Of course, the processor can also be used to process other data or perform calculations. This electronic device can be a PC, server, terminal, or other similar device.
[0156] like Figure 7 As shown, the electronic device may also include: memory 103, network interface 104, and internal bus 105. In addition to these components, other hardware may also be included, which will not be described in detail here.
[0157] It should be noted that the above-mentioned magnetic resonance imaging image processing device can be implemented by software. As a device in a logical sense, it is formed by the processor 102 of the electronic device in which it is located reading the computer program instructions stored in the non-volatile memory into the memory 103 for execution.
[0158] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.
[0159] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by special-purpose logic circuitry—such as FPGA (Field Programmable Gate Array) or ASIC (Application-Specific Integrated Circuit), and the device can also be implemented as special-purpose logic circuitry.
[0160] Suitable computers for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0161] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0162] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily used to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0163] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0164] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0165] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0166] The above are merely specific embodiments of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A magnetic resonance imaging image processing method, characterized in that, include: The original 3D MRI images were spatially aligned and sized normalized to obtain normalized MRI images; Normalized MRI images are segmented to obtain a set of masked images containing multiple regions of interest, including: substantia nigra, striatum, and globus pallidus. Dual-stream factorization coding is performed on the brain tissue data corresponding to the masked image set to obtain pathology-related content features and imaging domain-related style features. Reconstruction is then performed based on the content features and style features to obtain the reconstructed image. Based on the reconstructed image, dual-stream factorization coding is performed, and the obtained dual-stream codes are physically perturbed and adversarially aligned to obtain perturbation features; Based on the perturbation features and the pre-trained classification model, the classification corresponding to the original three-dimensional MRI image is obtained.
2. The magnetic resonance imaging image processing method according to claim 1, characterized in that, The process of spatial alignment and size normalization of the original 3D MRI images to obtain normalized MRI images includes: A rigid transformation matrix was used to transform the original 3D MRI images to the standard Montreal Neuroscience Institute space to obtain registered images; The intensity of the registered images was normalized using the Z-score standardization method to obtain normalized MRI images.
3. The magnetic resonance imaging image processing method according to claim 1, characterized in that, After spatial alignment and size normalization of the original 3D MRI images and before obtaining the normalized MRI images, the method further includes: Brain extraction is performed on the size-normalized images. Brain tissue volume data is obtained by combining a pre-set threshold segmentation with morphological closing operations to serve as the normalized MRI images.
4. The magnetic resonance imaging image processing method according to claim 1, characterized in that, The segmentation of normalized MRI images to obtain a masked image set containing multiple regions of interest includes: The downsampling path of the deep segmentation network based on the U-Net structure obtains high-level features through multi-layer convolution and performs max pooling on the high-level features. The upsampling path of the deep segmentation network based on the U-Net structure restores spatial resolution by using deconvolution and feature concatenation to obtain a mask image set.
5. The magnetic resonance imaging image processing method according to claim 1, characterized in that, The brain tissue data corresponding to the masked image set is subjected to dual-stream factorization encoding to obtain pathology-related content features and imaging domain-related style features. Reconstruction is then performed based on the content and style features to obtain the reconstructed image, including: A shared feature extraction layer is used to extract low-level texture and spatial structure features from brain tissue data corresponding to the masked image set to obtain a basic representation. The basic representation is dissected and functionally extracted using a content encoder to obtain content features that characterize the anatomical and functional features. In addition, the basic representation is image-based extracted using a style encoder to obtain style features that characterize the imaging features. The anatomical and functional features and the imaging features are statistically independent of each other. Reconstruction is performed based on content and style features to obtain reconstructed images.
6. The magnetic resonance imaging image processing method according to claim 5, characterized in that, The dual-stream factorization coding includes a pre-built site discriminator and feature orthogonality constraints, and the method further includes: Based on a pre-built site discriminator, the underlying representations for dissection and function extraction are discriminated to remove domain information from the acquired content features; and, The content features and style features obtained through discrimination are subject to orthogonal constraints to improve the independence of the acquired content features and style features.
7. The magnetic resonance imaging image processing method according to claim 1, characterized in that, The step of physically perturbing and adversarially aligning the acquired dual-stream codes to obtain perturbation features includes: Style samples are obtained by perturbing the style features of dual-stream coding based on a pre-set differentiable style perturbation operator. Based on pre-set style feature stability constraints, adversarial alignment is performed on style samples to ensure that perturbation samples and style features are similar in distribution rather than completely random, thereby obtaining perturbation features.
8. A magnetic resonance imaging image processing device, characterized in that, The magnetic resonance imaging image processing device includes: The normalization module is used to perform spatial alignment and size normalization on the original 3D MRI images to obtain normalized MRI images; The segmentation module is used to segment normalized MRI images and obtain a masked image set containing multiple regions of interest, including: substantia nigra, striatum, and globus pallidus; The image reconstruction module is used to perform dual-stream factorization encoding on the brain tissue data corresponding to the masked image set, obtain content features related to pathology and style features related to the imaging domain, and reconstruct the image based on the content features and style features. The coding module is used to perform dual-stream factorization coding based on the reconstructed image, and to perform physical perturbation and adversarial alignment on the acquired dual-stream code to obtain perturbation features; The classification acquisition module is used to acquire the classification corresponding to the original three-dimensional MRI image based on the perturbation features and the pre-trained classification model.
9. A storage medium, characterized in that, A program or instruction is stored on a storage medium, and the program or instruction is executed by a processor to implement the steps of the magnetic resonance imaging image processing method as described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the magnetic resonance imaging image processing method according to any one of claims 1 to 7.