The model is designed to enhance the background features of hyperspectral images, thereby improving the performance of non-training-based anomaly detection algorithms, such as those based on the Mahalanobis distance. This model only needs to be trained on background hyperspectral images and can then enhance background features in any hyperspectral anomaly detection scenario, thereby improving the detection performance.
To use this model, you need to have PyTorch installed. You can install it via pip:
Here is a demo of how to use the model with a hyperspectral image (HSI) of 200 bands captured by AVIRIS:
1import torch
2
3# If it is an HSI of 200 bands captured by AVIRIS:
4hsi = torch.rand(1, 200, 100, 100)
5
6# Load models:
7cwl = torch.jit.load('aviris/200bands/cwl_script.pt')
8rnl = torch.jit.load('aviris/200bands/rnl_script.pt')
9pfl = torch.jit.load('aviris/200bands/fpl_script.pt')
10cwl.eval()
11rnl.eval()
12pfl.eval()
13
14# The enhanced HSI can be computed:
15enhanced_hsi, _ = pfl(rnl(cwl(hsi)), hsi)
If you wish to train your own model, please refer to our
GitHub repository. Simply save the background HSIs in .npy format and place them in the corresponding folder.