{"repo":"RomanVPX/onnx-to-rknn","free":true,"listed":false,"github":"https://github.com/RomanVPX/onnx-to-rknn","clone":"git clone https://github.com/RomanVPX/onnx-to-rknn.git","description":"Automated converter for ONNX models (particularly ESRGAN) to RKNN format for Rockchip NPUs. Features include Docker-based conversion and GitHub Actions automation.","language":"Python","stars":26,"topics":["docker","esrgan","github-actions","model-conversion","neural-networks","onnx","rknn","rockchip","rk3566","upscaling"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"ONNX to RKNN Converter (for Rockchip NPU) A Dockerized tool to convert ONNX models (specifically targeting image upscalers like ESRGAN) to the RKNN format for Rockchip NPUs (tested on RK3566). Why Does This Exist? (The Problem) Converting models for Rockchip NPUs using their official rknn-toolkit2 is... an experience. Its documentation is a masterpiece of obfuscation, and key features like dynamic input (essential for models that should handle variable input sizes, like image upscalers) are fundamentally broken for many (if not all) architectures, leading to crashes ( Segmentation fault ) or garbage output during inference. After much suffering, apparently the only reliable method found was to generate separate RKNN models for each specific, fixed input resolution needed, bypassing the buggy dynamic shape handling. Doing this manually for multiple resolutions is tedious and error-prone. What It Does (The Solution) This tool takes a single ONNX model (which should ideally support dynamic input dimensions, although the tool can sometimes force a fixed size even on static ONNX files) and generates multiple RKNN models, each compiled for a specific, fixed input resolution (e.g., 1280x256, 1920x1080). It uses the rknn-toolkit2 library inside a Docker container with pinned dependencies to ensure a consistent environment, leveraging the (working) input size list parameter during rknn.load onnx() to force the desired input shape for each conversion. Features Dockerized: Packages ever","default_branch":null,"files":null,"tree":[],"storefront":"/r/RomanVPX","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/RomanVPX/onnx-to-rknn/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}