High-resolution magnetic field imaging method and system based on sparse data reconstruction network
By reconstructing a network using sparse data and employing adversarial training between the generator and discriminator, the contradiction between image resolution and acquisition efficiency in magnetic field imaging is resolved, achieving efficient and high-quality magnetic field image reconstruction. This method is suitable for rapid magnetic field scanning and condition assessment of motors and batteries in new energy vehicles.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies face constraints in magnetic field imaging between image resolution and acquisition efficiency. Sparse sampling leads to uneven magnetic field data and incomplete information. Traditional interpolation algorithms struggle to recover complex magnetic field distributions, and super-resolution technologies rely on high-resolution image datasets, which are difficult to acquire, making it challenging to achieve efficient and high-quality magnetic field image reconstruction.
A sparse data-based network reconstruction method is adopted. The generator module is used for multi-scale information completion and deep feature extraction, and the discriminator module is used for adversarial training. The known sampling point data is precisely constrained by the mask matrix to generate high-resolution magnetic field images. The training process only relies on sparse magnetic field distribution images and mask matrix samples.
It enables the efficient generation of high-resolution magnetic field images without the need for complete high-resolution training data, improving the efficiency and image quality of magnetic field imaging, and is suitable for rapid detection and fault diagnosis in industrial settings.
Smart Images

