SpectralSpatial Out-of-Distribution-Based Unsupervised Band Selection Method for Hyperspectral Anomaly Detection
[Title] SpectralSpatial Out-of-Distribution-Based Unsupervised Band Selection Method for Hyperspectral Anomaly Detection
[Journal] IEEE Transactions on Geoscience and Remote Sensing (TGRS)
This code is built upon the DP-GMM-HSI project developed by zsyOAOA.
This repository contains the implementation of HADUBS (Hyperspectral Anomaly Detection using Out-of-Distribution-Based Unsupervised Band Selection), an unsupervised band selection method for hyperspectral image (HSI) anomaly detection.
The method leverages:
- Hierarchical Dirichlet Process (HDP) for spectral denoising
- LOF (Local Outlier Factor) for spatial anomaly detection
- Mutual Information for optimal band ranking
- MATLAB (R2018b or later recommended)
- PROPACK Toolbox - Required for
lansvdfunction- Download from: https://github.com/jedlofh/propack/releases
- Add to MATLAB path:
addpath('path/to/PROPACK');
Abnormal_band_selection/
├── demo.m % Main entry point
├── set_opt_HSI.m % HDP parameter configuration
├── hdp_denoise.m % HDP denoising algorithm
├── inexact_alm_rpca.m % RPCA (Robust PCA) algorithm
├── LOF.m % Local Outlier Factor implementation
├── Mi_my.m % Mutual Information computation
└── common/ % Common utility functions
├── choosvd.m
├── PCA.m
├── img_quality_HSI.m
├── ErrRelGlobAdimSyn.m
├── ssim_index.m
├── psnr_img.m
└── logsumexp.m
-
Configure data path in
demo.m:addpath(genpath('YOUR_DATA_PATH')); load forest.mat % or your HSI data
-
Run the main algorithm:
demo
| Parameter | Default | Description |
|---|---|---|
area_threshold |
25 | Connected component area threshold |
quantile_upper |
0.96 | Upper quantile threshold for LOF |
lof_k |
3 | K neighbors for LOF algorithm |
rank_r |
3 | Rank of low-rank component |
initT_hdp |
7 | Initial number of local MoG components |
initK_hdp |
15 | Initial number of global MoG components |
The code expects a .mat file containing:
data: HSI data cube of shape [Height, Width, Bands]map(optional): Ground truth map or mask
If you find this code useful in your research, please cite our paper:
@ARTICLE{HADUBS2024,
author = {Authors},
journal = {IEEE Transactions on Geoscience and Remote Sensing},
title = {SpectralSpatial Out-of-Distribution-Based Unsupervised Band Selection Method for Hyperspectral Anomaly Detection},
year = {2024},
doi = {10.1109/TGRS.2024.3493879}
}[To be determined - please specify your license]
[Your contact information]