# PaddleSeg **Repository Path**: xinxing_me/PaddleSeg ## Basic Information - **Project Name**: PaddleSeg - **Description**: End-to-End Image Segmentation Suite Based on PaddlePaddle. (『飞桨』图像分割开发套件) - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: release/2.10 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 100 - **Created**: 2024-12-03 - **Last Updated**: 2024-12-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README English | [简体中文](README_CN.md)

**A High-Efficient Development Toolkit for Image Segmentation Based on [PaddlePaddle](https://github.com/paddlepaddle/paddle).** [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE) [![Version](https://img.shields.io/github/release/PaddlePaddle/PaddleSeg.svg)](https://github.com/PaddlePaddle/PaddleSeg/releases) ![python version](https://img.shields.io/badge/python-3.6+-orange.svg) ![support os](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-yellow.svg) ![stars](https://img.shields.io/github/stars/PaddlePaddle/PaddleSeg?color=ccf)
## News ## Introduction PaddleSeg is an end-to-end high-efficent development toolkit for image segmentation based on PaddlePaddle, which helps both developers and researchers in the whole process of designing segmentation models, training models, optimizing performance and inference speed, and deploying models. A lot of well-trained models and various real-world applications in both industry and academia help users conveniently build hands-on experiences in image segmentation.
## Features * **High-Performance Model**: Following the state of the art segmentation methods and using high-performance backbone networks, we provide 45+ models and 150+ high-quality pre-training models, which are better than other open-source implementations. * **High Efficiency**: PaddleSeg provides multi-process asynchronous I/O, multi-card parallel training, evaluation, and other acceleration strategies, combined with the memory optimization function of the PaddlePaddle, which can greatly reduce the training overhead of the segmentation model, all these allowing developers to train image segmentation models more efficiently and at a lower cost. * **Modular Design**: We build PaddleSeg with the modular design philosophy. Therefore, based on actual application scenarios, developers can assemble diversified training configurations with *data augmentation strategies*, *segmentation models*, *backbone networks*, *loss functions*, and other different components to meet different performance and accuracy requirements. * **Complete Flow**: PaddleSeg supports image labeling, model designing, model training, model compression, and model deployment. With the help of PaddleSeg, developers can easily finish all tasks in the entire workflow.
## Community * If you have any questions, suggestions or feature requests, please do not hesitate to create an issue in [GitHub Issues](https://github.com/PaddlePaddle/PaddleSeg/issues). * Please scan the following QR code to join PaddleSeg WeChat group to communicate with us:
## Overview
Models Components Special Cases
Backbones
Losses
Metrics
  • mIoU
  • Accuracy
  • Kappa
  • Dice
  • AUC_ROC
Datasets
Data Augmentation
  • Flipping
  • Resize
  • ResizeByLong
  • ResizeByShort
  • LimitLong
  • ResizeRangeScaling
  • ResizeStepScaling
  • Normalize
  • Padding
  • PaddingByAspectRatio
  • RandomPaddingCrop
  • RandomCenterCrop
  • ScalePadding
  • RandomNoise
  • RandomBlur
  • RandomRotation
  • RandomScaleAspect
  • RandomDistort
  • RandomAffine
Segment Anything
Model Selection Tool
Human Segmentation
MedicalSeg
Cityscapes SOTA Model
CVPR Champion Model
Domain Adaptation
## Industrial Segmentation Models
High Accuracy Semantic Segmentation Models #### These models have good performance and costly inference time, so they are designed for GPU and Jetson devices. | Model | Backbone | Cityscapes mIoU(%) | V100 TRT Inference Speed(FPS) | Config File | |:-------- |:--------:|:---------------------:|:-------------------------------:|:------------:| | FCN | HRNet_W18 | 78.97 | 24.43 | [yml](./configs/fcn/) | | FCN | HRNet_W48 | 80.70 | 10.16 | [yml](./configs/fcn/) | | DeepLabV3 | ResNet50_OS8 | 79.90 | 4.56 | [yml](./configs/deeplabv3/) | | DeepLabV3 | ResNet101_OS8 | 80.85 | 3.2 | [yml](./configs/deeplabv3/) | | DeepLabV3 | ResNet50_OS8 | 80.36 | 6.58 | [yml](./configs/deeplabv3p/) | | DeepLabV3 | ResNet101_OS8 | 81.10 | *3.94* | [yml](./configs/deeplabv3p/) | | OCRNet :star2: | HRNet_w18 | 80.67 | 13.26 | [yml](./configs/ocrnet/) | | OCRNet | HRNet_w48 | 82.15 | 6.17 | [yml](./configs/ocrnet/) | | CCNet | ResNet101_OS8 | 80.95 | 3.24 | [yml](./configs/ccnet/) | Note that: * We test the inference speed on Nvidia GPU V100. We use PaddleInference Python API with TensorRT enabled. The data type is FP32, and the shape of input tensor is 1x3x1024x2048.
Lightweight Semantic Segmentation Models #### The segmentation accuracy and inference speed of these models are medium. They can be deployed on GPU, X86 CPU and ARM CPU. | Model | Backbone | Cityscapes mIoU(%) | V100 TRT Inference Speed(FPS) | Snapdragon 855 Inference Speed(FPS) | Config File | |:-------- |:--------:|:---------------------:|:-------------------------------:|:-----------------:|:--------:| | PP-LiteSeg :star2: | STDC1 | 77.04 | 69.82 | 17.22 | [yml](./configs/pp_liteseg/) | | PP-LiteSeg :star2: | STDC2 | 79.04 | 54.53 | 11.75 | [yml](./configs/pp_liteseg/) | | BiSeNetV1 | - | 75.19 | 14.67 | 1.53 |[yml](./configs/bisenetv1/) | | BiSeNetV2 | - | 73.19 | 61.83 | 13.67 |[yml](./configs/bisenet/) | | STDCSeg | STDC1 | 74.74 | 62.24 | 14.51 |[yml](./configs/stdcseg/) | | STDCSeg | STDC2 | 77.60 | 51.15 | 10.95 |[yml](./configs/stdcseg/) | | DDRNet_23 | - | 79.85 | 42.64 | 7.68 |[yml](./configs/ddrnet/) | | HarDNet | - | 79.03 | 30.3 | 5.44 |[yml](./configs/hardnet/) | | SFNet | ResNet18_OS8 | 78.72 | *10.72* | - | [yml](./configs/sfnet/) | Note that: * We test the inference speed on Nvidia GPU V100. We use PaddleInference Python API with TensorRT enabled. The data type is FP32, and the shape of input tensor is 1x3x1024x2048. * We test the inference speed on Snapdragon 855. We use PaddleLite CPP API with 1 thread, and the shape of input tensor is 1x3x256x256.
Super Lightweight Semantic Segmentation Models #### These super lightweight semantic segmentation models are designed for X86 CPU and ARM CPU. | Model | Backbone | ADE20K mIoU(%) | Snapdragon 855 Inference latency(ms) | params(M) | Links | |:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| |TopFormer-Base|TopTransformer-Base|38.28|480.6|5.13|[config](./configs/topformer/) |PP-MobileSeg-Base :star2: |StrideFormer-Base|41.57|265.5|5.62|[config](./configs/pp_mobileseg/)| |TopFormer-Tiny|TopTransformer-Tiny|32.46|490.3|1.41|[config](./configs/topformer/) |PP-MobileSeg-Tiny :star2: |StrideFormer-Tiny|36.39|215.3|1.61|[config](./configs/pp_mobileseg/)| Note that: * We test the inference speed on Snapdragon 855. We use [PaddleLite](https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/README_en.md) CPP API with 1 thread, and the shape of input tensor is 1x3x512x512. We test the latency with the final argmax operator on. | Model | Backbone | Cityscapes mIoU(%) | V100 TRT Inference Speed(FPS) | Snapdragon 855 Inference Speed(FPS) | Config File | |:-------- |:--------:|:---------------------:|:-------------------------------:|:-----------------------------------:|:-----------:| | MobileSeg | MobileNetV2 | 73.94 | 67.57 | 27.01 | [yml](./configs/mobileseg/) | | MobileSeg :star2: | MobileNetV3 | 73.47 | 67.39 | 32.90 | [yml](./configs/mobileseg/) | | MobileSeg | Lite_HRNet_18 | 70.75 | *10.5* | 13.05 | [yml](./configs/mobileseg/) | | MobileSeg | ShuffleNetV2_x1_0 | 69.46 | *37.09* | 39.61 | [yml](./configs/mobileseg/) | | MobileSeg | GhostNet_x1_0 | 71.88 | *35.58* | 38.74 | [yml](./configs/mobileseg/) | Note that: * We test the inference speed on Nvidia GPU V100. We use PaddleInference Python API with TensorRT enabled. The data type is FP32, and the shape of input tensor is 1x3x1024x2048. * We test the inference speed on Snapdragon 855. We use PaddleLite CPP API with 1 thread, and the shape of input tensor is 1x3x256x256.
## Tutorials **Introductory Tutorials** * [Installation](./docs/install.md) * [Quick Start](./docs/quick_start.md) * [A 20 minutes Blitz to Learn PaddleSeg](./docs/whole_process.md) * [Model Zoo](./docs/model_zoo_overview.md) **Basic Tutorials** * Data Preparation * [Prepare Public Dataset](./docs/data/pre_data.md) * [Prepare Customized Dataset](./docs/data/marker/marker.md) * [Label Data with EISeg](./EISeg) * [Config Preparation](./docs/config/pre_config.md) * [Model Training](/docs/train/train.md) * [Model Evaluation](./docs/evaluation/evaluate.md) * [Model Prediction](./docs/predict/predict.md) * Model Export * [Export Inference Model](./docs/model_export.md) * [Export ONNX Model](./docs/model_export_onnx.md) * Model Deployment * [FastDeploy](./deploy/fastdeploy) * [Paddle Inference (Python)](./docs/deployment/inference/python_inference.md) * [Paddle Inference (C++)](./docs/deployment/inference/cpp_inference.md) * [Paddle Lite](./docs/deployment/lite/lite.md) * [Paddle Serving](./docs/deployment/serving/serving.md) * [Paddle JS](./docs/deployment/web/web.md) * [Benchmark](./docs/deployment/inference/infer_benchmark.md) **Advanced Tutorials** * [Training Tricks](./docs/train/train_tricks.md) * Model Compression * [Quantization](./docs/deployment/slim/quant/quant.md) * [Distillation](./docs/deployment/slim/distill/distill.md) * [Pruning](./docs/deployment/slim/prune/prune.md) * [Auto Compression](./docs/deployment/slim/act/readme.md) * [FAQ](./docs/faq/faq/faq.md) **Welcome to Contribute** * [API Documention](./docs/apis) * Advanced Development * [Detailed Configuration File](./docs/design/use/use.md) * [Create Your Own Model](./docs/design/create/add_new_model.md) * Pull Request * [PR Tutorial](./docs/pr/pr/pr.md) * [PR Style](./docs/pr/pr/style.md) ## Special Features * [Interactive Segmentation](./EISeg) * [Image Matting](./Matting) * [PP-HumanSeg](./contrib/PP-HumanSeg) * [3D Medical Segmentation](./contrib/MedicalSeg) * [Cityscapes SOTA](./contrib/CityscapesSOTA) * [Panoptic Segmentation](./contrib/PanopticDeepLab) * [CVPR Champion Solution](./contrib/AutoNUE) * [Domain Adaptation](./contrib/DomainAdaptation) ## Industrial Tutorial Examples * [Using PP-HumanSegV2 for Human Segmentation](https://aistudio.baidu.com/aistudio/projectdetail/4504982?contributionType=1) * [Using PP-HumanSegV1 for Human Segmentation](https://aistudio.baidu.com/aistudio/projectdetail/2189481?channelType=0&channel=0) * [Using PP-LiteSeg for Road Segmentation](https://aistudio.baidu.com/aistudio/projectdetail/3873145?contributionType=1) * [Using PaddleSeg for Face Parsing and Makeup](https://aistudio.baidu.com/aistudio/projectdetail/5326422) * [Using PaddleSeg for Mini-dataset Spine Segmentation](https://aistudio.baidu.com/aistudio/projectdetail/3878920) * [Using PaddleSeg for Lane Segmentation](https://aistudio.baidu.com/aistudio/projectdetail/1752986?channelType=0&channel=0) * [PaddleSeg in APIs](https://aistudio.baidu.com/aistudio/projectdetail/1339458?channelType=0&channel=0) * [Learn Paddleseg in 10 Mins](https://aistudio.baidu.com/aistudio/projectdetail/1672610?channelType=0&channel=0) * [Application of Interactive Segmentation Technology in Smart Mapping](https://aistudio.baidu.com/aistudio/projectdetail/5089472) * [Nail art preview machine based on PaddleSeg](https://aistudio.baidu.com/aistudio/projectdetail/5156312) * [Overrun monitoring of steel bar length based on PaddleSeg](https://aistudio.baidu.com/aistudio/projectdetail/5633532) For more examples, see [here](https://aistudio.baidu.com/aistudio/projectdetail/5436669). ## License PaddleSeg is released under the [Apache 2.0 license](LICENSE). ## Acknowledgement * Thanks [jm12138](https://github.com/jm12138) for contributing U2-Net. * Thanks [zjhellofss](https://github.com/zjhellofss) (Fu Shenshen) for contributing Attention U-Net, and Dice Loss. * Thanks [liuguoyu666](https://github.com/liguoyu666), [geoyee](https://github.com/geoyee) for contributing U-Net++ and U-Net3+. * Thanks [yazheng0307](https://github.com/yazheng0307) (LIU Zheng) for contributing quick-start document. * Thanks [CuberrChen](https://github.com/CuberrChen) for contributing STDC(rethink BiSeNet), PointRend and DetailAggregateLoss. * Thanks [stuartchen1949](https://github.com/stuartchen1949) for contributing SegNet. * Thanks [justld](https://github.com/justld) (Lang Du) for contributing UPerNet, DDRNet, CCNet, ESPNetV2, DMNet, ENCNet, HRNet_W48_Contrast, FastFCN, BiSeNetV1, SECrossEntropyLoss and PixelContrastCrossEntropyLoss. * Thanks [Herman-Hu-saber](https://github.com/Herman-Hu-saber) (Hu Huiming) for contributing ESPNetV2. * Thanks [zhangjin12138](https://github.com/zhangjin12138) for contributing RandomCenterCrop. * Thanks [simuler](https://github.com/simuler) for contributing ESPNetV1. * Thanks [ETTR123](https://github.com/ETTR123)(Zhang Kai) for contributing ENet, PFPNNet. ## Citation If you find our project useful in your research, please consider citing: ```latex @misc{liu2021paddleseg, title={PaddleSeg: A High-Efficient Development Toolkit for Image Segmentation}, author={Yi Liu and Lutao Chu and Guowei Chen and Zewu Wu and Zeyu Chen and Baohua Lai and Yuying Hao}, year={2021}, eprint={2101.06175}, archivePrefix={arXiv}, primaryClass={cs.CV} } @misc{paddleseg2019, title={PaddleSeg, End-to-end image segmentation kit based on PaddlePaddle}, author={PaddlePaddle Contributors}, howpublished = {\url{https://github.com/PaddlePaddle/PaddleSeg}}, year={2019} } ```