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)
Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pytorch Lightning 1.4k Jan 01, 2023
TAP: Text-Aware Pre-training for Text-VQA and Text-Caption, CVPR 2021 (Oral)

TAP: Text-Aware Pre-training TAP: Text-Aware Pre-training for Text-VQA and Text-Caption by Zhengyuan Yang, Yijuan Lu, Jianfeng Wang, Xi Yin, Dinei Flo

Microsoft 61 Nov 14, 2022
AdvStyle - Official PyTorch Implementation

AdvStyle - Official PyTorch Implementation Paper | Supp Discovering Interpretable Latent Space Directions of GANs Beyond Binary Attributes. Huiting Ya

Beryl 37 Oct 21, 2022
Neural Module Network for VQA in Pytorch

Neural Module Network (NMN) for VQA in Pytorch Note: This is NOT an official repository for Neural Module Networks. NMN is a network that is assembled

Harsh Trivedi 111 Nov 24, 2022
OpenMMLab Image Classification Toolbox and Benchmark

Introduction English | 简体中文 MMClassification is an open source image classification toolbox based on PyTorch. It is a part of the OpenMMLab project. D

OpenMMLab 1.8k Jan 03, 2023
RITA is a family of autoregressive protein models, developed by LightOn in collaboration with the OATML group at Oxford and the Debora Marks Lab at Harvard.

RITA: a Study on Scaling Up Generative Protein Sequence Models RITA is a family of autoregressive protein models, developed by a collaboration of Ligh

LightOn 69 Dec 22, 2022
This is the source code of the 1st place solution for segmentation task (with Dice 90.32%) in 2021 CCF BDCI challenge.

1st place solution in CCF BDCI 2021 ULSEG challenge This is the source code of the 1st place solution for ultrasound image angioma segmentation task (

Chenxu Peng 30 Nov 22, 2022
PyTorch Implementation of [1611.06440] Pruning Convolutional Neural Networks for Resource Efficient Inference

PyTorch implementation of [1611.06440 Pruning Convolutional Neural Networks for Resource Efficient Inference] This demonstrates pruning a VGG16 based

Jacob Gildenblat 836 Dec 26, 2022
Equivariant Imaging: Learning Beyond the Range Space

[Project] Equivariant Imaging: Learning Beyond the Range Space Project about the

Georges Le Bellier 3 Feb 06, 2022
[NeurIPS 2020] Official repository for the project "Listening to Sound of Silence for Speech Denoising"

Listening to Sounds of Silence for Speech Denoising Introduction This is the repository of the "Listening to Sounds of Silence for Speech Denoising" p

Henry Xu 40 Dec 20, 2022
Capsule endoscopy detection DACON challenge

capsule_endoscopy_detection (DACON Challenge) Overview Yolov5, Yolor, mmdetection기반의 모델을 사용 (총 11개 모델 앙상블) 모든 모델은 학습 시 Pretrained Weight을 yolov5, yolo

MAILAB 11 Nov 25, 2022
Official implementation for (Show, Attend and Distill: Knowledge Distillation via Attention-based Feature Matching, AAAI-2021)

Show, Attend and Distill: Knowledge Distillation via Attention-based Feature Matching Official pytorch implementation of "Show, Attend and Distill: Kn

Clova AI Research 80 Dec 16, 2022
The code of "Dependency Learning for Legal Judgment Prediction with a Unified Text-to-Text Transformer".

Code data_preprocess.py: preprocess data for Dependent-T5. parameters.py: define parameters of Dependent-T5. train_tools.py: traning and evaluation co

1 Apr 21, 2022
Disagreement-Regularized Imitation Learning

Due to a normalization bug the expert trajectories have lower performance than the rl_baseline_zoo reported experts. Please see the following link in

Kianté Brantley 25 Apr 28, 2022
This repository provides an efficient PyTorch-based library for training deep models.

s3sec Test AWS S3 buckets for read/write/delete access This tool was developed to quickly test a list of s3 buckets for public read, write and delete

Bytedance Inc. 123 Jan 05, 2023
Python wrapper class for OpenVINO Model Server. User can submit inference request to OVMS with just a few lines of code

Python wrapper class for OpenVINO Model Server. User can submit inference request to OVMS with just a few lines of code.

Yasunori Shimura 7 Jul 27, 2022
Offline Multi-Agent Reinforcement Learning Implementations: Solving Overcooked Game with Data-Driven Method

Overcooked-AI We suppose to apply traditional offline reinforcement learning technique to multi-agent algorithm. In this repository, we implemented be

Baek In-Chang 14 Sep 16, 2022
A general-purpose programming language, focused on simplicity, safety and stability.

The Rivet programming language A general-purpose programming language, focused on simplicity, safety and stability. Rivet's goal is to be a very power

The Rivet programming language 17 Dec 29, 2022
A data-driven approach to quantify the value of classifiers in a machine learning ensemble.

Documentation | External Resources | Research Paper Shapley is a Python library for evaluating binary classifiers in a machine learning ensemble. The

Benedek Rozemberczki 188 Dec 29, 2022
A Dataset of Python Challenges for AI Research

Python Programming Puzzles (P3) This repo contains a dataset of python programming puzzles which can be used to teach and evaluate an AI's programming

Microsoft 850 Dec 24, 2022