Toybrick

加载rock模块报错

SodrSnne

中级会员

积分
249
楼主
发表于 2020-4-14 14:49:47    查看: 5950|回复: 4 | [复制链接]    打印 | 只看该作者
板子为rk3399pro python调用RockX 初始化人脸识别模块总是报如下错误 ,请问大神是哪里出了问题.
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
I NPUTransfer: Starting NPU Transfer Client, Transfer version 1.9.8 (cab3961@2019-12-12T09:54:26)
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.2.0 (db63ace build: 2019-09-17 14:23:41)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.3.0 (c5654ea build: 2019-12-25 12:40:55)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!

E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!

E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: rknn_init,  recv(MsgLoadAck) fail, -9(ERROR_PIPE) != 368!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: rknn_init,  recv(MsgIoctlAck) fail, -9(ERROR_PIPE) < 125!



回复

使用道具 举报

SodrSnne

中级会员

积分
249
沙发
 楼主| 发表于 2020-4-14 15:00:07 | 只看该作者
我在代码里面使用了多进程,另外一个进程硬解码调用下面函数,但是只要开启了这个进程就会报错,如果单独算法,手动启动程序硬解码就很少出错.
def get_hard_decode(num):
    while num.value:
        time.sleep(10)
        print("number:value:",num.value)
    print('start rtsp hardecode')
    name = os.system("/home/toybrick/local_rtsp/build/rtsp_ssd &")
回复

使用道具 举报

jefferyzhang

版主

积分
12952
板凳
发表于 2020-4-14 17:34:17 | 只看该作者
用法是不是有点问题,rockx实例只需要初始化一次,然后后面一直用就可以了。。。
这里一直在刷版本号,应该是被实例化了好几次。。。
回复

使用道具 举报

SodrSnne

中级会员

积分
249
地板
 楼主| 发表于 2020-4-17 13:51:49 | 只看该作者
我是在官方的demo下面修改的C:\Users\Administrator\Desktop\RockX_SDK_V1.2.0_20200302\python\test\camera\rockx_face_recog.py 这个文件
print("image_dir=", args.image_dir)
    print(args.device)

    face_det_handle = RockX(RockX.ROCKX_MODULE_FACE_DETECTION, target_device=args.device)
    face_landmark5_handle = RockX(RockX.ROCKX_MODULE_FACE_LANDMARK_5, target_device=args.device)
    face_recog_handle = RockX(RockX.ROCKX_MODULE_FACE_RECOGNIZE, target_device=args.device)
    face_track_handle = RockX(RockX.ROCKX_MODULE_OBJECT_TRACK, target_device=args.device)
debug 发现其中这四个加载就会刷很多次版本号
回复

使用道具 举报

SodrSnne

中级会员

积分
249
5#
 楼主| 发表于 2020-4-17 14:29:06 | 只看该作者
I NPUTransfer: Starting NPU Transfer Client, Transfer version 1.9.8 (cab3961@2019-12-12T09:54:26)
D RKNNAPI: ==============================================
D RKNNAPI: RKNN VERSION:
D RKNNAPI:   API: 1.3.0 (c5654ea build: 2019-12-25 12:40:55)
D RKNNAPI:   DRV: 1.3.1 (6ebb4d7 build: 2020-01-02 09:37:58)
D RKNNAPI: ==============================================
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: __pthread_recv_msg,  recv(MsgHeader) fail, -9(ERROR_PIPE) < 108!
E RKNNAPI: rknn_init,  recv(MsgIoctlAck) fail, -9(ERROR_PIPE) < 125!
E RKNNAPI: rknn_init,  recv(MsgLoadAck) fail, -9(ERROR_PIPE) != 368!
E Catch exception when init runtime!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 988, in rknn.api.rknn_base.RKNNBase.init_runtime
E   File "rknn/api/rknn_runtime.py", line 320, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
E NPUTransfer: Transfer interface open failed!, ret = -1E Exception: RKNN init failed. error code: RKNN_ERR_DEVICE_UNAVAILABLE
1587104136174 rockx load_model(74): rknn_init fail! ret=-3

1587104136177 rockx init(74): init module(1) error -1

E RKNNAPI: rknn_init,  driver open fail!  ret = -1(ERROR_IO)!
Loading RKNN model:/home/toybrick/Fd/model/human_and_hat_2.rknn
load rknn model done
--> init runtime
init runtime failed.
E NPUTransfer: Transfer interface open failed!, ret = -11587104136212 rockx load_model(74): rknn_init fail! ret=-3

1587104136212 rockx init(74): init module(8) error -1

E RKNNAPI: rknn_init,  driver open fail!  ret = -1(ERROR_IO)!
回复

使用道具 举报

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

本版积分规则

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


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