Brain function magnetic resonance imaging head motion correction method, device, equipment and medium
By simulating the dynamic allocation mechanism of human brain cognition and combining the characteristics of the visual cortex and prefrontal cortex, a bidirectional optical flow network is used for head movement correction, which solves the problems of high computational complexity and insufficient accuracy in existing technologies and achieves a highly efficient head movement correction effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2026-05-20
- Publication Date
- 2026-07-07
AI Technical Summary
Existing head movement correction methods in functional magnetic resonance imaging suffer from high computational complexity, accuracy dependence on feature extraction, and difficulty in meeting the needs of real-time or large-scale applications.
A bidirectional optical flow network employing a spatial information allocation mechanism similar to the topological features of the visual cortex, a temporal information coherence mechanism similar to the working memory characteristics of the prefrontal cortex, and a joint spatiotemporal attention mechanism, combined with self-supervised fine-tuning, performs head movement correction by simulating the dynamic allocation mechanism of human brain cognition.
It improves the accuracy and stability of head movement correction, effectively handles complex nonlinear deformations caused by large head movements, and achieves efficient spatial alignment.
Smart Images

Figure CN122347720A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and medium for head motion correction in functional magnetic resonance imaging of the brain. Background Technology
[0002] Functional magnetic resonance imaging (fMRI) infers brain functional activity by measuring blood oxygenation level-dependent signals, providing high-quality visualization of brain region activity induced by sensory stimuli or cognitive functions. However, fMRI time-series acquisition is susceptible to head movements, leading to voxel spatial displacements from the actual anatomical structures, affecting the accuracy and reliability of subsequent resting-state functional connectivity analysis. Therefore, spatial alignment of all time-point images in the fMRI sequence is an indispensable step in data preprocessing. Its core objective is to align each acquired image in the entire time series to a common reference space through registration transformation, thereby reducing spatial misalignment caused by head movements.
[0003] Traditional non-learning image registration methods mostly employ feature-based strategies. Scale-invariant feature transformation (SIN) is one of the early and widely used keypoint detection and description algorithms. It typically requires the extraction of a large number of feature points, resulting in high computational complexity and limiting its application in large-scale 3D medical images. Histogram attribute vector methods based on grayscale and local spatial information reduce the dependence on precise segmentation. However, these methods are highly sensitive to the accuracy of feature extraction. Errors in feature detection or matching often lead to significant registration failures.
[0004] Existing technologies further combine convolutional neural networks as feature extractors with traditional iterative optimization processes. For example, stacked convolutional autoencoders are used to automatically learn feature representations from 3D brain MRI image pairs and achieve registration by minimizing the normalized cross-correlation between two sets of features; CNNs are used to learn registration errors, and the network output is used as a similarity index in traditional registration algorithms to guide subsequent optimization processes. Although the above methods have made progress in registration accuracy, they still rely on iterative optimization processes and are difficult to meet the needs of real-time or large-scale applications. Summary of the Invention
[0005] In order to at least solve one of the technical problems existing in the prior art, the present invention provides a method, device, equipment and medium for head movement correction in functional magnetic resonance imaging of the brain.
[0006] One aspect of the present invention provides a method for head movement correction in functional magnetic resonance imaging of the brain, comprising: A functional magnetic resonance imaging (fMRI) image of the brain is acquired, and the image is processed using a head movement correction model to obtain a head movement correction result. The head motion correction model is obtained through the following steps: The original image data is acquired, and the target deformation image is generated by applying a smooth deformation field to the slices of the original image data. Then, sampling and temporal enhancement processing are performed to obtain training samples. The training samples are used as feature maps, and a spatial information allocation mechanism similar to visual cortex topological features is used to constrain the feature maps by orientation preferences to obtain spatially allocated feature maps, wherein the orientation preference constraints include horizontal and vertical directions. Local spatiotemporal features are extracted from the feature map. Based on the extraction results, a temporal information coherence mechanism similar to prefrontal cortex working memory is used to simulate the retrieval and binding of working memory. The obtained attention output is then subjected to temporal evidence aggregation and dimensionality reduction to obtain a temporally coherent feature map. The spatial allocation feature map and the temporal coherence feature map are pre-trained using a bidirectional optical flow network with a joint spatiotemporal attention mechanism to obtain a pre-trained network; For each iteration of the pre-trained network, a weight adaptive allocation mechanism based on the selection characteristics of backside attention networks is used. The pre-trained network is self-supervised and fine-tuned based on real data to obtain the head motion correction model.
[0007] According to the described brain functional magnetic resonance imaging head movement correction method, the original image data is acquired, and a target deformation image is generated by applying a smooth deformation field to slices of the original image data. Then, sampling and temporal enhancement processing are performed to obtain training samples, including: Slices at specific time points are extracted from the image sequence of the original image data as a base template. For basic templates Perform Z-score standardization, and, in the base template Add Gaussian white noise to construct a template-centered time window sequence. :
[0008] in, This serves as the time window sequence number identifier. The time window length, For noise intensity parameters, Indicates in Gaussian white noise added within each time window; Two independent Gaussian random noise fields are generated by smoothing the deformation field. The Gaussian random noise fields are then smoothed and normalized to obtain the smoothed displacement field. ,in:
[0009]
[0010] in, This is a random noise matrix with the same size as the image in the original image data. The standard deviation is expressed as Gaussian smoothing kernel, The maximum displacement parameter that controls the deformation amplitude is, where This indicates taking the maximum absolute value of the convolution result, used for normalization processing. This is a convolution operation; Bilinear interpolation is used and the foundation template is based on a smooth displacement field. Resampling is performed to obtain the target deformation image. ,in:
[0011] in, Indicates coordinates The pixel value at that location is obtained through the base template. At the offset coordinate point The coordinate mapping obtained by sampling at a location uses inverse mapping combined with first-order interpolation; Deform the target image Basic Templates Smooth displacement field and time window sequence The training samples are encapsulated to obtain training samples, which are quadruplets. The smooth displacement field As a real label.
[0012] According to the described brain functional magnetic resonance imaging head movement correction method, the training samples are used as feature maps, and a visual cortical topological feature spatial information allocation mechanism is employed to constrain the orientation preference of the feature maps, resulting in a spatially allocated feature map, including: The feature maps are mapped to horizontal and vertical decoupled subspaces, and then projected into query vectors through convolutional layers. Key vector and value vector And, dividing the feature map into Each head has a dimension of [number]. , is represented as:
[0013] in, To query vectors, key vectors, and value vectors, Denotes the dimension, where For height dimension, Width dimension; Represents the feature map; express Convolution processing; Under the premise of fixed index, the correlation degree of different indices in the observed axis is calculated in the feature map. The observed axis includes height dimension and width dimension. When the observed axis is the width dimension, the fixed index is the fixed height index; when the observed axis is the height dimension, the fixed index is the fixed width index. Based on the correlation, Softmax is used to assign perceptual weights to the observed axis. Based on the assigned perceptual weights, features of different indices are aggregated to obtain aggregated features. The aggregated features are aggregated through the output mapping layer and the original spatial dimensions are restored to obtain the spatially allocated feature map.
[0014] According to the described brain functional magnetic resonance imaging head movement correction method, local spatiotemporal features are extracted from the feature map. Based on the extraction results, a temporal information coherence mechanism similar to that of prefrontal cortex working memory is used to simulate the retrieval and binding of working memory. The obtained attention output is then subjected to temporal evidence aggregation and dimensionality reduction to obtain a temporally coherent feature map, including: The input feature map is expanded into a five-dimensional tensor and processed using a three-dimensional convolutional kernel to obtain:
[0015] in, Given the input sequence, This represents 3D convolution processing. To extract the results, It is a non-linear activation function. Indicates oscillation; Extraction results spatial location As independent time series, a multi-head attention mechanism is used to calculate the correlation of the independent time series, and the extracted results are... Remodeling For the extraction results query vector of a sequence within a sequence Key vector and value vector Mapped to the temporal subspace through a linear transformation:
[0016] Based on the temporal subspace, the working memory retrieval and binding process is simulated using scaled dot product attention as follows:
[0017] in For feature dimension, Indicates attention output; By In the time dimension The temporal evidence is aggregated by taking the average from the top, generating a static feature map with temporal context information. for:
[0018] in, This indicates space-adaptive pooling.
[0019] According to the described brain functional magnetic resonance imaging head movement correction method, the spatial allocation feature map and static feature map are pre-trained using a bidirectional optical flow network with a joint spatiotemporal attention mechanism to obtain a pre-trained network, including: The source image is extracted using a spatially assigned feature map as a spatial encoder through a spatial branch of a bidirectional optical flow network. With target image Spatial geometric features By using the temporal branch of a bidirectional optical flow network, static feature maps are used as a temporal encoder to simulate the time-series features of working memory. ; By using the bottleneck layer of U-Net, the output features of the spatial and temporal branches are concatenated through channels, and convolution is used to achieve cross-modal information interaction and dimensionality reduction to obtain fused features. :
[0020] in, For channel cascading; The decoder, through the bidirectional optical flow network, is based on Simultaneously predict the forward optical flow. With backward optical flow ; By using the optical flow superposition operator, the short-range optical flow at adjacent time points is combined. and Synthesized into long-range trajectories :
[0021] A multi-constraint joint optimization approach is adopted, utilizing the deformation ground truth provided by the synthetic dataset and unsupervised geometric constraints to jointly guide the network convergence. The final objective function of the multi-constraint joint optimization is:
[0022] in, These are weight parameters; To monitor the deformation field loss, the true deformation value generated from synthetic data is used. To supervise; For spatial smoothing loss; This is a loss due to bidirectional consistency. This represents a loss due to timing consistency issues.
[0023] According to the described brain functional magnetic resonance imaging head movement correction method, the pre-trained network is processed in each iteration using a dorsal attention network-like selection characteristic weight adaptive allocation mechanism, including: For each iteration of the pre-trained network, the mean absolute intensity difference between adjacent frames of the sample is used as a measure of head movement significance. :
[0024] in, The height of the sample image, The width of the sample image. Image pixel coordinates, For the first Image pixel coordinates of a basic template For the first Image pixel coordinates of the target deformed image; Based on the measure of head movement significance Perform mean normalization to obtain adaptive weighting factors. :
[0025] in, For batch size, Used to guide the model to focus on the correction task during backpropagation.
[0026] According to the described brain functional magnetic resonance imaging head movement correction method, the pre-trained network is self-supervised fine-tuned based on real data to obtain the head movement correction model, including: The difference between the target deformed image and the base template is calculated using a weighted photometric loss, where the weighted photometric loss... for:
[0027] in, For batch size, This indicates that the target image is spatially resampled using the predicted forward optical flow; The self-supervised fine-tuning is constrained by the total loss function, where the total loss function is... for:
[0028] in, For weighted photometric loss, To provide a smooth constraint for the optical flow field, This is performed for bidirectional consistency constraints. As the constraint weight for smoothing the optical flow field, The weights are for bidirectional consistency constraints.
[0029] Another aspect of the present invention provides a head movement correction device for functional magnetic resonance imaging of the brain, comprising: The first module is used to acquire functional magnetic resonance imaging (fMRI) images of the brain, and to process the fMRI images of the brain using a head movement correction model to obtain head movement correction results. The head movement correction model is obtained through the following modules: The second module is used to acquire the original image data, generate the target deformation image by applying a smooth deformation field to the slices of the original image data, and then perform sampling and temporal enhancement processing to obtain training samples. The third module is used to use the training samples as feature maps and employ a visual cortex-like topological feature spatial information allocation mechanism to constrain the feature maps with orientation preferences to obtain spatially allocated feature maps, wherein the orientation preference constraints include horizontal and vertical directions. The fourth module is used to extract local spatiotemporal features from the feature map. Based on the extraction results, a temporal information coherence mechanism similar to prefrontal cortex working memory is used to simulate the retrieval and binding of working memory. The obtained attention output is then aggregated with temporal evidence and dimensionality reduced to obtain a temporally coherent feature map. The fifth module is used to pre-train a bidirectional optical flow network that uses a joint spatiotemporal attention mechanism to combine spatially assigned feature maps and temporally coherent feature maps, resulting in a pre-trained network. The sixth module is used to process the pre-trained network in each iteration using a weight adaptive allocation mechanism based on the selection characteristics of back-side attention networks; The seventh module is used to perform self-supervised fine-tuning of the pre-trained network based on real data to obtain the head motion correction model.
[0030] Another aspect of the present invention provides an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described above.
[0031] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the methods described above.
[0032] The beneficial effects of this invention are as follows: By simulating the orientation selectivity of the visual cortex, spatial feature extraction that can be topologically encoded according to the "row and column direction" overcomes the shortcomings of existing convolutional neural networks in terms of low spatial search efficiency when dealing with complex nonlinear deformations; addressing the problem of existing methods processing single-frame signals in isolation and lacking dynamic trend prediction, this invention simulates the working memory mechanism of the prefrontal cortex to achieve temporal and spatial binding of the most recent frame image information, thereby improving the tracking stability of continuous motion trajectories; by simulating the selective attention system of the human brain, this invention resolves the contradiction between insufficient head movement correction caused by equal weight allocation in deep network training and overfitting of small noise, thereby achieving adaptive and precise focusing on large head movement samples. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the brain functional magnetic resonance imaging head movement correction process according to an embodiment of the present invention.
[0034] Figure 2 This is a flowchart of the two-stage training process according to an embodiment of the present invention.
[0035] Figure 3 This is a diagram illustrating the spatial information allocation mechanism of the visual cortex topology features according to an embodiment of the present invention.
[0036] Figure 4 This is a diagram illustrating the temporal information coherence mechanism of prefrontal cortex working memory characteristics according to an embodiment of the present invention.
[0037] Figure 5 This is a structural diagram of the bidirectional optical flow network model according to an embodiment of the present invention.
[0038] Figure 6 This is a diagram of the adaptive allocation mechanism for the selection feature weights of the backside attention network in an embodiment of the present invention.
[0039] Figure 7 This is a result diagram of a frame header motion image correction test according to an embodiment of the present invention.
[0040] Figure 8 These are the difference curves between the initial head-moving image and the reference image for all frames in this embodiment of the invention, and the difference curves between the corrected image and the reference image.
[0041] Figure 9 This is an image alignment effect diagram before and after time-dimensional observation correction according to an embodiment of the present invention.
[0042] Figure 10 This is a schematic diagram of a brain functional magnetic resonance imaging head movement correction device according to an embodiment of the present invention. Detailed Implementation
[0043] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In the following description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0044] refer to Figure 1 , Figure 1 This is a schematic diagram of the brain functional magnetic resonance imaging head movement correction process according to an embodiment of the present invention, which includes, but is not limited to, steps S100~S700: S100: Acquire functional magnetic resonance imaging (fMRI) images of the brain, process the images using a head movement correction model, and obtain head movement correction results.
[0045] The head motion correction model is obtained through the following steps: S200: Acquire the original image data, generate the target deformation image by applying a smooth deformation field to the slices of the original image data, and then perform sampling and temporal enhancement processing to obtain training samples.
[0046] In some embodiments, to address the difficulty in obtaining the true deformation field in head motion correction tasks, this invention employs a synthetic data generation scheme based on a smooth displacement field. This scheme simulates head motion interference during scanning by subjecting real brain slices to nonlinear deformation and constructs training samples containing spatiotemporal context information.
[0047] For example, refer to Figure 2 The two-stage training flowchart shown is as follows: the first stage, steps S200 to S500, represents the feature extraction of synthetic data and network training, while steps S600 to S700 represent the fine-tuning of the model based on real data.
[0048] This invention extracts slices at specific time points from the image sequence of the original image data as a base template. For basic templates Perform Z-score standardization, and, in the base template Add Gaussian white noise to construct a template-centered time window sequence. :
[0049] in, This serves as the time window sequence number identifier. The time window length, For noise intensity parameters, Indicates in Gaussian white noise added within each time window; Two independent Gaussian random noise fields are generated by smoothing the deformation field. The Gaussian random noise fields are then smoothed and normalized to obtain the smoothed displacement field. ,in:
[0050]
[0051] in, This is a random noise matrix with the same size as the image in the original image data. The standard deviation is expressed as Gaussian smoothing kernel, The maximum displacement parameter that controls the deformation amplitude is, where This indicates taking the maximum absolute value of the convolution result, used for normalization processing. This is a convolution operation; Bilinear interpolation is used and the foundation template is based on a smooth displacement field. Resampling is performed to obtain the target deformation image. ,in:
[0052] in, Indicates coordinates The pixel value at that location is obtained through the base template. At the offset coordinate point The coordinate mapping obtained by sampling at a location uses inverse mapping combined with first-order interpolation; Deform the target image Basic Templates Smooth displacement field and time window sequence The training samples are encapsulated to obtain training samples, which are quadruplets. The smooth displacement field As a real label.
[0053] It can be determined that, in this embodiment of the invention, slices at specific time points are extracted from the original image sequence as the base template. Z-score normalization was performed to eliminate the impact of brightness differences on model training.
[0054] S300 uses training samples as feature maps and employs a visual cortex-like topological feature spatial information allocation mechanism to constrain the feature maps by orientation preference, resulting in a spatially allocated feature map. The orientation preference constraint includes both horizontal and vertical directions.
[0055] In some embodiments, reference Figure 3 The diagram showing the spatial information allocation mechanism of the visual cortex topology features illustrates the process of this embodiment of the invention, which includes: The feature maps are mapped to horizontal and vertical decoupled subspaces, and then projected into query vectors through convolutional layers. Key vector and value vector And, dividing the feature map into Each head has a dimension of [number]. , is represented as:
[0056] in, To query vectors, key vectors, and value vectors, Denotes the dimension, where For height dimension, Width dimension; Represents the feature map; express Convolution processing; Under the premise of fixed index, the correlation degree of different indices in the observed axis is calculated in the feature map. The observed axis includes height dimension and width dimension. When the observed axis is the width dimension, the fixed index is the fixed height index; when the observed axis is the height dimension, the fixed index is the fixed width index. Based on the correlation, Softmax is used to assign perceptual weights to the observed axis. Based on the assigned perceptual weights, features of different indices are aggregated to obtain aggregated features. The aggregated features are aggregated through the output mapping layer and the original spatial dimensions are restored to obtain the spatially allocated feature map.
[0057] For example, attention along the line direction (along the width) Taking dimensions as an example, its core lies in indexing at a fixed height. Under the premise of calculating the width index and The degree of correlation between them.
[0058]
[0059] Perceptual weights are assigned on the observed axis using the Softmax function:
[0060] Feature output after aggregation In position The location is represented as:
[0061] Finally, the multi-head information is aggregated through the output mapping layer to restore the original spatial dimensions:
[0062] For column-oriented attention, the above operations are performed along the height dimension. Transpose and execute.
[0063] Since image shifts and distortions caused by head movements often have complex topological structures, traditional convolutional or global attention mechanisms often suffer from computational redundancy or local convergence obstacles due to the lack of spatial orientation priors. The visual cortex-like topological feature spatial information allocation mechanism proposed in this invention introduces this brain-like orientation preference constraint, achieving not only high efficiency in long-distance dependent capture but also enhancing the robustness of the optical flow field under topological transformations. This allows for motion vector estimations that better conform to anatomical features when handling head movement correction tasks.
[0064] S400 performs local spatiotemporal feature extraction on the feature map. Based on the extraction results, it uses a temporal information coherence mechanism similar to prefrontal cortex working memory to simulate the retrieval and binding of working memory. The obtained attention output is then subjected to temporal evidence aggregation and dimensionality reduction to obtain a temporally coherent feature map.
[0065] Neuroscience research shows that when the human brain perceives continuous motion, it does not process instantaneous signals in isolation, but rather through the prefrontal cortex... Oscillations encode multiple frames of visual information into a specific temporal subspace, forming a motion trajectory representation with temporal coherence.
[0066] Inspired by this, the embodiments of this invention abandon the traditional simple frame sequence stacking and instead design a temporal attention-based sequential information coherence module that mimics the working memory characteristics of the prefrontal cortex. This module simulates the temporal binding process in neuroscience: it simulates working memory by maintaining a dynamic feature cache pool and uses an attention mechanism to calculate the association weights between the current moment and historical moments in the temporal subspace. This design enables the network to extract robust motion trends from long-range temporal context, effectively suppress artifact noise in frames, and improve the stability of dynamic head tracking and the accuracy of optical flow estimation.
[0067] In some embodiments, reference Figure 4 The diagram shown illustrates the temporal information coherence mechanism of prefrontal cortex working memory characteristics. An embodiment of the present invention includes the following process: Local spatiotemporal feature extraction: Input sequence First, it is expanded into a five-dimensional tensor and then preliminarily processed using a three-dimensional convolutional kernel. The three-dimensional convolution can capture local morphological changes between adjacent frames, simulating the primary visual cortex's initial perception of instantaneous motion. It is a non-linear activation function.
[0068]
[0069] Temporal subspace binding: This is a core step in simulating working memory. This embodiment of the invention binds each spatial location of the feature map... It is treated as an independent time series. A multi-head attention mechanism is used to calculate the correlation between different time points within the series. This step simulates... Oscillations project neural activity at different times into an orthogonal subspace, enabling long-range time-dependent modeling. To perform temporal modeling independently at spatial locations, embodiments of this invention will... Remodeling For queries in the sequence (Query), Key (Key) and value (Value), mapped to the time-series subspace through a linear transformation: The scaling dot product attention method is used to simulate the retrieval and binding process of working memory.
[0070] in For feature dimensions. This operation ensures that the features of the current frame are based on the entire time window. The system reconstructs the historical information within the sequence in a weighted manner, simulating the attentional focus of working memory. It automatically ignores single frames with sudden artifacts or noise in the sequence and instead relies on logically coherent motion trajectories.
[0071] Temporal evidence aggregation and dimensionality reduction: After acquiring features with temporal coherence, mean aggregation is performed along the time axis to integrate cached multi-frame information into a single feature representation. Then, adaptive spatial pooling is used to scale the feature map to a fixed size to construct a compact motion representation vector. Attention output is then applied... In the time dimension The average is taken to aggregate temporal evidence and generate a temporally coherent feature map with temporal context information. :
[0072] By simulating the evidence accumulation process, the registration field output by the network is no longer affected by transient noise.
[0073] S500 pre-trains a bidirectional optical flow network using a joint spatiotemporal attention mechanism to pre-train spatial assignment feature maps and temporal coherence feature maps.
[0074] In some embodiments, reference Figure 5 The diagram shows the structure of the bidirectional optical flow network model. In this embodiment of the invention, the backbone network uses a bidirectional optical flow model, which integrates the aforementioned temporal and spatial attention mechanisms to capture multi-scale and multi-dimensional features for encoding and decoding. This network can not only accurately perceive spatial displacement between single frames, but also learn the continuous evolution of head movements in physical space through multi-step temporal consistency constraints during the pre-training stage.
[0075] (1) Dual-branch feature encoding: spatial branch, using the spatial encoder in step two to extract the source image. With target image Spatial geometric features The time branch utilizes the time encoder from step three to extract time-series features from the simulated working memory. .
[0076] (2) Spatiotemporal feature fusion: In the bottleneck layer of U-Net, spatial and temporal features are channel-concatenated, and cross-modal information interaction and dimensionality reduction are achieved through convolution.
[0077]
[0078] in This represents a channel cascade. This design ensures that the bottleneck layer features contain both precise spatial location information and motion trend information from the working memory cache.
[0079] (3) Bidirectional optical flow regression: The decoder is based on the fusion features Simultaneously predict the forward optical flow. With backward optical flow .
[0080] (4) Temporal optical flow synthesis: To simulate the continuous scanning process, the network further processes the image pairs at the next time step. The short-range optical flow at adjacent time steps is synthesized using the optical flow superposition operator. and Synthesized into long-range trajectories This constrains the physical consistency of motion.
[0081]
[0082] In some embodiments, training optimization employs multi-constraint joint optimization, which utilizes deformation ground truth provided by synthetic datasets and unsupervised geometric constraints to guide network convergence.
[0083] (1) Supervised deformation field loss: using the true deformation value generated from synthetic data To conduct oversight.
[0084]
[0085] (2) Spatial smoothing loss:
[0086] (3) Bidirectional consistency loss: Based on the principle of cyclic consistency, the forward and backward optical flows should be inverse transformations of each other.
[0087]
[0088] (4) Temporal consistency loss: Define superimposed optical flow Compared with linear predicted optical flow The deviation between them.
[0089]
[0090] Final objective function:
[0091] in These are weighting parameters used to balance various constraints.
[0092] S600 uses a back-side attention network-like selection characteristic weight adaptive allocation mechanism to process the pre-trained network in each iteration.
[0093] It is understandable that the dorsal attention network is a persistent bilateral brain network used to focus human attention and maintain its stability. The human brain is constantly receiving sensory input signals and cannot give equal attention to every signal at every moment. Therefore, the dorsal attention network will focus the brain's attention on the most important sensory input signals at a specific moment and dynamically allocate cognitive resources according to the salience of the stimulus
[15] . Specifically, salient stimuli (such as sudden large head displacement) will activate the brain's salience network, inducing stronger neural representations and resource tilting; while weak background stimuli (such as physiological pulsations) will be filtered or have their processing priority reduced.
[0094] Traditional head movement correction methods typically employ an equal-weight strategy to process all samples. This often leads to insufficient correction capability when faced with large-amplitude head movements (i.e., the core correction task) due to the trivialization of resource allocation. Inspired by this, this invention proposes an adaptive weight allocation mechanism for dorsal attention network characteristics. During the fine-tuning stage with real data, the model does not blindly fit all inputs but simulates the cognitive resource selection characteristics of the human brain's dorsal attention network. By calculating the physical salience of head movements, samples with large-amplitude head movements are assigned higher loss weights. This strategy guides the model, like the human brain, to prioritize the reconstruction of complex motion scenarios, thereby significantly improving the accuracy of correction for large-amplitude, nonlinear head movements while ensuring global stability.
[0095] In some embodiments, reference Figure 6 The diagram shows the adaptive weight allocation mechanism for back-side attention network selection features. In this embodiment, the average absolute intensity difference between adjacent frames is used as a metric for head movement salience. For the first frame in the batch... Each sample, their original motion differences Defined as:
[0096] To achieve dynamic allocation of cognitive resources, embodiments of the present invention calculate adaptive weighting factors. This factor is obtained by normalizing the mean of the motion differences within the current batch:
[0097] in The formula represents the batch size. This formula ensures that in a single iteration, samples with head movement amplitudes greater than the batch average (i.e., "significant stimuli") will receive a loss weight greater than 1, thereby generating stronger gradient signals during backpropagation and guiding the model to focus on more challenging correction tasks.
[0098] S700 performs self-supervised fine-tuning of the pre-trained network based on real data to obtain the head motion correction model.
[0099] In some embodiments, since synthetic data cannot always accurately reflect real head motion data, embodiments of the present invention use real head motion data to fine-tune the pre-trained model to improve the accuracy of model predictions. Because real data lacks ground truth displacement field values, embodiments of the present invention employ a self-supervised photometric continuity loss to directly calculate the difference between the predicted and corrected image and the source image. Combined with the aforementioned saliency weights, the weighted photometric loss... Expressed as:
[0100] in This indicates that the target image is spatially resampled using the predicted forward optical flow.
[0101] The total loss function in the fine-tuning stage integrates weighted photometric loss, optical flow field smoothing constraint, and bidirectional consistency constraint, aiming to balance correction accuracy and physical realism.
[0102]
[0103] Following the above steps, for head motion data requiring correction, the network is first pre-trained using synthetic data, then its image features are captured through a spatiotemporal attention fusion mechanism, and finally, a multi-constraint joint optimization model is used to guide network convergence. After pre-training, the network is adaptively fine-tuned with real data to achieve accurate and efficient prediction of head motion optical flow fields.
[0104] refer to Figure 7 , Figure 7 To illustrate the results of a head-motion image correction test for a specific frame: the first column is a fixed reference image; the second column is the head-motion image and its difference from the reference image; the third column is the image corrected using the SynthMorph model, its difference from the reference image, and the predicted optical flow field; the fourth column is the image corrected using the TransMorph model, its difference from the reference image, and the predicted optical flow field; the fifth column is the image corrected using the method of this embodiment, its difference from the reference image, and the predicted optical flow field.
[0105] In contrast, the image corrected by the method proposed in this embodiment is closer to the reference image, and the predicted optical flow vector direction is more consistent with the real physical motion logic. It can accurately lock the deformed region while maintaining extremely high stability in the static region, demonstrating its superior performance in spatial alignment tasks. When the image exhibits local nonlinearity and large-amplitude spatial distortion, the comparison method, due to its lack of accurate perception of the deformation location, causes its optical flow field to produce large-scale invalid fluctuations. This not only fails to repair the core distortion region but also disturbs the originally stable region, resulting in erroneous large-amplitude deformation. However, the method in this embodiment demonstrates a very strong ability to characterize non-uniform deformation: its generated optical flow field can produce high-density energy accumulation and precise vector direction at the most drastically deformed local locations, achieving "point-to-point" reverse compensation for large-amplitude distortion. This keen capture of local extreme flow fields not only accurately identifies the physical boundary of the deformation but also restores the distorted spatial geometry through fine mesh adjustment. Experimental results show that even in high-dynamic deformation scenarios where conventional algorithms fail, this method can still achieve robust and high-quality image restoration thanks to the high-fidelity characteristics of its optical flow field.
[0106] Figure 8 and Figure 9The effects of using this method to correct head motion timing data before and after the test are demonstrated. Figure 8 The difference curves between the initial head-motion image and the reference image for all frames are shown, as well as the difference curves between the corrected image and the reference image. It can be seen that good correction results were achieved for each frame in the head-motion sequence. Figure 9 This observes the image alignment effect before and after correction from a time perspective, which more intuitively demonstrates the effectiveness of the method.
[0107] To verify the correction effect of the method in the embodiments of the present invention, the model results were quantitatively evaluated from three aspects: pixel-level difference, correction accuracy, and optical flow amplitude, as shown in Table 1.
[0108] Table 1. Comparison of indices before and after correction of head motion images using various methods.
[0109] It can be determined that pixel-level difference metrics primarily measure the similarity between the corrected image and the reference image in grayscale space. Among them, mean square error (MSE) and mean absolute error (MAE) reflect the average degree of difference between pixels; the smaller the value, the lower the error. Peak signal-to-noise ratio (PSNR) evaluates the image reconstruction quality by the ratio of grayscale peak value to noise; the larger the value, the higher the fidelity of the corrected image. Experimental results show that the method of this embodiment achieves optimal pixel-level alignment in image testing, demonstrating its significant advantages in suppressing displacement noise and restoring the original image features.
[0110] The accuracy metrics evaluate the registration precision from the perspectives of structure and spatial overlap. Normalized cross-correlation (NCC) measures the linear correlation between two images; structural similarity (SSIM) measures the ability to preserve brightness, contrast, and structure; and the DICE coefficient reflects the percentage of spatial overlap between regions of interest. The closer these metrics are to 1, the more perfectly the corrected image is aligned with the reference image in terms of anatomical structure. Experimental results show that the method of this invention exhibits a significant lead in accuracy, especially in the SSIM metric, which reflects structural consistency, outperforming the comparative methods, demonstrating its strong spatial alignment robustness when dealing with complex spatial distortions.
[0111] Optical flow amplitude reflects the dynamic characteristics of the predicted displacement field (optical flow). The optical flow mean (Flow_Mag_Mean) represents the average deformation intensity, while the optical flow standard deviation (Flow_Mag_Std) reflects the severity of displacement changes. An ideal optical flow field should maintain a low and reasonable amplitude while ensuring high alignment accuracy, avoiding invalid global fluctuations. For images with large local deformations, the optical flow mean of the comparative methods surges (all exceeding 1.0), indicating that their inability to accurately locate the deformation position leads to erroneous responses of the optical flow vector across the entire image, causing severe global interference. In contrast, the optical flow mean of our method is significantly lower, quantitatively demonstrating its strong spatial selectivity. It can accurately lock onto and generate effective displacement compensation only in the deformation region, achieving the highest accuracy alignment with a "more accurate and lighter" optical flow response, effectively avoiding the global interference phenomenon common in the comparative methods.
[0112] The experimental results consistently demonstrate that the proposed method achieves optimal performance across all quantitative indicators, exhibiting superior and stable correction performance. Its core advantage lies in the fact that the spatiotemporal attention mechanism inspired by neuroscience enables more efficient spatial correction through more precise optical flow field localization. Furthermore, the adaptive weight fine-tuning strategy, which simulates the dynamic allocation mechanism of human cognitive processes, gives the model extremely high anti-interference capability in scenarios with large local deformations.
[0113] Figure 10 This is a schematic diagram of a brain functional magnetic resonance imaging head movement correction device according to an embodiment of the present invention. The device includes a first module 1010, a second module 1020, a third module 1030, a fourth module 1040, a fifth module 1050, a sixth module 1060, and a seventh module 1070.
[0114] The system comprises four modules: The first module acquires functional magnetic resonance imaging (fMRI) images of the brain and processes these images using a head movement correction model to obtain the head movement correction result. The head movement correction model is derived through the following modules: The second module acquires raw image data, applies a smooth deformation field to slices of the raw image data to generate target deformation images, and then performs sampling and temporal enhancement processing to obtain training samples; the third module uses the training samples as feature maps and employs a visual cortical topological feature spatial information allocation mechanism to constrain the feature maps with orientation preferences, resulting in spatially allocated feature maps, where orientation preference constraints include both horizontal and vertical directions; the fourth module is used for feature... The graph is used to extract local spatiotemporal features. Based on the extraction results, a temporal information coherence mechanism similar to that of prefrontal cortex working memory is used to simulate the retrieval and binding of working memory. The obtained attention output is then subjected to temporal evidence aggregation and dimensionality reduction to obtain a temporally coherent feature map. The fifth module is used to pre-train the spatial allocation feature map and the temporally coherent feature map using a bidirectional optical flow network with a joint spatiotemporal attention mechanism to obtain a pre-trained network. The sixth module is used to process the pre-trained network in each iteration using a weight adaptive allocation mechanism with selection characteristics similar to a dorsal side attention network. The seventh module is used to perform self-supervised fine-tuning of the pre-trained network based on real data to obtain a head movement correction model.
[0115] Exemplarily, with the cooperation of the first, second, third, fourth, fifth, sixth, and seventh modules in the device, the embodiment device can implement any of the aforementioned brain functional magnetic resonance imaging head movement correction methods, namely, acquiring brain functional magnetic resonance images, processing the brain functional magnetic resonance images through a head movement correction model, and obtaining head movement correction results; the head movement correction model is obtained through the following steps: acquiring original image data, generating target deformation images by applying a smooth deformation field to slices of the original image data, and then performing sampling and temporal enhancement processing to obtain training samples; using the training samples as feature maps, and applying a visual cortical topological feature space information allocation mechanism to constrain the orientation preferences of the feature maps. The spatial allocation feature map is obtained, where orientation preference constraints include horizontal and vertical directions. Local spatiotemporal features are extracted from the feature map. Based on the extraction results, a temporal information coherence mechanism similar to prefrontal cortex working memory is used to simulate working memory retrieval and binding. The obtained attention output is then subjected to temporal evidence aggregation and dimensionality reduction to obtain a temporally coherent feature map. The spatial allocation feature map and the temporally coherent feature map are pre-trained using a bidirectional optical flow network with a joint spatiotemporal attention mechanism to obtain a pre-trained network. In each iteration, the pre-trained network is processed using a selection characteristic weight adaptive allocation mechanism similar to a dorsal attention network. The pre-trained network is then self-supervised fine-tuned based on real data to obtain a head movement correction model. The beneficial effects of this invention are as follows: By simulating the orientation selectivity of the visual cortex, spatial feature extraction that can be topologically encoded according to the "row and column direction" overcomes the shortcomings of existing convolutional neural networks in terms of low spatial search efficiency when dealing with complex nonlinear deformations; addressing the problem of existing methods processing single-frame signals in isolation and lacking dynamic trend prediction, this invention simulates the working memory mechanism of the prefrontal cortex to achieve temporal and spatial binding of the most recent frame image information, thereby improving the tracking stability of continuous motion trajectories; by simulating the selective attention system of the human brain, this invention resolves the contradiction between insufficient head movement correction caused by equal weight allocation in deep network training and overfitting of small noise, thereby achieving adaptive and precise focusing on large head movement samples.
[0116] This invention also provides an electronic device, which includes a processor and a memory; The memory stores the program; The processor executes a program to perform the aforementioned brain functional magnetic resonance imaging head movement correction method; the electronic device has the function of carrying and running the brain functional magnetic resonance imaging head movement correction software system provided in the embodiments of the present invention, such as a personal computer, minicomputer, mainframe, workstation, network or distributed computing environment, standalone or integrated computer platform, or communicating with charged particle tools or other imaging devices, etc.
[0117] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the brain functional magnetic resonance imaging head movement correction method as described above.
[0118] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented in the embodiments of this invention. Alternative embodiments are contemplated, in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0119] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned brain functional magnetic resonance imaging head movement correction method.
[0120] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, considering the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed in the embodiments of the invention, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0121] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can include, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0123] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0124] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0125] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0126] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0127] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method for head movement correction in functional magnetic resonance imaging of the brain, characterized in that, include: A functional magnetic resonance imaging (fMRI) image of the brain is acquired, and the image is processed using a head movement correction model to obtain a head movement correction result. The head movement correction model is obtained through the following steps: The original image data is acquired, and the target deformation image is generated by applying a smooth deformation field to the slices of the original image data. Then, sampling and temporal enhancement processing are performed to obtain training samples. The training samples are used as feature maps, and a visual cortex-like topological feature spatial information allocation mechanism is used to constrain the feature maps by orientation preferences to obtain spatially allocated feature maps, wherein the orientation preference constraints include horizontal and vertical directions. Local spatiotemporal features are extracted from the feature map. Based on the extraction results, a temporal information coherence mechanism similar to prefrontal cortex working memory is used to simulate the retrieval and binding of working memory. The obtained attention output is then subjected to temporal evidence aggregation and dimensionality reduction to obtain a temporally coherent feature map. The spatial allocation feature map and the temporal coherence feature map are pre-trained using a bidirectional optical flow network with a joint spatiotemporal attention mechanism to obtain a pre-trained network. For each iteration of the pre-trained network, a weight adaptive allocation mechanism based on the selection characteristics of backside attention networks is used. The pre-trained network is self-supervised and fine-tuned based on real data to obtain the head motion correction model.
2. The brain functional magnetic resonance imaging head movement correction method according to claim 1, characterized in that, The process involves acquiring the original image data, generating a target deformation image by applying a smoothing deformation field to slices of the original image data, and then performing sampling and temporal enhancement processing to obtain training samples, including: Slices at specific time points are extracted from the image sequence of the original image data as a base template. For basic templates Perform Z-score standardization, and, in the base template Add Gaussian white noise to construct a template-centered time window sequence. : in, This serves as the time window sequence number identifier. The time window length, For noise intensity parameters, Indicates in Gaussian white noise added within each time window; Two independent Gaussian random noise fields are generated by smoothing the deformation field. The Gaussian random noise fields are then smoothed and normalized to obtain the smoothed displacement field. ,in: in, This is a random noise matrix with the same size as the image in the original image data. The standard deviation is expressed as Gaussian smoothing kernel, The maximum displacement parameter that controls the deformation amplitude is, where This indicates taking the maximum absolute value of the convolution result, used for normalization processing. This is a convolution operation; Bilinear interpolation is used and the foundation template is based on a smooth displacement field. Resampling is performed to obtain the target deformation image. ,in: in, Indicates coordinates The pixel value at that location is obtained through the base template. At the offset coordinate point The coordinate mapping obtained by sampling at a location uses inverse mapping combined with first-order interpolation; Deform the target image Basic Templates Smooth displacement field and time window sequence The training samples are encapsulated to obtain training samples, which are quadruplets. The smooth displacement field As a real label.
3. The brain functional magnetic resonance imaging head movement correction method according to claim 2, characterized in that, The step of using the training samples as feature maps and employing a visual cortex-like topological feature spatial information allocation mechanism to constrain the feature maps by orientation preferences to obtain spatially allocated feature maps includes: The feature maps are mapped to horizontal and vertical decoupled subspaces, and then projected into query vectors through convolutional layers. Key vector and value vector And, dividing the feature map into Each head has a dimension of [number]. , is represented as: in, To query vectors, key vectors, and value vectors, Denotes the dimension, where For height dimension, Width dimension; Represents the feature map; express Convolution processing; Under the premise of fixed index, the correlation degree of different indices in the observed axis is calculated in the feature map. The observed axis includes height dimension and width dimension. When the observed axis is the width dimension, the fixed index is the fixed height index; when the observed axis is the height dimension, the fixed index is the fixed width index. Based on the correlation, Softmax is used to assign perceptual weights to the observed axis. Based on the assigned perceptual weights, features of different indices are aggregated to obtain aggregated features. The aggregated features are aggregated through the output mapping layer and the original spatial dimensions are restored to obtain the spatially allocated feature map.
4. The brain functional magnetic resonance imaging head movement correction method according to claim 2, characterized in that, The process involves local spatiotemporal feature extraction from the feature map. Based on the extraction results, a temporal information coherence mechanism similar to that of prefrontal cortex working memory is used to simulate the retrieval and binding of working memory. The obtained attention output is then subjected to temporal evidence aggregation and dimensionality reduction to obtain a temporally coherent feature map, including: The input feature map is expanded into a five-dimensional tensor and processed using a three-dimensional convolutional kernel to obtain: in, Given the input sequence, This represents 3D convolution processing. To extract the results, It is a non-linear activation function. Indicates oscillation; Extraction results spatial location As independent time series, a multi-head attention mechanism is used to calculate the correlation of the independent time series, and the extracted results are... Remodeling For the extraction results query vector of a sequence within a sequence Key vector and value vector Mapped to the temporal subspace through a linear transformation: Based on the temporal subspace, the working memory retrieval and binding process is simulated using scaled dot product attention as follows: in For feature dimension, Indicates attention output; By In the time dimension The temporal evidence is aggregated by taking the average from the top, generating a static feature map with temporal context information. for: in, This indicates space-adaptive pooling.
5. The brain functional magnetic resonance imaging head movement correction method according to claim 1, characterized in that, The pre-trained network is obtained by pre-training a bidirectional optical flow network that uses a joint spatiotemporal attention mechanism to combine spatially assigned feature maps and temporally coherent feature maps, including: The source image is extracted using a spatially assigned feature map as a spatial encoder through a spatial branch of a bidirectional optical flow network. With target image Spatial geometric features By using the temporal branch of a bidirectional optical flow network, a temporally coherent feature map is used as a temporal encoder to simulate the time-series features of working memory. ; By using the bottleneck layer of U-Net, the output features of the spatial and temporal branches are concatenated through channels, and convolution is used to achieve cross-modal information interaction and dimensionality reduction to obtain fused features. : in, For channel cascading; The decoder, through the bidirectional optical flow network, is based on Simultaneously predict the forward optical flow. With backward optical flow ; By using the optical flow superposition operator, the short-range optical flow at adjacent time points is combined. and Synthesized into long-range trajectories : Multi-constraint joint optimization is employed, utilizing the deformation ground truth provided by the synthetic dataset and unsupervised geometric constraints to jointly guide the network convergence. The final objective function of the multi-constraint joint optimization is: in, These are weight parameters; To monitor the deformation field loss, the true deformation value generated from synthetic data is used. To supervise; For spatial smoothing loss; This is a loss due to bidirectional consistency. This represents a loss due to timing consistency issues.
6. The brain functional magnetic resonance imaging head movement correction method according to claim 5, characterized in that, The process of adaptively allocating weights based on the selection characteristics of backside attention networks during each iteration of the pre-trained network includes: For each iteration of the pre-trained network, the mean absolute intensity difference between adjacent frames of a sample is used as a metric for head movement saliency. : in, The height of the sample image, The width of the sample image. Image pixel coordinates, For the first The image pixel coordinates of the basic template For the first Image pixel coordinates of the target deformed image; Based on the measure of head movement significance After mean normalization, adaptive weight factors are obtained. : in, For batch size, Used to guide the model to focus on the correction task during backpropagation.
7. The brain functional magnetic resonance imaging head movement correction method according to claim 6, characterized in that, The process of self-supervised fine-tuning the pre-trained network based on real data to obtain the head movement correction model includes: The difference between the target deformed image and the base template is calculated using a weighted photometric loss, where the weighted photometric loss... for: in, For batch size, This indicates that the target image is spatially resampled using the predicted forward optical flow; The self-supervised fine-tuning is constrained by the total loss function, where the total loss function is... for: in, For weighted photometric loss, To provide a smooth constraint for the optical flow field, This is performed for bidirectional consistency constraints. As the constraint weight for smoothing the optical flow field, The weights are for bidirectional consistency constraints.
8. A head movement correction device for functional magnetic resonance imaging of the brain, characterized in that, include: The first module is used to acquire functional magnetic resonance imaging (fMRI) images of the brain, and to process the fMRI images of the brain using a head movement correction model to obtain head movement correction results. The head movement correction model is obtained through the following modules: The second module is used to acquire the original image data, generate the target deformation image by applying a smooth deformation field to the slices of the original image data, and then perform sampling and temporal enhancement processing to obtain training samples. The third module is used to use the training samples as feature maps and employ a visual cortex-like topological feature spatial information allocation mechanism to constrain the feature maps with orientation preferences to obtain spatially allocated feature maps, wherein the orientation preference constraints include horizontal and vertical directions. The fourth module is used to extract local spatiotemporal features from the feature map. Based on the extraction results, a temporal information coherence mechanism similar to prefrontal cortex working memory is used to simulate the retrieval and binding of working memory. The obtained attention output is then aggregated with temporal evidence and dimensionality reduced to obtain a temporally coherent feature map. The fifth module is used to pre-train a bidirectional optical flow network that uses a joint spatiotemporal attention mechanism to combine spatially assigned feature maps and temporally coherent feature maps, resulting in a pre-trained network. The sixth module is used to process the pre-trained network in each iteration using a weight adaptive allocation mechanism based on the selection characteristics of back-side attention networks; The seventh module is used to perform self-supervised fine-tuning of the pre-trained network based on real data to obtain the head motion correction model.
9. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the brain functional magnetic resonance imaging head movement correction method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the brain functional magnetic resonance imaging head movement correction method as described in any one of claims 1-7.