A lightweight method for forestry remote sensing data based on latent space optimization
Through the latent space optimization method, the low-dimensional latent variables and clustering centers are generated using variational autoencoder and meta-gradient optimization technology, which solves the problem of insufficient representativeness of forestry remote sensing data compression in the existing technology, and realizes efficient data storage and processing.
Patent Information
- Application Number
- CN202510018709.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-01-07
AI Technical Summary
When compressing forestry remote sensing data, the prior art ignores the effectiveness of generated data in model training, resulting in insufficient representation of generated data to the original data and low storage space utilization.
Using a latent space optimization method, low-dimensional latent variables and cluster centers are generated through variational autoencoder and meta-gradient optimization, a clustered data set is formed, and a compressed data set is generated through decoder reconstruction.
While maintaining the accuracy of model training, it significantly reduces the amount of data storage, improves data processing efficiency, and generates high-quality compressed data sets suitable for practical applications.
Smart Images

Figure CN119418081B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a lightweight method for forestry remote sensing data based on latent space optimization. Background Art
[0002] In recent years, with the widespread application of remote sensing technology in forestry resource monitoring, geospatial analysis, disaster management and other fields, the scale of forestry remote sensing datasets has been increasing. These datasets usually contain a large number of high-resolution images, which brings huge challenges in storage and processing. In this context, how to reduce the amount of data while ensuring data quality and improve data processing efficiency has become a key issue in current forestry remote sensing data management. In order to meet this challenge, dataset distillation technology is being widely studied as an important solution.
[0003] Traditional dimensionality reduction and compression methods focus more on reducing the size of data, but ignore the effectiveness of generated data in actual model training, resulting in insufficient representation of the generated data for the original data. For example, the application with application number 202411423324.6 represents high-dimensional data as a vector, and uses the offset of each element of the vector in the vector storage area as a coordinate index. This method is prone to redundancy in storage space when indexing data, especially when the amount of high-dimensional data is huge, the space utilization of the storage area is low. Summary of the invention
[0004] The purpose of the present invention is to provide a forestry remote sensing data lightweighting method based on latent space optimization that is specifically aimed at the lightweight and optimization needs of forestry remote sensing data sets and can effectively reduce the data storage volume while maintaining the model training accuracy.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows: a lightweight method for forestry remote sensing data based on latent space optimization, comprising the following steps;
[0006] S1, obtain the forestry remote sensing image dataset D1 to be compressed, which includes N original samples of K categories, among which the jth original sample x j The category label is y j , 1≤j≤N;
[0007] S2, constructing a data lightweight network, including a variational autoencoder, a clustering unit, an image classification network, a multi-layer feature extraction network and a discriminator, wherein the variational autoencoder includes an encoder and a decoder, and the multi-layer feature extraction network and the discriminator are pre-trained;
[0008] S3, use D1 to train the variational autoencoder to obtain the trained variational autoencoder , where the encoder is used to map the original sample from the image space to the latent space to obtain the corresponding latent variable, and the decoder is used to map the latent variable back to the image space to obtain the reconstructed sample;
[0009] S4, use D1 to train the image classification network and obtain the image classification model , used for input , output its predicted category label ;
[0010] S5, generate clustering data set D2;
[0011] D1 input , the encoder generates N latent variables, and the clustering unit is 4K clusters, and the cluster center of the i-th cluster is , the category label is , is the category label with the largest number of samples in the cluster, forming the clustering data set D2. ;
[0012] S6, preset the iteration round T, based on the lightweight network of D1 and D2 training data, alternately update the latent space variables and the discriminator parameters in each round until the iteration number is reached, wherein the tth iteration round includes steps S61-S63, 1≤t≤T;
[0013] S61, input D2 into the decoder, the latent space variables of the i-th cluster in the t-1th round The decoder obtains the reconstructed samples , generate a synthetic dataset , D1 and The original samples with the same category labels constitute the sub-dataset ;
[0014] S62, Freeze , the network parameters of the multi-layer feature extraction network and the discriminator, and calculate the total loss of this round of training , updated by the meta-gradient method , get the latent space variables of the ith cluster in the tth round , when t=1, ;
[0015] S63, Frozen , multi-layer feature extraction network, using replace , calculate again , and update the network parameters of the discriminator through the gradient descent algorithm;
[0016] S7, the iteration ends, and the synthetic dataset of the Tth round is used as the compressed dataset.
[0017] Preferably, the multi-layer feature extraction network is a VGG19 network, an Inceptionv4 network or a resnet50 network.
[0018] Preferably, the clustering unit uses a K-means clustering method for clustering.
[0019] As a preference: In S3, when training the variational autoencoder with D1, the loss function Including reconstruction loss and KL divergence.
[0020] As a preferred embodiment: in S62, According to the following formula:
[0021] ,
[0022] ,
[0023] ,
[0024] ,
[0025] ,
[0026] In the formula, , , , Based on The obtained verification loss, regularization term, decoder adversarial loss, Total loss, λ reg , adv , S They are , , The weight hyperparameters are for The classification loss is for right The predicted class label of is the vector modulus, For the discriminator The probability of being true, For sub-datasets The original sample in is the perceptual loss of the multi-layer feature extraction network, λ percep for The weight hyperparameters of .
[0027] Preferably, the multi-layer feature extraction network extracts features of M layers at different scales by M layers of feature extraction functions, wherein the feature extraction function of the mth layer is , and the perceptual loss of the multi-layer feature extraction network is calculated according to the following formula ;
[0028] ,
[0029] In the formula, 1≤m≤M.
[0030] Compared with the prior art, the advantages of the present invention are:
[0031] (1) Based on VAE, low-dimensional latent variables of high-dimensional image data are learned while retaining the core features of the original data, so that the high-resolution remote sensing image in D1 can be compressed into low-dimensional latent variables. After clustering, the cluster center is obtained and used as the latent variable of the reconstructed sample. The category label with the largest number of clusters corresponding to the cluster center is used as the category label of the cluster center to generate cluster samples. , forming the clustering data set D2, , and then reconstructed with the decoder to generate a smaller compressed data set D3. In this way, N samples in D1 are compressed to 4K in D3. This process not only greatly reduces the demand for data storage and transmission, but also provides a lightweight data source for subsequent model training and inference.
[0032] (2) In order to ensure that the compressed data set can better meet the training requirements of the model, the present invention uses the cluster center in D2 as the initialization value, and optimizes each training round by the meta-gradient method. In this way, in the tth round of training, the cluster center It is optimized into latent space variables The present invention minimizes the total loss of each round of training, iteratively adjusts the latent space variables, and then decodes to obtain reconstructed data based on the adjusted latent space variables, so that the generated reconstructed data can not only highly retain the key information in the original data, but also achieve better performance in subsequent model training.
[0033] (3) In each round of training total loss, the quality of generated reconstructed data is further improved by introducing regularization and adversarial training mechanisms. The synthetic data set D3 reconstructed in each round of the present invention is different. The synthetic data set D3 generated in the Tth round as a compressed data set not only maintains the naturalness and geographical consistency of the remote sensing image, but also performs well in tasks such as object classification and positioning. It is suitable for a variety of practical application scenarios such as forestry resource monitoring, forest health assessment, and disaster response.
[0034] In summary, the present invention effectively solves the bottleneck problem of forestry remote sensing dataset storage and processing through dataset distillation improvement based on variational autoencoders and meta-gradient optimization. This method not only has significant advantages in data compression and lightweight processing, but also ensures the high quality and practicality of the data. By generating compressed datasets suitable for practical applications, the present invention provides a new technical solution for forestry resource monitoring and geospatial analysis, which greatly promotes the application and expansion of remote sensing technology in forestry resource management. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of the present invention;
[0036] Figure 2 This is a network structure diagram of the present invention;
[0037] Figure 3 This is a flowchart of obtaining D3 via D1 in one iteration. DETAILED DESCRIPTION
[0038] The present invention will be further described below in conjunction with embodiments.
[0039] The present invention will be further described below in conjunction with the accompanying drawings.
[0040] Example 1: See Figures 1 to 3 ,A lightweight method for forestry remote sensing data based on latent space optimization includes the following steps;
[0041] S1, obtain the forestry remote sensing image dataset D1 to be compressed, which includes N original samples of K categories, among which the jth original sample x j The category label is y j , 1≤j≤N;
[0042] S2, constructing a data lightweight network, including a variational autoencoder, a clustering unit, an image classification network, a multi-layer feature extraction network and a discriminator, wherein the variational autoencoder includes an encoder and a decoder, and the multi-layer feature extraction network and the discriminator are pre-trained;
[0043] S3, use D1 to train the variational autoencoder to obtain the trained variational autoencoder , where the encoder is used to map the original sample from the image space to the latent space to obtain the corresponding latent variable, and the decoder is used to map the latent variable back to the image space to obtain the reconstructed sample;
[0044] S4, use D1 to train the image classification network and obtain the image classification model , used for input , output its predicted category label ;
[0045] S5, generate clustering data set D2;
[0046] D1 input , the encoder generates N latent variables, and the clustering unit is 4K clusters, and the cluster center of the i-th cluster is , the category label is , is the category label with the largest number of samples in the cluster, forming the clustering data set D2. ;
[0047] S6, preset the iteration round T, based on the lightweight network of D1 and D2 training data, alternately update the latent space variables and the discriminator parameters in each round until the iteration number is reached, wherein the tth iteration round includes steps S61-S63, 1≤t≤T;
[0048] S61, input D2 into the decoder, the latent space variables of the i-th cluster in the t-1th round The decoder obtains the reconstructed samples , generate a synthetic dataset , D1 and The original samples with the same category labels constitute the sub-dataset ;
[0049] S62, Freeze , the network parameters of the multi-layer feature extraction network and the discriminator, and calculate the total loss of this round of training , updated by the meta-gradient method , get the latent space variables of the ith cluster in the tth round , when t=1, ;
[0050] S63, Frozen , multi-layer feature extraction network, using replace , calculate again , and update the network parameters of the discriminator through the gradient descent algorithm;
[0051] S7, the iteration ends, and the synthetic dataset of the Tth round is used as the compressed dataset.
[0052] In this embodiment, regarding D2, Considered as a cluster sample, 4K cluster samples Construct the clustering data set D2.
[0053] In this embodiment, the Meta-Gradient optimization method is a method for optimizing hyperparameters. It updates hyperparameters by calculating gradient information, so that the intelligent agent can better adapt to different environments and tasks.
[0054] In each round of iteration, the present invention updates the latent space variables and the discriminator parameters alternately once. In the t+1th round of iteration, based on the tth round of iteration, ,Will Reconstruct the decoder to get the reconstructed samples ,calculate After that, Treat it as a network model and update it using the meta-gradient method get ; Reuse replace Calculate again , the gradient descent algorithm is used to update the network parameters of the discriminator, so that alternating updates are achieved in one iteration and the network parameters of the discriminator. After T rounds of updates, the final synthetic dataset is the compressed dataset, which contains 4K reconstructed samples, which is much smaller than the forestry remote sensing image dataset D1 to be compressed, and each reconstructed sample is representative of the data in D1.
[0055] Example 2: See Figures 1 to 3 Based on Example 1, the multi-layer feature extraction network is a VGG19 network, an Inceptionv4 network or a resnet50 network.
[0056] The clustering unit adopts K-means clustering method for clustering. The idea of K-means clustering (k-means clustering algorithm) is: when the number of clusters K is specified, K cases are randomly selected from the data set as the starting cluster center points, the Euclidean distance between the points represented by other cases and the initial cluster center points is calculated, and the cases are divided into the class closest to the cluster center. After all data cases are divided into categories, K data sets (K clusters) are formed, and the mean of the data cases in each cluster is recalculated, and the mean is used as the new cluster center. Therefore, the cluster center is in a state of change, and this process is repeated until the cluster center point no longer changes.
[0057] In S3, when D1 is used to train the variational autoencoder, the loss function Including reconstruction loss and KL divergence.
[0058] In step S62 of this embodiment, According to the following formula:
[0059] ,
[0060] ,
[0061] ,
[0062] ,
[0063] ,
[0064] In the formula, , , , Based on The obtained verification loss, regularization term, decoder adversarial loss, Total loss, λ reg , adv , S They are , , The weight hyperparameters are for The classification loss is for right The predicted class label of is the vector modulus, For the discriminator The probability of being true, For sub-datasets The original sample in is the perceptual loss of the multi-layer feature extraction network, λ percep for The weight hyperparameters of .
[0065] The multi-layer feature extraction network extracts features of M layers of different scales by M layers of feature extraction functions, where the mth layer feature extraction function is , and the perceptual loss of the multi-layer feature extraction network is calculated according to the following formula ;
[0066] ,
[0067] Wherein, 1≤m≤M. In this embodiment, the multi-layer feature extraction network is VGG19, and M=5.
[0068] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A lightweight method for forestry remote sensing data based on latent space optimization, characterized by: The steps include: S1, obtain the forestry remote sensing image dataset D1 to be compressed, which includes N original samples of K categories, among which the jth original sample x j The category label is y j , 1≤j≤N; S2, constructing a data lightweight network, including a variational autoencoder, a clustering unit, an image classification network, a multi-layer feature extraction network and a discriminator, wherein the variational autoencoder includes an encoder and a decoder, and the multi-layer feature extraction network and the discriminator are pre-trained; S3, use D1 to train the variational autoencoder to obtain the trained variational autoencoder , where the encoder is used to map the original sample from the image space to the latent space to obtain the corresponding latent variable, and the decoder is used to map the latent variable back to the image space to obtain the reconstructed sample; S4, use D1 to train the image classification network and obtain the image classification model , used for input , output its predicted category label ; S5, generate clustering data set D2; D1 input , the encoder generates N latent variables, and the clustering unit is 4K clusters, and the cluster center of the i-th cluster is , the category label is , is the category label with the largest number of samples in the cluster, forming the clustering data set D2. ; S6, preset the iteration round T, lightweight network based on D1 and D2 training data, alternately update the latent space variables and discriminator parameters in each round until the iteration number is reached, wherein the tth iteration round includes steps S61-S63, 1≤t≤T; S61, input D2 into the decoder, the latent space variables of the i-th cluster in the t-1th round The decoder obtains the reconstructed samples , generate a synthetic dataset , D1 and The original samples with the same category labels constitute the sub-dataset ; S62, Freeze , the network parameters of the multi-layer feature extraction network and the discriminator, and calculate the total loss of this round of training , updated by the meta-gradient method , get the latent space variables of the ith cluster in the tth round , when t=1, ; S63, Frozen , multi-layer feature extraction network, using replace , calculate again , and update the network parameters of the discriminator through the gradient descent algorithm; S7, the iteration ends, and the synthetic data set of the Tth round is used as the compressed data set; In S62, According to the following formula: , , , , , In the formula, , , , Based on The obtained verification loss, regularization term, decoder adversarial loss, Total loss, λ reg , adv , S They are , , The weight hyperparameters are for The classification loss is for right The predicted class label of is the vector modulus, For the discriminator The probability of being true, For sub-datasets The original sample in is the perceptual loss of the multi-layer feature extraction network, λ percep for The weight hyperparameters of .
2. The method for lightweighting forestry remote sensing data based on latent space optimization according to claim 1 is characterized in that: The multi-layer feature extraction network is a VGG19 network, an Inceptionv4 network or a resnet50 network.
3. The method for lightweighting forestry remote sensing data based on latent space optimization according to claim 1, characterized in that: The clustering unit adopts K-means clustering method to perform clustering.
4. The method for lightweighting forestry remote sensing data based on latent space optimization according to claim 1 is characterized in that: In S3, when D1 is used to train the variational autoencoder, the loss function Including reconstruction loss and KL divergence.
5. The method for lightweighting forestry remote sensing data based on latent space optimization according to claim 1, characterized in that: The multi-layer feature extraction network extracts features of M layers of different scales by M layers of feature extraction functions, where the mth layer feature extraction function is , and the perceptual loss of the multi-layer feature extraction network is calculated according to the following formula ; , In the formula, 1≤m≤M.
Citation Information
Patent Citations
Constant space data compression method, device and computer equipment without metadata
CN118944679B
Cloth defect image generation system and method based on improved variational auto-encoder network
CN114067168A
Image augmentation model training method and image classification method based on variational auto-encoder and generative adversarial network
CN114386534A