Awesome Remote Sensing Toolkit based on PaddlePaddle.

Overview

基于飞桨框架开发的高性能遥感图像处理开发套件,端到端地完成从训练到部署的全流程遥感深度学习应用。

License python version support os

最新动态

  • PaddleRS 即将发布alpha版本!欢迎大家试用

简介

PaddleRS是遥感科研院所、相关高校共同基于飞桨开发的遥感处理平台,支持遥感图像分类,目标检测,图像分割,以及变化检测等常用遥感任务,帮助开发者更便捷地完成从训练到部署全流程遥感深度学习应用。

特性

  • 特有的遥感数据处理模块:针对遥感行业数据特点,提供了大尺幅数据切片与拼接,支持读取tifpngjpegbmpimg以及 npy等格式,支持地理信息保存和超分辨率。

  • 覆盖任务广:支持目标检测、图像分割、变化检测、参数反演等多种任务

  • 高性能:支持多进程异步I/O、多卡并行训练、评估等加速策略,结合飞桨核心框架的显存优化功能,可大幅度减少分割模型的训练开销,让开发者更低成本、更高效地完成图像遥感图像的开发和训练。

产品矩阵

模型总览 数据增强 遥感工具 实践案例
场景分类
  • ResNet
  • MobileNet
  • HRNet
语义分割
  • UNet
  • FarSeg
  • DeepLabV3P
目标检测
  • PP-YOLO
  • Faster RCNN
  • PicoDet
超分/去噪
  • DRNet
  • LESRCNNet
  • ESRGANet
变化检测
  • DSIFN
  • STANet
  • UNetSiamDiff
数据增强
  • Resize
  • RandomResize
  • ResizeByShort
  • RandomResizeByShort
  • ResizeByLong
  • RandomFlipOrRotation
  • RandomHorizontalFlip
  • RandomVerticalFlip
  • Normalize
  • CenterCrop
  • RandomCrop
  • RandomScaleAspect
  • RandomExpand
  • Padding
  • MixupImage
  • RandomDistort
  • RandomBlur
  • Defogging
  • DimReducing
  • BandSelecting
  • RandomSwap
数据格式转换
  • coco to mask
  • mask to shpfile
  • mask to geojson
数据预处理
  • data split
  • images match
  • bands select
遥感场景分类
  • 待更
遥感语义分割
  • 待更
遥感目标检测
  • 待更
遥感变化检测
  • 待更
遥感影像超分
  • 待更

代码结构

这部分将展示PaddleRS的文件结构全貌。文件树如下:

├── deploy               # 部署相关的文档和脚本
├── docs                 # 整个项目文档及图片
├── paddlers  
│     ├── custom_models  # 自定义网络模型代码
│     ├── datasets       # 数据加载相关代码
│     ├── models         # 套件网络模型代码
│     ├── tasks          # 相关任务代码
│     ├── tools          # 相关脚本
│     ├── transforms     # 数据处理及增强相关代码
│     └── utils          # 各种实用程序文件
├── tools                # 用于处理遥感数据的脚本
└── tutorials
      └── train          # 训练教程

技术交流

  • 如果你发现任何PaddleRS存在的问题或者是建议, 欢迎通过GitHub Issues给我们提issues。
  • 欢迎加入PaddleRS 微信群

使用教程

开源贡献

非常感谢国家对地观测科学数据中心、中国科学院空天信息创新研究院、北京航空航天大学、武汉大学、中国石油大学(华东)、中国地质大学、中国四维、航天宏图、中科星图、超图等单位对PaddleRS项目的贡献。注:排名不分先后。

许可证书

本项目的发布受Apache 2.0 license许可认证。

学术引用

如果我们的项目在学术上帮助到你,请考虑以下引用:

