This is a PyTorch implementation of the Instance Adaptation for RSAD:
@article{li2024segmenting,
title={Segmenting Remote Sensing Anomalies at Instance-level via Anomaly Map Guided Adaptation},
author={Li, Jingtao and Zhong, Yanfei and Zhao, Hengwei and Gao, Zhi and Wang, Xinyu},
journal={IEEE Transactions on Geoscience and Remote Sensing},
year={2024},
publisher={IEEE}
}
- This work extends the anomaly segmentation from the pixel-level to the instance level for object-centric, cleaner, and counting support detection results. The meta-architecture of query-based models is adopted to output the object masks for the end-to-end advantage.
- General adaptations are proposed, which extract the anomaly information from pixel-level anomaly map to guide the embedding refinement and query selection. The guidance injects the anomaly-aware representation to prevent the model from learning certain category anomalies.
- A channel preprocessing strategy is designed to deal with the varying channels of input remote sensing images. The strategy extracts only three channels while keeping the anomaly information existing by computing the deviation distance explicitly.
- Install required packages according to the requirements.txt.
- Download the simulated training dataset (using simulation workflow from UniADRS) and testing dataset from here. Update the dataset path in file
train_net.py (line 16-19)
andtools/visualize_json_results.py (line 14-17)
. - Download the pre-trained maskdino checkpoint and replace the 'WEIGHTS' key in config.yaml.
- MMRAD is trained with simulated samples and can infer the real anomaly samples of different modalities directly.
- Starting the training and quantitative testing process using the following one command.
python train_net.py
- Visualizing the inferring results using script
tools/visualize_json_results.py
.
- Anomaly generation. Line 446-448 in
/maskdino_ada/modeling/pixel_decoder/maskdino_encoder.py
. - Embedding refinement. Line 386-395 in
/maskdino_ada/modeling/transformer_decoder/maskdino_decoder.py
. - Query selection. Line 429-432 in
/maskdino_ada/modeling/transformer_decoder/maskdino_decoder.py
. - Varying channel preprocessing. Line 401-409 in
/maskdino_ada/maskdino.py
The following are the exemplified localization results on three modalities. We found the instance-level supervision promoted the pixel-level results as well.