Giter Club home page Giter Club logo

vitae-transformer / rsp Goto Github PK

View Code? Open in Web Editor NEW
121.0 2.0 7.0 16.85 MB

The official repo for [TGRS'22] "An Empirical Study of Remote Sensing Pretraining"

License: MIT License

Python 60.48% Jupyter Notebook 36.23% Dockerfile 0.04% Makefile 0.02% Batchfile 0.03% C++ 1.65% Cuda 1.31% C 0.01% Shell 0.24% CSS 0.01%
change-detection classification deep-learning imagenet object-detection pre-training remote-sensing semantic-segmentation transfer-learning foundation-models

rsp's Introduction

An Empirical Study of Remote Sensing Pretraining

Di Wang, Jing Zhang, Bo Du, Gui-Song Xia and Dacheng Tao

Updates | Introduction | Usage | Results & Models | Talk | Statement |

Current applications

Scene Recognition: Please see Remote Sensing Pretraining for Scene Recognition;

Sementic Segmentation: Please see Remote Sensing Pretraining for Semantic Segmentation;

Object Detection: Please see Remote Sensing Pretraining for Object Detection;

Change Detection: Please see Remote Sensing Pretraining for Change Detection;

ViTAE: Please see ViTAE-Transformer;

Matting: Please see ViTAE-Transformer for matting;

Updates

018/10/2023

RSP won the highly cited paper!

027/05/2022

The early access is available!

020/05/2022

The paper has been accepted by IEEE TGRS.

011/04/2022

The baiduyun links of pretrained models are provided.

07/04/2022

The paper is post on arxiv!

06/04/2022

The pretrained models for ResNet-50, Swin-T and ViTAEv2-S are released. The code for pretraining and downstream tasks are also provided for reference.

Introduction

This repository contains codes, models and test results for the paper "An Empirical Study of Remote Sensing Pretraining".

The aerial images are usually obtained by a camera in a birdview perspective lying on the planes or satellites, perceiving a large scope of land uses and land covers, whose scene is usually difficult to be interpreted since the interference of the scene-irrelevant regions and the complicated spatial distribution of land objects. Although deep learning has largely reshaped remote sensing research for aerial image understanding and made a great success. However, most of existing deep models are initialized with ImageNet pretrained weights, where the natural images inevitably presents a large domain gap relative to the aerial images, probably limiting the finetuning performance on downstream aerial scene tasks. This issue motivates us to conduct an empirical study of remote sensing pretraining. To this end, we train different networks from scratch with the help of the largest remote sensing scene recognition dataset up to now-MillionAID, to obtain the remote sensing pretrained backbones, including both convolutional neural networks (CNN) and vision transformers such as Swin and ViTAE, which have shown promising performance on computer vision tasks. Then, we investigate the impact of ImageNet pretraining (IMP) and RSP on a series of downstream tasks including scene recognition, semantic segmentation, object detection, and change detection using the CNN and vision transformers backbones.

Fig. - (a) and (b) are the natural image and aerial image belonging to the "park" category. (c) and (d) are two aerial images from the "school" category. Despite the distinct view difference of (a) and (b), (b) contains the playground that is unusual in the park scenes but usually exists in the school scenes like (d). On the other hand, (c) and (d) show different colors as well as significantly different spatial distributions of land objects like playground and swimming pool.

Results and Models

MillionAID

Backbone Input size Acc@1 Acc@5 Param(M) Pretrained model
RSP-ResNet-50-E300 224 × 224 98.99 99.82 23.6 google & baidu
RSP-Swin-T-E300 224 × 224 98.59 99.88 27.6 google & baidu
RSP-ViTAEv2-S-E100 224 × 224 98.97 99.88 18.8 google & baidu

Usage

Please refer to Readme.md for installation, dataset preparation, training and inference.

Citation

If this repo is useful for your research, please consider citation

@ARTICLE{rsp,
  author={Wang, Di and Zhang, Jing and Du, Bo and Xia, Gui-Song and Tao, Dacheng},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={An Empirical Study of Remote Sensing Pretraining}, 
  year={2023},
  volume={61},
  number={},
  pages={1-20},
  doi={10.1109/TGRS.2022.3176603}
}

Talk

A video talk about this study (In Chinese)

Statement

This project is under MIT licence. For any other questions please contact di.wang at gmail.com or di_wang at whu.edu.cn.

Relevant Projects

[1] Advancing Plain Vision Transformer Towards Remote Sensing Foundation Model, IEEE TGRS, 2022 | Paper | Github
     Di Wang, Qiming Zhang, Yufei Xu, Jing Zhang, Bo Du, Dacheng Tao and Liangpei Zhang

rsp's People

Contributors

chaimi2013 avatar dotwang avatar winter-jon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rsp's Issues

关于semantic segmentation 测试结果可能会有差异

您好,我使用upernet-rsp-resnet-50-potsdam-latest.pth权重在potsdam数据集上进行测试的时候,发现得到的结果与log中的结果有所出入;
我得到的结果如下:
微信图片_20231222211433
aAcc 86.43 vs 90.61 , mIou 65.69 vs 81.96,等等都有所差异;

关于MillionAID数据集

作者您好,我想请问一下我看b站中有提到,这个数据集是包含标签文件的,我在数据集官网下载后,并没有找到相关的标签文件,只有图片数据,您方便给我提供一下标签文件的下载地址吗,非常感谢!
b

Classification train/test set split.

Where can I find the train/test split for AID, UCM and NWPU-RESISC datasets? Could you provide the 'train_labels_{}_{}.txt'.format(ratio,split)) files?

训练时间+GPU是否利用问题

作者您好!我在复现您的变化检测 LEVIR-CD 数据集部分内容时(BIT-ResNet50 训练,ResNet50 预训练模型使用torch官方结果),batch size设置为4 (大于4则会爆显存)。发现训练一个epoch需要十五分钟左右,这和 LEVIR-CD 较小的数据量不符。在复现 BIT 算法官方论文时,同样的模型设置训练一个 epoch 仅需一分钟,而且能接受更大(12)的 batch size 且不会爆显存。
希望咨询作者,这种情况发生的原因是什么?因为代码是在 BIT 基础上修改的,理论上不会有这么大的训练差距,所以非常疑惑。
非常期待作者的回复,谢谢!

Runtime error

Why do I get an error after following the steps:DDP expects same model across all ranks, but Rank 0 has 161 params, while rank 1 has inconsistent 0 params.

new datasets

您好作者,谢谢您的工作,我有个关于添加新数据集的预训练的问题,如果想添加一个新的SAR数据集进行训练,生成预训练模型,这个SAR数据集要保持什么样的格式。

使用levir数据集报错问题

image
你好作者,我按照你的readme文件将levir数据集切换成了256*256的格式但是报错,如上图,这个可以帮忙看一下吗,谢谢

Warning: grad and param do not obey the gradient layout contract. This is not an error, but may impair performance.

您好,我的程序运行过程中,第1次验证val后总会出现如下警告:
[W accumulate_grad.h:185] Warning: grad and param do not obey the gradient layout contract. This is not an error, but may impair performance.
grad.sizes() = [2, 512, 1, 1], strides() = [512, 1, 1, 1]
param.sizes() = [2, 512, 1, 1], strides() = [512, 1, 512, 512] (function operator())
而且每回也就出现这1次,不知道您是否有遇到一样的Warning。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.