This is the repository for "A Segment Anything Model based weakly supervised learning method for crop mapping using Sentinel-2 time series images".
Download SAM checkpoint, we used ViT-B SAM model.
The main finetuning code is in adapter_finetune.py. Some example data is provided in the repository.
The codes of generating pseudo labels by different weak annotations lie in pseudoLabels_generate_XXX.py. Our image classification model--attention-based U-Net is in cls_model directory.
The segmentation model this study uses is U-TAE.
@article{sun2024segment,
title={A Segment Anything Model based weakly supervised learning method for crop mapping using Sentinel-2 time series images},
author={Sun, Jialin and Yan, Shuai and Yao, Xiaochuang and Gao, Bingbo and Yang, Jianyu},
journal={International Journal of Applied Earth Observation and Geoinformation},
volume={133},
pages={104085},
year={2024},
publisher={Elsevier}
}
Spectial thanks to scholars from Meta and Junde Wu, as well as his fellows, for their implementation of adapters in SAM.