Skip to main content

A command line tool for parsing and displaying RKNN model information

Project description

RKNN CLI

A command line tool for parsing and displaying RKNN model information with FlatBuffers support.

Features

  • Parse both FlatBuffers binary data and JSON metadata from RKNN files
  • Extract detailed model information including format, compiler, runtime
  • Display input/output tensor information with layout (NCHW) and data type
  • Python 3.8+ compatible

Installation

From PyPI (Recommended)

pip install rknncli

Development Installation

git clone https://github.com/your-username/rknncli.git
cd rknncli
pip install -e .

Usage

rknncli <path-to-rknn-model>

Example:

rknncli assets/base-encoder.rknn

Output Format

The tool prints comprehensive model information including FlatBuffers metadata:

Model: rknn model
Target Platform: rk3588
Format: RKNPU v2
Source: ONNX
Compiler: 2.1.0+708089d1(compiler version: 2.1.0)
Runtime: rk3588
Number of graphs: 1

Input information
--------------------------------------------------------------------------------
  ValueInfo "base-mel": type FLOAT32, shape [1, 80, 3000], layout NCHW,

Output information
--------------------------------------------------------------------------------
  ValueInfo "cross_k_0": type FLOAT16, shape [1, 1500, 512], layout NCHW,
  ValueInfo "cross_v_0": type FLOAT16, shape [1, 1500, 512], layout NCHW,

Development

Prerequisites

  • Python 3.8+
  • FlatBuffers compiler (for schema updates)

Setup

# Clone the repository
git clone https://github.com/your-username/rknncli.git
cd rknncli

# Install in development mode
pip install -e .

# Run tests
rknncli assets/base-encoder.rknn

Updating FlatBuffers Schema

If you need to update the RKNN schema:

cd schemas
./generate_schema.sh

Publishing to PyPI

To publish a new version:

# Build the package
python -m build

# Upload to PyPI
./scripts/upload_to_pypi.sh

Changelog

See CHANGELOG.md for version history.

License

MIT License - see LICENSE file for details.

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

rknncli-0.2.2.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

rknncli-0.2.2-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file rknncli-0.2.2.tar.gz.

File metadata

  • Download URL: rknncli-0.2.2.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rknncli-0.2.2.tar.gz
Algorithm Hash digest
SHA256 84356cc362f0049d3f8267e68cc8bf78a815f975e8ce15dbccba087c5e928531
MD5 6a7f461ad343ad512021536001ba891b
BLAKE2b-256 79a743f9da12bba68a7b690a3953d79b15933ff0196a8a2fd60a680b4a37b466

See more details on using hashes here.

Provenance

The following attestation bundles were made for rknncli-0.2.2.tar.gz:

Publisher: release.yml on hebangwen/rknncli

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

File details

Details for the file rknncli-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: rknncli-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rknncli-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a75b127a9849384909f469bfad4a5a5667a3778a4b894475e35210355465c429
MD5 54192fcdddb658c6c0a59c62c3c61500
BLAKE2b-256 9c538c54e763287845cb790e3acb822b1c438ed888a157d8e82b049aee43608d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rknncli-0.2.2-py3-none-any.whl:

Publisher: release.yml on hebangwen/rknncli

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