Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RS5M: a large-scale vision language dataset for remote sensing [TGRS]

License

NotificationsYou must be signed in to change notification settings

om-ai-lab/RS5M

Repository files navigation

RS5M Dataset

Pre-trained Vision-Language Models (VLMs) utilizing extensive image-text paired data have demonstrated unprecedented image-text association capabilities, achieving remarkable results across various downstream tasks. A critical challenge is how to make use of existing large-scale pre-trained VLMs, which are trained on common objects, to perform the domain-specific transfer for accomplishing domain-related downstream tasks. In this paper, we propose a new framework that includes the Domain pre-trained Vision-Language Model (DVLM), bridging the gap between the General Vision-Language Model (GVLM) and domain-specific downstream tasks. Moreover, we present an image-text paired dataset in the field of remote sensing (RS), RS5M, which has 5 million RS images with English descriptions. The dataset is obtained from filtering publicly available image-text paired datasets and captioning label-only RS datasets with pre-trained VLM. These constitute the first large-scale RS image-text paired dataset. Additionally, we fine-tuned the CLIP model and tried several Parameter-Efficient Fine-Tuning methods on RS5M to implement the DVLM. Experimental results show that our proposed dataset is highly effective for various tasks, and our model GeoRSCLIP improves upon the baseline or previous state-of-the-art model by 3% ~ 20% in Zero-shot Classification (ZSC) tasks, 3% ~ 6% in Remote Sensing Cross-Modal Text–Image Retrieval (RSCTIR) and 4% ~ 5% in Semantic Localization (SeLo) tasks.

teaser

GeoRSCLIP Model

Installation

  • Install Pytorch following instructions from the official website (We tested in torch 2.0.1 with CUDA 11.8 and 2.1.0 with CUDA 12.1)
  pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
  • Install other dependencies
  pip install pillow pandas scikit-learn ftfy tqdm matplotlib transformers adapter-transformers open_clip_torch pycocotools timm clip-benchmark torch-rs

Usage

git clone https://huggingface.co/Zilun/GeoRSCLIPcd GeoRSCLIP
  • Unzip the test data
unzip data/rs5m_test_data.zip
  • Run the inference script:
  python codebase/inference.py --ckpt-path /your/local/path/to/RS5M_ViT-B-32.pt --test-dataset-dir /your/local/path/to/rs5m_test_data
  • (Optional) If you just want to load the GeoRSCLIP model:
importopen_clipimporttorchfrominference_toolimportget_preprocessckpt_path="/your/local/path/to/RS5M_ViT-B-32.pt"model,_,_=open_clip.create_model_and_transforms("ViT-B/32",pretrained="openai")checkpoint=torch.load(ckpt_path,map_location="cpu")msg=model.load_state_dict(checkpoint,strict=False)model=model.to("cuda")img_preprocess=get_preprocess(image_resolution=224,  )
importopen_clipimporttorchfrominference_toolimportget_preprocessckpt_path="/your/local/path/to/RS5M_ViT-H-14.pt"model,_,_=open_clip.create_model_and_transforms("ViT-H/14",pretrained="laion2b_s32b_b79k")checkpoint=torch.load(ckpt_path,map_location="cpu")msg=model.load_state_dict(checkpoint,strict=False)model=model.to("cuda")img_preprocess=get_preprocess(image_resolution=224,  )

