A fabric hyperspectral flaw reconstruction method and system based on frequency domain dynamic convolution
By employing frequency-domain dynamic convolution and adversarial learning, hyperspectral defect reconstruction against complex texture backgrounds was achieved, solving the problem of inaccurate defect region reconstruction in existing technologies and improving detection accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG SCI-TECH UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-23
Smart Images

Figure CN121661264B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and hyperspectral imaging technology, and in particular to a method and system for reconstructing fabric defects based on frequency-domain dynamic convolution. The method achieves physical constraint modeling of complex textured backgrounds through frequency-domain dynamic convolution, suppresses multi-scale boundary displacements by combining frequency-domain perceptual feature fusion, and optimizes defect separation sensitivity using adversarial learning to realize fabric reconstruction. Background Technology
[0002] In hyperspectral imaging data of camouflage fabrics, the reconstruction of the spectral and textural background of defect areas faces significant challenges: the complex background is formed by the mixed weaving of multiple types of fibers, involving both the linear mixing effect of end-member materials and the nonlinear reflection characteristics caused by fiber interweaving. Existing reconstruction methods have significant drawbacks: First, traditional linear spectral unmixing or shallow coding models can only separate linear mixing components and cannot accurately reconstruct the spectral distortion regions caused by nonlinear fiber interactions, resulting in insufficient spectral fidelity of defect areas; second, in the process of multi-scale feature reconstruction, conventional upsampling methods (such as bilinear interpolation) over-smooth high-frequency details, making the reconstructed defect boundaries blurred and unable to accurately recover texture abrupt changes; in addition, existing frequency domain reconstruction methods mostly rely on fixed-band filters (such as static wavelet bases or Fourier bandpass filters), lacking dynamic frequency band adaptability, and are unable to simultaneously take into account the periodic texture reconstruction of low-frequency background and the recovery of abrupt changes in high-frequency defects, resulting in frequency band aliasing or loss of details in the reconstruction results. Therefore, how to achieve high-fidelity reconstruction of defective regions against complex texture backgrounds, especially while taking into account spectral consistency, boundary sharpness, and adaptive frequency band decoupling, has become a technical challenge that urgently needs to be overcome in the field of hyperspectral imaging. Summary of the Invention
[0003] The purpose of this invention is to provide a method and system for reconstructing hyperspectral defects in fabrics based on frequency domain dynamic convolution, which solves the problems of blurred boundaries and spectral distortion in traditional methods. It features simple operation, high measurement accuracy, and strong physical interpretability.
[0004] To achieve the above objectives, this invention provides a method for reconstructing hyperspectral defects in fabrics based on frequency domain dynamic convolution, comprising the following steps:
[0005] S1: Input predefined fiber endmember spectral library data, and input a set of fiber endmember spectral reflectance curves according to the endmember spectral library storage module. The spectral library includes end-member features of fabrics with different fiber materials and textures. The reflectance curves of the primitives are extracted and used for physical constraint modeling of the fabric background.
[0006] This is used to further enhance the model's multimodal generalization ability and provide prior knowledge for further simulation of different materials and textured fabric surface reconstruction;
[0007] S2: Fabric background reconstruction process. Based on the background reconstruction module, a frequency-band decoupled convolution kernel is generated using Fourier disjoint weights (FDW) based on frequency-domain dynamic convolution, and a linear mixture term is constructed by combining the endmember spectral library. Background representing mixed materials, non-linear interactive items Simulate the non-Lambertian reflection characteristics caused by fiber interweaving; optimize the energy equation By combining the alternating direction multiplier method, a physically interpretable reconstructed background map is generated. This method enhances the interpretability of fabric background reconstruction and is used to reduce anomalies in the reconstruction process caused by material characterization and linear reflection.
[0008] S3: Fabric defect residual enhancement. Based on the defect residual branch module, the input is decomposed into a low-frequency background sub-band using a learnable wavelet basis. With high-frequency defective subband And introduce frequency domain dynamic convolution band modulation pair and Adjust the frequency response of each filter, decompose the weights in the frequency domain, and dynamically modulate different frequency bands based on local content. Use the combination of frequency domain weights and local features to enhance the defects.
[0009] S4: Multi-scale information fusion. Based on the frequency domain-aware multi-scale fusion module, a frequency domain-aware feature fusion module is embedded in the feature fusion process. Adaptive low-pass filtering suppresses intra-class inconsistency, adaptive high-pass filtering enhances boundary details, and bidirectional attention gates are combined to realize the interaction between background and defect features. The method smooths high-frequency noise in high-level features and restores high-frequency boundary details lost in downsampling to solve the boundary displacement problem.
[0010] S5: Adversarial optimization and defect detection. Based on the adversarial optimization and defect detection module, and using a Generative Adversarial Network (GAN) framework, the defect separation result is optimized by jointly training the defect flow G and the discriminator D, minimizing the objective function. Output high-precision defect masks To achieve the reconstruction of defects in high-quality complex fabrics.
[0011] Preferably, in the background reconstruction stream, the frequency domain dynamic convolution decomposes the convolution kernel W into B frequency bands in the frequency domain. And through spatial modulation maps Dynamically adjust the contribution of each frequency band, perform spatial variability modulation based on local content, and calculate as follows:
[0012] ;
[0013] in For the frequency band mask matrix, From the spatial modulation diagram.
[0014] Preferably, in the frequency domain sensing multi-scale fusion module, the specific operations of frequency domain sensing multi-scale fusion include three parts: adaptive low-pass filtering, adaptive high-pass filtering, and bidirectional attention gating.
[0015] Adaptive low-pass filtering: The initial features are used to generate spatial variant low-pass filter kernels. The initial fused features are applied independently to each group and then recombined through PixelShuffle. They are then rearranged to form upsampled features.
[0016] Adaptive high-pass filtering: A spatial variant high-pass filter kernel is generated by convolution, and the low-pass kernel is inverted by unit kernel subtraction to preserve the original high-frequency channels. The high-pass filtering result is added to the original feature residual to enhance the representation of high-frequency details.
[0017] Bidirectional Attention Gating (Bi-AG): using the residual heatmap of texture primitive features E shared with the background flow and the defective branch. Generate spatial attention weights and Dynamic fusion of multi-scale features:
[0018] ;
[0019] The enhancements introduced by adaptive high-pass filtering highlight its ability to capture and preserve complex details and boundaries. The above method addresses the loss of high-frequency details caused by the Nyquist-Shannon sampling theorem in the original feature fusion and sampling processes.
[0020] Preferably, in the adversarial optimization process, the discriminator D introduces a material reflection consistency loss. The spectral reflectance of the constrained defect area is similar to that of the actual defect. Consistency is achieved, and the sensitivity of background reconstruction and defect separation is balanced by using a gradient coupling algorithm to avoid interference from abnormal conditions such as reflection and material properties in the reconstruction.
[0021] Preferably, the frequency domain dynamic convolution module generates frequency domain decoupled convolution kernels through the following steps:
[0022] Fourier disjoint grouping: First, divide the frequency domain parameters according to the frequency radius. Divide into n non-overlapping frequency band groups It provides multi-core and multi-frequency without increasing parameters, thus solving the bottleneck of redundancy of multi-core and multi-frequency in traditional dynamic convolution.
[0023] Inverse Fourier Transform and Reconstruction: For each group The parameters are subjected to an inverse Fourier transform (iDFT) to generate spatial domain convolution kernels. Each frequency band group covers different frequency ranges (low frequency → high frequency), and in each frequency band group Only the frequency band information of the current group is retained, and the other frequency bands are set to zero; this makes each group of cores complementary in the spatial domain, so as to form a combination that is friendly to targets of different sizes and contrasts; the modulation granularity is improved from "core level" to "element level", which makes it more adaptable to targets with varied shapes in the detection.
[0024] Kernel Spatial Modulation (KSM): Kernel spatial modulation combines local channel branching and global channel branching to generate a dense modulation matrix. Element-level dynamic modulation of convolution kernel elements.
[0025] Frequency band modulation (FBM): The model independently adjusts the contribution of different frequency bands of the convolution kernel at different spatial locations of the feature map based on local content; further, the modulation granularity is extended to the position and frequency band dimensions to achieve dynamic separation of foreground-background and subject-edge.
[0026] Preferably, in the defective residual branch, the parameters of the learnable wavelet basis are dynamically optimized through end-to-end training, and its decomposition formula is as follows:
[0027] ;
[0028] in and They are low-pass and high-pass wavelet bases, respectively, and are jointly updated through backpropagation;
[0029] Preferably, the frequency domain verification step of the background reconstruction stream includes: verifying the reconstructed background... Perform a Fast Fourier Transform (FFT) in the frequency domain, select the low-frequency space, and calculate the proportion of low-frequency energy. Set a deviation threshold constraint model, if If the value deviates from the preset threshold (0.6-0.8), iterative optimization of the reconstruction parameters is triggered. The advantage of this parameter is that it further constrains the fabric reconstruction results and avoids the impact of low-quality reconstruction caused by factors such as reflection and fabric on the reconstruction effect.
[0030] The present invention also provides a fabric hyperspectral defect reconstruction system based on frequency domain dynamic convolution, comprising:
[0031] The end-member spectral library storage module is used to store and load fiber end-member spectral reflectance curves;
[0032] The background reconstruction module integrates a frequency-domain dynamic convolution unit for performing background reconstruction.
[0033] The defective residual branch module includes a learnable wavelet basis decomposition unit and a frequency domain dynamic convolution modulation unit;
[0034] The frequency domain sensing multi-scale fusion module includes an adaptive low-pass filter unit, an adaptive high-pass filter unit, and a bidirectional attention gating unit;
[0035] The adversarial optimization and defect detection module, based on a generative adversarial network architecture, is used to optimize defect separation.
[0036] A processor and a memory, wherein the processor is configured to execute algorithms for each module, and the memory is used to store data;
[0037] The background reconstruction module and the defect residual branch module both employ the frequency domain dynamic convolution dynamic modulation method.
[0038] Therefore, the present invention provides a method and system for reconstructing hyperspectral defects in fabrics based on frequency domain dynamic convolution, which has the following beneficial effects:
[0039] This invention employs endmember spectral physical constraints combined with dual-stream frequency domain decoupling to analyze and locate hyperspectral data of fabrics. It can perform real-time background reconstruction and separation of minor defects against complex texture backgrounds. Compared with traditional generation-dependent methods, which suffer from the "black box" defects caused by relying solely on empirical parameters, this method further improves the interpretability of the model and enhances the ability to handle periodic textures by combining frequency domains. It also suppresses multi-scale boundary displacements and significantly improves detection efficiency while ensuring detection accuracy. In addition, it has the advantages of strong physical interpretability of the model, good robustness, and convenient deployment and maintenance.
[0040] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the architecture of a method and system for reconstructing hyperspectral defects in fabrics based on frequency domain dynamic convolution.
[0042] Figure 2 This is a schematic diagram of the frequency domain sensing feature fusion architecture of a method and system for reconstructing hyperspectral defects in fabrics based on frequency domain dynamic convolution.
[0043] Figure 3 This is a schematic diagram of the frequency domain dynamic convolution architecture for a method and system for reconstructing hyperspectral defects in fabrics based on frequency domain dynamic convolution. Detailed Implementation
[0044] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0045] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0046] Example
[0047] like Figure 1 As shown, this invention provides a method and system for reconstructing hyperspectral defects in fabrics based on frequency-domain dynamic convolution. The system includes an endmember spectral library storage module; a background reconstruction module; a defect residual branch module; a frequency-domain perceptual multi-scale fusion module; and an adversarial optimization and defect detection module. The background reconstruction module and the defect residual branch module both employ a frequency-domain dynamic convolution dynamic modulation method. The frequency-domain perceptual multi-scale fusion module includes adaptive high-pass filtering, adaptive low-pass filtering, and bidirectional attention gating.
[0048] The method includes the following steps:
[0049] S1: Hyperspectral data input, receives hyperspectral cubic data. ,in Where C represents the spatial resolution and C is the number of spectral bands; and further processing of the input hyperspectral data... Normalize:
[0050] ;
[0051] in, , The mean and standard deviation for each band.
[0052] Following the above preprocessing steps, a predefined fiber endmember spectral library is incorporated, the predefined endmember spectral library e is loaded, and an endmember abundance coefficient matrix is generated through linear initialization. The input contains a set of fiber endmember spectral reflectance curves. The spectral library includes end-member features of fabrics with different fiber materials and textures. The reflectance curves of the primitives are extracted and used for physical constraint modeling of the fabric background.
[0053] S2: Background reconstruction, based on frequency domain dynamic convolution to generate frequency band decoupled convolution kernels, combined with the aforementioned endmember spectral library to construct linear mixture terms. Used to characterize the background of material blending; non-linear interaction terms Simulate the non-Lambertian reflection characteristics caused by fiber interweaving; optimize the energy equation By combining the alternating direction multiplier method, a physically interpretable reconstructed background map is generated. ;
[0054] S3: In the defective residual branch, the input is decomposed into a low-frequency background subband using a learnable wavelet basis. With high-frequency defective subband And introduce frequency band modulation based on frequency domain dynamic convolution. and Adjust the frequency response of each filter, decompose the weights in the frequency domain, and dynamically modulate different frequency bands based on local content;
[0055] The specific operation of frequency domain dynamic convolution in the above process is as follows:
[0056] The frequency-domain dynamic convolution generates a frequency-domain decoupled convolution kernel through the following steps:
[0057] The Fourier disjoint grouping: First, the frequency domain parameters are grouped according to the frequency radius. Divide into n non-overlapping frequency band groups ;
[0058] Inverse Fourier Transform and Reconstruction: For each group The parameters are subjected to an inverse Fourier transform (iDFT) to generate spatial domain convolution kernels. This ensures that the frequency response of each core covers different frequency bands; each frequency band group covers different frequency bands (low frequency → high frequency), and within each frequency band group... Only the frequency band information of the current group is retained, and the other frequency bands are set to zero; the formula is as follows:
[0059] ;
[0060] in, The parameter represents the Fourier exponent (u, v) in the i-th group Pi; This represents the element at position (p, q) in the transformation result within the spatial domain.
[0061] The spatial domain matrix S is clipped and reassembled. Since the parameters are divided according to frequency, Si only contains frequency components of a specific frequency band. Si is clipped to... indivual The blocks are then reorganized into standard convolutional weights. Each group It has a unique frequency domain response; the method learns a fixed parameter budget in the frequency domain through Fourier transform, and generates weights with diverse frequencies by grouping in the frequency domain. Unlike dynamic convolution, it does not need to mix multiple parallel weights for calculation, thus avoiding redundancy in spatial domain learning.
[0062] Kernel Space Modulation (KSM): The weighted mixing above, as an initial decomposition, has a coarse granularity and cannot independently adjust the frequency response of each k×k filter. Kernel space modulation combines local channel branches and global channel branches to generate a dense modulation matrix. Element-level dynamic modulation of convolution kernel elements.
[0063] The specific method is as follows:
[0064] In local channel branches, 1D convolutions are used instead of fully connected layers to directly generate modulation matrices that match the size of the convolution kernel. Supports each size of Independent adjustment of the filter.
[0065] The global channel branch uses sparse modulation vector generation, and the modulation values in three dimensions—input channel dimension, output channel dimension, and spatial dimension—are predicted by the prediction fully connected layer.
[0066] The global channel branch sparse vector broadcast is expanded to the same size as the dense matrix output by the local branch, and then summed element by element. The modulated weights are represented as follows:
[0067] ;
[0068] Frequency band modulation (FBM): The model independently adjusts the contribution of different frequency bands of the convolution kernel at different spatial locations of the feature map based on local content.
[0069] First, the convolution kernel is decomposed into different frequency bands in the frequency domain. The weights W are padded with zeros to the size of the feature map. Then, it is transformed to the frequency domain F(W) using DFT. The frequency bands are isolated according to a preset frequency threshold, and a binary mask is applied. for;
[0070] ;
[0071] The default settings include four octave bands, with thresholds {0, 1 / 16, 1 / 8, 1 / 4, 1 / 2} corresponding to the center → edge, and low to high frequencies.
[0072] The corresponding new weights in this frequency band are represented as follows: :
[0073] ;
[0074] Furthermore, an ideal low-pass filter using frequency-domain convolution requires infinite support in the spatial domain, making it difficult to implement directly. Therefore, convolution in the frequency domain is equivalent to point-by-point multiplication of the Fourier transform in the frequency domain, calculated as follows:
[0075] ;
[0076] This method performs convolution calculations in the frequency domain, avoiding the problem of infinite convolution kernels in the spatial domain.
[0077] Finally, spatial variability modulation is performed, generating the final frequency band for each frequency band through lightweight convolutional layers and a sigmoid function. The calculation is as follows:
[0078] ;
[0079] in, It is the weight of the b-th frequency band. It is a spatial modulation map, where X and Y are the input and output features, respectively.
[0080] S4: Frequency domain-aware multi-scale fusion, embedding a frequency domain-aware feature fusion (FreqFusion) module in feature fusion, suppressing intra-class inconsistencies through adaptive low-pass filtering (ALPF), enhancing boundary details through adaptive high-pass filtering (AHPF), and combining bidirectional attention gate (Bi-AG) to achieve interaction between background and defect features, preserving detailed frequency domain information;
[0081] The specific operations of frequency domain sensing feature fusion in the above process are as follows:
[0082] like Figure 2 As shown, the frequency-domain perceptual feature fusion (FreqFusion) module in a fabric hyperspectral defect reconstruction method based on frequency-domain dynamic convolution and frequency-domain perceptual feature fusion serves as a further improvement to the above scheme. The specific process is as follows: the frequency-domain perceptual multi-scale fusion module comprises three parts: adaptive low-pass filtering (ALPF), adaptive high-pass filtering (AHPF), and a bidirectional attention gate.
[0083] The input to the adaptive low-pass filtering (ALPF) part is the initial fused features. After 3×3 convolution and Softmax operations, a spatial variant low-pass filter kernel is generated, which maps the initial features to the spatial domain for subsequent operations. The calculation process is as follows:
[0084] ;
[0085] ;
[0086] in, The weights of the spatially varied filter are represented, and k represents the kernel size of the low-pass filter. The final result is... A smooth low-pass filter.
[0087] Furthermore, the adaptive low-pass filtering grouping upsampling process includes: applying low-pass filtering independently to each group and then reassembling them via PixelShuffle, dividing the features into 4 groups, reducing the height and width by half, and expanding the channels by a factor of 4; further, dividing the channels into 4 groups, each group having a spatially varying low-pass filter, denoted as... ,in This group represents the output. Therefore, four groups of low-pass filter features are obtained, denoted as... , Then rearrange them to form a 2x upsampled feature. The calculation process is as follows:
[0088] ;
[0089] ;
[0090] The adaptive high-pass filter uses discrete Fourier transform to transform the feature map. Converted to the frequency domain, it is represented as
[0091] ;
[0092] ;
[0093] Furthermore, adaptive high-pass filtering will initially fuse... The high-pass filter, which serves as input and predicts spatial variations, consists of a 3×3 convolutional layer, a softmax layer, and a filter inversion operation, and is represented as follows:
[0094] ;
[0095] ;
[0096] in, This represents the initial kernel at each position (i, j); K represents the kernel size of the high-pass filter; to ensure the final generated kernel... It's a high-pass filter. First, a softmax algorithm is used to obtain the low-pass kernel. Then, the kernel is inverted by subtracting the values from the unit kernel E. When K=3, the weights of the unit kernel E are [[0, 0, 0], [0, 1, 0], [0, 0, 0]]. After applying the high-pass filter and summing the residuals, the enhanced result is obtained, expressed as:
[0097] ;
[0098] The whole process is simplified to
[0099] ;
[0100] in This method provides dynamically generated high-pass filters; the enhancements introduced by the adaptive high-pass filter generator highlight its ability to capture and preserve complex details and boundaries, enhancing high-frequency power above the Nyquist frequency, which is crucial for tasks requiring high resolution and accurate feature representation. The method preserves high-frequency boundary details lost during downsampling, addressing the boundary displacement problem. Frequencies above the Nyquist frequency are permanently lost during downsampling.
[0101] Furthermore, the bidirectional attention gate: uses the residual heatmap of the texture primitive features E of the shared background flow with the defective branch. Generate spatial attention weights and Dynamic fusion of multi-scale features:
[0102] ;
[0103] The above method solves the problem of high-frequency detail loss caused by the Nyquist-Shannon sampling theorem in the original feature fusion and sampling processes.
[0104] S5. Adversarial Optimization and Flaw Detection: Based on the Generative Adversarial Network (GAN) framework, the flaw separation result is optimized by jointly training the flaw stream G and the discriminator D, minimizing the objective function. Output high-precision defect masks This further enables the reconstruction of defects in high-quality complex fabrics.
[0105] Figure 3 As shown, in a method for reconstructing hyperspectral defects in fabrics based on the fusion of frequency-domain dynamic convolution and frequency-domain sensing features, the frequency-domain dynamic convolution module decomposes the convolution kernel W into B frequency bands in the background reconstruction stream. And through spatial modulation maps Dynamically adjust the contribution of each frequency band, perform spatial variability modulation based on local content, and calculate as follows:
[0106] ;
[0107] in For the frequency band mask matrix, From the spatial modulation diagram.
[0108] As a further improvement to the above scheme, the feature is that: in the adversarial optimization process, the input of the discriminator D is the background reconstruction image. With residual plot The output is the probability of being true or false. Input to residual generator G The texture primitive features E output from the background stream; the output is a defect residual map. ;
[0109] Introducing material reflection consistency loss:
[0110] ;
[0111] Introducing adversarial losses:
[0112] ;
[0113] Total loss:
[0114] ;
[0115] The spectral reflectance of the constrained defect area is compared with that of the actual defect. Consistency is achieved, and the sensitivity of background reconstruction and defect separation is balanced by using a gradient coupling algorithm to avoid interference from abnormal conditions such as reflection and material properties in the reconstruction.
[0116] As a further improvement to the above scheme, the feature is that: in the defective residual branch, the parameters of the learnable wavelet basis are dynamically optimized through end-to-end training, and its decomposition formula is:
[0117] ;
[0118] in and They are low-pass and high-pass wavelet bases, respectively, and are jointly updated through backpropagation.
[0119] As a further improvement to the above scheme, the feature is that the frequency domain verification step of the background reconstruction stream includes: verifying the reconstructed background... Perform a Fast Fourier Transform (FFT) in the frequency domain, select the low-frequency space, and calculate the proportion of low-frequency energy. Set a deviation threshold constraint model, if If the value deviates from the preset threshold (0.6-0.8), iterative optimization of the reconstruction parameters is triggered. The advantage of this parameter is that it further constrains the fabric reconstruction results and avoids the impact of low-quality reconstruction caused by factors such as reflection and fabric on the reconstruction effect.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for reconstructing hyperspectral defects in fabrics based on frequency-domain dynamic convolution, characterized in that, Includes the following steps: S1: Input predefined fiber endmember spectral library data and extract the elementary reflectance curves for physical constraint modeling of the fabric background; S2: Generates frequency band decoupled convolution kernels based on frequency domain dynamic convolution, combined with an endmember spectral library. Constructing linear mixed terms Used to characterize the background of material blending; non-linear interaction terms Simulate the non-Lambertian reflection characteristics caused by fiber interweaving; optimize the energy equation By combining the alternating direction multiplier method, a physically interpretable reconstructed background map is generated. ;in, To generate the endmember abundance coefficient matrix through linear initialization; S3: Decompose the input into a low-frequency background subband using a learnable wavelet basis. With high-frequency defective subband And introduces a frequency band modulation pair based on frequency domain dynamic convolution. and The frequency response of each filter is adjusted, and the weights are decomposed in the frequency domain and different frequency bands are dynamically modulated based on local content. The defect features are enhanced by introducing frequency band modulation based on frequency domain dynamic convolution. S4: Embed a frequency domain-aware feature fusion module during the feature fusion process, and achieve multi-scale information fusion through adaptive low-pass filtering, adaptive high-pass filtering and bidirectional attention gate; S5: Based on the generative adversarial network framework, the defect features are optimized through adversarial optimization to complete the defect reconstruction; In step S3, the parameters of the learnable wavelet basis are dynamically optimized through end-to-end training, and the decomposition formula is as follows: ; in and For low-pass and high-pass wavelet bases; In step S4, the frequency domain sensing feature fusion module includes: S41, Adaptive Low-Pass Filtering: Generates a spatial variant low-pass filter kernel and achieves upsampling through PixelShuffle recombination; S42, Adaptive High-Pass Filter: Enhances high-frequency details by inverting the low-pass core using a unit core subtraction method; S43, Bidirectional Attention Gating: Attention weights are generated by using texture primitive features and residual heatmaps, and features are dynamically fused.
2. The method according to claim 1, characterized in that, In step S1, the endmember spectral library includes a set of endmember reflectance curves with different fiber materials and texture characteristics. .
3. The method according to claim 1, characterized in that, In step S2, the frequency band modulation module of the frequency domain dynamic convolution decomposes the convolution kernel into multiple frequency bands in the frequency domain, and dynamically adjusts the contribution of each frequency band through the spatial modulation map. The calculation method is as follows: ; in, For the frequency band mask matrix, From the spatial modulation map, For convolution kernel, This is a high-frequency defective sub-band.
4. The method according to claim 1, characterized in that, In step S5, the adversarial optimization process introduces a loss of material reflection consistency. Furthermore, the sensitivity of background reconstruction and defect separation is balanced through a gradient coupling algorithm.
5. The method according to claim 1, characterized in that, In steps S2 and S3, frequency domain dynamic convolution is implemented through the following sub-steps: Perform Fourier non-overlapping grouping, and divide the frequency domain parameters into n non-overlapping frequency band groups according to the frequency radius; Perform an inverse Fourier transform on each set of parameters to generate a spatial domain convolution kernel; Then, the generated convolution kernel is subjected to kernel spatial modulation and frequency band modulation in sequence: Kernel space modulation is performed, and a dense modulation matrix is generated by combining local and global channel branches to dynamically modulate the convolution kernel elements at the element level; Frequency band modulation is performed, and the contribution of different frequency bands of the convolution kernel is independently adjusted according to the local content at different spatial locations in the feature map.
6. The method according to claim 1, characterized in that, It also includes step S6: frequency domain verification, which involves performing a fast Fourier transform on the background reconstruction image and calculating the proportion of low-frequency energy. If the deviation from the preset threshold is 0.6-0.8, iterative optimization of the reconstruction parameters will be triggered.
7. A fabric hyperspectral defect reconstruction system based on frequency domain dynamic convolution, used to implement the method according to any one of claims 1-6, characterized in that, include: The end-member spectral library storage module is used to store and load fiber end-member spectral reflectance curves; The background reconstruction module integrates a frequency-domain dynamic convolution unit for performing background reconstruction. The defective residual branch module includes a learnable wavelet basis decomposition unit and a frequency domain dynamic convolution modulation unit; The frequency domain sensing multi-scale fusion module includes an adaptive low-pass filter unit, an adaptive high-pass filter unit, and a bidirectional attention gating unit; The adversarial optimization and defect detection module, based on a generative adversarial network architecture, is used to optimize defect separation. A processor and a memory, wherein the processor is configured to execute module methods and the memory is used to store data.