Change segmentation method and system based on learnable DCT and frequency band division, and medium
By using a learnable DCT transform network and an adaptive frequency band partitioning method, the problem of insufficient utilization of frequency domain information in image variation region segmentation is solved, achieving efficient and robust segmentation in multiple scenarios and improving segmentation accuracy and robustness.
Patent Information
- Application Number
- CN202511631037.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-11-10
AI Technical Summary
Existing technologies struggle to accurately and robustly extract image change regions under conditions of noise interference, lighting differences, changes in observation angle, and inconsistent resolution. Furthermore, frequency domain information is not fully utilized, DCT basis functions cannot be reconstructed based on downstream loss, and high-frequency and spatial textures are independent and difficult to complement each other.
A concatenated framework of a learnable 2D DCT transform network, an adaptive frequency band partitioning network, and a Band Router dynamic weighting network is adopted. Differential features are generated through adaptive frequency band partitioning and routing weighting. Multi-scale features are extracted and fused by a spatial encoder to achieve end-to-end image variation region segmentation.
It significantly improves the precision and robustness of image variation region segmentation, and can adaptively adjust the frequency base, dynamically select frequency bands and automatically estimate weights in multiple scenarios, reducing redundant calculations and enhancing the robustness and discriminative power of the model.
Smart Images

