A hyperspectral reconstruction method and system based on mask logic coupling and deep expansion state space
Patent Information
- Application Number
- CN202610893069.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-21
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一条形成全链路的技术方案:解决基于Transformer的重构方法在处理大尺寸高光谱图像时,计算复杂度高、显存消耗大、无法适配边缘端部署的问题;解决基于深度展开的重构方法中,物理掩模仅作为静态输入、先验利用率低,导致重构结果光谱保真度不足的问题;解决现有重构算法缺乏对CASSI物理成像模型和高光谱数据固有特性的约束,重构结果易出现物理不合理、光谱跳变、空间噪声的问题;解决现有深度展开网络迭代收敛慢、阶段间信息丢失、对硬件误差鲁棒性低的问题;解决现有重构算法/系统对不同硬件厂商生成的随机编码孔径适配性差、泛化能力弱,且与CASSI硬件耦合度高、部署灵活性低的问题
本发明将状态空间模型的线性序列建模特性引入CASSI高光谱重构流程中。采用掩模门控状态空间单元作为主要特征建模模块,减少对传统 Transformer 或深层 CNN 堆叠结构的依赖,相较于全局自注意力结构,其特征建模过程具有更接近线性复杂度的计算特性,有助于降低大尺寸图像的重构耗时与显存消耗;配套软硬件解耦的模块化系统,可根据算力条件配置为云端推理、边缘端或嵌入式设备部署形式。
Smart Images