Figure CN121661290A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of magnetic field imaging and neural network image processing technology, specifically relating to a high-resolution magnetic field imaging method and system based on sparse data network reconstruction.
[0002] In the existing technology, the main monitoring methods for batteries and motors of new energy vehicles include: using a battery management system (BMS) to monitor electrical and thermal parameters such as voltage, current and temperature; analyzing the mechanical operating status of the motor through vibration sensors; using thermal imaging technology to monitor the temperature distribution of components to identify abnormal hot spots; and using machine learning algorithms based on historical data for fault prediction.
[0003] In recent years, magnetic field detection technology, as a non-invasive and highly sensitive monitoring method, has shown great application potential in the aforementioned fields. Since the charging and discharging process of batteries and the operation of motors both generate characteristic magnetic fields, accurately capturing and analyzing the distribution and changes of these magnetic field signals can effectively reflect the internal working status of equipment and potential early faults.
[0004] However, in the application of high-resolution magnetic field imaging, existing technologies face a core contradiction: the constraint between image resolution and acquisition efficiency. On the one hand, to obtain high-resolution, detailed magnetic field images, dense spatial sampling is required within the target area, i.e., acquiring a large number of data points. While this high-density sampling method ensures image quality, it significantly prolongs data acquisition time, reduces detection efficiency, and fails to meet the needs of rapid detection in industrial settings. On the other hand, reducing sampling points to improve acquisition speed, i.e., sparse sampling, results in uneven spatial distribution and incomplete information in the acquired magnetic field data. Magnetic field images directly generated from sparsely sampled data have low effective resolution, poor image quality, are riddled with artifacts and distortions, and cannot accurately characterize the fine structure and key features of the magnetic field, severely affecting the accuracy of subsequent condition assessment and fault diagnosis.
[0005] To address the aforementioned issues, existing technologies have explored various approaches. Some methods employ traditional interpolation algorithms (such as linear interpolation and bicubic interpolation) to augment sparse data. However, these methods only utilize the spatial proximity of the data and struggle to recover the complex details of nonlinear magnetic field distributions. Consequently, the reconstructed images often suffer from problems such as blurring, edge effects, and artifacts.
[0006] In addition, some existing methods attempt to improve image quality using super-resolution techniques. These methods typically employ neural network models to generate a corresponding high-resolution image from a complete low-resolution image. However, these methods face inherent limitations in the field of magnetic field imaging: the training process heavily relies on large datasets of paired, strictly aligned low-resolution and high-resolution magnetic field images. In practice, acquiring high-resolution magnetic field images as the "true standard" is itself a time-consuming and costly process. Constructing large-scale paired datasets specifically for training models is extremely difficult, if not feasible, greatly limiting the practical deployment of traditional super-resolution techniques in this field.
[0007] Therefore, how to accurately reconstruct high-resolution, high-density magnetic field images using only readily available sparse sampling data, without relying on complete high-resolution training data, is a technical challenge that urgently needs to be solved in the field of magnetic field detection. Summary of the Invention
[0008] The purpose of this invention is to provide a high-resolution magnetic field imaging method, system, and device based on sparse data network reconstruction to solve the problems mentioned in the background art.
[0009] The present invention achieves the above objectives through the following technical solutions: This invention proposes a high-resolution magnetic field imaging method based on sparse data reconstruction networks, the method comprising: The sparse magnetic field distribution image to be reconstructed is input into a pre-built sparse data reconstruction network, which outputs a high-resolution complete magnetic field distribution image. The sparse data reconstruction network includes a generator module and a discriminator module, which are constructed and optimized through the following steps: Obtain sparse magnetic field distribution image samples and corresponding mask matrix samples; The predicted magnetic field distribution image is determined based on the sparse magnetic field distribution image; The predicted magnetic field distribution image is multiplied element-wise with the mask matrix sample to obtain the predicted sparse magnetic field distribution image. Based on the mask matrix, determine the pixel loss value between the predicted sparse magnetic field distribution image and the original sparse sample at the effective sampling point location; Determine the adversarial loss value between the predicted sparse magnetic field distribution image and the original sparse sample; A total loss function for the generator is constructed by combining pixel loss values and adversarial loss values to optimize the generator module; The sparse magnetic field distribution image samples and the predicted sparse magnetic field distribution image are input into the discriminator module, and the discriminator loss value is calculated based on the classification results to optimize the discriminator module.
[0010] Preferably, determining the predicted magnetic field distribution image based on the sparse magnetic field distribution image includes: The sparse magnetic field distribution image sample is input into the generator module; The generator module outputs the predicted magnetic field distribution image through multi-scale information completion, deep feature extraction, and upsampling reconstruction.
[0011] Preferably, the generator module includes a multi-scale information completion module, a deep feature extraction module, and an upsampling reconstruction module; The multi-scale information completion module contains three parallel independent branches, each composed of a different number of downsampling convolutional units, used to map the input data to feature spaces of three different spatial scales; The deep feature extraction module consists of multiple cascaded residual blocks, each containing a convolutional layer and a PReLU activation function, and employing skip connections. The upsampling reconstruction module is used to restore the feature map resolution to the target size and output the predicted magnetic field distribution image.
[0012] Preferably, the sparse data reconstruction network is optimized using only sparse magnetic field distribution image samples and corresponding mask matrix samples during training, without using the corresponding complete high-resolution magnetic field image as supervision information.
[0013] Preferably, the determination of the pixel loss value at the effective sampling point location between the predicted sparse magnetic field distribution image and the original sparse sample includes... According to the mask matrix The actual distribution location of the sampling point data of the original image samples is used to calculate the reconstructed value at the original sparse sampling point locations. Compared with the actual measured value The mean square error between them; The loss is calculated using the pixel loss formula, as follows: ; in, These are the height and width of the image, respectively; This is the value of the mask matrix at this point, which is 1 at the sampling point and 0 at other positions; The predicted magnetic field distribution image output by the generator module; The image sample represents the sparse magnetic field distribution of the original input.
[0014] Preferably, determining the adversarial loss value between the predicted sparse magnetic field distribution image and the original sparse sample includes: The predicted sparse magnetic field distribution image and the original sparse sample are input into the discriminator module, which performs a realism judgment and outputs the judgment result. The adversarial loss value is calculated based on the judgment result, as follows: ; in, This represents element-wise multiplication. For the mask matrix, The predicted magnetic field distribution image output by the generator module; The discriminator scores the authenticity of the reconstructed sample after sparse sampling; For smooth labels.
[0015] Preferably, the combined pixel loss value and adversarial loss value are used to construct the generator's total loss function to optimize the generator module, including: Data pixel loss value Fighting against data loss values Construct the generator total loss function Represented as: ; in, and These are the weights for pixel loss and adversarial loss, respectively.
[0016] Preferably, the step of inputting the sparse magnetic field distribution image samples and the predicted sparse magnetic field distribution image into the discriminator module, and calculating the discriminator loss value based on the classification result to optimize the discriminator module includes: The discriminator module minimizes its total loss function. Perform self-optimization. Loss from real sparse magnetic field image samples and loss for image samples of the predicted sparse magnetic field The composition is as follows: ; in: ; in, and To smooth the labels, The input is a sparse magnetic field distribution image sample. The generator module outputs a predicted magnetic field distribution image. This is the output of the discriminator module.
[0017] This invention also proposes a system for implementing the high-resolution magnetic field imaging method based on sparse data reconstruction networks as described above, the system comprising: The magnetic field image sample acquisition and preprocessing module is used to acquire sparse magnetic field distribution image samples and generate corresponding mask matrix samples. The sparse data reconstruction network module is used to receive sparse magnetic field distribution image samples and output a predicted magnetic field distribution image through the sparse data reconstruction network; the sparse data reconstruction network includes a generator module and a discriminator module. The loss calculation and network optimization module is used to calculate the data pixel loss value and data adversarial loss value for the generator module and the discriminator loss value for the discriminator module, and to optimize the network parameters of the generator module and the discriminator module respectively. The imaging results output and storage module is used to output the final high-resolution complete magnetic field image and store the data.
[0018] The beneficial effects of this invention are as follows: 1. This invention enables the efficient generation of high-resolution magnetic field distribution images using only sparse magnetic field measurement data, without requiring complete high-resolution training images. It employs a generative adversarial network (GAN) framework, using a generator module to achieve multi-scale, deep feature mapping from sparse to complete data, and a discriminator module to ensure the physical authenticity of the reconstructed results. This method utilizes a mask matrix to precisely constrain the data fidelity of known sampling points, ensuring that the reconstructed image strictly matches the measured values at the measurement locations. Simultaneously, adversarial training guides the network to learn the inherent distribution patterns of the magnetic field data, resulting in natural and reasonable filling of unknown areas, effectively avoiding the blurring and artifacts caused by traditional interpolation methods.
[0019] 2. This invention enables magnetic field imaging to maintain high spatial resolution while significantly reducing the time and hardware costs required for data acquisition. It is particularly suitable for industrial sites with high requirements for detection efficiency, such as rapid magnetic field scanning and condition assessment of motors and batteries in new energy vehicles. It provides a practical and feasible technical solution for high-precision, non-invasive equipment monitoring and fault diagnosis. Attached Figure Description
[0020] Figure 1 A flowchart of a high-resolution magnetic field imaging method based on sparse data network reconstruction in this invention; Figure 2 This is a schematic diagram of the experimental platform in the example section of this invention; Figure 3 This is a schematic diagram of the network structure of the sparse data reconstruction network in this invention; Figure 4 This is a schematic diagram of the generator multi-scale information completion module in this invention; Figure 5 This is a schematic diagram of the discriminator feature extraction module in this invention; Figure 6This is the reconstruction result of the simulated sparse magnetic field image data in this invention; Figure 7 This is the reconstruction result of the real sparse magnetic field image data in this invention. Detailed Implementation
[0021] The following description provides specific application scenarios and requirements for this specification, intended to enable those skilled in the art to make and use the contents of this specification. Various partial modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but rather to the widest scope consistent with the claims.
[0022] The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not restrictive. For example, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. When used in this specification, the terms “comprising,” “including,” and / or “containing” mean that the associated integers, steps, operations, elements, and / or components are present, but do not exclude the presence of one or more other features, integers, steps, operations, elements, components, and / or groups, or that other features, integers, steps, operations, elements, components, and / or groups may be added to the system / method.
[0023] Considering the following description, these and other features of this specification, as well as the operation and function of the related components of the structure, and the economy of assembly and manufacture of the parts, can be significantly improved. All of these form part of this specification with reference to the accompanying drawings. However, it should be clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.
[0024] The flowcharts used in this specification illustrate operations implemented according to some embodiments of this specification. It should be clearly understood that the operations in the flowcharts may not be implemented in a sequential order. Instead, the operations may be implemented in reverse order or simultaneously. Furthermore, one or more additional operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.
[0025] The explanations and descriptions of specific technical terms used in this invention are as follows: The sparse magnetic field image sample referred to in this invention is a two-dimensional data structure (e.g., an image or a matrix) with a resolution of It has the following characteristics: 1. Data sparsity: In the entire two-dimensional data structure representing the target imaging area, only some coordinate points corresponding to the physical sensor position contain valid magnetic field measurements; while all other non-sampled coordinate points are filled with preset invalid or zero values.
[0026] 2. Spatial Location Correspondence: The spatial coordinates of each valid magnetic field measurement value in its data structure, such as the pixel index (i,j), are mapped to the actual spatial location of the magnetic field sensor that acquired the data on the physical measurement plane, such as the physical coordinates (x,y). This ensures that the sparse data accurately reflects the spatial layout of the physical sensor.
[0027] 3. Sampling distribution flexibility: The spatial distribution of the effective measurement points can be a regular uniform grid distribution or an irregular non-uniform distribution set according to actual needs.
[0028] In this invention, the "mask matrix sample" refers to a two-dimensional data matrix composed of binary values (0 and 1) that corresponds one-to-one with the sparse magnetic field image sample, and its size is the same as that of the sparse magnetic field image sample. The position of the element with a value of 1 corresponds precisely to the position of the effective magnetic field measurement point, while the position of the element with a value of 0 corresponds to the position of the non-sampling point.
[0029] The "complete magnetic field distribution image" referred to in this invention means a magnetic field distribution image in which all coordinate points in the target imaging region are valid magnetic field measurements or predictions, with a resolution of [resolution missing]. ; The "sparse data reconstruction network" referred to in this invention refers to a sparse data reconstruction network based on multi-scale information completion.
[0030] Example 1
[0031] like Figure 1 As shown, one embodiment of the present invention proposes a high-resolution magnetic field imaging method based on sparse data reconstruction networks, the overall scheme of which is as follows: First, image samples obtained from sparse magnetic field measurements and their corresponding binary mask matrices are acquired. The mask matrix is used to identify the locations of valid sampling points. Then, the sparse magnetic field image is input into a pre-constructed sparse data reconstruction network, which includes a generator module and a discriminator module. The generator module is responsible for multi-scale information completion, deep feature extraction, and upsampling reconstruction of the sparse input, outputting a predicted complete magnetic field distribution image. To further constrain the reconstruction quality, the complete image output by the generator is multiplied element-wise with the mask matrix to obtain a predicted sparse image that retains values only at the sampling points. Next, the pixel-level error between the predicted sparse image and the original sparse samples at the valid sampling point locations identified by the mask is calculated to form a pixel loss, thereby ensuring the numerical fidelity of the reconstruction result at known measurement points. Simultaneously, the predicted sparse image and the original sparse samples are fed into the discriminator module, where the discriminator judges their authenticity and calculates an adversarial loss. This loss guides the generator to learn the inherent physical laws of the spatial distribution of magnetic field data, enabling the reconstructed image to have a reasonable structure and continuity in unknown regions. Subsequently, combining the pixel loss and adversarial loss described above, a total loss function for the generator is constructed, and this function is used to optimize the generator parameters. Simultaneously with generator optimization, the discriminator also calculates its own discriminator loss based on its classification accuracy of real and generated sparse samples, and uses this to optimize itself, improving its ability to distinguish between real and fake samples. The generator and discriminator compete and evolve together during iterative training until the network reaches stability. Finally, the fully trained generator module is fixed for the inference stage: directly inputting the sparse magnetic field distribution image to be reconstructed into the generator outputs a high-resolution, complete magnetic field distribution image, thereby significantly improving the overall efficiency of magnetic field data acquisition and imaging while ensuring imaging quality.
[0032] 1. Main body of the method The method disclosed in this embodiment is based on a Generative Adversarial Network (GAN) framework. Its main structure consists of a generator network module and a discriminator network module, hereinafter referred to as the generator and discriminator. Unlike existing technologies, this method does not rely on paired high- and low-resolution complete image datasets for training. Instead, it directly uses sparse magnetic field images containing a large number of missing data points as input. Through the designed network structure and loss function, it learns the inherent spatial distribution patterns of the magnetic field data, thereby achieving reasonable information completion and image reconstruction.
[0033] 1.1 Generator Structure Combination Figure 3In this embodiment, the core task of the generator is to perform nonlinear mapping and reconstruction from sparse magnetic field image samples to a complete magnetic field image. Its network structure mainly follows a multi-stage processing flow from "multi-scale information completion" to "deep feature extraction" and then to "upsampling reconstruction".
[0034] Combination Figure 4 The generator receives sparse magnetic field image samples as input. First, these image samples are read and converted into matrix data, which is then fed into a multi-scale information completion module. This module contains three parallel, independent branches, each consisting of a different number of downsampled convolutional units. Each downsampled convolutional unit consists of a convolutional layer and a PReLU activation function. Through these three branches, the original sparse data is synchronously mapped to three low-resolution feature spaces at three different spatial scales. This design allows the network to perform preliminary physical feature inference and completion of other missing data regions at different scales, utilizing local information around known sampling points.
[0035] After imputing missing information at multiple scales, the feature maps output from each branch are fused and input into the network's backbone for deep feature extraction. This backbone consists of sixteen cascaded residual blocks. Each residual block contains two 3×3 convolutional layers and a PReLU activation function, with short-range skip connections adding the block's input and output element-wise. Furthermore, a long-range skip connection directly connects the input and output of the entire residual sequence. This deep residual structure greatly facilitates the efficient propagation of gradients in deep networks and enhances the network's feature learning and representation capabilities.
[0036] Combination Figure 5 After deep feature extraction, the generated high-dimensional feature map enters the upsampling reconstruction stage. This stage consists of two cascaded upsampling modules, each consisting of a convolutional layer, a pixel rearrangement operation, and a PReLU activation function. Its function is to progressively and efficiently restore the resolution of the feature map to the target size. Finally, the network uses a convolutional layer with a large 9×9 kernel to perform final integration and mapping of the multi-channel feature map, restoring it to a single-channel, complete, high-resolution reconstructed magnetic field image and outputting the result.
[0037] 1.2 Discriminator Structure In this embodiment, the discriminator is a deep convolutional binary classifier. Its main task is to determine the authenticity of the reconstructed image output by the generator, thereby guiding the generator to learn the inherent distribution law of real magnetic field data in adversarial training.
[0038] The discriminator's network structure mainly consists of two stages: feature extraction and classification. In the feature extraction stage, the discriminator receives image data and feeds it into a deep network backbone composed of eight 3×3 convolutional layers. This backbone alternates between convolutional layers with strides of 1 and 2: four convolutional layers with a stride of 1 are responsible for doubling the number of channels in the feature map layer by layer to increase the abstraction level and depth of the features; while four convolutional layers with a stride of 2 are responsible for compressing the spatial size of the feature map step by step to systematically expand the receptive field. During this process, each convolutional layer uses LReLU as the activation function to ensure the stability of the information flow and the effective transmission of gradient signals, preventing gradient vanishing.
[0039] In the classification stage, the discriminator first flattens the high-dimensional feature map extracted in the previous stage, transforming it into a one-dimensional feature vector. This vector then undergoes final dimensionality reduction and information integration through two fully connected layers. Finally, a sigmoid activation function maps the final output value to a probability value between 0 and 1, representing the likelihood that the discriminator considers the input image "real," thus completing its classification task.
[0040] 1.3 Loss Function In this embodiment, by introducing a mask matrix M that strictly corresponds to the input sparse data, precise constraints on the known data point information are achieved. At the same time, through two parts of generator loss, the reconstructed complete magnetic field distribution image data is both accurate and realistic.
[0041] Total loss function of the generator Due to pixel loss and combat losses The weighted sum of the two parts is expressed as follows: (1) in, and These are the weights for pixel loss and adversarial loss, respectively.
[0042] Pixel loss It is responsible for ensuring the data fidelity of the reconstruction result at known physical measurement points. It does not calculate the error of the entire image, but rather, based on the distribution of the actual sampling point data of the original image samples shown in the mask matrix M, it only calculates the reconstructed value at the original sparse sampling point locations. Compared with the actual measured value The mean square error between them. The formula is as follows: (2) in, These are the height and width of the image, respectively. This is the value of the mask matrix at this point, which is 1 at the sampling point and 0 at the other positions. The reconstructed value at this point is the predicted complete magnetic field distribution image output by the generator. This represents the value at this location from a real, sparse magnetic field distribution image sample. This loss function mandates that the generator accurately reproduces the numerical values at locations supported by real physical data.
[0043] At the same time, combating losses It is responsible for ensuring the physical authenticity of the reconstruction results in the unknown area.
[0044] It uses a discriminator to evaluate the realism of the reconstruction results, driving the generator to learn the inherent physical relationships between sampling points, thus making the filling of vast unknown regions more reasonable, rather than simple mathematical smoothing interpolation. Its expression is: (3) in, This represents element-wise multiplication. Represents the mask matrix, This represents the output of the generator. This represents the discriminator's score on the realism of the reconstructed sample after sparse sampling. For smooth labels.
[0045] The above-mentioned collaborative optimization strategy, which uses two loss terms—pixel loss and adversarial loss—to simultaneously ensure the accuracy of the reconstructed data at known sampling points and the authenticity of the reconstructed data at unknown sampling points, is the core of this invention's ability to generate high-quality dense images from sparse data.
[0046] As a binary classifier, the discriminator's shallow objective is to maximize its classification accuracy for both classes of input samples. This classification result simultaneously provides the generator's optimization process with a precise and dynamic measure of "physical realism." This measure plays a crucial role in improving the quality of the final reconstructed data, especially in the unsampled regions that require padding.
[0047] The discriminator minimizes its total loss function. This allows for self-optimization. The function forces the discriminator to learn the intrinsic characteristics inherent in real magnetic field data samples that cannot be described by simple mathematical formulas, such as the smoothness of field lines, natural gradient variations, and complex spatial correlations between different regions. Total loss function It consists of two parts: (4) Among them, the loss for real sparse magnetic field image samples The expression is: (5) By minimizing this loss, the discriminator can learn and memorize the characteristic distribution that a real magnetic field should have.
[0048] Loss on the predicted sparse magnetic field generated and sampled by the generator The expression is: (6) By minimizing this loss, the discriminator can learn to identify any "flaws" or "artifacts" in the generator's current output that do not match the true features.
[0049] To ensure more stable training and prevent premature convergence of the discriminator, the labels in this invention have been smoothed. and For smooth labels, it is (7) in, This is the label smoothing factor, and its magnitude determines the strength of label smoothing.
[0050] The impact on the final reconstructed data is that when the discriminator is optimized to be sufficiently "sensitive," it can detect any simplistic padding (such as overly smoothed or unnatural interpolation) made by the generator in non-sampling regions that does not conform to physical laws. During the generator's self-optimization, the gradient signal provided by the discriminator can forcefully guide the generator to correct these unrealistic regions, thereby fundamentally improving the global physical realism and credibility of the reconstructed image.
[0051] 1.4 Dataset Creation Because the experimental setup requires a lot of time to acquire magnetic field images, especially under high-resolution conditions, acquiring a sufficient amount of high-resolution magnetic field data for constructing an experimental dataset becomes very time-consuming, which constitutes a significant bottleneck in research and application in this field.
[0052] It is worth emphasizing that the sparse data reconstruction network proposed in this invention has significant advantages in training mechanism. Its training process does not rely on paired low-resolution and high-resolution image datasets, but only on sparse magnetic field distribution image datasets that are directly collected or indirectly generated. This greatly reduces the difficulty of obtaining network training datasets and makes this invention feasible for practical deployment.
[0053] In this embodiment, the training input to the network is a sparse magnetic field image generated by applying a sparse sampling mask to the aforementioned high-resolution simulated image. However, in order to intuitively evaluate the reconstruction performance of the method of the present invention, the original, complete high-resolution simulated magnetic field image is still retained and used as the real data standard in the verification stage to intuitively compare and demonstrate the reconstruction results.
[0054] Therefore, this embodiment employs an efficient physical simulation method based on the Biot-Savart law to replace the time-consuming physical acquisition process. Specifically, by using a numerical calculation model based on the Biot-Savart law and combining it with various parameterized analytical functions for current distribution, this invention can accurately solve for and generate magnetic field intensity distribution images with different shapes and complexities.
[0055] Compared to physical data acquisition, this simulation method completely decouples the dataset generation process from physical experiments, enabling the generation of high-quality data on a large scale in a short time, thus greatly accelerating the validation process. Furthermore, by programmatically adjusting the analytical function, it can create magnetic field patterns with far greater diversity than those in physical experiments. The spatial resolution of the simulated images can be precisely set and freely adjusted according to training needs, greatly facilitating model adaptation to different accuracy requirements. Therefore, this efficient, flexible, and highly controllable simulation strategy provides rich and high-quality data resources for subsequent model training and validation.
[0056] Case 1 To test the model's effectiveness, simulated magnetic field images were first used. Simultaneously, to simulate the environmental and component noise present in real-world magnetic field data during actual measurement, Gaussian noise with a standard deviation of 0.1 was added to the simulated magnetic field images. The formula is expressed as follows: ; in, For noisy magnetic field image data points, These are the original magnetic field image data points. It is a noise tensor with the same size as the input data. , It is the standard deviation of random noise, which is used to measure the noise intensity of added noise.
[0057] like Figure 6 As shown, it intuitively demonstrates the magnetic field data reconstruction results of this method.
[0058] Case 2 To further verify the effectiveness of the method of the present invention in real physical scenarios, the present invention was tested using a physical circuit board with circuit patterns.
[0059] (1) Construction of the experimental platform like Figure 2 As shown, this embodiment constructs a magnetic field imaging platform based on a high-density sensor array. This platform achieves high-precision, multi-dimensional magnetic field data acquisition through precise collaboration of multiple modules. At the system level, the platform integrates a motion control system, a high-sensitivity sensor array unit, and a data acquisition and control unit. Specifically, its core components include: a two-dimensional motion platform composed of two stepper motors; a sensor array consisting of two 8-channel MR2103 magnetic sensor chips mounted side-by-side; and a control and acquisition system composed of an NI USB-6289 data acquisition card, a computer, a programmable DC power supply DP800, and a digitally controlled DC power supply SPE3102. The MR2103 magnetic sensor possesses a sensitivity of up to 5 mV / GS, providing hardware assurance for accurately capturing subtle changes in the magnetic field.
[0060] In terms of physical structure design, two 8-channel magnetic sensor chips are fixed on a specially customized non-magnetic material substrate. This design aims to fundamentally eliminate the interference of the substrate itself on magnetic field measurements, thereby ensuring the stability and fidelity of the acquired data. The circuit board under test is securely mounted directly above the sensor array. The entire sensing substrate is driven by two orthogonal stepper motors, capable of precise linear displacement along the x-axis and y-axis respectively, thereby achieving raster-like scanning of the target area to systematically cover the entire imaging range.
[0061] The platform's operation is designed as an automated sequence of alternating stepping and acquisition cycles. During the experiment, the stepper motor strictly follows a preset scanning path for stepping movement. During the brief pause after each step displacement, the NI USB-6289 data acquisition card is immediately triggered, synchronously recording all magnetic field strength data at the current spatial coordinate point. Because the sensing directions of adjacent channels on the sensor chip are perpendicular, the platform can simultaneously capture magnetic field vector components in different directions, thus obtaining more comprehensive multidimensional magnetic field information. The acquired data, along with its spatial coordinate information, is recorded in real-time in a spreadsheet, providing structured raw data for subsequent analysis and processing. This coordinated movement and acquisition process continues until the entire preset area of the circuit board is fully covered. Furthermore, the step distance of the stepper motor, as a key parameter, can be flexibly set in the control software. This function enables the platform to easily acquire magnetic field images at different spatial resolutions; specific parameters can be found in Table 1. This allows for free adjustment between acquisition efficiency and imaging accuracy according to diverse experimental needs, greatly improving the platform's applicability and practicality.
[0062] Table 1 ; In this invention, Gaussian noise was also added to the actual magnetic field image samples to further simulate the acquisition results under strong interference conditions.
[0063] like Figure 7 As shown, the magnetic field data reconstruction results of this method are intuitively demonstrated, which effectively removes the added Gaussian noise and the transverse artifact noise caused by motor vibration during actual acquisition on the test bench.
[0064] In summary, this invention proposes a high-resolution magnetic field imaging method based on sparse data reconstruction networks to achieve complete high-resolution magnetic field image reconstruction from sparse magnetic field image data. By combining an innovative multi-scale information completion architecture with a unique mask structure and a multifunctional loss function, this method effectively eliminates the dependence on large-scale paired training datasets, while significantly improving the physical realism and accuracy of the reconstructed image in unknown regions.
[0065] Second Embodiment A system for implementing the high-resolution magnetic field imaging method based on sparse data reconstruction network as described in the first embodiment, the system comprising a magnetic field image sample acquisition and preprocessing module, a sparse data reconstruction network module, a loss calculation and network optimization module, and an imaging result output and storage module.
[0066] The magnetic field image sample acquisition and preprocessing module is used to acquire sparse magnetic field distribution image samples and generate corresponding mask matrix samples.
[0067] The sparse data reconstruction network module is used to receive sparse magnetic field distribution image samples and output the predicted magnetic field distribution image through the sparse data reconstruction network; the sparse data reconstruction network includes a generator module and a discriminator module.
[0068] The sparse data reconstruction network module internally encapsulates a trained or untrained generative adversarial network. This includes: Generator Module: This module is configured to perform the functions described in "1.1 Generator Structure" of the first embodiment. Specifically, its internal program or hardware logic implements: Multi-scale information completion module: It contains three parallel convolution branches that downsample the input sparse image by different factors and perform preliminary feature completion in different scale spaces.
[0069] The deep feature extraction module consists of multiple cascaded residual blocks that fuse shallow and deep features through skip connections to learn the deep nonlinear mapping relationship of the magnetic field data.
[0070] Upsampling reconstruction module: Through operations such as deconvolution or pixel rearrangement, the feature map is upsampled to the target resolution, and finally the predicted complete magnetic field distribution image is output (single channel, 128×128 resolution).
[0071] Discriminator Module: This module is configured to perform the functions described in "1.2 Discriminator Structure" of the first embodiment. Internally, it is a deep convolutional neural network that receives a sparse magnetic field image as input. After extracting features through multiple convolutional layers, it outputs a scalar value through fully connected layers and a sigmoid function, representing the probability that the discriminator determines the input to be a "real" sparse sample.
[0072] Network parameter storage unit: Stores all trainable parameters (weights and biases) of the generator and discriminator modules. During the inference phase, this unit provides the pre-trained optimal parameters; during the training phase, the parameters in this unit are continuously updated by the loss calculation and network optimization modules.
[0073] The loss calculation and network optimization module is used to calculate the data pixel loss value and data adversarial loss value for the generator module, and the discriminator loss value for the discriminator module, and to optimize the network parameters of the generator module and the discriminator module respectively.
[0074] Specifically, the loss calculation and network optimization module includes: Loss calculation unit: Calculates various loss values in real time according to the formula defined in "1.3 Loss Function" of the first embodiment.
[0075] Pixel loss calculator: Receives the generator output Given the original sparse sample x and the mask M, the mean square error at the sampling points is calculated strictly according to formula (2). .
[0076] Adversarial Loss Calculator: Receives the discriminator's score for the generated sample D, combined with smoothed labels. Calculate according to formula (3) .
[0077] Discriminator Loss Calculator: Receives the discriminator's scores for the real sample D and the generated sample D, combined with smoothed labels. and Calculate according to formulas (5) and (6) respectively. and Then, calculate the average using formula (4) to obtain the total loss. .
[0078] Generator Total Loss Calculator: According to formula (1), for and Perform a weighted summation to obtain Weight and This can be preset by the operator (e.g., all set to 1).
[0079] Parameter optimization unit: Based on the above loss values, the network parameters are updated using the backpropagation algorithm and an optimizer (such as the Adam optimizer).
[0080] Generator optimizer: to minimize To achieve the goal, calculate the gradient and update the parameters of the generator module.
[0081] Discriminator optimizer: to minimize To achieve the objective, calculate the gradient and update the parameters of the discriminator module.
[0082] This unit controls the generator and discriminator to perform alternating optimizations until the preset training rounds or loss convergence criteria are reached.
[0083] The imaging results output and storage module is used to output the final high-resolution complete magnetic field image and store the data.
[0084] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0085] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0086] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A high-resolution magnetic field imaging method based on sparse data network reconstruction, characterized in that, The method includes: The sparse magnetic field distribution image to be reconstructed is input into a pre-built sparse data reconstruction network, which outputs a high-resolution complete magnetic field distribution image. The sparse data reconstruction network includes a generator module and a discriminator module, which are constructed and optimized through the following steps: Obtain sparse magnetic field distribution image samples and corresponding mask matrix samples; The predicted magnetic field distribution image is determined based on the sparse magnetic field distribution image; The predicted magnetic field distribution image is multiplied element-wise with the mask matrix sample to obtain the predicted sparse magnetic field distribution image. Based on the mask matrix, determine the pixel loss value between the predicted sparse magnetic field distribution image and the original sparse sample at the effective sampling point location; Determine the adversarial loss value between the predicted sparse magnetic field distribution image and the original sparse sample; A total loss function for the generator is constructed by combining pixel loss values and adversarial loss values to optimize the generator module; The sparse magnetic field distribution image samples and the predicted sparse magnetic field distribution image are input into the discriminator module, and the discriminator loss value is calculated based on the classification results to optimize the discriminator module.
2. The high-resolution magnetic field imaging method based on sparse data reconstruction network according to claim 1, characterized in that, The step of determining the predicted magnetic field distribution image based on the sparse magnetic field distribution image includes: The sparse magnetic field distribution image sample is input into the generator module; The generator module outputs the predicted magnetic field distribution image through multi-scale information completion, deep feature extraction, and upsampling reconstruction.
3. The high-resolution magnetic field imaging method based on sparse data network reconstruction according to claim 2, characterized in that, The generator module includes a multi-scale information completion module, a deep feature extraction module, and an upsampling reconstruction module; The multi-scale information completion module contains three parallel independent branches, each composed of a different number of downsampling convolutional units, used to map the input data to feature spaces of three different spatial scales; The deep feature extraction module consists of multiple cascaded residual blocks, each containing a convolutional layer and a PReLU activation function, and employing skip connections. The upsampling reconstruction module is used to restore the feature map resolution to the target size and output the predicted magnetic field distribution image.
4. The high-resolution magnetic field imaging method based on sparse data reconstruction network according to claim 1, characterized in that, The sparse data reconstruction network optimizes itself using only sparse magnetic field distribution image samples and corresponding mask matrix samples during training, without needing to use the corresponding complete high-resolution magnetic field image as supervision information.
5. The high-resolution magnetic field imaging method based on sparse data reconstruction network according to claim 1, characterized in that, The determination of the pixel loss value at the effective sampling point location between the predicted sparse magnetic field distribution image and the original sparse sample includes: According to the mask matrix The actual distribution location of the sampling point data of the original image samples is used to calculate the reconstructed value at the original sparse sampling point locations. Compared with the actual measured value The mean square error between them; The loss is calculated using the pixel loss formula, as follows: ; in, , These are the height and width of the image, respectively; This is the value of the mask matrix at this point, which is 1 at the sampling point and 0 at other positions; The predicted magnetic field distribution image output by the generator module; The image sample represents the sparse magnetic field distribution of the original input.
6. The high-resolution magnetic field imaging method based on sparse data reconstruction network according to claim 5, characterized in that, The determination of the adversarial loss value between the predicted sparse magnetic field distribution image and the original sparse sample includes: The predicted sparse magnetic field distribution image and the original sparse sample are input into the discriminator module, which performs a realism judgment and outputs the judgment result. The adversarial loss value is calculated based on the judgment result, as follows: ; In this context, ⊙ represents element-wise multiplication. For the mask matrix, The predicted magnetic field distribution image output by the generator module; The discriminator scores the authenticity of the reconstructed sample after sparse sampling; For smooth labels.
7. The high-resolution magnetic field imaging method based on sparse data reconstruction network according to claim 6, characterized in that, The combined pixel loss value and adversarial loss value are used to construct the generator's total loss function to optimize the generator module, including: Data pixel loss value Fighting against data loss values Construct the generator total loss function Represented as: ; in, and These are the weights for pixel loss and adversarial loss, respectively.
8. The high-resolution magnetic field imaging method based on sparse data reconstruction network according to claim 7, characterized in that, The step of inputting sparse magnetic field distribution image samples and predicted sparse magnetic field distribution images into the discriminator module, and calculating the discriminator loss value based on the classification results to optimize the discriminator module includes: The discriminator module minimizes its total loss function. Perform self-optimization. Loss from real sparse magnetic field image samples and loss for image samples of the predicted sparse magnetic field The composition is as follows: ; in: ; in, and To smooth the labels, The input is a sparse magnetic field distribution image sample. The generator module outputs a predicted magnetic field distribution image. This is the output of the discriminator module.
9. A system for implementing the high-resolution magnetic field imaging method based on sparse data reconstruction networks as described in any one of claims 1-8, characterized in that the system... include: The magnetic field image sample acquisition and preprocessing module is used to acquire sparse magnetic field distribution image samples and generate corresponding mask matrix samples. The sparse data reconstruction network module is used to receive sparse magnetic field distribution image samples and output a predicted magnetic field distribution image through the sparse data reconstruction network; the sparse data reconstruction network includes a generator module and a discriminator module. The loss calculation and network optimization module is used to calculate the data pixel loss value and data adversarial loss value for the generator module and the discriminator loss value for the discriminator module, and to optimize the network parameters of the generator module and the discriminator module respectively. The imaging results output and storage module is used to output the final high-resolution complete magnetic field image and store the data.
Citation Information
Patent Citations
Magnetic particle three-dimensional reconstruction imaging method based on generative adversarial network
CN115880440A
MPI image reconstruction method, system and equipment based on sparse system matrix
CN116563412A
Sampling strategies for sparse magnetic resonance image reconstruction
US20150108978A1
System and method for high-resolution spectroscopic imaging
US20160202336A1
Cited By
Sparse magnetic field data reconstruction method, system and device and storage medium
CN122066800A
A method, system, device and storage medium for reconstructing sparse magnetic field data
CN122066800B