All Projects → PaddlePaddle → Paddle2onnx

PaddlePaddle / Paddle2onnx

Licence: apache-2.0
PaddlePaddle to ONNX model converter

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Paddle2onnx

Typefont
The first open-source library that detects the font of a text in a image.
Stars: ✭ 1,575 (+751.35%)
Mutual labels:  ocr, detection
Hms Ml Demo
HMS ML Demo provides an example of integrating Huawei ML Kit service into applications. This example demonstrates how to integrate services provided by ML Kit, such as face detection, text recognition, image segmentation, asr, and tts.
Stars: ✭ 187 (+1.08%)
Mutual labels:  classification, ocr
Craft Remade
Implementation of CRAFT Text Detection
Stars: ✭ 127 (-31.35%)
Mutual labels:  ocr, detection
Yolov5 Rt Stack
Yet another yolov5, with its runtime stack for libtorch, onnx, tvm and specialized accelerators. You like torchvision's retinanet? You like yolov5? You love yolort!
Stars: ✭ 107 (-42.16%)
Mutual labels:  onnx, detection
East icpr
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE
Stars: ✭ 154 (-16.76%)
Mutual labels:  ocr, detection
Tabulo
Table Detection and Extraction Using Deep Learning ( It is built in Python, using Luminoth, TensorFlow<2.0 and Sonnet.)
Stars: ✭ 110 (-40.54%)
Mutual labels:  ocr, detection
Simpsonrecognition
Detect and recognize The Simpsons characters using Keras and Faster R-CNN
Stars: ✭ 131 (-29.19%)
Mutual labels:  classification, detection
Kaggle Rsna
Deep Learning for Automatic Pneumonia Detection, RSNA challenge
Stars: ✭ 74 (-60%)
Mutual labels:  classification, detection
Scene Text Recognition
Scene text detection and recognition based on Extremal Region(ER)
Stars: ✭ 146 (-21.08%)
Mutual labels:  ocr, detection
Paddlex
PaddlePaddle End-to-End Development Toolkit(『飞桨』深度学习全流程开发工具)
Stars: ✭ 3,399 (+1737.3%)
Mutual labels:  classification, detection
Tabi
BGP Hijack Detection
Stars: ✭ 90 (-51.35%)
Mutual labels:  classification, detection
Mstar deeplearning project
Radar target classification, detection and recognition using deeplearning methods on MSTAR dataset
Stars: ✭ 163 (-11.89%)
Mutual labels:  classification, detection
Caffe Model
Caffe models (including classification, detection and segmentation) and deploy files for famouse networks
Stars: ✭ 1,258 (+580%)
Mutual labels:  classification, detection
Model Quantization
Collections of model quantization algorithms
Stars: ✭ 118 (-36.22%)
Mutual labels:  classification, detection
Dlcv for beginners
《深度学习与计算机视觉》配套代码
Stars: ✭ 1,244 (+572.43%)
Mutual labels:  classification, detection
Pytorch Imagenet Cifar Coco Voc Training
Training examples and results for ImageNet(ILSVRC2012)/CIFAR100/COCO2017/VOC2007+VOC2012 datasets.Image Classification/Object Detection.Include ResNet/EfficientNet/VovNet/DarkNet/RegNet/RetinaNet/FCOS/CenterNet/YOLOv3.
Stars: ✭ 130 (-29.73%)
Mutual labels:  classification, detection
Pytorchinsight
a pytorch lib with state-of-the-art architectures, pretrained models and real-time updated results
Stars: ✭ 713 (+285.41%)
Mutual labels:  classification, detection
Eyevis
Android based Vocal Vision for Visually Impaired. Object Detection, Voice Assistance, Optical Character Reader, Read Aloud, Face Recognition, Landmark Recognition, Image Labelling etc.
Stars: ✭ 48 (-74.05%)
Mutual labels:  ocr, detection
Luna16 Lung Nodule Analysis 2016 Challenge
LUNA16-Lung-Nodule-Analysis-2016-Challenge
Stars: ✭ 133 (-28.11%)
Mutual labels:  classification, detection
Craft Pytorch
Official implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 2,220 (+1100%)
Mutual labels:  ocr, detection

Paddle2ONNX

简体中文 | English

Introduction

Paddle2ONNX enables users to convert models from PaddlePaddle to ONNX.

  • Supported model format. Paddle2ONNX supports both dynamic and static computational graph of PaddlePaddle. For static computational graph, Paddle2ONNX converts PaddlePaddle models saved by API save_inference_model, for example IPthon example. For dynamic computational graph, it is now under experiment and more details will be released after the release of PaddlePaddle 2.0.
  • Supported operators. Paddle2ONNX can stably export models to ONNX Opset 9~11, and partialy support lower version opset. More details please refer to Operator list.
  • Supported models. You can find officially verified models by Paddle2ONNX in model zoo.

AIStudio Tutorials

Environment Dependencies

Configuration

 python >= 2.7  
 static computational graph: paddlepaddle >= 1.8.0
 dynamic computational graph: paddlepaddle >= 2.0.0
 onnx == 1.7.0 | Optional

Installation

Via Pip

 pip install paddle2onnx

From Source

 git clone https://github.com/PaddlePaddle/paddle2onnx.git
 python setup.py install

Usage

Static Computational Graph

Via Command Line Tool

Uncombined PaddlePaddle model(parameters saved in different files)

paddle2onnx --model_dir paddle_model  --save_file onnx_file --opset_version 10 --enable_onnx_checker True

Combined PaddlePaddle model(parameters saved in one binary file)

paddle2onnx --model_dir paddle_model  --model_filename model_filename --params_filename params_filename --save_file onnx_file --opset_version 10 --enable_onnx_checker True

Parameters

Parameters Description
--model_dir The directory path of the paddlepaddle model saved by paddle.fluid.io.save_inference_model
--model_filename [Optional] The model file name under the directory designated by--model_dir. Only needed when all the model parameters saved in one binary file. Default value None
--params_filename [Optonal] the parameter file name under the directory designated by--model_dir. Only needed when all the model parameters saved in one binary file. Default value None
--save_file the directory path for the exported ONNX model
--opset_version [Optional] To configure the ONNX Opset version. Opset 9-11 are stably supported. Default value is 9.
--enable_onnx_checker [Optional] To check the validity of the exported ONNX model. It is suggested to turn on the switch. If set to True, onnx>=1.7.0 is required. Default value is False
--version [Optional] check the version of paddle2onnx
  • Two types of PaddlePaddle models
    • Combined model, parameters saved in one binary file. --model_filename and --params_filename represents the file name and parameter name under the directory designated by --model_dir. --model_filename and --params_filename are valid only with parameter --model_dir.
    • Uncombined model, parameters saved in different files. Only --model_dir is needed,which contains '__model__' file and the seperated parameter files.

IPython tutorials

Dynamic Computational Graph

import paddle
from paddle import nn
from paddle.static import InputSpec
import paddle2onnx as p2o

class LinearNet(nn.Layer):
    def __init__(self):
        super(LinearNet, self).__init__()
        self._linear = nn.Linear(784, 10)

    def forward(self, x):
        return self._linear(x)

layer = LinearNet()

# configure model inputs
x_spec = InputSpec([None, 784], 'float32', 'x')

# convert model to inference mode
layer.eval()

save_path = 'onnx.save/linear_net'
p2o.dygraph2onnx(layer, save_path + '.onnx', input_spec=[x_spec])

# when paddlepaddle>2.0.0, you can try:
# paddle.onnx.export(layer, save_path, input_spec=[x_spec])

IPython tutorials

Documents

License

Apache-2.0 license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].