Magnetic particle image generation method and electronic device
By identifying magnetic nanoparticle regions using a dual-gradient sampling mode and segmentation model, scanning time and cost are reduced without sacrificing resolution, solving the problem of balancing imaging resolution and cost in existing technologies and improving imaging efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF AUTOMATION CHINESE ACAD OF SCI
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-07
AI Technical Summary
Existing magnetic nanoparticle imaging technology struggles to effectively balance imaging resolution and imaging cost without sacrificing imaging resolution. In particular, under conditions of large field of view and high magnetic field gradient, it requires traversing all spatial sampling points, resulting in long scanning times and significant invalid sampling.
A dual-gradient sampling mode is adopted. The low-gradient fast scan is used to obtain prior contour information, and the segmentation model is combined to identify regions containing magnetic nanoparticles. Then, in the high-gradient scan stage, only these regions are finely scanned to avoid invalid scans of particle-free regions.
It significantly reduces the total number of scan points and scan time while maintaining high resolution and sensitivity, thus improving imaging efficiency.
Smart Images

Figure CN121962360B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and more specifically to a method for generating magnetic particle images and an electronic device. Background Technology
[0002] Magnetic nanoparticle imaging (MPI) utilizes the nonlinear magnetization response of superparamagnetic nanoparticles (MNPs) in an external magnetic field to achieve imaging. Its signal originates entirely from the MNPs and is completely transparent to background tissue, thus exhibiting near-zero background and high contrast, making it suitable for various scenarios such as cardiovascular monitoring, perfusion imaging, and cell tracking. However, related methods suffer from a technical challenge in effectively balancing imaging resolution and imaging cost. Summary of the Invention
[0003] In view of the above problems, the present invention provides a method for generating magnetic particle images and an electronic device.
[0004] According to a first aspect of the present invention, a method for generating a magnetic particle image is provided, comprising: performing a narrow-band point-by-point scan of a target object within an imaging field of view based on a first magnetic field gradient and according to a position of interest in an initial mask image, to obtain an initial magnetic particle image, wherein the position of interest represents a position in the imaging field of view that needs to be scanned; segmenting the initial magnetic particle image to obtain a segmented mask image; performing convolution processing on the segmented mask image to obtain an expanded mask image, wherein the position of interest in the expanded mask image represents the object contour generated by the migration and diffusion of magnetic particles in the edge region of the segmented mask image; and performing a narrow-band point-by-point scan of the target object within the imaging field of view based on a second magnetic field gradient and according to the position of interest in the expanded mask image, to obtain a target magnetic particle image, wherein the second magnetic field gradient is higher than the first magnetic field gradient.
[0005] Optionally, the magnetic particle image generation method further includes: determining an edge mask image based on the difference between the expanded mask image and the segmented mask image; and determining the target particle state representing the state where no particle overflow has occurred based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image.
[0006] Optionally, the magnetic particle image generation method further includes: when the target particle is in a particle overflow state, updating the position of interest in the edge region of the initial mask image according to the particle overflow state to obtain an updated initial mask image, wherein the updated initial mask image is used to determine the updated target magnetic particle image.
[0007] Optionally, the target particle state can be determined based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image, including: determining the gradient factor based on the ratio between the second magnetic field gradient and the first magnetic field gradient; determining multiple second pixels corresponding to the first pixel in the target magnetic particle image based on the gradient factor; determining the initial particle state corresponding to the first pixel based on the pixel values of the multiple second pixels corresponding to the first pixel, where the pixel values represent particle concentration information; and determining the target particle state as a state without particle overflow when the initial particle states of the multiple first pixels are all in a state without particle overflow.
[0008] Optionally, the initial particle state corresponding to the first pixel is determined based on the pixel values of the multiple second pixels corresponding to the first pixel, including: if the number of second pixels with pixel values equal to a preset concentration threshold is greater than a preset number threshold, the initial particle state of the first pixel is determined to be a state where no particle overflow has occurred, and the preset number threshold is determined based on the gradient multiple; if the number of second pixels with pixel values greater than a preset concentration threshold is greater than a preset number threshold, the initial particle state of the first pixel is determined to be a state where particle overflow has occurred.
[0009] Optionally, based on the second magnetic field gradient, a narrow-band point-by-point scan is performed on the target object within the imaging field of view according to the position of interest in the expanded mask image to obtain a target magnetic particle image, including: mapping the position of interest in the expanded mask image to a spatial position under the imaging field of view; based on the second magnetic field gradient, a narrow-band point-by-point scan is performed on the target object within the imaging field of view according to the spatial position to obtain a scan signal; and the scan signal is reconstructed to obtain a target magnetic particle image.
[0010] Optionally, mapping the location of interest in the expanded mask image to a spatial location in the imaging field of view includes: determining the location of the pixel of interest in the expanded mask image as the location of interest; and transforming the location of interest to a spatial location in the imaging field of view based on the reference position in the imaging field of view, the side length of the field of view, and the number of pixels on one side.
[0011] Optionally, the scan signal is reconstructed to obtain a target magnetic particle image, including: reconstructing the scan signal using a shrinkage threshold optimization function and constraints to obtain a target magnetic particle image; wherein, the shrinkage threshold optimization function is used to optimize the magnetic particle concentration distribution of the target magnetic particle image reconstructed based on the scan signal, and the constraints are used to constrain the signal intensity distribution of the reconstructed signal to be close to the signal intensity distribution of the scan signal, and the reconstructed signal is obtained by transforming the reconstructed target magnetic particle image based on the transformation matrix.
[0012] Optionally, the initial magnetic particle image is segmented using a segmentation model to obtain a segmentation mask image, including: extracting downsampled features from the initial magnetic particle image to obtain downsampled features; and extracting upsampled features from the downsampled features to obtain a segmentation mask image.
[0013] A second aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the method described above.
[0014] According to the magnetic particle image generation method and electronic device provided by the present invention, a low-resolution initial magnetic particle image of the particle distribution contour is quickly obtained with less sampling cost by performing a coarse scan based on the first magnetic field gradient mode and the position of interest in the initial mask image. Then, the prior position of the magnetic nanoparticle distribution is automatically extracted from the initial magnetic particle image. To adapt to the migration of particles over time, the prior position is updated by mask iteration and edge expansion is performed using convolution kernels to enhance the positioning robustness, thereby reducing the risk of missed scanning of edge areas caused by positioning errors or slight particle movement, and obtaining an expanded mask image with high prior accuracy. Fine scanning is performed in the second magnetic field gradient mode, and only the position of interest in the expanded mask image is docked point by point and narrow-band excitation measurement is performed to avoid invalid scanning of particle-free areas, thereby significantly reducing the total number of scanning points and the total scanning time, while obtaining an accurate high-resolution target magnetic particle image. This realizes the dual-mode synergy of "first magnetic field gradient coarse scanning - second magnetic field gradient fine scanning", improving imaging efficiency without sacrificing fine imaging resolution. Attached Figure Description
[0015] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings.
[0016] Figure 1 A flowchart of a magnetic particle image generation method according to an embodiment of the present invention is shown.
[0017] Figure 2 A schematic diagram of a segmentation model according to an embodiment of the present invention is shown.
[0018] Figure 3 A schematic diagram illustrating the generation of a target magnetic particle image according to an embodiment of the present invention is shown.
[0019] Figure 4 A structural block diagram of a magnetic particle image generation apparatus according to an embodiment of the present invention is shown.
[0020] Figure 5 A block diagram of an electronic device suitable for implementing a magnetic particle image generation method according to an embodiment of the present invention is shown. Detailed Implementation
[0021] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0022] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0023] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0024] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0025] In the process of developing this invention, it was discovered that MPI imaging systems still face a key bottleneck: limited scanning speed. On one hand, MPI suffers from insufficient sensitivity, and a common countermeasure is to extend the scanning time of a single MPI image to reduce the impact of noise. On the other hand, as the field of view aperture continues to increase, the number of scanning voxels increases with the square of the field of view aperture. Simultaneously, to obtain high spatial resolution, a higher magnetic field gradient needs to be applied. However, a higher gradient means a smaller field-free point (FFP) area and a lower MNP content within the FFP, resulting in a longer dwell time to obtain a sufficient signal-to-noise ratio, further increasing the overall scanning time of narrowband MPI.
[0026] In most medical applications, such as focal lesion monitoring, cell tracking, and local targeted drug delivery, the magnetic nanoparticles actually involved in imaging are only distributed in a very small portion of the field of view. Most locations do not contain MNPs, but the MPI scanning method needs to traverse all spatial sampling points in the field of view, resulting in significant wasted scanning time.
[0027] One of the recent development trends is narrowband MPI. Narrowband MPI works by moving the FFP to a predetermined spatial location and then applying a narrowband excitation signal to acquire the particle response at that location, thus achieving point-to-point scanning. The movement, stopping, and excitation processes of the FFP can all be independently scheduled and precisely controlled, thereby enabling the creation of custom measurement sequences at any location, providing a technological foundation for "scanning only the locations where particles exist."
[0028] In the field of medical imaging, segmentation models based on Convolutional Neural Networks (CNNs) and Visual Transformers have made significant progress. In imaging modalities such as MRI and ultrasound, segmentation models are widely used for tasks such as lesion detection, organ delineation, target localization, and image prior extraction. Therefore, to overcome the problem that existing narrowband magnetic particle imaging requires traversing all spatial sampling points under conditions of large field of view and high magnetic field gradients, resulting in long scan times and a large number of invalid samples, an efficient sampling strategy based on segmentation algorithms to plan the FFP sampling positions of MPI is needed.
[0029] In view of this, embodiments of the present invention provide a method for generating magnetic particle images and an electronic device. The method includes: based on a first magnetic field gradient, performing a narrow-band point-by-point scan of a target object within an imaging field of view according to the position of interest in an initial mask image to obtain an initial magnetic particle image, where the position of interest represents the position in the imaging field of view that needs to be scanned; segmenting the initial magnetic particle image to obtain a segmented mask image; performing convolution processing on the segmented mask image to obtain an expanded mask image, where the position of interest in the expanded mask image represents the object contour generated by the migration and diffusion of magnetic particles in the edge region of the segmented mask image; and based on a second magnetic field gradient, performing a narrow-band point-by-point scan of the target object within the imaging field of view according to the position of interest in the expanded mask image to obtain a target magnetic particle image, where the second magnetic field gradient is higher than the first magnetic field gradient.
[0030] Based on the narrowband MPI point-by-point sampling scanning method, a dual-gradient sampling mode can be designed. It utilizes the prior contour information obtained by fast scanning with low gradient, and then uses a segmentation model to automatically identify the spatial regions that actually contain MNPs. Subsequently, in the high gradient scanning stage, FFP docking and excitation measurement are arranged only for the positions of interest in the segmented and expanded masked image. This achieves an efficient sampling strategy of "fine scanning only for regions containing particles", avoiding invalid scanning of regions without particles. While ensuring resolution and sensitivity, it significantly reduces the number of scanning points, thereby significantly reducing the total scanning time.
[0031] In the technical solution of this invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0032] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.
[0033] Figure 1 A flowchart of a magnetic particle image generation method according to an embodiment of the present invention is shown.
[0034] like Figure 1 As shown, the method includes operations S110 to S140.
[0035] In operation S110, based on the first magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the position of interest in the initial mask image to obtain the initial magnetic particle image.
[0036] In operation S120, the initial magnetic particle image is segmented to obtain a segmentation mask image.
[0037] In operation S130, the segmented mask image is convolved to obtain an expanded mask image.
[0038] In operation S140, based on the second magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the position of interest in the expanded mask image to obtain the target magnetic particle image.
[0039] The initial mask image is a scan mask matrix covering the entire imaging field of view, where the positions to be scanned are set to 1, and the positions not to be scanned are set to 0. The position of interest represents the position in the imaging field of view that needs to be scanned.
[0040] The initial mask image is generated based on scan trajectory priors and unilateral depth attenuation priors, identifying the effective spatial locations that need to be sampled during the scanning system matrix calibration. The location of interest is matched with the tumor targeting region of the target object.
[0041] The first magnetic field gradient is a low magnetic field gradient, for example, 0.4 T / m. The magnetic field gradient represents the change in magnetic field strength per unit distance. The purpose of the first magnetic field gradient is to quickly obtain measurement data of the "segmentable profile prior" with less sampling cost.
[0042] The location of interest in the initial mask image is mapped to the spatial location of the imaging field of view. The narrowband magnetic particle imaging system in the first magnetic field gradient mode drives the FFP to dock point by point in the imaging field of view according to this spatial location and collect narrowband signals to obtain low gradient measurement data. Then, the low gradient measurement data is reconstructed to obtain the initial magnetic particle image.
[0043] The target population represents the cancer patients to be tested.
[0044] The initial magnetic particle image characterizes a low-resolution estimate of the magnetic nanoparticle concentration distribution in the tumor-targeting region within the target object.
[0045] A segmentation model can be used to perform threshold segmentation on the initial magnetic particle image to obtain a segmentation mask image. The segmentation model can be constructed based on a Residual U-shaped Network (ResU-Net).
[0046] The segmentation mask image is a binary mask used to identify the actual spatial contour of the distribution of magnetic nanoparticles within the target object.
[0047] Considering the potential migration and diffusion of magnetic nanoparticles within tissues, a 3×3 convolutional kernel window with all 1s is used to scan and segment the mask image. After each step of 1, the pixel value of the segmented mask image within the window is multiplied by the corresponding weight in the convolution kernel and then summed to obtain a pixel value at that location. Non-zero pixel values after convolution are then set to 1 to obtain the expanded mask image. Zero padding around the edges ensures that the segmented mask image and the expanded mask image have the same size.
[0048] The expanded mask image expands the edge regions in the segmentation mask image.
[0049] The location of interest in the expanded mask image represents the object contour generated by the migration and diffusion of magnetic particles in the edge region of the segmented mask image.
[0050] The second magnetic field gradient is higher than the first magnetic field gradient.
[0051] The second magnetic field gradient is a high magnetic field gradient, for example, 0.8 T / m. Since the resolution is higher under a high magnetic field gradient, the number of pixels and the scanning time of a high magnetic field gradient in the same area are usually about 4 times that of a low magnetic field gradient, which is equivalent to a 2-fold increase in resolution per axis.
[0052] The location of interest in the expanded mask image is mapped to the spatial location of the imaging field of view. The narrowband magnetic particle imaging system in the second magnetic field gradient mode drives the FFP to dock point by point in the imaging field of view according to this spatial location and collect narrowband signals to obtain high gradient measurement data. Then, the high gradient measurement data is reconstructed to obtain the target magnetic particle image.
[0053] Target magnetic particle images characterize high-resolution estimates of the magnetic nanoparticle concentration distribution in the tumor-targeting region within the target object.
[0054] Optionally, a coarse scan is performed based on the first magnetic field gradient mode and the position of interest in the initial mask image, quickly acquiring a low-resolution initial magnetic particle image of the particle distribution contour with less sampling cost. Then, the prior position of the magnetic nanoparticle distribution is automatically extracted from the initial magnetic particle image. To adapt to particle migration over time, the prior position is updated iteratively using a mask and edge expansion is performed using a convolution kernel to enhance the positioning robustness, thereby reducing the risk of missed scanning of edge regions caused by positioning errors or slight particle movement, resulting in an expanded mask image with high prior accuracy. A fine scan is performed in the second magnetic field gradient mode, performing point-by-point docking and narrow-band excitation measurement only on the position of interest in the expanded mask image, avoiding invalid scanning of particle-free regions, thus significantly reducing the total number of scan points and total scan time, while obtaining an accurate high-resolution target magnetic particle image. This achieves dual-mode synergy of "first magnetic field gradient coarse scan - second magnetic field gradient fine scan", improving imaging efficiency without sacrificing fine imaging resolution.
[0055] Optionally, based on the second magnetic field gradient, a narrow-band point-by-point scan is performed on the target object within the imaging field of view according to the position of interest in the expanded mask image to obtain a target magnetic particle image, including: mapping the position of interest in the expanded mask image to a spatial position under the imaging field of view; based on the second magnetic field gradient, a narrow-band point-by-point scan is performed on the target object within the imaging field of view according to the spatial position to obtain a scan signal; and the scan signal is reconstructed to obtain a target magnetic particle image.
[0056] By utilizing the imaging coordinate system of the imaging field of view, the location of interest in the expanded mask image is transformed into its spatial location under the imaging field of view.
[0057] In the second magnetic field gradient mode, the narrowband magnetic particle imaging system drives a field-free magnetic field at this spatial position to dock point by point with the target object in the imaging field of view and acquire narrowband signals to obtain a high-gradient scanning signal.
[0058] The scan signal can be reconstructed using the Fast Iterative Shrinkage-Thresholding Algorithm (FISTA) to obtain the image of the target magnetic particles.
[0059] Optionally, mapping the location of interest in the expanded mask image to a spatial location in the imaging field of view includes: determining the location of the pixel of interest in the expanded mask image as the location of interest; and transforming the location of interest to a spatial location in the imaging field of view based on the reference position in the imaging field of view, the side length of the field of view, and the number of pixels on one side.
[0060] In one embodiment, the mapping process is as shown in formulas (1) and (2):
[0061] (1).
[0062] (2).
[0063] in, The x-coordinate characterizing the reference position in the imaging field of view. The ordinate characterizing the reference position in the imaging field of view. The x-coordinate representing the location of interest. The ordinate representing the location of interest. Characterizing the edge length of the field of view, Characterizes the number of pixels on a single side. The abscissa characterizes the spatial position mapped to the imaging field of view. The ordinate represents the spatial position mapped to the imaging field of view.
[0064] The reference position in the imaging field of view is the spatial coordinate of the upper left pixel in the imaging market coordinate system.
[0065] The coordinates of the location of interest are converted into the coordinates of the spatial location under the imaging field of view where the FFP needs to dock, and a "Z" scanning sequence is generated according to the system control requirements.
[0066] Optionally, the scan signal is reconstructed to obtain a target magnetic particle image, including: reconstructing the scan signal using a shrinkage threshold optimization function and constraints to obtain a target magnetic particle image; wherein, the shrinkage threshold optimization function is used to optimize the magnetic particle concentration distribution of the target magnetic particle image reconstructed based on the scan signal, and the constraints are used to constrain the signal intensity distribution of the reconstructed signal to be close to the signal intensity distribution of the scan signal, and the reconstructed signal is obtained by transforming the reconstructed target magnetic particle image based on the transformation matrix.
[0067] During the initial reconstruction of the scan signal using the shrinkage threshold optimization function, the magnetic particle concentration distribution of the reconstructed target magnetic particle image is continuously optimized.
[0068] The reconstructed target magnetic particle image is transformed using a transformation matrix to obtain the reconstructed signal.
[0069] The constraint objective is to minimize the fitting error between the signal intensity distribution of the reconstructed signal and the signal intensity distribution of the scanned signal, so that the signal intensity distribution of the reconstructed signal is close to that of the scanned signal.
[0070] In one embodiment, the constraints of the shrinkage threshold optimization function are shown in equations (3), (4), and (5):
[0071] (3).
[0072] (4).
[0073] (5).
[0074] in, To characterize the fitting error, the data consistency term of the gradient can be calculated. for L1 regularization, For L2 regularization, Let A be the regularization parameter used to balance data fidelity and sparsity regularization, and let A be the transformation matrix. This is the image of the target magnetic particles reconstructed during the iterative reconstruction process. For scanning signals, Regular terms that characterize non-smooth but convex surfaces.
[0075] The transformation matrix is used to describe the transformation relationship between the magnetic particle image and the scanning signal.
[0076] In one embodiment, the iterative process of the shrinkage threshold optimization function is shown in equations (6), (7), and (8):
[0077] (6).
[0078] (7).
[0079] (8).
[0080] in, This is the reconstructed image of the target magnetic particles after the k-th iteration. To control the acceleration parameter of the momentum term during the k-th iteration, This is an auxiliary variable that accelerates the process during the k-th iteration. gradient The Lipschitz constant is usually taken as The largest eigenvalue, Characterizing the soft-threshold shrinkage operator, achieving L1 regularized sparse projection, with a threshold of... .
[0081] To achieve the goal of "quickly obtaining a sufficient profile to characterize the contour", the number of iterations can be set to 50-100 times, balancing reconstruction quality and time consumption.
[0082] Optionally, the magnetic particle concentration distribution of the target magnetic particle image reconstructed based on the scanning signal is optimized by shrinking the threshold optimization function. The L1 regularization constraint promotes the sparsity of the solution, while the data fidelity term constrains the signal intensity distribution of the reconstructed signal to be close to the signal intensity distribution of the actual scanning signal. This achieves joint optimization of sparsity and data consistency, maintaining a high degree of consistency between the reconstructed image and the scanning data, effectively suppressing noise and artifacts, and improving the reconstruction accuracy and spatial resolution of the magnetic particle concentration distribution. This is suitable for fast and high-quality imaging under narrowband undersampling conditions.
[0083] Optionally, the initial magnetic particle image is segmented using a segmentation model to obtain a segmentation mask image, including: extracting downsampled features from the initial magnetic particle image to obtain downsampled features; and extracting upsampled features from the downsampled features to obtain a segmentation mask image.
[0084] Figure 2 A schematic diagram of a segmentation model according to an embodiment of the present invention is shown.
[0085] like Figure 2As shown, the segmentation model's network skeleton contains four levels of downsampling paths and four levels of upsampling paths, fusing shallow edge information and deep semantic information through skip connections between layers of the same scale. The first downsampling layer introduces a 5×5 convolutional kernel to accelerate the reduction of feature map size, while the remaining convolutional layers use 3×3. Residual blocks are introduced in the second to fourth downsampling layers, and 2×2 max pooling is used to stably extract contour features. Upsampling uses deconvolutional kernels, such as transposed convolutional kernels. The upsampling and downsampling layers at the corresponding scales are structurally symmetrical, with only the input and output channels reversed.
[0086] The segmentation model takes a 50×50×1 initial magnetic particle image (50 pixels high, 50 pixels wide, 1 channel) as input and extracts features using four cascaded downsampling network layers. 2 ×4 indicates that a feature with a spatial size of 24×24 and 4 channels is obtained through convolution or fully connected layers; 12 2 ×16 indicates a spatial dimension of 12×12 and a channel of 16; 6 2 ×64 indicates a space dimension of 6×6 and a passageway of 64; 3 2 ×256 represents a spatial size of 3×3 and 256 channels. These four branches extract downsampled features at different scales. After output, they are processed through a unified number of channels and then fed into a residual block for feature enhancement and gradient optimization. Finally, they are processed through a 2×2 max pooling layer to halve the spatial size to expand the receptive field.
[0087] Downsampled features are upsampled and extracted through transposed convolutional layers to restore spatial resolution. During decoding, the network skips and fuses features at the corresponding scales of the encoder layer by layer, forming an encoder-decoder structure similar to U-Net. This achieves effective aggregation of multi-scale information and ultimately outputs a refined feature map or segmentation probability map.
[0088] Upsampling features are extracted from the downsampled features to output a segmentation probability map showing the presence of magnetic nanoparticles. The probability of each position being greater than a threshold of 0.5 is thresholded to 1, and the probability being less than or equal to the threshold of 0.5 is thresholded to 0, resulting in a binary segmentation mask image. The segmentation mask image includes contour segmentation information of the magnetic nanoparticle region.
[0089] The segmentation model is trained using a loss function that combines boundary coefficient Dice loss and binary cross-entropy (BCE) loss to balance the optimization of overlapping area under class imbalance and pixel-level probability error constraints.
[0090] In one embodiment, the loss function As shown in formulas (9), (10), and (11):
[0091] (9).
[0092] (10).
[0093] (11).
[0094] in, Characterizing Dice loss, Characterizing binary cross-entropy loss, This is the proportionality coefficient. To segment the mask image, The actual label mask image. The pixel ordinal number. This represents the total number of pixels. To segment the mask image of the th The predicted probability of each pixel. For real label mask image The Middle The real label is a pixel.
[0095] Optionally, by leveraging the residual connectivity and multi-scale feature fusion capabilities of the segmentation model, the contour boundaries of the target object can be accurately extracted from the initial magnetic particle image with low resolution and low signal-to-noise ratio. Through threshold conversion from probability map to binary mask, the actual spatial aggregation area of magnetic nanoparticles can be adaptively identified, effectively eliminating background noise and particle-free areas. This provides precise spatial range constraints for subsequent high-resolution fine scanning, significantly reducing the amount of invalid sampling data and improving reconstruction efficiency and target localization accuracy.
[0096] Optionally, the magnetic particle image generation method further includes: determining an edge mask image based on the difference between the expanded mask image and the segmented mask image; and determining the target particle state representing the state where no particle overflow has occurred based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image.
[0097] In one embodiment, the edge mask image As shown in formula (12):
[0098] (12).
[0099] in, Characterize the expanded mask image, Characterize the segmentation mask image.
[0100] Based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image, multiple second pixels corresponding to each first pixel are determined. If more than half of the pixel positions of the multiple second pixels do not contain magnetic nanoparticles, the target particle state representing the state in which no particle overflow has occurred is obtained.
[0101] Based on the second magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the position of interest in the expanded mask image to obtain the second target magnetic particle image. If no particle overflow occurs in this scan, the above process is repeated until a preset number of target magnetic particle images are obtained.
[0102] Optionally, it effectively combines the advantages of fast scanning speed of the first magnetic field gradient and accurate scanning speed of the second magnetic field gradient. In the absence of particle overflow, the scanning result of a single low magnetic field gradient can guide multiple fine scanning of high magnetic field gradient, without the need to extract the mask of the scanned image after each scan, effectively saving computational resources and time for reconstruction and mask extraction.
[0103] Optionally, the magnetic particle image generation method further includes: when the target particle is in a particle overflow state, updating the position of interest in the edge region of the initial mask image according to the particle overflow state to obtain an updated initial mask image, wherein the updated initial mask image is used to determine the updated target magnetic particle image.
[0104] Based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image, multiple second pixels corresponding to each first pixel are determined. If magnetic nanoparticles appear in more than half of the pixel positions of multiple second pixels, it means that the magnetic nanoparticles may diffuse outside the range of the position of interest in the initial mask image, and the target particle state characterizing the particle overflow state is obtained.
[0105] When the target particle is in a particle overflow state, the position of interest in the edge region of the initial mask image is expanded according to the position of particle overflow, and the area of particle overflow is covered to obtain an updated initial mask image.
[0106] Based on the first magnetic field gradient, a narrow-band point-by-point scan is performed on the target object within the imaging field of view according to the position of interest in the updated initial mask image to obtain an updated initial magnetic particle image; the updated initial magnetic particle image is segmented to obtain an updated segmentation mask image; the updated segmentation mask image is convolved to obtain an updated dilated mask image; based on the second magnetic field gradient, a narrow-band point-by-point scan is performed on the target object within the imaging field of view according to the position of interest in the updated dilated mask image to obtain an updated target magnetic particle image.
[0107] Continue detecting the state of the target particles and repeat the above steps until a preset number of target magnetic particle images are obtained.
[0108] For example, each first pixel can correspond to four second pixels. The four second pixels corresponding to the first pixel at the edge contour region are regarded as a group. When at least three second pixels in the group detect a particle response, it is considered that the particle may have spread outside the current scanning range, triggering the next low gradient scan and the initial mask image update. Repeating the above steps can achieve continuous automatic scanning.
[0109] Optionally, the mask update triggering mechanism relies solely on the degree of magnetic particle expansion in the edge mask image, significantly reducing computational load. The expansion direction during mask update is a fixed step size, expanding outwards from the location where particles exist. This allows the low magnetic field gradient scan during mask update to scan only a small area within the space, saving scanning time and accelerating the update speed. This, in turn, ensures the continuity of subsequent high magnetic field gradient scans and does not rely on prior knowledge of magnetic particle trajectories. The mask expansion and update mechanism adapts to time-varying particle migration, improving the stability and reliability of trajectory planning. It is suitable for applications where particles are only present in localized areas, such as focal lesion monitoring, cell tracking, and local targeted drug delivery.
[0110] Optionally, the target particle state is determined based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image, including: determining a gradient factor based on the ratio between the second magnetic field gradient and the first magnetic field gradient; determining multiple second pixels corresponding to the first pixel in the target magnetic particle image based on the gradient factor; determining the initial particle state corresponding to the first pixel based on the pixel values of the multiple second pixels corresponding to the first pixel, where the pixel values represent particle concentration information; and determining the target particle state as a state without particle overflow when the initial particle states of the multiple first pixels are all in a state without particle overflow.
[0111] For example, if the second magnetic field gradient is 0.8 T / m and the first magnetic field gradient is 0.4 T / m, the gradient factor is determined to be 2.
[0112] During scanning, the resolution per axis is increased by 2 times, and one first pixel corresponds to four second pixels (2×2).
[0113] Based on the pixel values of multiple second pixels, determine the initial particle state corresponding to the first pixel corresponding to the second pixel. The initial particle state is either a state where no particle overflow occurs or a state where particles overflow.
[0114] A pixel value of 0 for the second pixel indicates that there is no particle response at that location; a non-zero pixel value indicates that there is a particle response at that location.
[0115] If the initial particle states of multiple first pixels are all in a state where no particle overflow has occurred, the target particle state is determined to be a state where no particle overflow has occurred.
[0116] If the initial particle states of multiple first pixels are all in a state where no particle overflow has occurred, the target particle state is determined to be a state where no particle overflow has occurred.
[0117] If a particle overflow state exists in the initial particle state of multiple first pixels, the target particle state is determined to be a particle overflow state.
[0118] Optionally, the initial particle state corresponding to the first pixel is determined based on the pixel values of the multiple second pixels corresponding to the first pixel, including: if the number of second pixels with pixel values equal to a preset concentration threshold is greater than a preset number threshold, the initial particle state of the first pixel is determined to be a state where no particle overflow has occurred, and the preset number threshold is determined based on the gradient multiple; if the number of second pixels with pixel values greater than a preset concentration threshold is greater than a preset number threshold, the initial particle state of the first pixel is determined to be a state where particle overflow has occurred.
[0119] The preset concentration threshold can be 0.
[0120] The preset quantity threshold can be half the square of the gradient multiple. For example, if the gradient multiple is 2, the preset quantity threshold is 2.
[0121] For example, if the gradient multiplier is 2, one first pixel corresponds to four second pixels, and the preset quantity threshold is 2, then at least three of the four second pixels have a value greater than 0, which means that at least three pixel values have a particle response. In this case, the initial particle state of the first pixel is the particle overflow state.
[0122] For example, if at least 3 out of the 4 second pixels have a value of 0, it means that at least 3 pixels do not have a particle response. Therefore, the initial particle state of this first pixel is a state where no particle overflow has occurred.
[0123] Figure 3 A schematic diagram illustrating the generation of a target magnetic particle image according to an embodiment of the present invention is shown.
[0124] Figure 3As shown, based on the first magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the position of interest in the initial mask image to obtain the scanning signal of the first magnetic field gradient. The initial magnetic particle image is reconstructed using the FISTA function. The initial magnetic particle image is segmented to obtain a segmented mask image. The segmented mask image is convolved using a convolution kernel with a weight of 1 to obtain an expanded mask image. Based on the second magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the position of interest in the expanded mask image to obtain a target magnetic particle image. According to the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image, the target particle state representing the state where no particle overflow has occurred is determined, and the target magnetic particle image is determined again based on the second magnetic field gradient. When the target particle state is in the state of particle overflow, the position of interest in the edge region of the initial mask image is updated according to the particle overflow state to obtain an updated initial mask image. The updated initial mask image is used to determine the updated target magnetic particle image. The above steps are repeated until a preset number of target magnetic particle images are obtained.
[0125] Based on the above-described magnetic particle image generation method, this invention also provides a magnetic particle image generation apparatus. The following will be combined with... Figure 4 The device is described in detail.
[0126] Figure 4 A structural block diagram of a magnetic particle image generation apparatus according to an embodiment of the present invention is shown.
[0127] like Figure 4 As shown, the magnetic particle image generation device 400 of this embodiment includes a first scanning module 410, a segmentation module 420, an expansion module 430, and a second scanning module 440.
[0128] The first scanning module 410 is used to perform narrow-band point-by-point scanning of the target object in the imaging field of view based on the first magnetic field gradient and the position of interest in the initial mask image to obtain an initial magnetic particle image. The position of interest represents the position in the imaging field of view that needs to be scanned.
[0129] The segmentation module 420 is used to segment the initial magnetic particle image to obtain a segmentation mask image.
[0130] The expansion module 430 is used to perform convolution processing on the segmented mask image to obtain an expanded mask image. The position of interest in the expanded mask image represents the object contour generated by the migration and diffusion of magnetic particles in the edge region of the segmented mask image.
[0131] The second scanning module 440 is used to perform narrow-band point-by-point scanning of the target object in the imaging field of view based on the second magnetic field gradient and the position of interest in the expanded mask image to obtain the target magnetic particle image. The second magnetic field gradient is higher than the first magnetic field gradient.
[0132] Optionally, any plurality of modules among the first scanning module 410, segmentation module 420, expansion module 430, and second scanning module 440 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. Optionally, at least one of the first scanning module 410, segmentation module 420, expansion module 430, and second scanning module 440 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the first scanning module 410, segmentation module 420, expansion module 430, and second scanning module 440 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0133] Figure 5 A block diagram of an electronic device suitable for implementing a magnetic particle image generation method according to an embodiment of the present invention is shown.
[0134] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0135] like Figure 5 As shown, a computer electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a ROM 502 (read-only memory) or a program loaded from a storage portion 508 into a RAM 503 (random access memory). The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0136] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 executes various operations of the method flow according to embodiments of the present invention by executing programs in ROM 502 and / or RAM 503. It should be noted that programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also execute various operations of the method flow according to embodiments of the present invention by executing programs stored in one or more memories.
[0137] Optionally, the electronic device 500 may also include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output (I / O) interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0138] Optionally, the method flow according to embodiments of the present invention can be implemented as a computer software program. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of embodiments of the present invention. Optionally, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0139] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the magnetic particle image generation method according to embodiments of the present invention.
[0140] Optionally, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0141] For example, optionally, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.
[0142] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of the present invention. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the magnetic particle image generation method provided in the embodiments of the present invention.
[0143] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this embodiment of the invention. Optionally, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0144] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0145] Optionally, program code for executing the computer programs provided in the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0146] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention can be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or pairings fall within the scope of this invention.
[0147] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.
Claims
1. A method for generating magnetic particle images, characterized in that, The method includes: Based on the first magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the position of interest in the initial mask image to obtain the initial magnetic particle image. The position of interest represents the position in the imaging field of view that needs to be scanned. The initial magnetic particle image is segmented to obtain a segmentation mask image; The segmented mask image is convolved to obtain an expanded mask image. The position of interest in the expanded mask image represents the object contour generated by the migration and diffusion of magnetic particles in the edge region of the segmented mask image. Based on the second magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the position of interest in the expanded mask image to obtain the target magnetic particle image. The second magnetic field gradient is higher than the first magnetic field gradient. The edge mask image is determined based on the difference between the expanded mask image and the segmented mask image; Based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image, the target particle state representing the state where no particle overflow has occurred is determined. When the target particle is in a particle overflow state, the positions of interest in the edge regions of the initial mask image are updated according to the particle overflow state to obtain an updated initial mask image. The updated initial mask image is used to determine the updated target magnetic particle image.
2. The method according to claim 1, characterized in that, Determining the target particle state based on the mapping relationship between the first pixel in the edge mask image and the second pixel in the target magnetic particle image includes: The gradient factor is determined based on the ratio between the second magnetic field gradient and the first magnetic field gradient; Based on the gradient multiple, a plurality of second pixels corresponding to the first pixel are determined in the target magnetic particle image; Based on the pixel values of the plurality of second pixels corresponding to the first pixel, the initial particle state corresponding to the first pixel is determined, wherein the pixel values represent particle concentration information; If the initial particle state of each of the multiple first pixels is a state in which no particle overflow has occurred, the target particle state is determined to be a state in which no particle overflow has occurred.
3. The method according to claim 2, characterized in that, The step of determining the initial particle state corresponding to the first pixel based on the pixel values of the plurality of second pixels corresponding to the first pixel includes: If the number of second pixels whose pixel value is equal to a preset concentration threshold is greater than a preset number threshold, the initial particle state of the first pixel is determined to be a state in which no particle overflow has occurred, and the preset number threshold is determined based on the gradient multiple. If the number of second pixels whose pixel value is greater than a preset concentration threshold is greater than the preset number threshold, the initial particle state of the first pixel is determined to be a particle overflow state.
4. The method according to claim 1, characterized in that, The step of performing a narrow-band point-by-point scan of the target object within the imaging field of view based on the second magnetic field gradient and the position of interest in the expanded mask image to obtain a target magnetic particle image includes: Map the location of interest in the expanded mask image to its spatial location under the imaging field of view; Based on the second magnetic field gradient, the target object in the imaging field of view is scanned point-by-point in a narrow band according to the spatial position to obtain the scanning signal; The scan signal is reconstructed to obtain an image of the target magnetic particles.
5. The method according to claim 4, characterized in that, The step of mapping the location of interest in the expanded mask image to its spatial location in the imaging field of view includes: The position of the pixel of interest in the expanded mask image is determined as the position of interest. Based on the reference position in the imaging field of view, the side length of the field of view, and the number of pixels on one side, the position of interest is transformed into a spatial position in the imaging field of view.
6. The method according to claim 4, characterized in that, Reconstructing the scanned signal to obtain an image of the target magnetic particles includes: The scan signal is reconstructed using a shrinkage threshold optimization function and constraints to obtain an image of the target magnetic particles; The shrinkage threshold optimization function is used to optimize the magnetic particle concentration distribution of the target magnetic particle image reconstructed based on the scanning signal. The constraint condition is used to constrain the signal intensity distribution of the reconstructed signal to be close to the signal intensity distribution of the scanning signal. The reconstructed signal is obtained by transforming the reconstructed target magnetic particle image based on the transformation matrix.
7. The method according to claim 1, characterized in that, The initial magnetic particle image is segmented using a segmentation model to obtain a segmentation mask image, including: The initial magnetic particle image is subjected to downsampling feature extraction to obtain downsampling features; Upsampling features are extracted from the downsampled features to obtain a segmentation mask image.
8. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.