|
发表于 2023-9-22 19:42:15
只看该作者
13#
我对照demo_rknn.cpp写了一个py版本的但是加载rknn 模型时候出现了问题
- setModelData(): incompatible function arguments. The following argument types are supported:
- 1. (self: ff_pymedia.ModuleInference, arg0: capsule, arg1: int) -> int
- Invoked with: <ff_pymedia.ModuleInference object at 0x7fa664f0f0>, <ff_pymedia.ModuleInference object at 0x7fa664f0f0>, 'iot_firefly.rknn', 0
复制代码
========================
- dec.setModelData('iot_firefly.rknn', 0)
- ret = dec.init()
- if ret < 0:
- print("dec init failed")
- raise Exception
- else:
- print("dec int done")
复制代码
=============demo代码=============
- input_para = dec->getOutputImagePara();
- inf = make_shared<ModuleInference>(input_para);
- inf->setProductor(dec);
- inf->setInferenceInterval(1);
- if (inf->setModelData(argv[2], 0) < 0) {
- ff_error("inf setModelData fail!\n");
- break;
- }
- ret = inf->init();
- if (ret < 0) {
- ff_error("inf init failed\n");
- break;
- }
复制代码 |
|