Figure CN122597485A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hyperspectral image processing technology, specifically to a hyperspectral image reconstruction method and system based on Mask Logic Gating and a depth unfolded state-space model (SSM). Background Technology
[0002] Single-frame snapshot compressed imaging (CASSI) is one of the current technologies in the field of hyperspectral imaging. Its core principle is to perform spatial-spectral joint modulation on a three-dimensional hyperspectral data cube through an optical coded aperture (physical mask), compressing and projecting the three-dimensional hyperspectral information into a two-dimensional observation image. This effectively solves the problems of slow acquisition speed and large hardware size of traditional hyperspectral imaging technologies, and has been successfully applied in fields such as dynamic scene hyperspectral acquisition, portable hyperspectral imaging equipment, remote sensing, and biomedical imaging.
[0003] In recent years, existing hyperspectral reconstruction algorithms have primarily focused on improving reconstruction accuracy, but there is still room for improvement in terms of computational efficiency, physical interpretability, and hardware adaptability. Therefore, designing a hyperspectral image reconstruction method that balances reconstruction accuracy, computational efficiency, physical interpretability, and engineering deployment adaptability is of great significance.
[0004] As discussed above, the reconstruction of a CASSI system is essentially a process of solving an inverse problem under physical constraints. Purely data-driven methods designed solely to improve reconstruction accuracy fail to explicitly utilize the prior physical imaging information of the CASSI system. Therefore, this invention argues that achieving high-precision, low-overhead hyperspectral image reconstruction hinges on a low-level fusion of physical priors and deep feature learning, while simultaneously considering the computational efficiency and engineering deployability of the algorithm. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a complete technical solution: It solves the problems of high computational complexity, high memory consumption, and inability to adapt to edge deployments when processing large-size hyperspectral images using Transformer-based reconstruction methods; it addresses the issue of insufficient spectral fidelity in reconstruction results due to the physical mask being used only as static input and low prior utilization in depth-unfolding-based reconstruction methods; it addresses the lack of constraints on the inherent characteristics of the CASSI physical imaging model and hyperspectral data in existing reconstruction algorithms, leading to physical inconsistencies, spectral jumps, and spatial noise in the reconstruction results; it addresses the problems of slow iterative convergence, inter-stage information loss, and low robustness to hardware errors in existing depth-unfolding networks; and it addresses the problems of poor adaptability to random coded apertures generated by different hardware manufacturers, weak generalization ability, high coupling with CASSI hardware, and low deployment flexibility in existing reconstruction algorithms / systems.
[0006] To achieve the above objectives, the present invention specifically adopts the following technical solution: A hyperspectral reconstruction method based on mask logic coupling and depth unfolding state space specifically includes the following steps: S1, Input data acquisition and preprocessing: Acquire the two-dimensional compressed observation image and corresponding physical mask output by the single-frame snapshot compressed imaging (CASSI) system, and complete hardware error elimination and normalization preprocessing; S2, Depth Unfolding Iterative Network Initialization: Construction The weight-sharing depth unfolds the iterative network in each iteration stage to complete input feature dimensionality upscaling, recursive residual redistribution buffer initialization, and network weight initialization. S3, Multi-stage mask feature extraction and gating signal generation: Extract the spatial-spectral joint local features of the physical mask in each iteration stage and map them to generate gating signals for controlling the state memory weights of the state space model (SSM). S4, Gated Signal Modulation of SSM Hidden State Transition: Based on Mask Gated State Space Unit (MSSM), a four-way space-spectrum coupled situational scanning method is adopted. The hidden state of SSM is dynamically modulated by the gated signal to complete the extraction of deep features with physical prior enhancement. S5, Physical Consistency Mapping and Cross-Stage Residual Compensation: The observation residuals are calculated based on the CASSI physical imaging model, feature adaptive updates are achieved through a dynamic step size generator, and cross-stage spatial information compensation is completed using a recursive residual redistribution mechanism. S6, Hyperspectral Cube Output and Amplitude Restoration: The output features of the final iteration stage are dimensionally calibrated, feature fused and amplitude restored to output the reconstructed hyperspectral data cube.
[0007] Furthermore, in S1, the preprocessing of the two-dimensional compressed observation image includes subtracting the detector dark current substrate and Gaussian filtering to suppress random noise; the preprocessing of the physical mask includes optional outlier correction, isolated noise removal, or morphological closing operation processing, used to correct local outliers generated during calibration without changing the main spatial distribution of the coded aperture; both the preprocessed observation image and the physical mask are normalized to... The interval serves as the input to the deep unfolding iterative network.
[0008] Furthermore, in S2, the number of iteration stages of the deep unfolded iterative network. All stages share the weights of the SSM module, gating generation module, and dynamic step size generator; input features are mapped to higher dimensions through 1×1 convolution. Three-dimensional features ( (Number of hyperspectral bands); the recursive residual redistribution buffer adopts a first-in-first-out (FIFO) mechanism and is initially empty; the network weights are initialized with Xavier normal distribution for convolutional and fully connected layers, and the bias terms are initialized with constants.
[0009] Furthermore, in S3, the mask feature extraction adopts a spatial-spectral joint non-overlapping block of the local receptive domain. The window covers both the spatial and spectral dimensions. Average pooling is performed on the mask values in each window to obtain local statistical features, which are then stitched together to generate a mask feature map of the same size as the physical mask. The gating signal is generated through a two-layer lightweight fully connected network. The first hidden layer has a dimension of 64 and uses GELU activation function, while the second output layer has a dimension of 1 and uses Sigmoid activation function. The output value range is... The gating signal diagram; during training, physical logic hard constraints are added to the gating signals: the gating signal at the mask occlusion position approaches 0, and the gating signal at the light transmission position approaches 1.
[0010] Furthermore, in S4, the four-way space-spectrum coupled situational scanning adopts an alternating approach of spatial dimension ZScan and spectral dimension CScan to model the spatial long-range correlation and inter-spectral band continuous correlation of hyperspectral data, respectively. The specific method for modulating the hidden state of the SSM with gated signals is as follows: the gated signal diagram... The hidden state matrix of the previous iteration The current stage of selective scanning results of SSM is weighted and fused to obtain the modulated hidden state matrix. ,Right now: in This is an element-wise dot product operation. Selective scan operation for state-space model; gating signal Dynamically control the weights of SSM in retaining historical memory states and updating new observed features in the current iteration stage to avoid information loss caused by setting features in occluded areas to zero.
[0011] Furthermore, in S5, the physical consistency mapping is based on the CASSI linear imaging model: The L1 residual between the predicted observed image and the original preprocessed observed image is calculated. This residual is then enlarged by a 1×1 convolution and superimposed with the SSM output features to achieve fidelity constraints. The dynamic stride generator consists of two 3×3 convolutional layers (stride 1, padding 1) and one fully connected layer. Using the current stage mask features as input, it predicts an update stride in real-time with values ranging from (0,1). The update stride is a function of mask sparsity; the lower the mask transmittance, the smaller the stride. A recursive residual redistribution mechanism... The physical observation residuals of the first stage are downsampled using 2×2 max pooling and stored in a buffer. This process is repeated until the next stage. During the phase, the residuals are upsampled using bilinear interpolation to restore them to their original size and used as input for the bias term, where Positive integers are preferred. The residual is immediately removed from the cache after being called.
[0012] Furthermore, in S6, the final output feature is obtained through... Convolution completes feature fusion and dimensionality calibration, eliminating feature redundancy caused by multi-stage iterations; amplitude restoration maps the normalized pixel values back to the original amplitude range acquired by the CASSI detector (usually 10 ... or The reconstructed hyperspectral cube can be directly connected to downstream tasks such as target detection, spectral recognition, and material classification.
[0013] Furthermore, the deep unrolled iterative network embeds multi-level physical prior constraint layers, which are deeply integrated with the core module: The mask binarization constraint takes effect during the mask feature extraction stage and is used to constrain the mask values to maintain or approach a 0 / 1 binary distribution, thereby avoiding mask value blurring caused by hardware noise. The spectral smoothness constraint takes effect during the SSM feature modulation stage, adding a first-order difference L2 constraint to the spectral dimension features to ensure that the reconstructed spectral curve is continuous and smooth. The spatial sparsity constraint takes effect during the physical consistency mapping stage, adding L1 sparsity constraints to spatial dimension features to suppress spatial noise in the reconstruction results.
[0014] Furthermore, the deep unfolded iterative network adopts an end-to-end joint training approach and is optimized using a multi-dimensional composite loss function, the formula of which is: in The L1 physical consistency loss constrains the matching degree between the predicted observed image and the original observed image, which is the core of ensuring that the reconstruction result conforms to the CASSI physical imaging model. The spectral angle mapping loss constrains the angular deviation between the reconstructed spectrum and the original spectrum; For structural similarity loss, the spatial structural similarity between the reconstructed image and the original image is constrained; The regularization loss includes constraints on spectral smoothness, spatial sparsity, and gating consistency. The weighting coefficient can be set to To achieve a balance between physical consistency, spectral fidelity, and spatial structure constraints; the training process employs a quadruple regularization strategy: weight decay coefficient Gradient clipping maximum norm 1.0, gated generation of fully connected layers dropout probability 0.1, and adding small random Gaussian perturbations to the physical mask during training to simulate hardware installation errors.
[0015] Furthermore, this invention proposes a hyperspectral reconstruction system adapted to the above method, employing a hardware-software decoupling and modular design. The system includes a data input module, a depth unfolding iterative reconstruction module, and a result output module connected in sequence, as well as a hardware interaction interface module connected to the data input module and the CASSI optical acquisition hardware. The data input module includes a data receiving unit, a hardware error elimination unit, and a normalization processing unit. It supports interfaces such as USB3.0, GigE, and CameraLink, and is used to receive CASSI hardware output data and perform preprocessing. The deep unfolding iterative reconstruction module has built-in K cascaded iterative processing units and mask logic coupling, SSM feature modulation, physical consistency mapping, and recursive residual redistribution units, and supports deployment on multiple platforms such as CPU, GPU, FPGA, and Jetson. The result output module includes a feature fusion and dimension calibration unit, an amplitude restoration unit, and a data format conversion unit, and supports output of hyperspectral data formats such as ENVI, TIFF, and HDF5. The hardware interaction interface module integrates the CASSI hardware driver, supports the visual configuration of hardware acquisition parameters and system reconstruction parameters, and improves the compatibility with CASSI hardware from different manufacturers.
[0016] Compared with existing technologies, this invention provides a hyperspectral reconstruction method and system based on mask logic coupling and deep unfolding state space, which has the following beneficial effects: This invention introduces the linear sequence modeling characteristics of state-space models into the CASSI hyperspectral reconstruction process. It employs mask-gated state-space units as the main feature modeling module, reducing reliance on traditional Transformer or deep CNN stacked structures. Compared to global self-attention structures, its feature modeling process has computational characteristics closer to linear complexity, helping to reduce the reconstruction time and memory consumption of large images. The accompanying modular system with decoupled hardware and software can be configured for cloud inference, edge, or embedded device deployment depending on computing power requirements.
[0017] This invention proposes a mask logic coupling mechanism to achieve low-level fusion of physical mask priors and deep features. Compared to methods that only use the mask as an auxiliary input or perform shallow feature fusion, this method incorporates the mask spatial-spectral features into the SSM hidden state transition process in the form of gating signals; combined with multi-level physical prior constraints, it helps to improve hyperspectral reconstruction evaluation metrics such as SAM, PSNR, and SSIM.
[0018] This invention designs a joint strategy of dynamic step size generation and recursive residual redistribution, combined with quadruple regularization, which helps to improve the network convergence speed. With configurable input mask and system calibration parameters, it can adapt to different coding apertures; for hardware systems with significant differences, migration can be achieved through minor fine-tuning. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall process of the hyperspectral reconstruction method provided by the present invention; Figure 2 A schematic diagram of the overall architecture of a deep unfolding iterative network; Figure 3 This is a schematic diagram of the internal structure of a Mask Gated State Space Unit (MSSM). Figure 4 This is a schematic diagram of the path for a four-way space-spectrum coupled situational scanning method; Figure 5 A diagram illustrating the operational principle of the Recursive Residual Redistribution (RRR) mechanism; Figure 6 This is a schematic diagram of the functional modules of the system of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Example 1: like Figures 1-6 As shown, a hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space proposed in one embodiment of the present invention specifically includes the following steps: S1, Input Data Acquisition and Preprocessing: Acquire the two-dimensional compressed observation image and corresponding physical mask output by the single-frame snapshot compressed imaging system. Perform dark current correction and noise suppression processing on the two-dimensional compressed observation image in sequence; perform optional outlier correction or morphological closing operation on the physical mask to eliminate isolated noise points generated during calibration without changing the main spatial distribution of the coded aperture; then normalize both to the [0,1] interval to obtain the preprocessed observation image and physical mask.
[0022] S2, Depth Unfolding Iterative Network Initialization: Construct a depth unfolding iterative network with multiple iteration stages and shared weights. The preprocessed 2D compressed observation image... Represented as size A two-dimensional tensor, representing the physical mask as a dimensional tensor of size . The equivalent 3D mask tensor, where These represent the height and width of the space, respectively. This indicates the number of spectral bands to be reconstructed. (Through...) Convolution maps a two-dimensional observed image to a format of size . The initial features are used as input for the first iteration phase.
[0023] S3, Multi-stage mask feature extraction and gated signal generation: In each iteration stage, spatial-spectral joint feature extraction is performed on the physical mask to generate a mask feature map; the output value range is [value range missing]. The gating signal graph is used to dynamically control the memory weights of the state-space model. The equivalent 3D physical mask is divided into non-overlapping blocks according to preset local windows. Average pooling is performed on the mask values within each local window to obtain local transmittance statistical features. These statistical features are then input into a two-layer fully connected network, and after GELU activation and Sigmoid mapping, the gating signal graph is obtained. The gated signal diagram The range of values is , is used to indicate the confidence level of the corresponding spatial-spectral location for the current observed features.
[0024] S4, Gated Signal Modulation (SSM) Hidden State Transition: A four-way space-spectrum coupled situational scanning method is used to traverse stage features. The hidden state transition of the state space model is dynamically modulated using a gated signal graph, thereby achieving the fusion and enhancement of physical priors and deep features.
[0025] S5, Physical Consistency Mapping and Cross-Stage Residual Compensation: Calculate the predicted observation residual based on the imaging model and apply fidelity constraints; dynamically update the step size in real time by generating the mask features; store the current stage residual in the buffer and perform cross-stage residual compensation in subsequent stages.
[0026] S6, Hyperspectral Cube Output and Amplitude Restoration: The final iterative output features are fused, calibrated, and amplitude restored to output a fully reconstructed hyperspectral data cube, which can be used for subsequent tasks such as target detection, spectral recognition, and material classification. In one optional implementation, the training phase uses a simulation dataset or calibration dataset with a reference hyperspectral data cube for supervised training, and jointly optimizes the network parameters using L1 physical consistency loss, spectral angle mapping loss, structural similarity loss, and regularization loss; the inference phase only requires input of two-dimensional compressed observation images acquired by the CASSI system. With the corresponding physical mask, the reconstructed hyperspectral data cube can be output through the trained depth expansion iterative network.
[0027] This invention employs an end-to-end joint training approach, uses a multi-dimensional composite loss function to optimize the network, and combines regularization strategies such as weight decay, gradient clipping, dropout, and mask perturbation to ensure stable network training and reliable convergence.
[0028] Example 2 This embodiment provides a hyperspectral reconstruction system based on mask logic coupling and deep unfolding state space to implement the hyperspectral reconstruction method described in Embodiment 1. The system adopts hardware and software decoupling and functional modular design, and its overall architecture is as follows: Figure 6 As shown, the specific work steps include the following: S1, Data Input and Preprocessing: The data input module receives the two-dimensional compressed observation image and physical mask data output from the single-frame snapshot compressed imaging hardware. Internally, the module sequentially processes the following: a dark current correction unit subtracts the detector's dark current substrate; a noise suppression unit filters out random noise; a mask preprocessing unit corrects local anomalies or isolated noise points in the mask calibration data; and a normalization unit maps the data to the [0,1] interval, outputting standard tensor data that meets network input requirements. The module supports multiple transmission interfaces and is compatible with input data of different resolutions and spectral ranges.
[0029] S2, Deep Unfolding Iterative Reconstruction: Preprocessed data is fed into the deep unfolding iterative reconstruction module, which performs multi-level iterative reconstruction operations. Internally, the module sequentially generates mask feature maps through a mask feature extraction unit, outputs gate signals through a gating generation unit, performs four-way space-spectrum scanning and hidden state modulation through a state-space modulation unit, calculates observation residuals and applies fidelity constraints through a physical consistency mapping unit, outputs adaptive update step sizes through a dynamic step size generation unit, and implements cross-stage residual compensation through a recursive residual redistribution unit. Simultaneously, a multi-level physical prior constraint layer applies global constraints to the reconstruction process. The module supports multi-platform deployment and can dynamically configure core parameters such as the number of iteration stages and network channels according to computing power and accuracy requirements.
[0030] S3, Result Output and Format Conversion: The reconstructed hyperspectral features are sent to the result output module for post-processing. Internally, the module uses a feature fusion calibration unit to eliminate feature redundancy caused by multi-stage iterations, an amplitude mapping unit to restore normalized data to the detector's original amplitude range, a format conversion unit to export the hyperspectral data cube into various industry standard formats, and a preview generation unit to output pseudo-color composite images and spectral curve previews. The output data can be directly interfaced with various downstream hyperspectral analysis tasks.
[0031] S4, Hardware Interaction and Parameter Configuration: This module enables bidirectional communication and collaborative control between the system and imaging hardware through a hardware interaction interface module. Internally, the module uses a hardware driver unit to adapt to snapshot compression imaging equipment, a protocol conversion unit to achieve interoperability between different interface protocols, a parameter configuration unit to provide a visual interface for setting hardware acquisition parameters and system reconstruction parameters, and a status monitoring unit to provide real-time feedback on hardware operating status and system reconstruction progress. The module supports saving and loading configuration files and can support batch processing workflows.
[0032] The system uses standardized data interfaces between its modules, supports function expansion and module replacement, and can flexibly adapt to imaging hardware from different manufacturers and application needs in different scenarios.
[0033] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space, characterized in that: The method specifically includes the following steps: S1, Input data acquisition and preprocessing: Acquire the two-dimensional compressed observation image and corresponding physical mask output by the single-frame snapshot compressed imaging system; perform dark current correction and noise suppression processing on the two-dimensional compressed observation image, and perform optional outlier correction or morphological closing operation on the physical mask to eliminate isolated noise points generated during the calibration process without changing the main spatial distribution of the coded aperture; then normalize the two to the [0,1] interval to obtain the preprocessed observation image and physical mask; S2, Depth Unfolding Iterative Network Initialization: Construct a depth unfolding iterative network containing K iteration stages, where K is a positive integer greater than or equal to 2, and all iteration stages share network weights; Upscale the preprocessed 2D observation image to 3D initial features through 1×1 convolution, and use it as the input features for the first iteration stage; The recursive residual reallocation buffer is initialized using a first-in-first-out mechanism, and the weights of all network modules are initialized. S3, Multi-stage Mask Feature Extraction and Gated Signal Generation: Within each stage of the deep unfolded iterative network, spatial-spectral joint local feature extraction is performed on the physical mask to obtain a mask feature map that reflects the spatial distribution and spectral modulation characteristics of the mask; the mask feature map is then mapped to a gated signal map with position indexing properties. Gating signals are used to dynamically control the memory weights of the state sequence in a state-space model (SSM). S4, Gated Signal Modulation SSM Hidden State Transition and Prior Enhancement: Using Mask-Gated State Space Element (MSSM) as the basic unit of SSM, a four-way space-spectrum coupled situational scanning method is used to traverse the stage input features; the gated signal graph is utilized. The hidden state transition process of dynamically modulated SSM is used to complete the deep feature extraction with physical prior enhancement. S5, Physical Consistency Mapping and Cross-Stage Residual Compensation: Physical consistency mapping is performed, calculating the physical observation residual between the predicted and original observation images based on the CASSI linear imaging model, and applying fidelity constraints to depth features; a dynamic step size generator predicts and updates the step size in real time based on the current stage mask features, achieving adaptive updating of stage features; a recursive residual redistribution mechanism is used to... Physical observation residuals from stage 1 are transferred to stage 2. Phase, in which Positive integers are preferred. To achieve cross-stage spatial information compensation; S6, Hyperspectral Cubic Output and Amplitude Reconstruction: via The cascaded iterative operation of each stage performs dimensional calibration, feature fusion, and amplitude restoration on the output features of the last stage, outputting a reconstructed hyperspectral data cube.
2. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: In S1, the preprocessing of the two-dimensional compressed observation image includes subtracting the detector dark current substrate and suppressing random noise through Gaussian filtering; the preprocessing of the physical mask includes optional outlier correction, isolated noise removal or morphological closing operation processing, which are used to correct local outliers generated during the calibration process without changing the main spatial distribution of the coded aperture; the preprocessed observation image and physical mask are both normalized to the [0,1] interval and used as input to the depth unfolding iterative network.
3. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: In S2, the number of iteration stages for the deep unfolded iterative network is: Preferred ; Shared across all iteration phases Weights of the module, gating generation module, and dynamic step size generator; Input feature initialization is achieved through a 1×1 convolutional upscaling mapping layer, which maps the input features to a dimension of [size missing]. The two-dimensional observation image is mapped to a size of The three-dimensional features, among which The number of hyperspectral bands is specified; the recursive residual redistribution buffer adopts a first-in-first-out mechanism and is initially empty; the network weights are initialized with Xavier normal distribution for convolutional and fully connected layers, and the bias terms are initialized with constants.
4. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: In step S3, mask feature extraction employs a spatial-spectral joint local window within the local receptive domain to non-overlappingly divide the physical mask into blocks. Each window simultaneously covers both the spatial and spectral dimensions. Average pooling is performed on the mask values within each window to obtain local statistical features, which are then concatenated to form a mask feature map of the same size as the physical mask. ; The gating signal is generated using a two-layer lightweight fully connected network. The first layer has a hidden layer dimension of 64 and uses the GELU activation function; the second layer has an output layer dimension of 1 and uses the Sigmoid activation function, outputting the gating signal graph. Gating signals at each location ; During training, gating consistency constraints are added to the gating signals to ensure that the gating signals and physical masks are consistent in spatial-spectral position. When the value of a certain position of the physical mask is 0, the gating signal corresponding to the constraint approaches 0; when the value of a certain position of the physical mask is 1, the gating signal corresponding to the constraint approaches 1. Gradient clipping is also used to limit gradient explosion during training.
5. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: In S4, the four-way space-spectrum coupled situational scanning adopts an alternating approach of spatial dimension ZScan and spectral dimension CScan to model the spatial long-range correlation and inter-spectral band continuous correlation of hyperspectral data, respectively. The specific method of dynamically modulating the gated signal to hide the state transition in the SSM is as follows: the gated signal diagram... Hidden state matrix of the previous stage And the candidate states obtained by selectively scanning the input features of the current stage using the state-space model. Weighted fusion is performed to obtain the modulated hidden state matrix. ,Right now: in This is an element-wise dot product operation. This refers to the selective scan operation for the state-space model. Input features for the current stage; when When the value approaches 0, the model tends to retain the hidden state from the previous stage; when... When the value approaches 1, the model is more inclined to adopt the new observation state generated by the current input features.
6. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: In S5, the physical consistency mapping is achieved through the CASSI linear imaging model: in, Represents a two-dimensional compressed observation image. Represents a hyperspectral data cube. This represents the linear measurement matrix obtained equivalently by mask modulation, spectral dispersion, and spatial superposition processes. Represents the noise term; realizes the mapping of depth features to the physical observation space, in the first... In each iteration phase, the reconstruction results are based on the current phase. Generate predictive observation images and compared with the original preprocessed observation image Calculate the L1 residual to obtain the physical observation residual. ,Will pass After convolution to increase the dimension to three-dimensional features, it is superimposed with the output features of SSM to complete the fidelity constraint; The dynamic stride generator consists of two 3×3 convolutional layers (stride 1, padding 1) and one fully connected layer, using the mask feature map of the current stage. As input, predict the output and update the step size in real time. The update step size is a function of mask sparsity. The lower the mask transmittance, the smaller the step size should be to maintain the balance between the physical consistency term and the prior term.
7. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: In S5, the specific process of the recursive residual redistribution (RRR) mechanism is as follows: the physical observation residuals generated in the k-th stage are... go through After downsampling by the max pooling layer, the data is stored in the RRR buffer; when iterates to the... During the initial stage, the downsampling residuals in the buffer are upsampled to their original size using bilinear interpolation, and then upsampled to a three-dimensional compensated feature, which is then used as the bias term input to the next stage. In the SSM input features of the stage; The residual is immediately removed from the cache after being called to avoid memory accumulation; if the current iteration stage number is... satisfy If the recursive residual redistribution mechanism terminates automatically, or the residual term is fed back to the feature fusion layer in the final output stage to participate in global calibration, then... Positive integers are preferred. .
8. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: The deep unfolded iterative network incorporates multi-level physical prior constraint layers, which are deeply integrated with the core network modules, specifically including: Mask binarization constraint: Takes effect during the mask feature extraction stage, and is used to constrain mask values to maintain or approach a 0 / 1 binary distribution, avoiding mask value blurring caused by hardware noise; Spectral smoothness constraint: Effective during the SSM feature modulation stage, it adds a first-order difference L2 constraint to the spectral dimension features to ensure that the reconstructed spectral curve is continuous and smooth, and avoids spectral jumps; Spatial sparsity constraint: Effective during the physical consistency mapping stage, it adds an L1 sparsity constraint to the spatial dimension features to suppress spatial noise in the reconstruction results.
9. The hyperspectral reconstruction method based on mask logic coupling and deep unfolding state space according to claim 1, characterized in that: The deep unfolded iterative network is trained end-to-end and optimized using a multi-dimensional composite loss function, the formula of which is: in The spectral angle mapping loss constrains the angular deviation between the reconstructed spectrum and the original spectrum; For structural similarity loss, the spatial structural similarity between the reconstructed image and the original image is constrained; The L1 loss is used to constrain the physical consistency between the predicted observed image and the original observed image; The regularization loss includes constraints on spectral smoothness, spatial sparsity, and gating consistency; the weighting coefficients... ; The training process employs a quadruple regularization strategy: weight decay coefficient Gradient clipping maximum norm 1.0, gated generation of fully connected layers dropout probability 0.1, and adding small random Gaussian perturbations to the physical mask during training to simulate hardware installation errors.
10. A hyperspectral reconstruction system based on mask logic coupling and deep unfolding state space, characterized in that: To implement the hyperspectral reconstruction method according to any one of claims 1-9, the system adopts a hardware-software decoupling and functional modular design. The system includes a data input module, a depth unfolding iterative reconstruction module, and a result output module connected in sequence, as well as a hardware interaction interface module connected to the data input module and the CASSI optical acquisition hardware. The data input module includes a data receiving unit, a hardware error elimination unit, and a normalization processing unit, used to receive the two-dimensional compressed observation image and physical mask output by the CASSI optical acquisition hardware, and output them after preprocessing. The depth unfolding iterative reconstruction module has a built-in... The system comprises a cascaded iterative processing unit, a mask logic coupling unit, an SSM feature modulation unit, a physical consistency mapping unit, a recursive residual redistribution unit, and a physical prior constraint layer, performing multi-stage iterative reconstruction operations. The result output module includes a feature fusion and dimension calibration unit, an amplitude restoration unit, and a data format conversion unit, used for post-processing the hyperspectral feature map and outputting hyperspectral data cubes in formats such as ENVI, TIFF, and HDF5. The hardware interaction interface module includes a hardware driver unit, an interface protocol conversion unit, and a parameter configuration unit, integrating CASSI hardware drivers and interface protocols such as USB3.0, GigE, and CameraLink, supporting the visual configuration of hardware acquisition parameters and system reconstruction parameters.