Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with run.py #37

Open
bardia-esm opened this issue Jul 12, 2019 · 4 comments
Open

Problem with run.py #37

bardia-esm opened this issue Jul 12, 2019 · 4 comments

Comments

@bardia-esm
Copy link

bardia-esm commented Jul 12, 2019

Hi

I am trying to use run.py with webcam on a cpu-only machine

I downloaded the vgg19 and pretrained models and made checkpoints directory as bellow:

Screenshot from 2019-07-12 17-59-29

and changed the code like this:

Screenshot from 2019-07-12 17-33-34

however when I execute run.py , I get the following error:

2019-07-12 17:56:33,712] [run] [INFO] checkpoint_path: checkpoints/pretrained
WARNING: Logging before flag parsing goes to stderr.
I0712 17:56:33.712154 140183425660736 run.py:37] checkpoint_path: checkpoints/pretrained
W0712 17:56:33.713050 140183425660736 deprecation_wrapper.py:119] From run.py:40: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0712 17:56:33.721329 140183425660736 deprecation_wrapper.py:119] From /home/bardia/Documents/University/Bachelor Project/unofficial-implement-of-openpose/vgg.py:244: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

[2019-07-12 17:56:34,558] [run] [INFO] initializing model...
I0712 17:56:34.558601 140183425660736 run.py:50] initializing model...
W0712 17:56:34.564836 140183425660736 deprecation_wrapper.py:119] From /home/bardia/Documents/University/Bachelor Project/unofficial-implement-of-openpose/cpm.py:141: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

W0712 17:56:34.589925 140183425660736 deprecation_wrapper.py:119] From /home/bardia/Documents/University/Bachelor Project/unofficial-implement-of-openpose/cpm.py:153: The name tf.summary.histogram is deprecated. Please use tf.compat.v1.summary.histogram instead.

W0712 17:56:37.113407 140183425660736 deprecation_wrapper.py:119] From run.py:54: The name tf.image.resize_area is deprecated. Please use tf.compat.v1.image.resize_area instead.

W0712 17:56:37.135530 140183425660736 deprecation.py:323] From run.py:63: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
[2019-07-12 17:56:37,136] [run] [INFO] initialize saver...
I0712 17:56:37.136752 140183425660736 run.py:65] initialize saver...
W0712 17:56:37.136974 140183425660736 deprecation_wrapper.py:119] From run.py:68: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.

W0712 17:56:37.137136 140183425660736 deprecation_wrapper.py:119] From run.py:68: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead.

W0712 17:56:37.138484 140183425660736 deprecation_wrapper.py:119] From run.py:72: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

[2019-07-12 17:56:37,370] [run] [INFO] initialize session...
I0712 17:56:37.370700 140183425660736 run.py:74] initialize session...
2019-07-12 17:56:37.374638: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-07-12 17:56:37.417958: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2494190000 Hz
2019-07-12 17:56:37.418350: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x66919a0 executing computations on platform Host. Devices:
2019-07-12 17:56:37.418400: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2019-07-12 17:56:38.243818: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2019-07-12 17:56:38.360024: W tensorflow/core/framework/allocator.cc:107] Allocation of 67108864 exceeds 10% of system memory.
2019-07-12 17:56:38.561824: W tensorflow/core/framework/allocator.cc:107] Allocation of 411041792 exceeds 10% of system memory.
[2019-07-12 17:56:41,446] [run] [INFO] restoring vgg weights...
I0712 17:56:41.446801 140183425660736 run.py:79] restoring vgg weights...
W0712 17:56:41.479456 140183425660736 deprecation.py:323] From /home/bardia/env_dir/main_venv/lib/python3.6/site-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
[1]    7928 killed     python run.py

should I change any part of the code, since I have a cpu-only machine like line 76 in run.py?
could you help me where I am doing wrong?

@YangZeyu95
Copy link
Owner

Which version of tensorflow you are using? Main is 1.12

@YangZeyu95
Copy link
Owner

And there is a '/' missing at the end of '--checkpoints_path' para in line25