Figure CN121074074A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a change segmentation method and system based on a learnable DCT and frequency band division, and a medium. BACKGROUND
[0002] Image change region segmentation is a key technology for determining the existence and change type of ground targets in the time sequence dimension using multi-temporal high-resolution images (generally "temporal 1" and "temporal 1" of the same region). Its results directly serve many fields such as land resource monitoring, urban expansion evaluation, disaster damage statistics, agricultural condition yield estimation, and military reconnaissance. Due to the characteristics of high resolution, complex scene, and imaging conditions that fluctuate dramatically with seasons and climate, how to accurately and stably extract the change region under the conditions of noise interference, light difference, observation angle change, and even inconsistent resolution is one of the technical difficulties that the research and industrial circles are highly concerned about.
[0003] One of the more representative methods in recent years is to connect the frequency domain enhancement module FEM and the spatial reconstruction module SRM in series. The frequency domain enhancement module FEM performs two-dimensional discrete cosine transform (2-DDCT) on each image, and selects "a few fixed high-frequency coefficient channels" to subtract and superimpose, emphasizing fine-grained changes. The spatial reconstruction module SRM performs multi-scale cross fusion in the spatial domain and uses residual up-sampling to restore texture. Finally, the dual-domain feature splicing decoding outputs the change map. This scheme verifies the F1 improvement on the LEVIR-CD, WHU-CD, S2Looking, etc. public data sets. The visual results show that it is sensitive to road fine lines and building roof demolition. However, its technical defects are also very prominent: such as fixed selection of high-frequency channels, which leads to large fluctuations in transfer effect between different data sets; the discrete cosine transform DCT basis function is still static and has no learnable parameters, which cannot be reshaped according to the downstream loss; there is a lack of frequency band granularity gating, and all high frequencies are treated equally, and noise points are also amplified; the memory usage is relatively high, and the discrete cosine transform DCT coefficient tensor and the spatial feature need to be maintained simultaneously, and the inference resolution is limited; most models choose simple splicing or element-wise weighting, and use cross attention, but lack of real cross-domain interaction, resulting in independent high-frequency and spatial texture, making it difficult to fully utilize complementary information. SUMMARY
[0004] To solve the problems that the traditional image change region segmentation method is difficult to fully mine the frequency domain information, the DCT basis function cannot be reshaped according to the downstream loss, and the high frequency and spatial texture are independent and difficult to fully utilize the complementary information, the application provides a change segmentation method and system based on a learnable DCT and frequency band division, and a medium; taking an improved AFB_DCT_FEM model as the core, a learnable two-dimensional DCT transformation network, an adaptive frequency band division AFB network and a Band Router dynamic weighting network are connected in series to form an overall framework that can be end-to-end backpropagated, while maintaining the energy concentration characteristics of DCT, the network is endowed with the triple capabilities of on-demand tuning of frequency basis, dynamic frequency band selection and automatic weight estimation, thereby significantly improving the fineness and robustness of image change region segmentation.
[0005] The above technical purposes of the application are realized by the following technical solutions:
[0006] The present application provides a change segmentation method based on a learnable DCT and frequency band division, which comprises the following steps:
[0007] Obtain the first and second time images of the same target region, and pre-process the first and second time images;
[0008] Input the pre-processed first and second time images into an AFB_DCT_FEM model to obtain a block-level DCT coefficient tensor, and generate a difference feature through adaptive frequency band division and routing weighting;
[0009] Parallelly input the pre-processed first and second time images into a spatial encoder to extract multi-scale spatial features;
[0010] Fuse the difference feature and the multi-scale spatial feature to obtain a pixel-level change mask.
[0011] Further optimization scheme is that the pre-processing comprises:
[0012] Correct the first and second time images, and the correction comprises radiation correction and geometric correction;
[0013] Crop the corrected first and second time images to a target block size, and the target block size is a size that can be evenly divided by a block with a size of Bx B.
[0014] Further optimization scheme is that the difference feature acquisition method comprises:
[0015] The first phase image or the second phase image is mapped at a block level in a frequency domain based on a learnable two-dimensional DCT transformation network in a cross-domain fine-tuning strategy to obtain a mapping spectrum containing a plurality of frequency points; a DCT convolution kernel of the learnable two-dimensional DCT transformation network is a trainable DCT convolution kernel, and a DCT basis function is:
[0016] ;
[0017] wherein x, y represent spatial coordinate indexes within a block; B s represents a size of a convolution block; u, v represent frequency domain coordinates; represents a k-th spectrum segment length weight; k = u or v; cos[] represents a cosine function;
[0018] The mapping spectrum is segmented based on an adaptive frequency band division AFB network according to a trainable frequency band threshold.
[0019] Each spectrum segment obtained through segmentation is scored and weightedly fused based on a Band Router dynamic weighting network, and finally up-sampling is performed to obtain a difference feature.
[0020] A further optimization scheme is that the cross-domain fine-tuning strategy comprises:
[0021] The DCT convolution kernel is initialized, an adaptive attenuation coefficient matrix of a target image sensor is constructed, and the DCT convolution kernel is scaled based on the adaptive attenuation coefficient matrix after loading pre-training weights;
[0022] The spatial resolution of a target image and the benchmark spatial resolution in the pre-training stage of the learnable two-dimensional DCT transformation network are obtained, the benchmark spatial resolution and the spatial resolution of the target image are combined to determine the size of the convolution block for multiple interpolation scaling of the DCT convolution kernel; the size of the convolution block satisfies:
[0023] ;
[0024] wherein, represents the size of the scaled convolution block; r base represents the benchmark spatial resolution; r target represents the spatial resolution of the target image; B s represents the size of the convolution block;
[0025] A gain function of each frequency point is determined based on a dark channel prior method, and the DCT convolution kernel is scaled by frequency point based on the gain function.
[0026] Further optimization scheme is that the gain function of each frequency point is determined based on the dark channel prior method, and the DCT convolution kernel is scaled by frequency point based on the gain function, including methods:
[0027] The atmospheric light transmittance t is estimated based on the dark channel prior method;
[0028] The gain function of each frequency point is calculated based on the following formula:
[0029] ;
[0030] ;
[0031] Wherein, The frequency radius is represented, k represents the hyperparameter for controlling the gain intensity; B s The size of the convolution block is represented; exp[*] represents the exponential operation; The gain function is represented; u, v represents the frequency domain coordinates;
[0032] The DCT convolution kernel is scaled by frequency point based on the gain function of each frequency point:
[0033] ;
[0034] Wherein, The final effective learnable DCT convolution weight is represented; The trained adaptive learnable DCT convolution weight is represented.
[0035] Further optimization scheme is that the AFB network is used to segment the mapping spectrum according to the trainable frequency band threshold; including methods:
[0036] The number of divided spectrum segments K is configured, and the edge threshold set of the spectrum segment is Wherein, The threshold of the K-1th spectrum segment is represented, which satisfies ;
[0037] The unsorted learnable scalar is determined, the length weight of each spectrum segment is obtained by combining the softmax function, and the ordered boundary threshold is obtained based on prefix accumulation;
[0038] For each spectrum segment, a soft mask is generated based on a double Sigmoid differential function.
[0039] Further optimization scheme is that the Band Router dynamic weighting network is used to score and weight fuse each spectrum segment obtained by segmentation, and finally up-sampling to obtain the differential feature; including methods:
[0040] The frequency band feature of the K spectrum segments is obtained ;
[0041] For the kth frequency band feature F k , a frequency band feature vector P k is extracted by a lightweight convolution, wherein the frequency band feature vector P k characterizes the frequency band local information and global statistical information.
[0042] All the frequency band feature vectors are spliced, the weight of each frequency spectrum segment is predicted through a full connection layer, and the differential features are output by weighted fusion.
[0043] A further optimization scheme is that the loss function of the Band Router dynamic weighting network is:
[0044] ;
[0045] ;
[0046] wherein, represents the loss function of the Band Router dynamic weighting network; represents the average activation weight of the kth frequency spectrum segment in a batch, and N represents the batch size; represents the predicted weight of the nth sample on the kth frequency spectrum segment.
[0047] The scheme also provides a change segmentation system based on a learnable DCT and frequency band division, which is used to implement the change segmentation method based on the learnable DCT and frequency band division.
[0048] The acquisition module is used to acquire the first time-phase image and the second time-phase image of the same target region.
[0049] The preprocessing module is used to preprocess the first time-phase image and the second time-phase image.
[0050] The first feature extraction module is used to input the preprocessed first time-phase image and second time-phase image into the AFB_DCT_FEM module to obtain a block-level DCT coefficient tensor, and generate differential features through adaptive frequency band division and routing weighting.
[0051] The second feature extraction module is used to input the preprocessed first time-phase image and second time-phase image into a spatial encoder in parallel to extract multi-scale spatial features.
[0052] The fusion output module is used to fuse the differential features and the multi-scale spatial features to obtain a pixel-level change mask.
[0053] This solution also provides a computer-readable medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, can implement the variation segmentation method based on learnable DCT and frequency band division as described above.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] 1. This application provides a variation segmentation method, system, and medium based on learnable DCT and frequency band division; with an improved AFB_DCT_FEM model as the core, a learnable two-dimensional DCT transform network, an adaptive frequency band division AFB network, and a BandRouter dynamic weighting network are connected in series to form an overall framework with end-to-end backpropagation. While maintaining the energy concentration characteristics of DCT, the network is endowed with the triple capabilities of on-demand frequency base optimization, dynamic frequency band selection, and automatic weight estimation; and the substructure of the existing image variation region segmentation network is replaced in an end-to-end manner to achieve efficient extraction of differential features of dual-temporal images, significantly improving the accuracy and robustness of image variation region segmentation.
[0056] 2. This application provides a variation segmentation method, system, and medium based on learnable DCT and frequency band division; its learnable two-dimensional DCT transform network explicitly solidifies the two-dimensional DCT basis functions into convolution kernels and sets the convolution weights as trainable parameters, realizing learnable frequency domain transform parameters; combined with orthogonal constraint loss, it preserves the energy concentration and interpretability of the basis, taking into account the high-frequency focusing characteristics of DCT and the differentiability advantage of convolutional networks; it retains the good energy concentration characteristics of DCT, and allows the network to automatically find the optimal frequency domain representation that better matches the actual ground features and noise distribution during training, thereby significantly improving the separability of subtle variations.
[0057] 3. This application provides a variation segmentation method, system, and medium based on learnable DCT and frequency band division; during the adaptive frequency band division process, a connected and differentiable soft frequency band mask is generated based on the "double Sigmoid" function to avoid gradient discontinuity caused by hard thresholding; at the same time, the adaptive frequency band division AFB network dynamically adjusts the segmentation threshold and frequency band width according to the statistical energy proportion and gradient sensitivity of each frequency point during training, realizing data-driven frequency domain subspace recombination, which not only automatically suppresses noise frequency bands and retains the frequency bands most sensitive to changes, but also reduces redundant computation of subsequent networks.
[0058] 4. This application provides a variation segmentation method, system and medium based on learnable DCT and frequency band division; its BandRouter dynamic weighted network assigns weights to each adaptive frequency band and selects the most suitable feature extraction path to form a frequency band-specific deep sub-network, which strengthens the information complementarity between high frequency and low frequency, while reducing frequency band redundancy interference, making the model more robust under multi-scale and cross-seasonal imaging conditions. BRIEF DESCRIPTION OF DRAWINGS
[0059] The accompanying drawings, which are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings:
[0060] Figure 1 Flowchart of the change segmentation method based on learnable DCT and frequency band division;
[0061] Figure 2 Principle diagram of the change segmentation method based on learnable DCT and frequency band division;
[0062] Figure 3 AFB_DCT_FEM model structure diagram;
[0063] Figure 4 System structure diagram of the change segmentation method based on learnable DCT and frequency band division;
[0064] Figure 5 Comparison diagram of the comparison results of the pre-image, post-image, change true value and model output effect. DETAILED DESCRIPTION
[0065] In order to make the objects, technical solutions and advantages of the present application clearer, further detailed description will be given to the present application combined with embodiments and drawings. The illustrative embodiments of the present application and the description thereof are only used to explain the present application and do not limit the present application.
[0066] The traditional image change region segmentation method is difficult to fully mine the frequency domain information, the discrete cosine transform (DCT) basis function cannot be reshaped according to the downstream loss, and the high frequency and spatial texture are independent and difficult to fully utilize the complementary information. In view of this, the present application provides the following embodiments to solve the above technical problems:
[0067] The present embodiment provides a change segmentation method based on learnable DCT and frequency band division, as shown in Figure 1 and Figure 2 The method comprises the following steps:
[0068] Step 1: obtaining first and second time images I1 and I2 of the same target region, and pre-processing the first and second time images I1 and I2;
[0069] The pre-processing in step 1 comprises:
[0070] Correcting the first and second time images, the correction comprising radiation correction and geometric correction;
[0071] The first phase image and the second phase image after correction are cropped to a target block size, which is a size that can be evenly divided by a block with a size of Bx B.
[0072] In step two, the pre-processed first phase image and the second phase image are input into an AFB_DCT_FEM model to obtain a block-level DCT coefficient tensor, and a difference feature is generated through adaptive frequency band division and routing weighting; as shown in the figure, the specific method for obtaining the difference feature includes: Figure 3
[0073] S21, based on a learnable two-dimensional DCT transform network, the first phase image or the second phase image is mapped in the block-level frequency domain through a cross-domain fine-tuning strategy, to obtain a mapping spectrum containing a plurality of frequency points; the DCT convolution kernel of the learnable two-dimensional DCT transform network is a trainable DCT convolution kernel, and the DCT basis function is:
[0074] ;
[0075] Wherein, x, y represents the spatial coordinate index within the block; B s represents the size of the convolution block; u, v represents the frequency domain coordinate; k represents the length weight of the k-th frequency spectrum segment; k = u or v; cos[] represents the cosine function;
[0076] The DCT basis function is parameterized as a trainable convolution kernel W u,v , and an orthogonal regularization is added:
[0077] ;
[0078] Wherein, represents the loss function of the learnable two-dimensional DCT transform network; W represents the basis matrix stacked by the convolution kernel; I represents the unit matrix; represents the Frobenius norm; T represents the transpose;
[0079] Ensure that the basis function is approximately orthogonal during learning to prevent high and low frequency leakage. In specific implementation, the trainable DCT convolution kernel can be generated by the dct_kernels function through the class nn.Parameter.
[0080] In step S21, the cross-domain fine-tuning strategy includes:
[0081] There are differences in imaging modulation transfer function (MTF) between different remote sensors (such as optical satellites, multi-spectral loads, and unmanned aerial vehicles); therefore, the cross-domain fine-tuning strategy includes sensor domain adaptation, including methods,
[0082] The DCT convolution kernel is initialized as where c represents the channel index; u, v represent the horizontal and vertical frequency index; for the target image sensor, its modulation transfer function can be approximated as follows:
[0083] ;
[0084] where, represents the normalized frequency, a0, a1, a2 represent the coefficients obtained by fitting the experimental calibration data;
[0085] An adaptive attenuation coefficient matrix of the target image sensor is constructed After loading the pre-trained weights, the DCT convolution kernel is scaled based on the adaptive attenuation coefficient matrix:
[0086] ;
[0087] where, represents the final effective learnable DCT convolution weight; represents the trained adaptive learnable DCT convolution weight;
[0088] This operation is performed once after loading the pre-trained weights and does not participate in gradient update;
[0089] When there is a difference between the input image resolution and the model pre-training stage, in order to maintain the consistency of frequency resolution, the receptive field of the DCT convolution kernel needs to be scaled, including the method, obtaining the spatial resolution of the target image and the benchmark spatial resolution of the pre-training stage of the learnable two-dimensional DCT transformation network, combining the benchmark spatial resolution and the spatial resolution of the target image to determine the size of the convolution block to perform multiple interpolation scaling on the DCT convolution kernel, specifically performing three times of interpolation scaling, and performing energy normalization processing to ensure the consistency of the frequency domain response of the convolution operation. The adjusted DCT convolution kernel will continue to be optimized as the initial weight in the target domain fine-tuning training. The size of the convolution block satisfies:
[0090] ;
[0091] where, represents the size of the convolution block; r base represents the benchmark spatial resolution; r target represents the spatial resolution of the target image; B s represents the size of the convolution block; represents the upward rounding.
[0092] In order to eliminate the interference of environmental light changes (such as shadows, haze, and atmospheric scattering) on the frequency distribution, the present scheme proposes a method of scaling the DCT convolution kernel by frequency point, which specifically includes the following steps:
[0093] The gain function of each frequency point is determined based on the dark channel prior method, and the DCT convolution kernel is scaled by frequency point based on the gain function; specifically:
[0094] The atmospheric light transmittance t is estimated based on the dark channel prior method;
[0095] The gain function of each frequency point is calculated based on the following formula:
[0096] ;
[0097] ;
[0098] wherein, represents the frequency radius, k represents the hyperparameter for controlling the gain intensity; B s represents the size of the convolution block; exp[*] represents the exponential operation; represents the gain function; u, v represent the frequency domain coordinates.
[0099] The DCT convolution kernel is scaled by frequency point based on the gain function of each frequency point:
[0100] ;
[0101] wherein, represents the final effective learnable DCT convolution weight; represents the adapted learnable DCT convolution weight after training.
[0102] The method can effectively restore the high-frequency energy and improve the change area detection ability in low-contrast environment.
[0103] First, the AFB_DCT_FEM model receives a feature map with a size of BxCxHxW (B represents the number of samples in a batch; C represents the number of channels of the intermediate feature; H represents the spatial height of the feature map; W represents the spatial width of the feature map), and performs block-level frequency domain mapping on it using a learnable two-dimensional DCT transformation network. Specifically, the DCT convolution kernel is preset as an orthogonal basis function and declared as a trainable parameter, so that the network can make subtle adjustments to the basis to fit the data distribution while maintaining the "energy concentration" characteristic. The convolution step size (the size of the convolution block) is B s (default 8), and a depth separable convolution is implemented through a class nn.Conv2d function, with each input channel corresponding to an output channel; the initial value of the convolution kernel is generated according to the two-dimensional discrete cosine transform orthogonal basis in the (u, v) direction, and then participates in the back propagation update, so the resolution of the output tensor is reduced to (H / 8, W / 8) by block, and the number of channels is expanded to 64C, which is equivalent to splitting each original channel into 64 frequency channels.
[0104] Traditional DCT layer coefficients are fixed and cannot tolerate spectral drift introduced by scene differences; this scheme realizes data-driven adjustment under the premise of preserving DCT energy concentration by combining orthogonal initialization with constraint regularization, and improves generalization; through parameter fine-tuning and learnability, the DCT convolution kernel can be fine-tuned to adapt to different sensors, image resolutions, lighting and atmospheric conditions, and under the same training rounds, the precision is improved compared to fixed DCT, and the gradient is more concentrated.
[0105] In the remote sensing change detection task, the spectral energy distribution of the input image is significantly different due to the differences in ground object categories; for example, urban building roof areas usually show strong signals at medium and high frequencies, farmland and other regular textures are mainly distributed at medium and low frequencies, and water bodies or bare land are mainly low-frequency flat components. The traditional method uses fixed frequency band division, which cannot simultaneously consider multiple ground object scenes, and is prone to problems such as amplification of high-frequency noise, loss of low-frequency features, or energy leakage. Therefore, this scheme proposes an adaptive frequency band division method, which allows the network to automatically learn and dynamically adjust the optimal frequency band boundary during training, thereby improving segmentation performance and generalization ability; considering that frequency features are easily damaged at the beginning of training, this scheme introduces a phased training scheduling strategy to prevent overfitting of low-frequency channels, as shown in step S22;
[0106] S22, the AFB network performs spectral segmentation on the mapped spectrum based on the trainable frequency band threshold; step S22 specifically includes the following method:
[0107] Configure the number of divided spectral segments K, and the edge threshold set of the spectral segment is ; wherein represents the threshold of the K-1th spectral segment, satisfying ;
[0108] Determine the unsorted learnable scalar, this embodiment takes β k as the unsorted learnable scalar, k=1, 2, …, K-1; obtain the length weight of each spectral segment by combining the softmax function, and obtain the ordered boundary threshold based on prefix accumulation; the length weight of the kth spectral segment is specifically:
[0109] ;
[0110] wherein, β j represents the jth unsorted learnable scalar; represents the length weight of the kth spectral segment;
[0111] The ordered boundary threshold obtained by prefix accumulation is:
[0112] ;
[0113] Thus, automatically satisfied This method ensures the monotonicity of each threshold, effectively avoids the training instability caused by the traditional threshold crossing, and maintains the differentiability to the parameters and good gradient propagation.
[0114] For each frequency band, a soft mask M k (r) is generated based on the double Sigmoid difference function
[0115] ;
[0116] wherein, represents the Sigmoid function; τ represents the boundary smoothing hyperparameter (usually 0.05-0.2), θ0=0, θ K =1.
[0117] After obtaining the complete frequency spectrum, the adaptive frequency band division stage is entered next, and the normalized radius r is calculated for each frequency point in advance:
[0118] ;
[0119] wherein, ; represents the diagonal radius;
[0120] n-1 thresholds θ are learned, and are registered as a constant vector, ensuring zero additional overhead during inference; the adaptive frequency band division AFB network holds a trainable threshold vector θ, which is forced to be monotonically increasing by using the softmax function and then accumulating, naturally avoiding threshold "fighting"; then, a differentiable soft mask m k (r) is generated for each frequency band by using a "double Sigmoid" function, obtaining n band features (band tensor) F k The DCT coefficients are divided into low, medium and high K frequency bands, and each frequency band is a sub-tensor list with the same size as the original DCT tensor. This soft mask not only keeps the gradient continuous near the threshold, but also allows the threshold to automatically migrate to the most discriminative radius interval during training.
[0121] To accelerate network convergence and guide effective segmentation, the boundary threshold can be initially set to 0.25, 0.5, and 0.75 uniformly; during the training process, a band sparsification regularization term is added to the main loss function, and the constraint is as follows:
[0122] ;
[0123] wherein, represents the band sparsification regularization loss; represents the regularization coefficient, This represents the L1 norm of the mask for the k-th spectral segment; this regularization helps to eliminate redundant frequency bands and improve the model's resolution and compression capabilities.
[0124] The masking function described above achieves a smooth transition at each frequency band boundary, ensuring that the segmentation operation is differentiable with respect to the network parameters, and is beneficial to the stability and generalization of model training.
[0125] Existing technologies often use methods such as "directly extracting the first K high-frequency coefficients" or "manually defining fixed frequency rings," lacking a differentiable and adaptive frequency band selection mechanism. This scheme uses a sigmoid dual-gating method to form a continuously differentiable soft mask, resulting in more stable gradients. To further improve feature separation capabilities in tasks such as segmenting changing regions in multi-scene images, this scheme employs dynamic weight fusion for feature components of different frequency bands after adaptive frequency band division. Since the contribution of each frequency band to the final decision is significantly affected by the input sample type (e.g., city, farmland, water body), static weighting or average fusion often leads to feature redundancy and decreased discriminative power. Therefore, this application proposes a Band Router dynamic weighting network to achieve sample-level dynamic weighting of frequency-divided features, thereby improving the system's scene adaptability and inference efficiency. Specifically, this is step S23.
[0126] S23, based on the Band Router dynamic weighted network, scores and weights the obtained spectrum segments, and finally upsamples to obtain differential features; step S23 specifically includes the following methods:
[0127] S231, Obtain the frequency band characteristics of K frequency bands. ;
[0128] S232, for the k-th frequency band feature F k The frequency band feature vector P is extracted through lightweight convolution. k The frequency band feature vector P k It characterizes local frequency band information and global statistical information;
[0129] ;
[0130] Among them, Conv 3×3 () represents a 3×3 convolution (32 channels), BN() represents batch normalization, ReLU() represents the activation function, and GAP() represents global average pooling; thus, the resulting frequency band feature vector P k It is a channel description vector of length 32, which effectively extracts local and global statistical information of each frequency band.
[0131] S233 concatenates all frequency band feature vectors, predicts the weights of each spectral band through a fully connected layer, and then weights and fuses them to output differential features.
[0132] ;
[0133] in, Indicates the weights of the first fully connected layer; d represents the real number field; d represents the number of intermediate channels (e.g., 64). This represents the weights of the second fully connected layer; the Softmax function guarantees the weight vector... Satisfy: The weight of the k-th spectrum segment ;
[0134] Finally, the fused output features are calculated as follows:
[0135] ;
[0136] This process enables dynamic selection and fusion of different frequency band components, and supports Top-k sparse activation (such as taking only the two frequency bands with the highest weights), further reducing memory and computational load.
[0137] To prevent the network from relying solely on a few frequency band components for an extended period, this scheme uses weight balancing to assist in loss calculation. The loss function of the BandRouter dynamically weighted network is as follows:
[0138] ;
[0139] ;
[0140] in, This represents the loss function of the Band Router dynamically weighted network. This represents the average activation weight of the k-th spectral segment within a batch, where N represents the batch size. This represents the prediction weight of the nth sample in the kth spectral segment.
[0141] After determining the frequency bands, it is necessary to decide "which band is more important." This solution uses a Band Router dynamic weighted network to establish a lightweight 3×3 convolution-BN function-ReLU function branch for each frequency band, and calculates the frequency band feature (band tensor) F. k By applying 3×3 convolution, BN function, ReLU function, and GAP function, the frequency band feature vector P is obtained. k ; Put all frequency band feature vectors P k After concatenation, the input consists of two fully connected layers and a sigmoid function. This compresses the spatial information to a 1×1 shape, and the concatenation results in a vector. The weights are then predicted and output as a weight vector using the fully connected layers and the sigmoid function. These weights can adaptively change for different samples: high-detail scenes amplify high frequencies, while cloud or low-resolution scenes tend to retain low-to-mid frequencies. Finally, bilinear interpolation is used to calculate the weights according to block scale B.s Up-sampling to the original size; after dimension reduction by 1x1 convolution, it is output as a frequency domain enhancement feature for subsequent space-frequency fusion.
[0142] All band features are linearly fused according to the weight vector, and are recombined into a single tensor, still maintaining 64C channels and a resolution of (H / 8, W / 8) (H / 8, W / 8); the fused frequency domain features need to return to the size consistent with the backbone network, and the tensor is enlarged by 8 times in space by using bilinear interpolation to restore it to HxW. At this time, the channel dimension is still 64C, so a 1x1 convolution is used to compress the channel back to the original C, which not only completes the dimension matching, but also increases a nonlinear mapping to help the frequency domain enhancement information naturally integrate with the subsequent spatial convolution flow; the present scheme predicts dynamic weights with a lightweight Router network, automatically highlighting key signals and suppressing noise bands.
[0143] The Band Router of the present application works in cooperation with the adaptive frequency band division module. The former (frequency band division) dynamically determines the coverage of each frequency band through a learnable threshold, and the latter (Band Router) adaptively adjusts the contribution of each frequency band feature according to the actual frequency spectrum distribution of the input image. The combination of the two forms a dynamic expert system of "frequency division - frequency selection", which can adaptively adjust the optimal feature combination in various scenes such as urban, farmland and water body, and enhance the adaptability and discriminability of the model to complex changing images.
[0144] In summary, the AFB_DCT_FEM model provides an adjustable but orthogonal frequency domain dictionary based on a learnable two-dimensional DCT transformation network, the AFB network adaptively divides the frequency spectrum according to a trainable threshold, the Band Router dynamically weights the network to score and weight each frequency band according to the sample content, and finally returns to the spatial domain through up-sampling and 1x1 convolution, which not only retains the discriminability brought by frequency analysis, but also avoids the rigidity and gradient instability of fixed frequency band design.
[0145] Step three, the preprocessed first and second phase images are sent into a spatial encoder in parallel to extract multi-scale spatial features; in this embodiment, the spatial encoder is a conventional encoder, such as a ResNet encoder, a Swin-UNet encoder, etc.
[0146] Step four, the difference feature and the multi-scale spatial feature are fused to obtain a pixel-level change mask. Specifically, the difference feature and the multi-scale spatial feature are fused through attention coupling, feature alignment, difference accumulation, etc. at the multi-scale stage, and finally a pixel-level change mask is output through a lightweight decoder.
[0147] The training of the above network or model is implemented based on an end-to-end training method, and during the training process, binary cross entropy + DiceLoss is used as a main loss, an orthogonal regularization term is introduced for the learnable DCT base, and an ordered prior regularization is introduced for the adaptive threshold, so that the overall network automatically converges under the driving of a supervision signal.
[0148] The AFB_DCT_FEM model is located at the front end of the network and is responsible for "projecting the original spatial domain image to a learnable frequency domain representation and extracting an efficient differential frequency band". Compared with the existing method which only performs difference in a fixed high-frequency channel, the AFB_DCT_FEM model has three major innovations: first, a depth separable convolution DCT is used to simulate a learnable 2-D DCT, and the DCT convolution kernel can be adjusted with training iterations; second, a trainable scalar sequence is used to divide the frequency band domain, realizing soft frequency band division; third, a lightweight CNN + global pooling prediction weight is designed for the difference features of each frequency band, realizing scene-adaptive spectral segment reconstruction.
[0149] Embodiment 2
[0150] This embodiment provides a change segmentation system based on learnable DCT and frequency band division, as shown in Figure 4 for implementing the change segmentation method based on learnable DCT and frequency band division described in Embodiment 1, the system comprises:
[0151] The acquisition module is configured to acquire the first and second time-phase images of the same target region.
[0152] The preprocessing module is configured to preprocess the first and second time-phase images.
[0153] The first feature extraction module is configured to input the preprocessed first and second time-phase images into the AFB_DCT_FEM module to obtain a block-level DCT coefficient tensor, and generate difference features through adaptive frequency band division and routing weighting.
[0154] The second feature extraction module is configured to input the preprocessed first and second time-phase images into a spatial encoder in parallel to extract multi-scale spatial features.
[0155] The fusion output module is configured to fuse the difference features and the multi-scale spatial features to obtain a pixel-level change mask.
[0156] Embodiment 3
[0157] This embodiment provides a computer readable medium having a computer program stored thereon, and the computer program is executed by a processor to implement the change segmentation method based on learnable DCT and frequency band division as described in Embodiment 1; and the following steps are specifically executed:
[0158] Step one, obtain the first and second time phase images of the same target area, and preprocess the first and second time phase images;
[0159] Step two, input the preprocessed first and second time phase images into the AFB_DCT_FEM model to obtain the block-level DCT coefficient tensor, and generate the difference feature through adaptive frequency band division and routing weighting;
[0160] Step three, parallelly send the preprocessed first and second time phase images into the spatial encoder to extract the multi-scale spatial feature;
[0161] Step four, fuse the difference feature and the multi-scale spatial feature to obtain the pixel-level change mask.
[0162] Based on the method of the present application, the comparison results of the pre-image, post-image, change true value and model output effect are as shown in Figure 5 .
[0163] The specific embodiments described above further illustrate the purposes, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method of variable partitioning based on a learnable DCT and band division, characterized in that, The method comprises: obtaining first and second time-phase images of the same target region, and preprocessing the first and second time-phase images; inputting the preprocessed first and second time-phase images into an AFB_DCT_FEM model to obtain a block-level DCT coefficient tensor, and generating a difference feature through adaptive frequency band division and routing weighting; parallelly inputting the preprocessed first and second time-phase images into a spatial encoder to extract multi-scale spatial features; fusing the difference feature and the multi-scale spatial feature to obtain a pixel-level change map.
2. The method of claim 1, wherein the method is based on a learnable DCT and band division based variation partitioning. The preprocessing comprises: correcting the first and second time-phase images, wherein the correction comprises radiation correction and geometric correction; cropping the corrected first and second time-phase images to a target block size, wherein the target block size is an integer multiple of a block size of Bx B. 3.The method of claim 1, wherein, The method for obtaining the difference feature comprises: performing block-level frequency domain mapping on the first or second time-phase image based on a learnable two-dimensional DCT transformation network to obtain a mapping spectrum containing multiple frequency points; the DCT convolution kernel of the learnable two-dimensional DCT transformation network is a trainable DCT convolution kernel, and the DCT basis function is: ; ; where x, y represent the spatial coordinate index within the block; B s denotes the size of the convolution block; u, v represent the frequency coordinate; denotes the k-th spectral band length weight; k = u or v; cos[] denotes the cosine function; performing frequency spectrum segmentation on the mapping spectrum based on an adaptive frequency band division AFB network according to a trainable frequency band threshold; scoring and weighting fusion of each frequency spectrum segment obtained by segmentation based on a Band Router dynamic weighting network, and finally upsampling to obtain a difference feature.
4. The method of claim 3, wherein, The cross-domain fine-tuning strategy comprises: initializing the DCT convolution kernel, constructing an adaptive attenuation coefficient matrix of the target image sensor, and scaling the DCT convolution kernel based on the adaptive attenuation coefficient matrix after loading the pre-trained weight; obtaining the spatial resolution of the target image and the benchmark spatial resolution in the pre-training stage of the learnable two-dimensional DCT transformation network, determining the size of the convolution block based on the benchmark spatial resolution and the spatial resolution of the target image to perform multiple interpolation scaling on the DCT convolution kernel; the size of the convolution block satisfies: ; wherein, denotes the size of the scaled convolution block; r base denotes the reference spatial resolution; r target denotes the spatial resolution of the target image; B s denotes the size of the convolution block; determining a gain function of each frequency point based on the dark channel prior method, and scaling the DCT convolution kernel based on the gain function.
5. The method of claim 4, wherein, The method for determining a gain function of each frequency point based on the dark channel prior method and scaling the DCT convolution kernel based on the gain function comprises: estimating the atmospheric light transmittance t based on the dark channel prior method; calculating the gain function of each frequency point based on the following formula: ; ; wherein, represents a frequency radius, k represents a hyperparameter that controls the strength of the gain; B s represents the size of the convolution block; exp[*] represents the exponential operation; represents a gain function; u, v represent frequency domain coordinates; scaling the DCT convolution kernel based on the gain function of each frequency point: ; wherein, denotes the final effective learnable DCT convolutional weights; denotes the post-training adapted learnable DCT convolutional weights.
6. The method of claim 3, wherein, The adaptive frequency band division AFB network performs frequency spectrum segmentation on the mapping spectrum according to the trainable frequency band threshold; the method comprises: determining an unsorted learnable scalar, obtaining the length weight of each frequency spectrum segment based on the softmax function, and obtaining an ordered boundary threshold based on prefix accumulation; A spectrum segment number K is configured, and a threshold set of a spectrum segment edge is wherein, denotes a threshold of the K-1th spectrum segment, and satisfies ; for each frequency spectrum segment, generating a soft mask based on a double Sigmoid difference function. The Band Router dynamic weighting network scores and weights the fusion of each frequency spectrum segment, and finally upsamples to obtain a difference feature.
7. The method of claim 6, wherein, The method comprises: Acquiring band features of K frequency spectrum segments ; For the kth band feature F k , a band feature vector P k is extracted by lightweight convolution k , which represents the band local information and global statistical information All band feature vectors are spliced, and a full connection layer is used to predict the weight of each frequency spectrum segment, and a differential feature is output by weighted fusion.
8. The method of claim 7, wherein, The loss function of the Band Router dynamic weighting network is: ; ; wherein, represents a loss function of the Band Router dynamic weighted network; represents the average activation weight of the kth frequency bin within a batch, and N represents the batch size; represents the predicted weight of the nth sample on the kth frequency bin.
9. A system for change segmentation based on a learnable DCT and frequency band partitioning, characterized by, The system for implementing the change segmentation method based on a learnable DCT and frequency band division according to any one of claims 1-8 comprises: The acquisition module is configured to acquire the first and second time-phase images of the same target region. The preprocessing module is configured to preprocess the first and second time-phase images. The first feature extraction module is configured to input the preprocessed first and second time-phase images into an AFB_DCT_FEM module to obtain a block-level DCT coefficient tensor, and generate a differential feature through adaptive frequency band division and routing weighting. The second feature extraction module is configured to input the preprocessed first and second time-phase images into a spatial encoder in parallel to extract multi-scale spatial features. The fusion output module is configured to fuse the differential feature and the multi-scale spatial feature to obtain a pixel-level change map.
10. A computer readable medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the change segmentation method based on a learnable DCT and frequency band division according to any one of claims 1-8.
Citation Information
Patent Citations
Remote sensing image change detection method based on DCT perception
CN119107562A
Remote sensing image building extraction method fusing double-space attention features
CN120198800A
Method and system for detecting intra-coded pictures and for extracting intra DCT precision and macroblock-level coding parameters from uncompressed digital video
US20030099290A1
Camera defocus direction estimation
US20150317770A1
Cited By
Motor rotor fault diagnosis system based on interpretable polynomial time sequence convolutional network
CN122045961A