Experiment Result

  • All tasks

    EuroSAT_accRESISC45_accAID_accretrieval-image2text-R@1-rsitmdretrieval-image2text-R@5-rsitmdretrieval-image2text-R@10-rsitmdretrieval-text2image-R@1-rsitmdretrieval-text2image-R@5-rsitmdretrieval-text2image-R@10-rsitmdretrieval-mean-recall-rsitmdretrieval-image2text-R@1-rsicdretrieval-image2text-R@5-rsicdretrieval-image2text-R@10-rsicdretrieval-text2image-R@1-rsicdretrieval-text2image-R@5-rsicdretrieval-text2image-R@10-rsicdretrieval-mean-recall-rsicdSelo_RsuSelo_RdaSelo_RasSelo_Rmi
    GeoRSCLIP-ViTB3261.4072.7474.4217.9234.9646.0214.1241.4657.5235.3312.1728.4538.619.3126.5141.2826.060.7556360.7309250.2580440.744670
    GeoRSCLIP-ViTH1467.4773.8376.3323.4542.9253.3218.0144.6059.9640.3814.2729.5540.4411.3830.8044.4128.480.7595150.7418060.2566490.749430
  • RSCTIR Task

    • RSICD Test set

      MethodParadigmTuned onR@1 (I2T)R@5 (I2T)R@10 (I2T)R@1 (T2I)R@5 (T2I)R@10 (T2I)mR
      LW-MCRSupervisedRSICD3.29%12.52%19.93%4.66%17.51%30.02%14.66%
      VSE++SupervisedRSICD3.38%9.51%17.46%2.82%11.32%18.10%10.43%
      AFMFNSupervisedRSICD5.39%15.08%23.40%4.90%18.28%31.44%16.42%
      KCRSupervisedRSICD5.84%22.31%36.12%4.76%18.59%27.20%19.14%
      GaLRSupervisedRSICD6.59%19.85%31.04%4.69%19.48%32.13%18.96%
      SWANSupervisedRSICD7.41%20.13%30.86%5.56%22.26%37.41%20.61%
      HVSASupervisedRSICD7.47%20.62%32.11%5.51%21.13%34.13%20.16%
      PIRSupervisedRSICD9.88%27.26%39.16%6.97%24.56%38.92%24.46%
      FAAMISupervisedRSICD10.44%22.66%30.89%8.11%25.59%41.37%23.18%
      MultilanguageSupervisedRSICD10.70%29.64%41.53%9.14%28.96%44.59%27.42%
      PE-RSITRGVLM + FTRSICD14.13%31.51%44.78%11.63%33.92%50.73%31.12%
      MTGFESupervisedRSICD15.28%37.05%51.60%8.67%27.56%43.92%30.68%
      RemoteCLIPGVLM + FTRET-3 + DET-10 + SEG-417.02%37.97%51.51%13.71%37.11%54.25%35.26%
      CLIP-BaselineGVLM-5.31%14.18%23.70%5.78%17.73%27.76%15.74%
      GeoRSCLIP-FTGVLM + FTRS5M + RSICD22.14%40.53%51.78%15.26%40.46%57.79%38.00%
      GeoRSCLIP-FTGVLM + FTRS5M + RET-221.13%41.72%55.63%15.59%41.19%57.99%38.87%
    • RSITMD test set

      MethodParadigmTuned onR@1 (I2T)R@5 (I2T)R@10 (I2T)R@1 (T2I)R@5 (T2I)R@10 (T2I)mR
      LW-MCRSupervisedRSITMD10.18%28.98%39.82%7.79%30.18%49.78%27.79%
      VSE++SupervisedRSITMD10.38%27.65%39.60%7.79%24.87%38.67%24.83%
      AFMFNSupervisedRSITMD11.06%29.20%38.72%9.96%34.03%52.96%29.32%
      HVSASupervisedRSITMD13.20%32.08%45.58%11.43%39.20%57.45%33.15%
      SWANSupervisedRSITMD13.35%32.15%46.90%11.24%40.40%60.60%34.11%
      GaLRSupervisedRSITMD14.82%31.64%42.48%11.15%36.68%51.68%31.41%
      FAAMISupervisedRSITMD16.15%35.62%48.89%12.96%42.39%59.96%35.99%
      MTGFESupervisedRSITMD17.92%40.93%53.32%16.59%48.50%67.43%40.78%
      PIRSupervisedRSITMD18.14%41.15%52.88%12.17%41.68%63.41%38.24%
      MultilanguageSupervisedRSITMD19.69%40.26%54.42%17.61%49.73%66.59%41.38%
      PE-RSITRGVLM + FTRSITMD23.67%44.07%60.36%20.10%50.63%67.97%44.47%
      RemoteCLIPGVLM + FTRET-3 + DET-10 + SEG-427.88%50.66%65.71%22.17%56.46%73.41%49.38%
      CLIP-BaselineGVLM-9.51%23.01%32.74%8.81%27.88%43.19%24.19%
      GeoRSCLIP-FTGVLM + FTRS5M + RSITMD30.09%51.55%63.27%23.54%57.52%74.60%50.10%
      GeoRSCLIP-FTGVLM + FTRS5M + RET-232.30%53.32%67.92%25.04%57.88%74.38%51.81%

GeoRSSD

RS5M Dataset Download (About 500GB, 128 webdataset tars)

RS5M

Geometa

MetaFile

Image Only

How to use this dataset

Option 1 (Recommended)

  • We create the webdataset format files containing paired image and text for sequential data io. DoNOT untar the files.
  1. Download the webdataset files from the link provided above. The dataset directory should look like this:
        /nas/zilun/RS5M_v5/webdataset                                                           ├── train                                ├── pub11-train-0000.tar                                                                 ├── pub11-train-0001.tar        ├── ......        ├── pub11-train-0030.tar                                                 ├── pub11-train-0031.tar        ├── rs3-train-0000.tar                                                      ├── rs3-train-0001.tar        ├── ......        ├── rs3-train-0030.tar                                                      ├── rs3-train-0031.tar    ├── val                                ├── pub11-val-0000.tar                                                                 ├── pub11-val-0001.tar        ├── ......        ├── pub11-val-0030.tar                                                 ├── pub11-val-0031.tar        ├── rs3-val-0000.tar                                                      ├── rs3-val-0001.tar        ├── ......        ├── rs3-val-0030.tar                                                      ├── rs3-val-0031.tar
  2. An example of data IO pipeline using webdataset files is provided in "dataloader.py". The throughput (images per second) is ~1800 images per second. (With Ryzen 3950x CPU and dual-channel 3200MHZ DDR4 RAM)
  3. Run the following to have a taste:
    python dataloader.py --train_dir /media/zilun/mx500/RS5M/data/train --val_dir /media/zilun/mx500/RS5M/data/val --num_worker 16 --batch_size 400 --num_shuffle 10000

Option 2

  • We also provide the pure image files, which could be used with the metafiles from huggingface. Due to the huge amount of the image data, an SSD drive is recommended.
  1. Download the files from theBaidu disk link provided. The dataset directory should look like this:
        /nas/zilun/RS5M_v5/img_only                                                          ├── pub11                                ├── pub11.tar.gz_aa                                                               ├── pub11.tar.gz_ab        ├── ......        ├── pub11.tar.gz_ba                                                      ├── pub11.tar.gz_bc    ├── rs3                                ├── ben            ├── ben.tar.gz_aa                                               ├── fmow            ├── fmow.tar.gz_aa            ├── fmow.tar.gz_ab            ├── ......            ├── fmow.tar.gz_ap            ├── fmow.tar.gz_aq        ├── millionaid            ├── millionaid.tar.gz_aa            ├── millionaid.tar.gz_ab            ├── ......            ├── millionaid.tar.gz_ap            ├── millionaid.tar.gz_aq
  2. Combine and untar the files. You will have the images files now.
     # optional, for split and zip the dataset tar -I pigz -cvf - pub11 | split --bytes=500MB - pub11.tar.gz_ # combine different parts into one cat pub11.tar.gz_* > pub11.tar # extract pigz -dc pub11.tar | tar -xvf - -C /data/zilun/RS5M_v5/img_only/

Statistics

PUB11 Subset