@bardia-esm
Copy link
Author

bardia-esm commented Jul 13, 2019

My tensorflow version is 1.14
As you mentioned I added a '/' to the end of the checkpoint path and now I get the following error

WARNING: Logging before flag parsing goes to stderr.
I0713 22:02:50.059869 140150081058624 run.py:37] checkpoint_path: checkpoints/pretrained/
W0713 22:02:50.060944 140150081058624 deprecation_wrapper.py:119] From run.py:40: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0713 22:02:50.066842 140150081058624 deprecation_wrapper.py:119] From /home/bardia/Documents/University/Bachelor Project/unofficial-implement-of-openpose/vgg.py:244: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

[2019-07-13 22:02:51,052] [run] [INFO] initializing model...
I0713 22:02:51.052708 140150081058624 run.py:50] initializing model...
W0713 22:02:51.061728 140150081058624 deprecation_wrapper.py:119] From /home/bardia/Documents/University/Bachelor Project/unofficial-implement-of-openpose/cpm.py:141: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

W0713 22:02:51.114830 140150081058624 deprecation_wrapper.py:119] From /home/bardia/Documents/University/Bachelor Project/unofficial-implement-of-openpose/cpm.py:153: The name tf.summary.histogram is deprecated. Please use tf.compat.v1.summary.histogram instead.

W0713 22:02:54.495259 140150081058624 deprecation_wrapper.py:119] From run.py:54: The name tf.image.resize_area is deprecated. Please use tf.compat.v1.image.resize_area instead.

W0713 22:02:54.516101 140150081058624 deprecation.py:323] From run.py:63: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
[2019-07-13 22:02:54,516] [run] [INFO] initialize saver...
I0713 22:02:54.516945 140150081058624 run.py:65] initialize saver...
W0713 22:02:54.517126 140150081058624 deprecation_wrapper.py:119] From run.py:68: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.

W0713 22:02:54.517249 140150081058624 deprecation_wrapper.py:119] From run.py:68: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead.

W0713 22:02:54.518206 140150081058624 deprecation_wrapper.py:119] From run.py:72: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

[2019-07-13 22:02:54,865] [run] [INFO] initialize session...
I0713 22:02:54.865621 140150081058624 run.py:74] initialize session...
2019-07-13 22:02:54.866032: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-07-13 22:02:54.892454: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2494300000 Hz
2019-07-13 22:02:54.892873: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x6131360 executing computations on platform Host. Devices:
2019-07-13 22:02:54.892909: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2019-07-13 22:02:55.710225: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2019-07-13 22:02:55.805702: W tensorflow/core/framework/allocator.cc:107] Allocation of 411041792 exceeds 10% of system memory.
[2019-07-13 22:02:56,638] [run] [INFO] restoring vgg weights...
I0713 22:02:56.638266 140150081058624 run.py:79] restoring vgg weights...
W0713 22:02:56.638562 140150081058624 deprecation.py:323] From /home/bardia/env_dir/main_venv/lib/python3.6/site-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
2019-07-13 22:02:56.948333: W tensorflow/core/framework/allocator.cc:107] Allocation of 411041792 exceeds 10% of system memory.
[2019-07-13 22:02:59,409] [run] [INFO] restoring from checkpoint...
I0713 22:02:59.409865 140150081058624 run.py:81] restoring from checkpoint...
2019-07-13 22:02:59.842244: W tensorflow/core/framework/allocator.cc:107] Allocation of 411041792 exceeds 10% of system memory.
[2019-07-13 22:03:01,497] [run] [INFO] initialization done
I0713 22:03:01.497821 140150081058624 run.py:84] initialization done
[tcp @ 0x73d5880] Connection to tcp://192.168.1.52:8081 failed: No route to host
[2019-07-13 22:03:04,768] [run] [ERROR] Can't read video
E0713 22:03:04.768429 140150081058624 run.py:93] Can't read video

@YangZeyu95
Copy link
Owner

That error means can't read the video, check your video path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants