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)
Expressive Power of Invariant and Equivaraint Graph Neural Networks (ICLR 2021)

Expressive Power of Invariant and Equivaraint Graph Neural Networks In this repository, we show how to use powerful GNN (2-FGNN) to solve a graph alig

Marc Lelarge 36 Dec 12, 2022
An algorithm study of the 6th iOS 10 set of Boost Camp Web Mobile

알고리즘 스터디 🔥 부스트캠프 웹모바일 6기 iOS 10조의 알고리즘 스터디 입니다. 개인적인 사정 등으로 S034, S055만 참가하였습니다. 스터디 목적 상진: 코테 합격 + 부캠끝나고 아침에 일어나기 위해 필요한 사이클 기완: 꾸준하게 자리에 앉아 공부하기 +

2 Jan 11, 2022
Baleen: Robust Multi-Hop Reasoning at Scale via Condensed Retrieval (NeurIPS'21)

Baleen Baleen is a state-of-the-art model for multi-hop reasoning, enabling scalable multi-hop search over massive collections for knowledge-intensive

Stanford Future Data Systems 22 Dec 05, 2022
Stock-history-display - something like a easy yearly review for your stock performance

Stock History Display Available on Heroku: https://stock-history-display.herokua

LiaoJJ 1 Jan 07, 2022
Indices Matter: Learning to Index for Deep Image Matting

IndexNet Matting This repository includes the official implementation of IndexNet Matting for deep image matting, presented in our paper: Indices Matt

Hao Lu 357 Nov 26, 2022
Code artifacts for the submission "Mind the Gap! A Study on the Transferability of Virtual vs Physical-world Testing of Autonomous Driving Systems"

Code Artifacts Code artifacts for the submission "Mind the Gap! A Study on the Transferability of Virtual vs Physical-world Testing of Autonomous Driv

Andrea Stocco 2 Aug 24, 2022
这是一个利用facenet和retinaface实现人脸识别的库,可以进行在线的人脸识别。

Facenet+Retinaface:人脸识别模型在Pytorch当中的实现 目录 注意事项 Attention 所需环境 Environment 文件下载 Download 预测步骤 How2predict 参考资料 Reference 注意事项 该库中包含了两个网络,分别是retinaface和

Bubbliiiing 102 Dec 30, 2022
Adversarial Framework for (non-) Parametric Image Stylisation Mosaics

Fully Adversarial Mosaics (FAMOS) Pytorch implementation of the paper "Copy the Old or Paint Anew? An Adversarial Framework for (non-) Parametric Imag

Zalando Research 120 Dec 24, 2022
Joint learning of images and text via maximization of mutual information

mutual_info_img_txt Joint learning of images and text via maximization of mutual information. This repository incorporates the algorithms presented in

Ruizhi Liao 10 Dec 22, 2022
A Dying Light 2 (DL2) PAKFile Utility for Modders and Mod Makers.

Dying Light 2 PAKFile Utility A Dying Light 2 (DL2) PAKFile Utility for Modders and Mod Makers. This tool aims to make PAKFile (.pak files) modding a

RHQ Online 12 Aug 26, 2022
A python interface for training Reinforcement Learning bots to battle on pokemon showdown

The pokemon showdown Python environment A Python interface to create battling pokemon agents. poke-env offers an easy-to-use interface for creating ru

Haris Sahovic 184 Dec 30, 2022
E2EDNA2 - An automated pipeline for simulation of DNA aptamers complexed with small molecules and short peptides

E2EDNA2 - An automated pipeline for simulation of DNA aptamers complexed with small molecules and short peptides

11 Nov 08, 2022
NVIDIA container runtime

nvidia-container-runtime A modified version of runc adding a custom pre-start hook to all containers. If environment variable NVIDIA_VISIBLE_DEVICES i

NVIDIA Corporation 938 Jan 06, 2023
Official code for 'Pixel-wise Energy-biased Abstention Learning for Anomaly Segmentationon Complex Urban Driving Scenes'

PEBAL This repo contains the Pytorch implementation of our paper: Pixel-wise Energy-biased Abstention Learning for Anomaly Segmentationon Complex Urba

Yu Tian 115 Dec 29, 2022
A python script to lookup Passport Index Dataset

visa-cli A python script to lookup Passport Index Dataset Installation pip install visa-cli Usage usage: visa-cli [-h] [-d DESTINATION_COUNTRY] [-f]

rand-net 16 Oct 18, 2022
FwordCTF 2021 Infrastructure and Source code of Web/Bash challenges

FwordCTF 2021 You can find here the source code of the challenges I wrote (Web and Bash) in FwordCTF 2021 and the source code of the platform with our

Kahla 5 Nov 25, 2022
My implementation of Fully Convolutional Neural Networks in Keras

Keras-FCN This repository contains my implementation of Fully Convolutional Networks in Keras (Tensorflow backend). Currently, semantic segmentation c

The Duy Nguyen 15 Jan 13, 2020
Code and datasets for TPAMI 2021

SkeletonNet This repository constains the codes and ShapeNetV1-Surface-Skeleton,ShapNetV1-SkeletalVolume and 2d image datasets ShapeNetRendering. Plea

34 Aug 15, 2022
This is an example of object detection on Micro bacterium tuberculosis using Mask-RCNN

Mask-RCNN on Mycobacterium tuberculosis This is an example of object detection on Mycobacterium Tuberculosis using Mask RCNN. Implement of Mask R-CNN

Jun-En Ding 1 Sep 16, 2021
Towards Interpretable Deep Metric Learning with Structural Matching

DIML Created by Wenliang Zhao*, Yongming Rao*, Ziyi Wang, Jiwen Lu, Jie Zhou This repository contains PyTorch implementation for paper Towards Interpr

Wenliang Zhao 75 Nov 11, 2022