ViTAE-Transformer / SAMRS

The official repo for [NeurIPS'23] "SAMRS: Scaling-up Remote Sensing Segmentation Dataset with Segment Anything Model"
255 stars 13 forks source link

NotImplementedError #23

Open jihyunRS opened 1 week ago

jihyunRS commented 1 week ago

Thank you very much for sharing your research code.

I have one question, and I hope you can help me.

In the files main_finetune.py, main_pretrain.py, and test_gpu, the datasets are set to POTSDAM, VAIHNGEN, and ISAID, instead of the FAST, SOTA, and SIOR datasets that you uploaded to OneDrive. Should I modify the code to use the FAST, SOTA, and SIOR datasets instead?

Looking forward to your response. Thank you so much.

DotWang commented 1 week ago

@jihyunRS are you sure? We have set a dataset class using FAST, SOTA, and SIOR in main_pretrain.py (line 189-205). The POTSDAM, VAIHNGEN, and ISAID is only adopted in 'main_finetune.py'.

jihyunRS commented 1 week ago

I checked the main_pretrain.py file again and it indeed uses SOTA, SIOR, and FAST datasets.

So, for implementing SAMRS, do I need to download the POTSDAM, VAIHINGEN, ISAID, and HSRC2016 datasets separately and set the paths accordingly?

Thank you very much for your prompt response.

DotWang commented 1 week ago

@jihyunRS Yes, POTSDAM, VAIHINGEN, ISAID are segmentation datasets that are only used for finetuning the model pretrained on SAMRS, while HSRC2016 is a detection dataset that is used to determine the optimal prompt for constructing SAMRS.

So if you only need to use SAMRS, you only need to download public RS segmentation datasets, such as POTSDAM, VAIHINGEN, ISAID, SpaceNetv1 and LoveDA But you may need to manually conduct the data preprocessing, like cropping, label conversion, etc.

By the way, the afmentioned last two datasets are used in our newly recent research: improving RS foundation model by multitask pretraining (MTP), which also uses the SAMRS.