@misc{paddlers2022,
    title={PaddleRS, Awesome Remote Sensing Toolkit based on PaddlePaddle},
    author={PaddlePaddle Authors},
    howpublished = {\url{https://github.com/PaddleCV-SIG/PaddleRS}},
    year={2022}
}
Comments
  • [Feature] Add training tutorials for segmentation tasks

    [Feature] Add training tutorials for segmentation tasks

    Add training tutorials for all implemented segmentation methods. Since currently, UNet is the only method that handles multispectral (more than three bands) images, the tutorials of the other methods are based on a non-remote-sensing dataset (i.e. the optic_disc_seg dataset). The tutorial of UNet is based on a landcover classification dataset. Test passes locally.

    opened by Bobholamovic 7
  • [Fix] Fix PCA used

    [Fix] Fix PCA used

    晖哥根据昨天我们关于pca的讨论,今天我尝试修改了一下,首先是tools中有个pca.py,可以对一张hsi图像进行pca降维,在保存结果的同时保存pca的参数,如下

    R%HWFQMO`}40)5@TS}4)9 B

    WL{)LUI@F4P3YS3(RXCHS

    但是transform里面还是保留了,作用是比如推理的时候,可以加载这个pca参数进行推理,加载和保存都是这个*.joblib的文件,一个test.py如下:

    import paddlers as pdrs
    from paddlers import transforms as T
    import cv2
    
    transforms = T.Compose([
        T.DimReducing("pcatest/output/UINT16_HSI_pca.joblib")
    ])
    
    dataset = pdrs.datasets.ClasDataset(
        data_dir='pcatest',  # 里面只有一张图
        file_list='pcatest/list.txt',  # 里面只有这张图的名字和一个标签
        transforms=transforms
    )
    
    for data in dataset:
        img = data["image"]
        print(img.shape)
        cv2.namedWindow('img', cv2.WINDOW_NORMAL)
        cv2.imshow("img", cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
        cv2.waitKey(0)
        cv2.destroyAllWindows()
    

    测试这样的pca

    75@AJ69737ILU23{PH6{Q27

    SP(6K_85Q1OU$94@1UH3NA4

    晖哥看看这样可以吗。中间我比较困惑是我应不应该转uint8两次,首先是现在ImgDecoder是默认用了to_uint8,我想如果训练pca的时候没有这个就会导致不同我就用了,然后就是得到的结果我看有是float64有正有负,如果不to_uint8一下会不会影响后面的Normalize,所以我也用了。

    还有关于save_tiff这里有一些重复,和geojson分支,我想等后面这两个合并了我再删一下,顺便再更新文档。

    opened by geoyee 6
  • Error when importing

    Error when importing

    The same error has been reported when importing paddlers. I have tried many times to create a new virtual environment and reinstall it, but it still does not solve it. Is there a better solution? Thank you very much for your help. image

    solved 
    opened by wwzh26 5
  • RS训练分类模型,导出之后,预测报错

    RS训练分类模型,导出之后,预测报错

    利用RS 训练了HRNet_W18_C模型,模型训练、导出都正常,就是用导出的模型做预测的时候出现了错误。 Traceback (most recent call last): File "demo.py", line 52, in result = predictor.predict(img_file=img1,transforms=eval_transforms) File "/home/aistudio/PaddleRS/paddlers/deploy/predictor.py", line 279, in predict results = self._run(images=images, topk=topk, transforms=transforms) File "/home/aistudio/PaddleRS/paddlers/deploy/predictor.py", line 235, in _run transforms=transforms) File "/home/aistudio/PaddleRS/paddlers/deploy/predictor.py", line 175, in postprocess preds = self._model._postprocess(net_outputs, true_topk) TypeError: 'NoneType' object is not callable image 请问这个错误怎么处理

    bug solved 
    opened by L-xiaolu 4
  • [Feature] Add training tutorials for classification tasks

    [Feature] Add training tutorials for classification tasks

    1. Fix typos and bugs in paddlers/datasets/cd_dataset.py and paddlers/utils/utils.py.
    2. Update readme file for training tutorials.
    3. Add training tutorials for classification tasks. The training of the classification models is based on the UC Merced land use dataset.
    opened by Bobholamovic 4
  • add 5 flip mode, 3 rotate mode of images

    add 5 flip mode, 3 rotate mode of images

    add RandomFlipOrRotation in paddlers/transforms/operators.py add some functions in paddlers/transforms/functions.py add some files that work by json library to show statistics information of images or annotations, and to merge, spilt, get new json file

    opened by huilin16 4
  • [Feature] Add training tutorials for CD tasks

    [Feature] Add training tutorials for CD tasks

    1. Change the parameter initialization method of FC-EF, FC-Siam-conc, and FC-Siam-diff, such that these networks can be trained to obtained higher detection accuracy.
    2. Add training tutorials for all implemented CD methods, except for ChangeStar. The training tutorial of ChangeStar is to be added later, because I have not yet found a suitable dataset. For the other CD methods, the training is performed on the SZTAKI AirChange Benchmark Set.
    opened by Bobholamovic 4
  • Can't use paddle's ReduceOnPlateau

    Can't use paddle's ReduceOnPlateau

    paddle.optimizer.lr.ReduceOnPlateau.step(metrics, epoch=None), it require metrics that other paddle.optimizer.lr doesn't;

    when you use ReduceOnPlateau as learning rate scheduler like this:

    model = pdrs.tasks.BIT(... lr_scheduler = paddle.optimizer.lr.ReduceOnPlateau( LR, ) optimizer = paddle.optimizer.Adam( learning_rate=lr_scheduler, parameters=model.net.parameters() ) model.train(...

    it will rise a TypeError: step() missing 1 required positional argument: 'metrics'

    enhancement 
    opened by Xiaracto 3
  • [Feat] Update use mixed loss

    [Feat] Update use mixed loss

    1. 按照之前与 @LutaoChu 的商讨结果,修改了SegmenterChangeDetectoruse_mixed_loss相关逻辑和接口。目前支持API调用者直接传入构建好的loss对象。为了让API使用起来更加便捷,支持传入布尔型、列表、字典、或者loss对象这四种不同的类型。
    2. 目前所有的变化检测模型(包括使用了深度监督的模型和多任务模型)均已支持用户自定义的use_mixed_loss参数。

    问题:目前的实现进一步复杂化了use_mixed_loss,加重了这个输入参数本来就存在的“名称与行为不一致”的问题。是否考虑拆成多个参数或者更名?

    opened by Bobholamovic 3
  • [Fix] Update clas-task val and predict without train

    [Fix] Update clas-task val and predict without train

    在进行多光谱分类中遇到一些问题,进行了一些修改,项目可见https://aistudio.baidu.com/aistudio/projectdetail/3711240

    1. 现在default_metric的初始化放在train中的,要调用evaluate必须先调用train,否则会报错。所以现在将default_metric放到task的初始化中,这看起来不会对其他有影响。
    2. 修改了changedetector中的一个命名的问题。
    3. 增加了load的方法来加载参数,方便进行推理,就不用再用model.net.set_dict(xxx)这样的方式加载参数了。
    4. 修复了一些predict的问题,之前无法预测(主要是那个加[0]后的形状问题和postprocess的问题)。
    5. 为clas的task增加了一个label_list的初始化参数,目前label_list来自train时从train_data.label_list中得到,如果不先调用train就无法预测。这里还可以看看怎么做会好点。
    opened by geoyee 3
  • rs change star 模型调用出错

    rs change star 模型调用出错

    model=pdrs.tasks.ChangeStar( num_classes=2, use_mixed_loss=False, mid_channels=256, inner_channels=16, num_convs=4, scale_factor=4.0, )


    TypeError Traceback (most recent call last) /tmp/ipykernel_160/3661388624.py in 5 inner_channels=16, 6 num_convs=4, ----> 7 scale_factor=4.0, 8 )

    ~/PaddleRS/paddlers/tasks/changedetector.py in init(self, num_classes, use_mixed_loss, mid_channels, inner_channels, num_convs, scale_factor, **params) 883 num_classes=num_classes, 884 use_mixed_loss=use_mixed_loss, --> 885 **params) 886 887 def default_loss(self):

    ~/PaddleRS/paddlers/tasks/changedetector.py in init(self, model_name, num_classes, use_mixed_loss, **params) 61 if params.get('with_net', True): 62 params.pop('with_net', None) ---> 63 self.net = self.build_net(**params) 64 self.find_unused_parameters = True 65

    ~/PaddleRS/paddlers/tasks/changedetector.py in build_net(self, **params) 67 # TODO: add other model 68 net = cmcd.dict[self.model_name](num_classes=self.num_classes, ---> 69 **params) 70 return net 71

    ~/PaddleRS/paddlers/custom_models/cd/changestar.py in init(self, num_classes, mid_channels, inner_channels, num_convs, scale_factor) 138 inner_channels=inner_channels, 139 num_convs=num_convs, --> 140 scale_factor=scale_factor) 141 142

    ~/PaddleRS/paddlers/custom_models/cd/changestar.py in init(self, seg_model, num_classes, mid_channels, inner_channels, num_convs, scale_factor) 29 def init(self, seg_model, num_classes, mid_channels, inner_channels, 30 num_convs, scale_factor): ---> 31 super(_ChangeStarBase, self).init(_ChangeStarBase, self) 32 33 self.extract = seg_model

    /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py in init(self, name_scope, dtype) 103 if name_scope is None: 104 name_scope = _convert_camel_to_snake(self.class.name) --> 105 self._full_name = unique_name.generate(name_scope) 106 self._helper = LayerObjectHelper(self._full_name) 107 self._built = False

    /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/unique_name.py in generate(key) 103 print(name1, name2) # fc_0, fc_1 104 """ --> 105 return generator(key) 106 107

    /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/unique_name.py in call(self, key) 49 tmp = self.ids[key] 50 self.ids[key] += 1 ---> 51 return self.prefix + "_".join([key, str(tmp)]) 52 53

    TypeError: sequence item 0: expected str instance, type found

    solved 
    opened by Dylan-get 3
  • CVE-2007-4559 Patch

    CVE-2007-4559 Patch

    Patching CVE-2007-4559

    Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.

    If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

    opened by TrellixVulnTeam 0
  • module 'paddlers' has no attribute 'transforms'

    module 'paddlers' has no attribute 'transforms'

    (paddle_env) E:\PaddleRS>python setup.py install Traceback (most recent call last): File "setup.py", line 16, in import paddlers File "E:\PaddleRS\paddlers_init_.py", line 17, in from paddlers.utils.env import get_environ_info, init_parallel_env File "E:\PaddleRS\paddlers\utils_init_.py", line 28, in from .visualize import map_display File "E:\PaddleRS\paddlers\utils\visualize.py", line 26, in from paddlers.transforms.functions import to_uint8 File "E:\PaddleRS\paddlers\transforms_init_.py", line 18, in from .operators import * File "E:\PaddleRS\paddlers\transforms\operators.py", line 30, in import paddlers.transforms.functions as F AttributeError: module 'paddlers' has no attribute 'transforms'

    opened by jzzzzh 0
Releases(1.0-beta)
  • 1.0-beta(May 19, 2022)

    新特性

    丰富数据处理

    • 20+遥感数据增强策略
    • 半自动标注工具 EISeg

    高质量视觉模型

    • 120+内置模型算法
    • 覆盖5大遥感视觉场景

    易用API设计

    • 1套API支持5大任务
    • 4个API完成模型训练

    高性能训练

    • 核心框架显存优化功能
    • 多卡并行训练加速策略
    Source code(tar.gz)
    Source code(zip)
Owner
null
rastrainer is a QGIS plugin to training remote sensing semantic segmentation model based on PaddlePaddle.

rastrainer rastrainer is a QGIS plugin to training remote sensing semantic segmentation model based on PaddlePaddle. UI TODO Init UI. Add Block. Add l

deepbands 5 Mar 4, 2022
Remote sensing change detection using PaddlePaddle

Change Detection Laboratory Developing and benchmarking deep learning-based remo

Lin Manhui 15 Sep 23, 2022
Semi-supervised Representation Learning for Remote Sensing Image Classification Based on Generative Adversarial Networks

SSRL-for-image-classification Semi-supervised Representation Learning for Remote Sensing Image Classification Based on Generative Adversarial Networks

Feng 2 Nov 19, 2021
CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Detection in Remote Sensing Images

CFC-Net This project hosts the official implementation for the paper: CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Dete

ming71 55 Dec 12, 2022
Official Pytorch Implementation of Adversarial Instance Augmentation for Building Change Detection in Remote Sensing Images.

IAug_CDNet Official Implementation of Adversarial Instance Augmentation for Building Change Detection in Remote Sensing Images. Overview We propose a

null 53 Dec 2, 2022
FactSeg: Foreground Activation Driven Small Object Semantic Segmentation in Large-Scale Remote Sensing Imagery (TGRS)

FactSeg: Foreground Activation Driven Small Object Semantic Segmentation in Large-Scale Remote Sensing Imagery by Ailong Ma, Junjue Wang*, Yanfei Zhon

Kingdrone 43 Jan 5, 2023
PyTorch implementation of popular datasets and models in remote sensing

PyTorch Remote Sensing (torchrs) (WIP) PyTorch implementation of popular datasets and models in remote sensing tasks (Change Detection, Image Super Re

isaac 222 Dec 28, 2022
Deep learning models for change detection of remote sensing images

Change Detection Models (Remote Sensing) Python library with Neural Networks for Change Detection based on PyTorch. ⚡ ⚡ ⚡ I am trying to build this pr

Kaiyu Li 176 Dec 24, 2022
Change is Everywhere: Single-Temporal Supervised Object Change Detection in Remote Sensing Imagery (ICCV 2021)

Change is Everywhere Single-Temporal Supervised Object Change Detection in Remote Sensing Imagery by Zhuo Zheng, Ailong Ma, Liangpei Zhang and Yanfei

Zhuo Zheng 125 Dec 13, 2022
LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation (NeurIPS2021 Benchmark and Dataset Track)

LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation by Junjue Wang, Zhuo Zheng, Ailong Ma, Xiaoyan Lu, and Yanfei Zh

Kingdrone 174 Dec 22, 2022
From this paper "SESNet: A Semantically Enhanced Siamese Network for Remote Sensing Change Detection"

SESNet for remote sensing image change detection It is the implementation of the paper: "SESNet: A Semantically Enhanced Siamese Network for Remote Se

null 1 May 24, 2022
paper: Hyperspectral Remote Sensing Image Classification Using Deep Convolutional Capsule Network

DC-CapsNet This is a tensorflow and keras based implementation of DC-CapsNet for HSI in the Remote Sensing Letters R. Lei et al., "Hyperspectral Remot

LEI 7 Nov 29, 2022
a practicable framework used in Deep Learning. So far UDL only provide DCFNet implementation for the ICCV paper (Dynamic Cross Feature Fusion for Remote Sensing Pansharpening)

UDL UDL is a practicable framework used in Deep Learning (computer vision). Benchmark codes, results and models are available in UDL, please contact @

Xiao Wu 11 Sep 30, 2022
LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation

LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation by Junjue Wang, Zhuo Zheng, Ailong Ma, Xiaoyan Lu, and Yanfei Zh

Payphone 8 Nov 21, 2022
Fang Zhonghao 13 Nov 19, 2022
Universal Adversarial Examples in Remote Sensing: Methodology and Benchmark

Universal Adversarial Examples in Remote Sensing: Methodology and Benchmark Yong

null 19 Dec 17, 2022
Object detection and instance segmentation toolkit based on PaddlePaddle.

Object detection and instance segmentation toolkit based on PaddlePaddle.

null 9.3k Jan 2, 2023
Multi-Modal Machine Learning toolkit based on PaddlePaddle.

简体中文 | English PaddleMM 简介 飞桨多模态学习工具包 PaddleMM 旨在于提供模态联合学习和跨模态学习算法模型库,为处理图片文本等多模态数据提供高效的解决方案,助力多模态学习应用落地。 近期更新 2022.1.5 发布 PaddleMM 初始版本 v1.0 特性 丰富的任务

njustkmg 520 Dec 28, 2022
Paddle-Adversarial-Toolbox (PAT) is a Python library for Deep Learning Security based on PaddlePaddle.

Paddle-Adversarial-Toolbox Paddle-Adversarial-Toolbox (PAT) is a Python library for Deep Learning Security based on PaddlePaddle. Model Zoo Common FGS

AgentMaker 17 Nov 8, 2022