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)
Improving Transferability of Representations via Augmentation-Aware Self-Supervision

Improving Transferability of Representations via Augmentation-Aware Self-Supervision Accepted to NeurIPS 2021 TL;DR: Learning augmentation-aware infor

hankook 38 Sep 16, 2022
[Pedestron] Generalizable Pedestrian Detection: The Elephant In The Room. @ CVPR2021

Pedestron Pedestron is a MMdetection based repository, that focuses on the advancement of research on pedestrian detection. We provide a list of detec

Irtiza Hasan 594 Jan 05, 2023
Official code for 'Weakly-supervised Video Anomaly Detection with Robust Temporal Feature Magnitude Learning' [ICCV 2021]

RTFM This repo contains the Pytorch implementation of our paper: Weakly-supervised Video Anomaly Detection with Robust Temporal Feature Magnitude Lear

Yu Tian 242 Jan 08, 2023
Script for getting information in discord

User-info.py Script for getting information in https://discord.com/ Instalação: apt-get update -y apt-get upgrade -y apt-get install git pkg install

Moleey 1 Dec 18, 2021
The MATH Dataset

Measuring Mathematical Problem Solving With the MATH Dataset This is the repository for Measuring Mathematical Problem Solving With the MATH Dataset b

Dan Hendrycks 267 Dec 26, 2022
내가 보려고 정리한 <프로그래밍 기초 Ⅰ> / organized for me

Programming-Basics 프로그래밍 기초 Ⅰ 아카이브 Do it! 점프 투 파이썬 주차 강의주제 비고 1주차 Syllabus 2주차 자료형 - 숫자형 3주차 자료형 - 문자열형 4주차 입력과 출력 5주차 제어문 - 조건문 if 6주차 제어문 - 반복문 whil

KIMMINSEO 1 Mar 07, 2022
Much faster than SORT(Simple Online and Realtime Tracking), a little worse than SORT

QSORT QSORT(Quick + Simple Online and Realtime Tracking) is a simple online and realtime tracking algorithm for 2D multiple object tracking in video s

Yonghye Kwon 8 Jul 27, 2022
SegNet-Basic with Keras

SegNet-Basic: What is Segnet? Deep Convolutional Encoder-Decoder Architecture for Semantic Pixel-wise Image Segmentation Segnet = (Encoder + Decoder)

Yad Konrad 81 Jun 30, 2022
This is a collection of our NAS and Vision Transformer work.

AutoML - Neural Architecture Search This is a collection of our AutoML-NAS work iRPE (NEW): Rethinking and Improving Relative Position Encoding for Vi

Microsoft 828 Dec 28, 2022
Unofficial TensorFlow implementation of the Keyword Spotting Transformer model

Keyword Spotting Transformer This is the unofficial TensorFlow implementation of the Keyword Spotting Transformer model. This model is used to train o

Intelligent Machines Limited 8 May 11, 2022
This Repostory contains the pretrained DTLN-aec model for real-time acoustic echo cancellation.

This Repostory contains the pretrained DTLN-aec model for real-time acoustic echo cancellation.

Nils L. Westhausen 182 Jan 07, 2023
This project is a re-implementation of MASTER: Multi-Aspect Non-local Network for Scene Text Recognition by MMOCR

This project is a re-implementation of MASTER: Multi-Aspect Non-local Network for Scene Text Recognition by MMOCR,which is an open-source toolbox based on PyTorch. The overall architecture will be sh

Jianquan Ye 82 Nov 17, 2022
Minecraft Hack Detection With Python

Minecraft Hack Detection An attempt to try and use crowd sourced replays to find

Kuleen Sasse 3 Mar 26, 2022
Official repository for the paper "GN-Transformer: Fusing AST and Source Code information in Graph Networks".

GN-Transformer AST This is the official repository for the paper "GN-Transformer: Fusing AST and Source Code information in Graph Networks". Data Prep

Cheng Jun-Yan 10 Nov 26, 2022
Removing Inter-Experimental Variability from Functional Data in Systems Neuroscience

Removing Inter-Experimental Variability from Functional Data in Systems Neuroscience This repository is the official implementation of [https://www.bi

Eulerlab 6 Oct 09, 2022
Implementation of Stochastic Image-to-Video Synthesis using cINNs.

Stochastic Image-to-Video Synthesis using cINNs Official PyTorch implementation of Stochastic Image-to-Video Synthesis using cINNs accepted to CVPR202

CompVis Heidelberg 135 Dec 28, 2022
Official code for MPG2: Multi-attribute Pizza Generator: Cross-domain Attribute Control with Conditional StyleGAN

This is the official code for Multi-attribute Pizza Generator (MPG2): Cross-domain Attribute Control with Conditional StyleGAN. Paper Demo Setup Envir

Fangda Han 5 Sep 01, 2022
Official code for Spoken ObjectNet: A Bias-Controlled Spoken Caption Dataset

Official code for our Interspeech 2021 - Spoken ObjectNet: A Bias-Controlled Spoken Caption Dataset [1]*. Visually-grounded spoken language datasets c

Ian Palmer 3 Jan 26, 2022
Spectral Temporal Graph Neural Network (StemGNN in short) for Multivariate Time-series Forecasting

Spectral Temporal Graph Neural Network for Multivariate Time-series Forecasting This repository is the official implementation of Spectral Temporal Gr

Microsoft 306 Dec 29, 2022
ObsPy: A Python Toolbox for seismology/seismological observatories.

ObsPy is an open-source project dedicated to provide a Python framework for processing seismological data. It provides parsers for common file formats

ObsPy 979 Jan 07, 2023