Giter Site home page Giter Site logo

rknn-superresolution's Introduction

RKNN Superresolution

Demo code to run image superresolution on Rockchip NPU

How to use

  1. Download super-resolution-10.onnx from the ONNX model zoo
  2. Run convert.py on a PC with RKNN installed
    • Modify the target_platform variable to sute your board
  3. Move the generated super-resolution-10.rknn to your dev board
  4. Prepare any image, name it test.jpg on your board. Run infer.py
  5. out.jpg is your output

rknn-superresolution's People

Contributors

marty1885 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jianglu

rknn-superresolution's Issues

rknn. reference is a None

Hello author, after converting the onnx model to rknn, the input of the rknn model is [1,1224224], and the following error occurred during the execution of infer.py:
(1, 1, 224, 224)
E RKNN: [03:51:51.071] rknn_set_input_shapes error, input name = input supported input shapes are as follows:
E RKNN: [03:51:51.071] shape = [1,224,224,1], layout = NHWC
E RKNN: [03:51:51.071] while get rknn_tensor_attr[0].name = input, dims = [1, 1, 224, 224], fmt = NHWC
E Catch exception when setting inputs.
E Traceback (most recent call last):
File "/home/pi/archiconda3/envs/py38/lib/python3.8/site-packages/rknnlite/api/rknn_lite.py", line 200, in inference
self.rknn_runtime.set_inputs(inputs, data_type, data_format, inputs_pass_through=inputs_pass_through)
File "rknnlite/api/rknn_runtime.py", line 1127, in rknnlite.api.rknn_runtime.RKNNRuntime.set_inputs
Exception: Set input shape failed. error code: RKNN_ERR_FAIL
None
By adding printing information, it was found that the dimension of img_crop in the statement out_y [sy: sy+output_size, sx: sx+output_size]=rknn. reference (inputs=[img_crop]) [0] [0] is (1, 1, 224, 224), which conforms to the input of the rknn model. However, the result of rknn. reference (inputs=[img_crop]) is a None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.