Toybrick

楼主: jefferyzhang

[Latest Version] [1.6.0] rknn-toolkit & rknn-api for Toybrick

 

zhaohuimima

注册会员

积分
59
发表于 2021-3-17 16:32:41 | 显示全部楼层
jefferyzhang 发表于 2021-3-17 15:19
drv和api版本要匹配,drv是1.6了么?toybrick的1808 1.6 DRV 还没正式发布

D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.6.0 (79320de build: 2020-12-29 10:56:36)
D RKNNAPI:   DRV: 1.3.0 (c4f8c23 build: 2019-11-25 10:39:29)
D RKNNAPI: ==============================================
yolo3的例子可以运行。但yolo4的就不行
回复

使用道具 举报

jefferyzhang

超级版主

积分
7774
 楼主| 发表于 2021-3-17 16:51:43 | 显示全部楼层
zhaohuimima 发表于 2021-3-17 16:32
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   AP ...

DRV: 1.3.0 不匹配
回复

使用道具 举报

hello09999

新手上路

积分
34
发表于 2021-3-18 14:09:20 | 显示全部楼层
我烧了最新的固件TB-RK1808M0--image_V2.1,可以运行yolov5
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.4.0 (bbe0dfc build: 2020-09-14 14:06:05)
D RKNNAPI:   DRV: 1.5.0 (83d70a9 build: 2020-09-30 16:25:49)
D RKNNAPI: ==============================================
rknn_init successed!
回复

使用道具 举报

marshorizon

注册会员

积分
59
发表于 2021-3-25 11:29:15 | 显示全部楼层
对build时dataset.txt设置的疑惑。如果do_quantization=True,dataset.txt里面为空,则模型并不能正确分类,如果do_quantization=True,dataset.txt里面为推理图片,则推理有的图片正确有的图片错误。请问dataset.txt的设置有什么要求,是训练时的train\test\validate还是推理图片?如果是推理图片,就成了鸡蛋悖论了。
回复

使用道具 举报

zhaohuimima

注册会员

积分
59
发表于 2021-3-30 12:46:48 | 显示全部楼层
请问1808计算棒如何升级驱动?
教程在哪里?
回复

使用道具 举报

Lubagov

注册会员

积分
100
QQ
发表于 2021-4-2 21:43:39 | 显示全部楼层
本帖最后由 Lubagov 于 2021-4-2 22:35 编辑

Hello!
I receive my toybrick board today, TB-RK3399ProD_33101_V1.2. Interested it was already flash on Debian 10, from box. And already with 1.6 RKNN API.
I want on this run YOLO5, and i get same problem like with ASUS:
it is after
  1. adb shell
复制代码
, i trying to run direcly on NPU:
  1. /userdata/rknn_yolov5_demo # ./run_rk180x.sh
  2. Read model/test2.jpg ...
  3. img width = 1280, img height = 720
  4. Loading mode...
  5. failed to open /dev/dri/card0
  6. sdk version: librknn_runtime version 1.6.0 (096015c build: 2021-01-12 15:25:30 base: 1126) driver version: 6.4.3.5.293908
  7. model input num: 1, output num: 3
  8. index=0 name=images_165 n_dims=4 dims=[1 3 640 640] n_elems=1228800 size=1228800 fmt=0 type=3 qnt_type=2 fl=0 zp=0 scale=0.003922
  9. index=0 name=Conv_Conv_159/out0_0 n_dims=4 dims=[1 255 80 80] n_elems=1632000 size=1632000 fmt=0 type=3 qnt_type=2 fl=-69 zp=187 scale=0.127843
  10. index=1 name=Conv_Conv_160/out0_1 n_dims=4 dims=[1 255 40 40] n_elems=408000 size=408000 fmt=0 type=3 qnt_type=2 fl=-74 zp=182 scale=0.113217
  11. index=2 name=Conv_Conv_161/out0_2 n_dims=4 dims=[1 255 20 20] n_elems=102000 size=102000 fmt=0 type=3 qnt_type=2 fl=-84 zp=172 scale=0.103272
  12. model is NCHW input fmt
  13. model input height=640, width=640, channel=3
  14. failed to open /dev/dri/card0
  15. ./run_rk180x.sh: line 4:   202 Segmentation fault      ./rknn_yolov5_demo model/${chip_dir}/yolov5s_relu_rk180x_out_opt.rknn model/test2.jpg
  16. /userdata/rknn_yolov5_demo #
复制代码


  1. /userdata/rknn_yolov5_demo # ./run_rv1109_rv1126.sh
  2. Read model/test2.jpg ...
  3. img width = 1280, img height = 720
  4. Loading mode...
  5. failed to open /dev/dri/card0
  6. Create RKNN model fail, error=-13
  7. rknn_init error ret=-13
复制代码


So similar NPU have not /dev/dri/card0, it have only CPU... While i don't recive Toybrick stick, after several days should recive it...
What i do wrong? /dev/dri/ should be on RK3399Pro NPU?

SSD Demo working, but in any case write about /dev/dri/card0 is not here.

And if just llok code, at all nothing ctitical with libdrm, it use https://github.com/rockchip-linux/linux-rga for resize/convert format image, and for this open DRM...
But why it has not here?

回复

使用道具 举报

LDSM

新手上路

积分
24
发表于 2021-4-13 14:37:41 | 显示全部楼层
Github中的https://github.com/rockchip-linux/rknn-toolkit有什么用? 我如何使用该repo更新? repo的doc中说替换external/rknpu目录, 但我并没有找到该目录啊(刷的debian10).
回复

使用道具 举报

Lubagov

注册会员

积分
100
QQ
发表于 2021-4-15 17:39:49 | 显示全部楼层
本帖最后由 Lubagov 于 2021-4-15 18:48 编辑

Hello! i recive Toybrick USB yesterday.
I cant find `rga_ctx->rga_handle = dlopen("/usr/lib/librga.so", RTLD_LAZY);` i can found `/usr/lib64/librockchip_rga.so` but here has not `c_RkRgaInit`
i ofcose can find https://github.com/rockchip-linux/linux-rga but really not think, that i should build from sources... And USB stick use Fedora? Debian only in PCIe?

UPD:
I build rga from sources... but, i modify CMakeLists.txt and append here /core/RgaApi.cpp, and now it found functions, like c_RkRgaInit and start working...
回复

使用道具 举报

brunolin

中级会员

积分
427
发表于 2021-4-29 17:02:51 | 显示全部楼层
zhaohuimima 发表于 2021-3-30 12:46
请问1808计算棒如何升级驱动?
教程在哪里?

參考固件在线升级
回复

使用道具 举报

brunolin

中级会员

积分
427
发表于 2021-4-29 17:05:34 | 显示全部楼层
jefferyzhang 发表于 2021-3-17 15:19
drv和api版本要匹配,drv是1.6了么?toybrick的1808 1.6 DRV 还没正式发布

請問版主,toybrick的1808 1.6 DRV 发布了么?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表