Skip to main content

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

Project description

p2o

Crates.io PyPI docs.rs License: Apache-2.0

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.2.tar.gz (128.9 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.2-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

p2o-0.1.2-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.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

p2o-0.1.2-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.2.tar.gz.

File metadata

  • Download URL: p2o-0.1.2.tar.gz
  • Upload date:
  • Size: 128.9 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.2.tar.gz
Algorithm Hash digest
SHA256 64e900e4b739f194211b938dafb97faba65c78aed0aea27456ab5aa112268f29
MD5 2439e4986478c118d815ed16138cfec7
BLAKE2b-256 601b44f9ea2d7593cb5ffad42acdb7715b15d0d60f10302e9b7a4a9bee8b58fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.2.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.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: p2o-0.1.2-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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 aeaae35cffa2eedd5e5a7bdea809a61310392495b156d423ac480899d21ddd8a
MD5 cd2fd2b5253e472077a78f4f61228427
BLAKE2b-256 0aca31506603d15bf365185ddfa115a7c6b8fbdde5237eb53608de1f605d61b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.2-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.2-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: p2o-0.1.2-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.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3b25f2b0775e6628af8375e1058a7f9161d1f2b609fe11a8dc813be443ecfefe
MD5 7977c89d68efd287bbd2423a8a748bc2
BLAKE2b-256 7c764308139b62fc2c894165e0d50d7c653929491a22bcf8c42f3a39f77627e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.2-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.2-py3-none-musllinux_1_2_aarch64.whl.

File metadata

  • Download URL: p2o-0.1.2-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.2-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b3424f02d6e7c7f92146cfe140d890c1ed123603ab96259ef37e55494343aee3
MD5 8ae003a66c4e131ea3828adebc8d68c6
BLAKE2b-256 9117c90bec5a25f18e3a358511a9c519790d0e515288a55f36498a65ce570fa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.2-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.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for p2o-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6b8aef24c87a1615d4a16cdbc79dfd8ac416c75a9ea1c2d82d6b14b9d8d3c845
MD5 b87ac5ed0f40210abdeaa00daeff0586
BLAKE2b-256 e1c8c96322608a43f5bac882ee2f6c0df997b45725c8934de15d21d4d4595ec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.2-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.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for p2o-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2e26b4f6a4588a41e199c71af8ffa4f6b4365c5ed7d2c4f88b49c029561805e6
MD5 a08c11039464c45e84950bc2c60c9398
BLAKE2b-256 55d21dabfaf4054122e9ec1cc8db4429da945bb22c81c3fc9d17932411f908a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.2-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.2-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: p2o-0.1.2-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.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e178b3482defcfb245c9a06d460e5de7c349dfdc1edeb4176c113cee2f0ea8fc
MD5 77fb144816bfc967df088b5ac5499339
BLAKE2b-256 954f94acd27d6265d3b94db19aa314e1126f0709c0189f3b04ab58bb3a27c746

See more details on using hashes here.

Provenance

The following attestation bundles were made for p2o-0.1.2-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