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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2e08859b9e155633ff4a47fd547410a793b33cca0f53350898be9efa4bfdb9c
|
|
| MD5 |
d475c858cad6487a362fbcd290759e70
|
|
| BLAKE2b-256 |
d30479eac61afaf902c70490fa4918d765b8ed3e68c3bc9f4a2cb8aa2ce33804
|
Provenance
The following attestation bundles were made for p2o-0.1.1.tar.gz:
Publisher:
publish.yml on GreatV/p2o
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p2o-0.1.1.tar.gz -
Subject digest:
b2e08859b9e155633ff4a47fd547410a793b33cca0f53350898be9efa4bfdb9c - Sigstore transparency entry: 1409450213
- Sigstore integration time:
-
Permalink:
GreatV/p2o@2a68ec4d354c32261f901504e8669881ec562698 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GreatV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a68ec4d354c32261f901504e8669881ec562698 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c312cb7ebeab413d2aea2d85b3e525db7b515623f1c9bad4e576f80556e3203c
|
|
| MD5 |
146763851624dec281561bdbefd186b0
|
|
| BLAKE2b-256 |
7875f818aa1277366131ac3f43280cdd8156ca08bade71a6a46496ff9364578e
|
Provenance
The following attestation bundles were made for p2o-0.1.1-py3-none-win_amd64.whl:
Publisher:
publish.yml on GreatV/p2o
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p2o-0.1.1-py3-none-win_amd64.whl -
Subject digest:
c312cb7ebeab413d2aea2d85b3e525db7b515623f1c9bad4e576f80556e3203c - Sigstore transparency entry: 1409450248
- Sigstore integration time:
-
Permalink:
GreatV/p2o@2a68ec4d354c32261f901504e8669881ec562698 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GreatV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a68ec4d354c32261f901504e8669881ec562698 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58925e120fc2b3da362f21ee3674fc4e2aa7aa59da4069feacd8cde70f57cb26
|
|
| MD5 |
766611d83020bf79dc891ad111b393ee
|
|
| BLAKE2b-256 |
e43a66c0442b3ec3bef39bd49e1f10ae6b915c576b7f43ae151176bbbdc4c25a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p2o-0.1.1-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
58925e120fc2b3da362f21ee3674fc4e2aa7aa59da4069feacd8cde70f57cb26 - Sigstore transparency entry: 1409450271
- Sigstore integration time:
-
Permalink:
GreatV/p2o@2a68ec4d354c32261f901504e8669881ec562698 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GreatV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a68ec4d354c32261f901504e8669881ec562698 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bc976c76c8176973d0aaa0db374872b5d034c96ff04aae5fbd267180dcb2241
|
|
| MD5 |
b4407b2e65b740bc6f0c48568c735063
|
|
| BLAKE2b-256 |
e04398f25dfa37a028cd3be0c7b2bdce94df72d8ea01d945092d17c7e23ee447
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p2o-0.1.1-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
1bc976c76c8176973d0aaa0db374872b5d034c96ff04aae5fbd267180dcb2241 - Sigstore transparency entry: 1409450289
- Sigstore integration time:
-
Permalink:
GreatV/p2o@2a68ec4d354c32261f901504e8669881ec562698 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GreatV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a68ec4d354c32261f901504e8669881ec562698 -
Trigger Event:
push
-
Statement type:
File details
Details for the file p2o-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: p2o-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20f31312974a85bff889bbdee18c8e0b62cbdf6c0b846d11b242c33db02bded0
|
|
| MD5 |
c8ad9edb956d653433e9734725327e9c
|
|
| BLAKE2b-256 |
72e39a84b534a64ce7b63c6f9eaa2ee1bc7e1c4fce1dfb7b8298f1864d5ba54f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p2o-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
20f31312974a85bff889bbdee18c8e0b62cbdf6c0b846d11b242c33db02bded0 - Sigstore transparency entry: 1409450220
- Sigstore integration time:
-
Permalink:
GreatV/p2o@2a68ec4d354c32261f901504e8669881ec562698 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GreatV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a68ec4d354c32261f901504e8669881ec562698 -
Trigger Event:
push
-
Statement type:
File details
Details for the file p2o-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: p2o-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f7fa5e9e903d38f7c9327c14b6fccaaee049a24764e65cc3cdda33006b2ec2c
|
|
| MD5 |
cb0fef3d2eafdd0f9fd2d462273b1669
|
|
| BLAKE2b-256 |
41c959f730008923e8a6a0f5b8fd86e3210b983b6425ce5d775c63262200717f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p2o-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
8f7fa5e9e903d38f7c9327c14b6fccaaee049a24764e65cc3cdda33006b2ec2c - Sigstore transparency entry: 1409450259
- Sigstore integration time:
-
Permalink:
GreatV/p2o@2a68ec4d354c32261f901504e8669881ec562698 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GreatV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a68ec4d354c32261f901504e8669881ec562698 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27f3f4507e9b762565032dfcd38fb8ea69aac0acfbac10609ba91b1b6b3bcf9f
|
|
| MD5 |
0bfcdff8b02cf0298e02c21dd4bb603b
|
|
| BLAKE2b-256 |
ae57d0061add71b650916591d370159eaf1dbb0e7b65673aaff6d8b06156b5b6
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
p2o-0.1.1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
27f3f4507e9b762565032dfcd38fb8ea69aac0acfbac10609ba91b1b6b3bcf9f - Sigstore transparency entry: 1409450228
- Sigstore integration time:
-
Permalink:
GreatV/p2o@2a68ec4d354c32261f901504e8669881ec562698 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/GreatV
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a68ec4d354c32261f901504e8669881ec562698 -
Trigger Event:
push
-
Statement type: