# PaddleSeg **Repository Path**: zhangdelight/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.8 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 99 - **Created**: 2023-12-03 - **Last Updated**: 2023-12-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 简体中文 | [English](README_EN.md)

**飞桨高性能图像分割开发套件,端到端完成从训练到部署的全流程图像分割应用。** [![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)
## 最新动态 * [2023-04-11] :fire: PaddleSeg 2.8版本发布!详细发版信息请参考[Release Note](https://github.com/PaddlePaddle/PaddleSeg/releases)。 * 开源飞桨版本视觉大模型[Segment Anything Model](./contrib/SegmentAnything),提供演示Demo,支持全图分割的功能、使用提示输入分割的功能。 * 发布超轻量级语义分割SOTA模型[PP-MobileSeg](./configs/pp_mobileseg):在ADE20K数据集上,PP-MobileSeg对比此前最优模型,精度提升1.5%、速度提升42.3%、参数量减少34.9%。 * 发布工业质检全流程解决方案[QualityInspector v0.5](./contrib/QualityInspector):提供统一可配置的算法Pipeline,集成检测和分割模型库,支持3种无监督异常检测算法,支持工业级指标评测、分析、调优等功能。 * 发布通用的全景分割解决方案[PanopticSeg v0.5](./contrib/PanopticSeg):提供全景分割的全流程开发功能,集成2个前沿高精模型,具备灵活的二次开发能力。 * [2022-11-30] PaddleSeg 2.7版本发布实时人像抠图模型[PP-MattingV2](./Matting/)、3D医疗影像分割方案[MedicalSegV2](./contrib/MedicalSeg/)、轻量级语义分割模型[RTFormer](./configs/rtformer/)。 * [2022-07-20] PaddleSeg 2.6版本发布实时人像分割SOTA方案[PP-HumanSegV2](./contrib/PP-HumanSeg)、高性能智能标注工具[EISeg v1.0](./EISeg)正式版、ImageNet分割伪标签数据预训练方法PSSL,开源PP-MattingV1代码和预训练模型。 * [2022-04-20] PaddleSeg 2.5版本发布超轻量级语义分割模型[PP-LiteSeg](./configs/pp_liteseg),高精度抠图模型PP-MattingV1,3D医疗影像开发套件MedicalSegV1,交互式分割工具EISeg v0.5。 * [2022-01-20] PaddleSeg 2.4版本发布交互式分割工具EISeg v0.4,超轻量级人像分割方案PP-HumanSegV1,以及大规模视频会议数据集[PP-HumanSeg14K](./contrib/PP-HumanSeg/paper.md#pp-humanseg14k-a-large-scale-teleconferencing-video-dataset)。 ## 简介 **PaddleSeg**是基于飞桨PaddlePaddle的端到端图像分割套件,内置**45+模型算法**及**140+预训练模型**,支持**配置化驱动**和**API调用**开发方式,打通数据标注、模型开发、训练、压缩、部署的**全流程**,提供**语义分割、交互式分割、Matting、全景分割**四大分割能力,助力算法在医疗、工业、遥感、娱乐等场景落地应用。
## 特性 * **高精度**:跟踪学术界的前沿分割技术,结合高精度训练的骨干网络,提供45+主流分割网络、150+的高质量预训练模型,效果优于其他开源实现。 * **高性能**:使用多进程异步I/O、多卡并行训练、评估等加速策略,结合飞桨核心框架的显存优化功能,大幅度减少分割模型的训练开销,让开发者更低成本、更高效地完成图像分割训练。 * **模块化**:源于模块化设计思想,解耦数据准备、分割模型、骨干网络、损失函数等不同组件,开发者可以基于实际应用场景出发,组装多样化的配置,满足不同性能和精度的要求。 * **全流程**:打通数据标注、模型开发、模型训练、模型压缩、模型部署全流程,经过业务落地的验证,让开发者完成一站式开发工作。
## 技术交流 * 如果大家有PaddleSeg的使用问题和功能建议, 可以通过[GitHub Issues](https://github.com/PaddlePaddle/PaddleSeg/issues)提issue。 * **欢迎加入PaddleSeg的微信用户群👫**(扫码填写简单问卷即可入群),大家可以**领取30G重磅学习大礼包🎁**,也可以和值班同学、各界大佬直接进行交流。 * 🔥 获取深度学习视频教程、图像分割论文合集 * 🔥 获取PaddleSeg的历次直播视频,最新发版信息和直播动态 * 🔥 获取PaddleSeg自建的人像分割数据集,整理的开源数据集 * 🔥 获取PaddleSeg在垂类场景的预训练模型和应用合集,涵盖人像分割、交互式分割等等 * 🔥 获取PaddleSeg的全流程产业实操范例,包括质检缺陷分割、抠图Matting、道路分割等等
## 产品矩阵
模型 组件 特色案例
骨干网络
损失函数
评估指标
  • mIoU
  • Accuracy
  • Kappa
  • Dice
  • AUC_ROC
支持数据集
数据增强
  • Flipping
  • Resize
  • ResizeByLong
  • ResizeByShort
  • LimitLong
  • ResizeRangeScaling
  • ResizeStepScaling
  • Normalize
  • Padding
  • PaddingByAspectRatio
  • RandomPaddingCrop
  • RandomCenterCrop
  • ScalePadding
  • RandomNoise
  • RandomBlur
  • RandomRotation
  • RandomScaleAspect
  • RandomDistort
  • RandomAffine
分割一切模型
模型选型工具
人像分割模型
3D医疗分割模型
Cityscapes打榜模型
CVPR冠军模型
领域自适应
## 产业级分割模型库
高精度语义分割模型 #### 高精度模型,分割mIoU高、推理算量大,适合部署在服务器端GPU和Jetson等设备。 | 模型名称 | 骨干网络 | Cityscapes精度mIoU(%) | V100 TRT推理速度(FPS) | 配置文件 | |:-------- |:--------:|:---------------------:|:---------------------:|:--------:| | 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/) | 测试条件: * V100上测速条件:针对Nvidia GPU V100,使用PaddleInference预测库的Python API,开启TensorRT加速,数据类型是FP32,输入图像维度是1x3x1024x2048。
轻量级语义分割模型 #### 轻量级模型,分割mIoU中等、推理算量中等,可以部署在服务器端GPU、服务器端X86 CPU和移动端ARM CPU。 | 模型名称 | 骨干网络 | Cityscapes精度mIoU(%) | V100 TRT推理速度(FPS) | 骁龙855推理速度(FPS) | 配置文件 | |:-------- |:--------:|:---------------------:|:---------------------:|:-----------------:|:--------:| | 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/) | 测试条件: * V100上测速条件:针对Nvidia GPU V100,使用PaddleInference预测库的Python API,开启TensorRT加速,数据类型是FP32,输入图像维度是1x3x1024x2048。 * 骁龙855上测速条件:针对小米9手机,使用PaddleLite预测库的CPP API,ARMV8编译,单线程,输入图像维度是1x3x256x256。
超轻量级语义分割模型 #### 超轻量级模型,分割mIoU一般、推理算量低,适合部署在服务器端X86 CPU和移动端ARM CPU。 | 模型名称 | 骨干网络 | ADE20K精度mIoU(%) | 骁龙855推理延时(ms) | 参数量(M) | 配置文件 | |:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| |TopFormer-Base|TopTransformer-Base|38.28|480.6|5.13|[config](./configs/topformer/) |PP-MobileSeg-Base|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|StrideFormer-Tiny|36.39|215.3|1.61|[config](./configs/pp_mobileseg/)| 测试条件: * 针对小米9手机,使用[PaddleLite](https://github.com/PaddlePaddle/Paddle-Lite/blob/develop/README_en.md)预测库的CPP API,ARMV8编译,单线程,输入图像维度是1x3x512x512。测试模型在带有最后一个argmax算子的条件下进行测试。 | 模型名称 | 骨干网络 | Cityscapes精度mIoU(%) | V100 TRT推理速度(FPS) | 骁龙855推理速度(FPS)| 配置文件 | |:-------- |:--------:|:---------------------:|:---------------------:|:-----------------:|:--------:| | 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/) | 测试条件: * V100上测速条件:针对Nvidia GPU V100,使用PaddleInference预测库的Python API,开启TensorRT加速,数据类型是FP32,输入图像维度是1x3x1024x2048。 * 骁龙855上测速条件:针对小米9手机,使用PaddleLite预测库的CPP API,ARMV8编译,单线程,输入图像维度是1x3x256x256。
## 使用教程 **入门教程** * [安装说明](./docs/install_cn.md) * [快速体验](./docs/quick_start_cn.md) * [20分钟快速上手PaddleSeg](./docs/whole_process_cn.md) * [模型库](./docs/model_zoo_overview_cn.md) **基础教程** * 准备数据集 * [准备公开数据集](./docs/data/pre_data_cn.md) * [准备自定义数据集](./docs/data/marker/marker_cn.md) * [EISeg 数据标注](./EISeg) * [准备配置文件](./docs/config/pre_config_cn.md) * [模型训练](./docs/train/train_cn.md) * [模型评估](./docs/evaluation/evaluate_cn.md) * [模型预测](./docs/predict/predict_cn.md) * 模型导出 * [导出预测模型](./docs/model_export_cn.md) * [导出ONNX模型](./docs/model_export_onnx_cn.md) * 模型部署 * [FastDeploy部署](./deploy/fastdeploy) * [Paddle Inference部署(Python)](./docs/deployment/inference/python_inference_cn.md) * [Paddle Inference部署(C++)](./docs/deployment/inference/cpp_inference_cn.md) * [Paddle Lite部署](./docs/deployment/lite/lite_cn.md) * [Paddle Serving部署](./docs/deployment/serving/serving_cn.md) * [Paddle JS部署](./docs/deployment/web/web_cn.md) * [推理Benchmark](./docs/deployment/inference/infer_benchmark_cn.md) **进阶教程** * [训练技巧](./docs/train/train_tricks_cn.md) * 模型压缩 * [量化](./docs/deployment/slim/quant/quant_cn.md) * [蒸馏](./docs/deployment/slim/distill/distill_cn.md) * [裁剪](./docs/deployment/slim/prune/prune_cn.md) * [常见问题汇总](./docs/faq/faq/faq_cn.md) **欢迎贡献** * [API文档](./docs/apis/README_CN.md) * 二次开发教程 * [配置文件详解](./docs/design/use/use_cn.md) * [如何创造自己的模型](./docs/design/create/add_new_model_cn.md) * 模型贡献 * [提交PR说明](./docs/pr/pr/pr_cn.md) * [模型PR规范](./docs/pr/pr/style_cn.md) ## 特色能力 - [交互式分割](./EISeg) - [图像抠图](./Matting) - [人像分割](./contrib/PP-HumanSeg) - [3D医疗分割](./contrib/MedicalSeg) - [Cityscapes打榜模型](./contrib/CityscapesSOTA) - [全景分割](./contrib/PanopticDeepLab) - [CVPR冠军模型](./contrib/AutoNUE) - [领域自适应](./contrib/DomainAdaptation) ## 产业实践范例 * [使用PP-HumanSegV2进行人像分割](https://aistudio.baidu.com/aistudio/projectdetail/4504982?contributionType=1) * [使用PP-HumanSegV1进行人像分割](https://aistudio.baidu.com/aistudio/projectdetail/2189481?channelType=0&channel=0) * [使用PP-LiteSeg进行遥感道路分割](https://aistudio.baidu.com/aistudio/projectdetail/3873145?contributionType=1) * [PaddleSeg实战之人脸部件分割与变妆](https://aistudio.baidu.com/aistudio/projectdetail/5326422) * [PaddleSeg实战之小数据集3D椎骨分割](https://aistudio.baidu.com/aistudio/projectdetail/3878920) * [PaddleSeg实战之车道线图像分割](https://aistudio.baidu.com/aistudio/projectdetail/1752986?channelType=0&channel=0) * [PaddleSeg动态图API使用教程](https://aistudio.baidu.com/aistudio/projectdetail/1339458?channelType=0&channel=0) * [10分钟上手PaddleSeg](https://aistudio.baidu.com/aistudio/projectdetail/1672610?channelType=0&channel=0) * [车路协同:交互式分割技术在智慧建图中的应用和实践](https://aistudio.baidu.com/aistudio/projectdetail/5089472) * [基于PaddleSeg的美甲预览机](https://aistudio.baidu.com/aistudio/projectdetail/5156312) * [基于PaddleSeg的钢筋长度超限监控](https://aistudio.baidu.com/aistudio/projectdetail/5633532) 更多范例项目可参考:[『图像分割经典项目集』用PaddleSeg能做什么?](https://aistudio.baidu.com/aistudio/projectdetail/5436669) ## 许可证书 本项目的发布受Apache 2.0 license许可认证。 ## 社区贡献 - 非常感谢[jm12138](https://github.com/jm12138)贡献U2-Net模型。 - 非常感谢[zjhellofss](https://github.com/zjhellofss)(傅莘莘)贡献Attention U-Net模型,和Dice loss损失函数。 - 非常感谢[liuguoyu666](https://github.com/liguoyu666)贡献U-Net++模型。 - 非常感谢[yazheng0307](https://github.com/yazheng0307) (刘正)贡献快速开始教程文档。 - 非常感谢[CuberrChen](https://github.com/CuberrChen)贡献STDC (rethink BiSeNet) PointRend,和 Detail Aggregate损失函数。 - 非常感谢[stuartchen1949](https://github.com/stuartchen1949)贡献 SegNet。 - 非常感谢[justld](https://github.com/justld)(郎督)贡献 UPerNet, DDRNet, CCNet, ESPNetV2, DMNet, ENCNet, HRNet_W48_Contrast, BiSeNetV1, FastFCN, SECrossEntropyLoss 和PixelContrastCrossEntropyLoss。 - 非常感谢[Herman-Hu-saber](https://github.com/Herman-Hu-saber)(胡慧明)参与贡献 ESPNetV2。 - 非常感谢[zhangjin12138](https://github.com/zhangjin12138)贡献数据增强方法 RandomCenterCrop。 - 非常感谢[simuler](https://github.com/simuler) 贡献 ESPNetV1。 - 非常感谢[ETTR123](https://github.com/ETTR123)(张恺) 贡献 ENet,PFPNNet。 ## 学术引用 如果我们的项目在学术上帮助到你,请考虑以下引用: ```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 Authors}, howpublished = {\url{https://github.com/PaddlePaddle/PaddleSeg}}, year={2019} } ```