首页 > 解决方案 > tf-pose-estimation 不显示 matplotlib 访客:CentOS 主机:windows10

问题描述

windows 10 centos 7 python 3.6.5 VScode

我正在尝试 OpenPose,最后我命令了这段代码

[vagrant@localhost tf-pose-estimation]$ python3 run.py --model=mobilenet_thin --resize=432x368 --image=images/p2.jpg

但这并没有通过 matplotlib 显示任何窗口

我更改了后端代码

\home\vagrant.local\lib\python3.6\site-packages\matplotlib\mpl-data\matplotlibrc

后端:Agg => 后端:TKAgg

[vagrant@localhost tf-pose-estimation]$ python3 run.py --model=mobilenet_thin --resize=432x368 --image=images/p2.jpg

/home/vagrant/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516:FutureWarning:不推荐将(type,1)或'1type'作为类型的同义词传递;在 numpy 的未来版本中,它将被理解为 (type, (1,)) / '(1,)type'。_np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/vagrant/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning:不推荐将 (type, 1) 或 '1type' 作为类型的同义词传递;在 numpy 的未来版本中,它将被理解为 (type, (1,)) / '(1,)type'。_np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/vagrant/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1)

---脚本部分除外-----

TfPoseEstimator/Openpose/MConv_Stage6_L2_5_pointwise/BatchNorm/FusedBatchNorm TfPoseEstimator/Openpose/concat_stage7/axis TfPoseEstimator/Openpose/concat_stage7 WARNING:tensorflow:From /home/vagrant/tf-pose-estimation/tf_pose/estimator.py:341: 名称 tf.placeholder已弃用。请改用 tf.compat.v1.placeholder。

2019-09-10 12:57:56,417 来自 /home/vagrant/tf-pose-estimation/tf_pose/estimator.py:341 的警告:不推荐使用名称 tf.placeholder。请改用 tf.compat.v1.placeholder。

警告:tensorflow:来自 /home/vagrant/tf-pose-estimation/tf_pose/estimator.py:342:不推荐使用名称 tf.image.resize_area。请改用 tf.compat.v1.image.resize_area。

2019-09-10 12:57:56,420 来自 /home/vagrant/tf-pose-estimation/tf_pose/estimator.py:342 的警告:不推荐使用名称 tf.image.resize_area。请改用 tf.compat.v1.image.resize_area。

警告:tensorflow:来自 /home/vagrant/tf-pose-estimation/tf_pose/tensblur/smoother.py:96:不推荐使用名称 tf.variable_scope。请改用 tf.compat.v1.variable_scope。

2019-09-10 12:57:56,442 来自 /home/vagrant/tf-pose-estimation/tf_pose/tensblur/smoother.py:96 的警告:不推荐使用名称 tf.variable_scope。请改用 tf.compat.v1.variable_scope。

警告:tensorflow:来自 /home/vagrant/tf-pose-estimation/tf_pose/estimator.py:354:add_dispatch_support..wrapper(来自 tensorflow.python.ops.array_ops)已弃用,将在未来版本中删除。更新说明:在 2.0 中使用 tf.where,与 np.where 具有相同的广播规则 2019-09-10 12:57:56,463 WARNING From /home/vagrant/tf-pose-estimation/tf_pose/estimator.py: 354:add_dispatch_support..wrapper(来自 tensorflow.python.ops.array_ops)已被弃用,将在未来版本中删除。更新说明:使用2.0中的tf.where,广播规则与np.where相同2019-09-10 12:57:56.563567:W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412](一次性警告): 未将 XLA:CPU 用于集群,因为未设置 envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit。如果你想要 XLA:CPU,要么设置该环境变量,要么使用experimental_jit_scope 来启用XLA:CPU。要确认 XLA 处于活动状态,请传递 --vmodule=xla_compilation_cache=1(作为适当的命令行标志,而不是通过 TF_XLA_FLAGS)或设置 envvar XLA_FLAGS=--xla_hlo_profile。2019-09-10 12:57:57.584627: W tensorflow/core/framework/allocator.cc:107] 24164352 的分配超过了系统内存的 10%。[2019-09-10 12:58:04,331] [TfPoseEstimatorRun] [INFO] 推理图像:images/p2.jpg 在 1.3923 秒内。2019-09-10 12:58:04,331 INFO 推理图像:images/p2.jpg 在 1.3923 秒内。107] 24164352 的分配超过了系统内存的 10%。[2019-09-10 12:58:04,331] [TfPoseEstimatorRun] [INFO] 推理图像:images/p2.jpg 在 1.3923 秒内。2019-09-10 12:58:04,331 INFO 推理图像:images/p2.jpg 在 1.3923 秒内。107] 24164352 的分配超过了系统内存的 10%。[2019-09-10 12:58:04,331] [TfPoseEstimatorRun] [INFO] 推理图像:images/p2.jpg 在 1.3923 秒内。2019-09-10 12:58:04,331 INFO 推理图像:images/p2.jpg 在 1.3923 秒内。

标签: visual-studiomatplotlibwindows-10centos7openpose

解决方案


解决了。Vbox 只是不在 GUI 上。谢谢收看。

这教我如何在 centos7 上安装 GUI https://zero-config.com/centos/gnome-0001.html


推荐阅读