Git Product home page Git Product logo

rknn-docker's Introduction

RKNPU Docker images

This repository contains a number of docker images ranging from small, base images only containing the runtime library to demo containers that are able to run either the python demos or a pre-compiled yolov5 example

Todo: add containers for converting and working with the rknn models

ghcr.io/daedaluz/rknn-runtime

This image only contains the runtime.

Use as a base for running pre-compiled applications

ghcr.io/daedaluz/rknn-lite

This image has the rknn-lite python library installed

Use as a base for running python based applications

ghcr.io/daedaluz/rknn-lite-demo

This image adds the rknn_toolkit_lite2 demos and installs required dependencies for them to run.

On RK3588

docker run --rm -ti --privileged \
            -v /dev/dri/renderD129:/dev/dri/renderD129 \
            -v /proc/device-tree/compatible:/proc/device-tree/compatible \
            ghcr.io/daedaluz/rknn-lite-demo

Then to run eg. the resnet18 demo

cd lite/resnet18
python3 test.py

ghcr.io/daedaluz/rknn-yolov5-demo

This image is the pre-built yolov5 example ontop of the ghcr.io/daedaluz/rknn-runtime image.

On RK3588

docker run --rm -ti --privileged \
            -v /dev/dri/renderD129:/dev/dri/renderD129 \
            -v /proc/device-tree/compatible:/proc/device-tree/compatible \
            ghcr.io/daedaluz/rknn-yolov5-demo

Output:

post process config: box_conf_threshold = 0.25, nms_threshold = 0.45
Loading mode...
sdk version: 1.6.0 (9a7b5d24c@2023-12-13T17:31:11) driver version: 0.9.2
model input num: 1, output num: 3
  index=0, name=images, n_dims=4, dims=[1, 640, 640, 3], n_elems=1228800, size=1228800, w_stride = 640, size_with_stride=1228800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
  index=0, name=output, n_dims=4, dims=[1, 255, 80, 80], n_elems=1632000, size=1632000, w_stride = 0, size_with_stride=1638400, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003860
  index=1, name=283, n_dims=4, dims=[1, 255, 40, 40], n_elems=408000, size=408000, w_stride = 0, size_with_stride=491520, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
  index=2, name=285, n_dims=4, dims=[1, 255, 20, 20], n_elems=102000, size=102000, w_stride = 0, size_with_stride=163840, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003915
model is NHWC input fmt
model input height=640, width=640, channel=3
Read model/bus.jpg ...
img width = 640, img height = 640
once run use 29.713000 ms
loadLabelName ./model/coco_80_labels_list.txt
person @ (209 244 286 506) 0.884139
person @ (478 238 559 526) 0.867678
person @ (110 238 230 534) 0.824685
bus @ (94 129 553 468) 0.705055
person @ (79 354 122 516) 0.339254
save detect result to ./out.jpg
loop count = 10 , average run  23.933400 ms

ghcr.io/daedaluz/rknn-sample-app

See sample-app readme

rknn-docker's People

Contributors

daedaluz avatar

Watchers

 avatar

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.