NameAmountAfter Keyword FilteringDownload ImageInvalid Image (Removed)Duplicate Image (Removed)Outlier images (Removed by VLM and RS Detector)Remain
LAION2B2.3B1,980,9781,737,584102343,017333,6861,060,779
COYO700M746M680,089566,07628245,65094,329226,069
LAIONCOCO662M3,014,2832,549,73880417,689527,9411,604,028
LAION400M413M286,102241,32425141,65823,86075,781
WIT37 M98,54093,754074,0819,29910,374
YFCC15M15M27,16625,020026515,1269,629
CC12M12M18,89216,23401,8704,33010,034
Redcaps12M2,8422,68602289721,486
CC3M3.3M12,56311,71813281,8179,572
SBU1M10291043651
VG0.1M262600206
Total4.2B6,121,5835,244,2512361,224,7901,011,4163,007,809

RS3 Subset

NameAmountOriginal SplitHas Class label
FMoW727,144TrainYes
BigEarthNet344,385TrainYes
MillionAID990,848TestNo
Total2,062,377--

Geo-Statistics

  • Statistics of geometa for images contain the UTM zone, latitude, and longitude information.

    • YFCC14M: 7841
    • FMoW: 727,144
    • BigEarthNet: 344,385

    teaser

  • Extract entity with "GPE" label usingNER from NLTK

    • Applied to captions in PUB11 subset
    • Extraction Result
    • 880,354 image-text pairs contain "GPE", and most of them are city/country names.

BLIP2 fine-tuned with RSITMD dataset

  • Tuned with LoRA
  • Checkpoint and inference code can be found through thislink

Image-Text Pair Rating Tool

Awesome Remote Sensing Vision-Language Models & Papers

Contact

Email:zilun.zhang@zju.edu.cn

WeChat: zilun960822

Slack Group:https://join.slack.com/t/visionlanguag-fks1990/shared_invite/zt-290vxhx5y-SUkCzf2aH3G9eu3lye2YvQ

Acknowledgement

We thank Delong Chen and his ITRA framework for helping us fine-tune the CLIP-like models.https://itra.readthedocs.io/en/latest/Contents/introduction/overview.html

BibTeX Citation

If you use RS5M or GeoRSCLIP in a research paper, we would appreciate using the following citations:

@ARTICLE{10679571,  author={Zhang, Zilun and Zhao, Tiancheng and Guo, Yulong and Yin, Jianwei},  journal={IEEE Transactions on Geoscience and Remote Sensing},   title={RS5M and GeoRSCLIP: A Large Scale Vision-Language Dataset and A Large Vision-Language Model for Remote Sensing},   year={2024},  volume={},  number={},  pages={1-1},  keywords={Remote sensing;Data models;Visualization;Semantics;Tuning;Location awareness;Computational modeling;Image-text Paired Dataset;Remote Sensing;Vision-Language Model;Parameter Efficient Tuning;General Vision-Language Model;Domain Vision-Language Model;Remote Sensing Cross-Modal Text–Image Retrieval;Zero-shot Classification;Semantic Localization},  doi={10.1109/TGRS.2024.3449154}}

Some other citations:

@article{Long2021DiRS,  title={On Creating Benchmark Dataset for Aerial Image Interpretation: Reviews, Guidances and Million-AID},  author={Yang Long and Gui-Song Xia and Shengyang Li and Wen Yang and Michael Ying Yang and Xiao Xiang Zhu and Liangpei Zhang and Deren Li},  journal={IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing},  year={2021},  volume={14},  pages={4205-4230}}@inproceedings{Sumbul_2019,  title={Bigearthnet: A Large-Scale Benchmark Archive for Remote Sensing Image Understanding},  url={http://dx.doi.org/10.1109/IGARSS.2019.8900532},  DOI={10.1109/igarss.2019.8900532},  booktitle={IGARSS 2019 - 2019 IEEE International Geoscience and Remote Sensing Symposium},  publisher={IEEE},  author={Sumbul, Gencer and Charfuelan, Marcela and Demir, Begum and Markl, Volker},  year={2019},  month=jul}@inproceedings{fmow2018,  title={Functional Map of the World},  author={Christie, Gordon and Fendley, Neil and Wilson, James and Mukherjee, Ryan},  booktitle={CVPR},  year={2018}}

About

RS5M: a large-scale vision language dataset for remote sensing [TGRS]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp