Skip to main content

A PaddlePaddle New IR (PIR) to ONNX model converter.

Project description

p2o

A PaddlePaddle New IR (PIR) to ONNX model converter, written in Rust.

Converts PaddlePaddle inference models (inference.json + inference.pdiparams) to the ONNX format.

Installation

Pre-built binaries

Download from GitHub Releases.

From PyPI

pip install p2o

From crates.io

cargo install p2o

Build from source

git clone https://github.com/greatv/p2o.git
cd p2o
cargo build --release

Usage

p2o <model.json> <model.pdiparams> <output.onnx> [--opset 17] [--strict]

Arguments

Argument Description
model.json Path to the PaddlePaddle .json model file
model.pdiparams Path to the PaddlePaddle .pdiparams weight file
output.onnx Path to the output .onnx model file
--opset <N> Target ONNX opset version (≥ 10, default: 17)
--strict Reject lossy conversions (e.g. multinomial → ArgMax)

Example

p2o inference_models/PP-OCRv5_server_det_infer/inference.json \
    inference_models/PP-OCRv5_server_det_infer/inference.pdiparams \
    output.onnx --opset 17

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

p2o-0.1.1.tar.gz (124.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

p2o-0.1.1-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

p2o-0.1.1-py3-none-musllinux_1_2_x86_64.whl (1.5 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

p2o-0.1.1-py3-none-musllinux_1_2_aarch64.whl (1.4 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

p2o-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

p2o-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

p2o-0.1.1-py3-none-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file p2o-0.1.1.tar.gz.

File metadata

  • Download URL: p2o-0.1.1.tar.gz
  • Upload date:
  • Size: 124.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for p2o-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2e08859b9e155633ff4a47fd547410a793b33cca0f53350898be9efa4bfdb9c
MD5 d475c858cad6487a362fbcd290759e70
BLAKE2b-256 d30479eac61afaf902c70490fa4918d765b8ed3e68c3bc9f4a2cb8aa2ce33804

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.1.tar.gz:

Publisher: publish.yml on GreatV/p2o

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file p2o-0.1.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: p2o-0.1.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for p2o-0.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c312cb7ebeab413d2aea2d85b3e525db7b515623f1c9bad4e576f80556e3203c
MD5 146763851624dec281561bdbefd186b0
BLAKE2b-256 7875f818aa1277366131ac3f43280cdd8156ca08bade71a6a46496ff9364578e

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.1-py3-none-win_amd64.whl:

Publisher: publish.yml on GreatV/p2o

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file p2o-0.1.1-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: p2o-0.1.1-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for p2o-0.1.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 58925e120fc2b3da362f21ee3674fc4e2aa7aa59da4069feacd8cde70f57cb26
MD5 766611d83020bf79dc891ad111b393ee
BLAKE2b-256 e43a66c0442b3ec3bef39bd49e1f10ae6b915c576b7f43ae151176bbbdc4c25a

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.1-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on GreatV/p2o

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file p2o-0.1.1-py3-none-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: p2o-0.1.1-py3-none-musllinux_1_2_aarch64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3, musllinux: musl 1.2+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for p2o-0.1.1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1bc976c76c8176973d0aaa0db374872b5d034c96ff04aae5fbd267180dcb2241
MD5 b4407b2e65b740bc6f0c48568c735063
BLAKE2b-256 e04398f25dfa37a028cd3be0c7b2bdce94df72d8ea01d945092d17c7e23ee447

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.1-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on GreatV/p2o

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file p2o-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for p2o-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20f31312974a85bff889bbdee18c8e0b62cbdf6c0b846d11b242c33db02bded0
MD5 c8ad9edb956d653433e9734725327e9c
BLAKE2b-256 72e39a84b534a64ce7b63c6f9eaa2ee1bc7e1c4fce1dfb7b8298f1864d5ba54f

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on GreatV/p2o

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file p2o-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for p2o-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8f7fa5e9e903d38f7c9327c14b6fccaaee049a24764e65cc3cdda33006b2ec2c
MD5 cb0fef3d2eafdd0f9fd2d462273b1669
BLAKE2b-256 41c959f730008923e8a6a0f5b8fd86e3210b983b6425ce5d775c63262200717f

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on GreatV/p2o

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file p2o-0.1.1-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: p2o-0.1.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for p2o-0.1.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27f3f4507e9b762565032dfcd38fb8ea69aac0acfbac10609ba91b1b6b3bcf9f
MD5 0bfcdff8b02cf0298e02c21dd4bb603b
BLAKE2b-256 ae57d0061add71b650916591d370159eaf1dbb0e7b65673aaff6d8b06156b5b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.1-py3-none-macosx_11_0_arm64.whl:

Publisher: publish.yml on GreatV/p2o

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page