Toybrick

人工智能开发系列(7) OPENPOSE开发与实现

liyang

中级会员

积分
260
发表于 2020-4-18 11:23:05 | 显示全部楼层
你好 这个只有python版本吗 没有c++版本的
回复

使用道具 举报

wzp

注册会员

积分
63
发表于 2020-4-21 15:14:28 | 显示全部楼层
转换模型时遇到加载模型失败怎么办?
[toybrick@toybrick rknn_openpose]$ python3 rknn_transfer.py
/usr/lib64/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
/home/toybrick/.local/lib/python3.6/site-packages/onnx_tf/common/__init__.py:87: UserWarning: FrontendHandler.get_outputs_names is deprecated. It will be removed in future release.. Use node.outputs instead.
  warnings.warn(message)
--> config model
done
--> Loading model
E Blobs file ./pose/coco/pose_iter_440000.caffemodel not exists!
Load model failed!

我cd到./pose/coco/目录 里面并没有pose_iter_440000.caffemodel这个文件啊,有哪位大神跑通这个案例了?指导一下,谢谢!
回复

使用道具 举报

wzp

注册会员

积分
63
发表于 2020-4-21 15:38:01 | 显示全部楼层
wzp 发表于 2020-4-21 15:14
转换模型时遇到加载模型失败怎么办?
[toybrick@toybrick rknn_openpose]$ python3 rknn_transfer.py
/usr ...

知道问题所在了:
使用代码包内提供的getModels.sh下载模型的权重文件。请注意配置proto文件已经存在于文件夹中。
在命令行中,cd到下载到的文件夹内,执行以下代码:
sudo chmod a+x getModels.sh
./getModels.sh
检查文件夹中,是否下载好了二进制模型文件(.caffemodel后缀的文件)。如果无法运行上述脚本,可以直接点这里http://posefs1.perception.cs.cmu ... r_440000.caffemodel下载模型。下载完成后,要放到“pose/coco/”文件夹内。
回复

使用道具 举报

wzp

注册会员

积分
63
发表于 2020-4-21 17:18:38 | 显示全部楼层
wzp 发表于 2020-4-21 15:38
知道问题所在了:
使用代码包内提供的getModels.sh下载模型的权重文件。请注意配置proto文件已经存在于文 ...

解决了上面的问题,由遇到新问题了,模型转换失败:
warnings.warn(message)
--> config model
done
--> Loading model
done
--> Building model
W The RKNN Model generated can not run on simulator when pre_compile is True.
E pre_compile is not supproted on aarch64 platform.
Build model failed!
怎么解决
回复

使用道具 举报

wzp

注册会员

积分
63
发表于 2020-4-22 09:03:08 | 显示全部楼层
wzp 发表于 2020-4-21 17:18
解决了上面的问题,由遇到新问题了,模型转换失败:
warnings.warn(message)
--> config model

pre_compile=ture删掉就可以了
回复

使用道具 举报

golo

新手上路

积分
14
发表于 2020-5-5 16:15:54 | 显示全部楼层
(venv) t450@t450:~/RK1808_stick/learnopencv/OpenPose-Multi-Person$ python test_rnetCam.py
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
/home/t450/RK1808_stick/venv/lib/python3.5/site-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)])
--> Init runtime environment
E Pre compile model can not run on simulator
E Catch exception when init runtime!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 664, in rknn.api.rknn_base.RKNNBase.init_runtime
T   File "rknn/api/rknn_runtime.py", line 244, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
T Exception: RKNN init failed. Wrong platform: simulator
Init runtime environment failed
回复

使用道具 举报

golo

新手上路

积分
14
发表于 2020-5-5 21:05:50 | 显示全部楼层
新问题
python test_rnetCam.py
W:tensorflow:From /home/t450/RK1808_stick/venv/lib/python3.5/site-packages/onnx_tf/handlers/backend/ceil.py:10: The name tf.ceil is deprecated. Please use tf.math.ceil instead.

W:tensorflow:From /home/t450/RK1808_stick/venv/lib/python3.5/site-packages/onnx_tf/handlers/backend/depth_to_space.py:12: The name tf.depth_to_space is deprecated. Please use tf.compat.v1.depth_to_space instead.

W:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/co ... 7-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

W:tensorflow:From /home/t450/RK1808_stick/venv/lib/python3.5/site-packages/onnx_tf/handlers/backend/log.py:10: The name tf.log is deprecated. Please use tf.math.log instead.

W:tensorflow:From /home/t450/RK1808_stick/venv/lib/python3.5/site-packages/onnx_tf/handlers/backend/random_normal.py:9: The name tf.random_normal is deprecated. Please use tf.random.normal instead.

W:tensorflow:From /home/t450/RK1808_stick/venv/lib/python3.5/site-packages/onnx_tf/handlers/backend/random_uniform.py:9: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

W:tensorflow:From /home/t450/RK1808_stick/venv/lib/python3.5/site-packages/onnx_tf/handlers/backend/upsample.py:13: The name tf.image.resize_images is deprecated. Please use tf.image.resize instead.

/home/t450/RK1808_stick/venv/lib/python3.5/site-packages/onnx_tf/common/__init__.py:87: UserWarning: FrontendHandler.get_outputs_names is deprecated. It will be removed in future release.. Use node.outputs instead.
  warnings.warn(message)
--> Init runtime environment
E Pre compile model can not run on simulator
E Catch exception when init runtime!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 788, in rknn.api.rknn_base.RKNNBase.init_runtime
E   File "rknn/api/rknn_runtime.py", line 270, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
E Exception: RKNN init failed. Wrong platform: simulator
Init runtime environment failed
回复

使用道具 举报

Aiden

注册会员

积分
88
发表于 2020-5-12 18:39:37 | 显示全部楼层
@我是流氓我怕谁, 请问 openpose 的 mobilenet v1 模型在 Toybrick RK3399Pro 上的 FPS 预计可以达到多少?
回复

使用道具 举报

SongJ

注册会员

积分
87
发表于 2020-5-14 16:05:34 | 显示全部楼层
./getModels.sh 之后速度奇慢无比怎么办
回复

使用道具 举报

qing

新手上路

积分
41
发表于 2021-3-10 16:49:28 | 显示全部楼层
您好,请问这个网址现在无效了是吗
回复

使用道具 举报

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

本版积分规则

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


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