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

cache_on_fail error #134

Open
DannyYCCheng opened this issue Jun 17, 2019 · 34 comments
Open

cache_on_fail error #134

DannyYCCheng opened this issue Jun 17, 2019 · 34 comments

Comments

@DannyYCCheng
Copy link

DannyYCCheng commented Jun 17, 2019

  1. Your operating system: Ubuntu 18.04
  2. Your tensorflow version: 1.13.1
  3. Your python version: 3.6.7
  4. The stack trace of the error that you see

I am using @ArashHosseini 's version (using it with tf-pose-estimation), and I get a cache_on_fail error:

data/h36m/S11/MyPoses/3D_positions/WalkTogether.h5
/3d-pose-baseline/src/data_utils.py:462: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
  complete_train = copy.deepcopy( np.vstack( train_set.values() ))
2019-06-18 00:26:56.096188: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-06-18 00:26:58.450485: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x2d45eb0 executing computations on platform CUDA. Devices:
2019-06-18 00:26:58.450595: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): Tesla K40m, Compute Capability 3.5
2019-06-18 00:26:58.454522: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2200025000 Hz
2019-06-18 00:26:58.461810: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x2dfb080 executing computations on platform Host. Devices:
2019-06-18 00:26:58.461875: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
2019-06-18 00:26:58.462975: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties: 
name: Tesla K40m major: 3 minor: 5 memoryClockRate(GHz): 0.745
pciBusID: 0000:02:00.0
totalMemory: 11.17GiB freeMemory: 11.10GiB
2019-06-18 00:26:58.463045: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-06-18 00:26:58.464870: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-06-18 00:26:58.464909: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990]      0 
2019-06-18 00:26:58.464931: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0:   N 
2019-06-18 00:26:58.465852: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10798 MB memory) -> physical GPU (device: 0, name: Tesla K40m, pci bus id: 0000:02:00.0, compute capability: 3.5)
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:112: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.batch_normalization instead.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:112: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.batch_normalization instead.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:114: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:114: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
train_dir experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17
Loading model experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17/checkpoint-4874200
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1266: 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.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1266: 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.
INFO:tensorflow:Restoring parameters from experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17/checkpoint-4874200
INFO:tensorflow:Restoring parameters from experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17/checkpoint-4874200
INFO:__main__:calc frame 0/187
2019-06-18 00:27:01.293396: I tensorflow/stream_executor/dso_loader.cc:152] successfully opened CUDA library libcublas.so.10.0 locally
Traceback (most recent call last):
  File "src/tf-pose-estimation_3dpose_sandbox.py", line 444, in <module>
    tf.app.run()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "src/tf-pose-estimation_3dpose_sandbox.py", line 388, in main
    if FLAGS.cache_on_fail:
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/flags.py", line 85, in __getattr__
    return wrapped.__getattr__(name)
  File "/usr/local/lib/python3.6/dist-packages/absl/flags/_flagvalues.py", line 473, in __getattr__
    raise AttributeError(name)
AttributeError: cache_on_fail

The code are downloaded directly from ArashHosseini's github, the only change I have made is in line 56 of openpose_3dpose_sandbox.py:
_data = data["people"][0]["pose_keypoints"]
to
_data = data["people"][0]["pose_keypoints_2d"]

Based on the output of both OpenPose and tf-pose-estimation.

I can include the original images/json outputs/rendered outputs from OpenPose if required.

Command used:
python3 src/tf-pose-estimation_3dpose_sandbox.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 200 --load 4874200 --pose_estimation_json /data/3d-pose-baseline/MM_json/ --write_gif --gif_fps 30

@Montage-LSM
Copy link

请问你这个问题解决了么。是怎么解决的

@adampelah
Copy link

I am having this issue too, commenting for updates.

@ArashHosseini
Copy link

ArashHosseini commented Jul 4, 2019

hi @adampelah, @DannyYCCheng, the flag was missing, commit

@adampelah
Copy link

Hi Arash, thanks for the speedy response.

I am getting this error now, any suggestions?

File "src/openpose_3dpose_sandbox.py", line 393, in main
to_export = poses3d.tolist()[0]
AttributeError: 'NoneType' object has no attribute 'tolist'

@ArashHosseini
Copy link

@adampelah, it probably comes from the fact that no skeleton was recognized in the frame, "poses3d" is None. can you send me your frames.json's please?

@adampelah
Copy link

adampelah commented Jul 4, 2019

Yes, here is one of my keypoint files, I'm using tf-pose-estimation webcam data:

000000000008_keypoints.txt

@ArashHosseini
Copy link

ArashHosseini commented Jul 4, 2019

can you send me also the corrupt frame, it must be on the beginning. or send me all as zip. thx

@adampelah

This comment has been minimized.

@ArashHosseini
Copy link

46 kb...., check the zip please, is corrupt. thx

@adampelah
Copy link

I have zipped it again:

tmp (2).zip

@ArashHosseini
Copy link

@adampelah where are the jsons coming from? thc

@adampelah
Copy link

jsons are coming from running: python run_webcam.py --model=mobilenet_thin --resize=432x368 --camera=0 --output_json tmp/
and then moving around in the webcam for a while

@ArashHosseini
Copy link

@adampelah ,
normally you do a so-called "t-pose" at the beginning of a mocap seq, it has the side effect that all opticals and thus joints are recognized. Since your feet are already missing in the first frame, this causes a concatenation for the following frames... the scores are very low from the beginning. pull please and let it me know if its working for you...
command, don't cache:
python3.5 src/openpose_3dpose_sandbox.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 200 --load 4874200 --pose_estimation_json '/tmp' --cache_on_fail False
pose_frame_000000000070
thanks

@adampelah
Copy link

Awesome, thank you, but now my 3d_data.json is empty in my maya folder, whereas there is a 2d_data.json that is not.

3d_data - Copy.txt
2d_data - Copy.txt

@ArashHosseini
Copy link

@adampelah , remove line 393 and move the if body back like:

            #if not poses3d is None:
            to_export = poses3d.tolist()[0]
            x,y,z = [[] for _ in range(3)]
            for o in range(0, len(to_export), 3):
                x.append(to_export[o])
                y.append(to_export[o+1])
                z.append(to_export[o+2])
            export_units[frame]={}
            for jnt_index, (_x, _y, _z) in enumerate(zip(x,y,z)):
                export_units[frame][jnt_index] = {"translate": [_x, _y, _z]}


                viz.show3Dpose(p3d, ax, lcolor="#9b59b6", rcolor="#2ecc71")

2d_3d.zip

@adampelah
Copy link

Hi, getting this error again:

heckpoint-4874200
I0704 22:02:46.833290 7980 openpose_3dpose_sandbox.py:317] calc frame 0/248
Traceback (most recent call last):
File "src/openpose_3dpose_sandbox.py", line 448, in
tf.app.run()
File "C:\Users\adamp\Anaconda3\envs\tfopenpose\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\adamp\Anaconda3\envs\tfopenpose\lib\site-packages\absl\app.py", line 300, in run
_run_main(main, args)
File "C:\Users\adamp\Anaconda3\envs\tfopenpose\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File "src/openpose_3dpose_sandbox.py", line 394, in main
to_export = poses3d.tolist()[0]
AttributeError: 'NoneType' object has no attribute 'tolist'

@ArashHosseini
Copy link

@adampelah , try it with

            p3d = poses3d
            logger.info("frame score {0}".format(np.min(poses3d)))
            x,y,z = [[] for _ in range(3)]
            if not poses3d is None:
                to_export = poses3d.tolist()[0]
            else:
                to_export = [0.0 for _ in range(96)]
            logger.info("export {0}".format(to_export))
            for o in range(0, len(to_export), 3):
                x.append(to_export[o])
                y.append(to_export[o+1])
                z.append(to_export[o+2])

            export_units[frame]={}
            for jnt_index, (_x, _y, _z) in enumerate(zip(x,y,z)):
                export_units[frame][jnt_index] = {"translate": [_x, _y, _z]}
                viz.show3Dpose(p3d, ax, lcolor="#9b59b6", rcolor="#2ecc71")

let it me know how its end please. thx

@adampelah
Copy link

adampelah commented Jul 4, 2019

This is how that ends:

Traceback (most recent call last):
File "src/openpose_3dpose_sandbox.py", line 448, in
tf.app.run()
File "C:\Users\adamp\Anaconda3\envs\tfopenpose\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\adamp\Anaconda3\envs\tfopenpose\lib\site-packages\absl\app.py", line 300, in run
_run_main(main, args)
File "C:\Users\adamp\Anaconda3\envs\tfopenpose\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File "src/openpose_3dpose_sandbox.py", line 408, in main
viz.show3Dpose(p3d, ax, lcolor="#9b59b6", rcolor="#2ecc71")
File "C:\Users\adamp\Desktop\3dtfpose\3d-pose-baseline\src\viz.py", line 25, in show3Dpose
assert channels.size == len(data_utils.H36M_NAMES)*3, "channels should have 96 entries, it has %d instead" % channels.size
AttributeError: 'NoneType' object has no attribute 'size'

So at least it's getting past tolist now

@ArashHosseini
Copy link

Pose3d is none for this frame, p3d also. Please upload the images and jsons please, we can not do much about it, we need better skeleton in frame

@adampelah
Copy link

adampelah commented Jul 4, 2019

How is this for a dataset? Was in T-pose for a couple of seconds

tmp2.zip

update: For the above set, I removed the nulls and I have output in 3d_maya,

side note, if i dont remove "ax.set_aspect('equal')" from viz.py (line 55), I get this error:

'It is not currently possible to manually set the aspect '
NotImplementedError: It is not currently possible to manually set the aspect on 3D axes

I assume this is just a visualization error.

Below is the updated keypoints anfd resulting 3d coordinates file:
tmp2.zip

3d_data.zip

How could I split the arrays in the 3d_data to joint centers such as leftankle: X, Y, Z, righthip: X, Y, Z etc. ?

@Montage-LSM
Copy link

Montage-LSM commented Jul 5, 2019

data.zip
Hi, when i run
python35.exe src/openpose_3dpose_sandbox.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 200 --pose_estimation_json "D:\\Download\\out_data\\test" --verbose 3 --interpolation

pose_estimation_json is data.zip file

tip as follows :
image

that happen in 9_keypoints.json some where .

when i delete 1~9 keypoints.json file

D:\\Download\\out_data\\test just only have 10~20 keypoints.json file

image

output_2d_and_3d_json.zip

the generate 109 object . why not 10?

image

thank you.
@ArashHosseini

@ArashHosseini
Copy link

@Montage-LSM i think frame 0 is missing, try to rename your json files with 0 like str(0).zfill(12).json or where are json's coming from? Naming convention looks like: 000000000000_keypoints.json, 000000000001_keypoints.json, ...
109 object's are coming from the usage of the --interpolation flag, see in folder gif_output for png graphs, remove it to keep all
thx

@ArashHosseini
Copy link

ArashHosseini commented Jul 5, 2019

hi @adampelah ,i am running tmp2.zip with

            p3d = poses3d
            logger.info("frame score {0}".format(np.min(poses3d)))
            x,y,z = [[] for _ in range(3)]
            if not poses3d is None:
                to_export = poses3d.tolist()[0]
            else:
                to_export = [0.0 for _ in range(96)]
            logger.info("export {0}".format(to_export))
            for o in range(0, len(to_export), 3):
                x.append(to_export[o])
                y.append(to_export[o+1])
                z.append(to_export[o+2])

            export_units[frame]={}
            for jnt_index, (_x, _y, _z) in enumerate(zip(x,y,z)):
                export_units[frame][jnt_index] = {"translate": [_x, _y, _z]}
                viz.show3Dpose(p3d, ax, lcolor="#9b59b6", rcolor="#2ecc71")

and
python3.5 src/openpose_3dpose_sandbox.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 200 --load 4874200 --pose_estimation_json '/tmp2'
its running through
pose_frame_000000000022

How could I split the arrays in the 3d_data to joint centers such as leftankle: X, Y, Z, righthip: X, Y, Z etc. ?

can you explain this one little more please, because its already like this. See https://github.com/ArashHosseini/3d-pose-baseline/blob/c50136745e744321db7700f066ddcd454e55d3b2/maya/maya_skeleton.py#L122 joint leftankle is nr. 8 and righthip is nr. 1, so in the 3d_json data[frame_id][8]["translate"] is the leftankle center pos. You do not really need to make a t-pose, it is important that all body parts are recognized at the beginning of the recording, that was my point.
thx

@Montage-LSM
Copy link

Montage-LSM commented Jul 5, 2019

hi ,i can't run
python .\maya\maya_skeleton.py

because, maya module not true install.
no matter python2.7 、 python3.5 、 python3.6
code:
import maya.cmds as cmds
import maya.OpenMaya as om

will ↓↓↓
No module named cmds
No module named OpenMaya

Can you write it in another module?
or

How could I split the arrays in the 3d_data to joint centers such as leftankle: X, Y, Z, righthip: X, Y, Z etc. ?
question.
More detailed description. like

CMD-openpose-output.md#keypoint-ordering

thk
@ArashHosseini

@adampelah
Copy link

adampelah commented Jul 11, 2019

Hi Arash, thanks for the help.

How does 3d-pose-baseline deal with two or more people in view? Also, am I correct in assuming that if no data is detected for any frame that the program will not run through, as indicated by the following error:

File "src/openpose_3dpose_sandbox.py", line 56, in read_openpose_json
_data = data["people"][0]["pose_keypoints_2d"] if "pose_keypoints_2d" in data["people"][0] else data["people"][0]["pose_keypoints"]
IndexError: list index out of range

@ArashHosseini

@Sunloggy
Copy link

hi ,i can't run
python .\maya\maya_skeleton.py

because, maya module not true install.
no matter python2.7 、 python3.5 、 python3.6
code:
import maya.cmds as cmds
import maya.OpenMaya as om

will ↓↓↓
No module named cmds
No module named OpenMaya

I can't run too, even in maya, have you solved it yet?

@Montage-LSM
Copy link

嗨,我不能跑
python .\maya\maya_skeleton.py
因为,maya模块没有真正安装。
无论是python2.7,python3.5,python3.6
代码:
import maya.cmds as cmds
import maya.OpenMaya as om
将↓↓↓
No module named cmds
No module named OpenMaya

我不能跑,即使在玛雅,你解决了吗?

I've given up Maya ,use other way to Solve ,2D to 3D .
my QQ: 564303494 you can Add to me. chines.

@ArashHosseini
Copy link

@Montage-LSM, @Sunlolo hi, the 3D information is already included in 3d_json file. Maya is a dcc application, the maya_skeleton.py file is Reading the information from the json and will build the skeleton incl. animation inside maya. So the 3D information already exists, how to visualize them need your own implementation. In this example I used maya but you can use any application which supports 3D space

@Sunloggy
Copy link

I had 3d_data. json file with the information of animation inside. But the code maya_skeleton.py not work. No error, no result. Look like I have to watch an ice cream melt down but i cant eat:((( huhu. Pls help me.
The maya_skeleton.py say :
#for 3d use 3d_data.json and set three_dim to True
input_json_path = [os.path.join(threed_pose_baseline, "maya/{0}.json".format(_data)) for _data in ["3d_data", "2d_data"]] # replace it with abs path like "/path/to/2d_data.json"
"set three_dim to True" like threed=True or something:(( could you show me an example code for this line, thanks.

@Sunloggy
Copy link

Ohh, I've just used other solution, it works but I have to polish more on other DDC! Thanks all!

@AndroidUnityGit
Copy link

@ArashHosseini
Why 3d_data.json has 32 joints data per frame? What do you mean by 0-32?

{"0": {"0": {"translate": [-526.1015, 0.0, 607.4599038791717]}, "1": {"translate": [-606.7712571744592, 29.97365833193502, 638.2196033433054]}, "2": {"translate": [-683.1806852983734, 171.87800074669218, 279.8027711993891]}, "3": {"translate": [-714.030891594344, 390.4970673693886, -77.76505558036922]}, "4": {"translate": [-537.657563267619, 166.4772871982283, -134.68982145646862]}, "5": {"translate": [-537.946210199349, 165.18243684504364, -129.30315982730815]}, "6": {"translate": [-445.43285665586234, -29.973443387552578, 576.7004995146641]}, "7": {"translate": [-499.75722631374884, 121.42663686711519, 238.5431372224732]}, "8": {"translate": [-550.1535947989404, 363.988289668462, -107.27378900129531]}, "9": {"translate": [-537.365739970135, 166.6659767910167, -141.17695967542193]}, "10": {"translate": [-537.5105839502969, 163.7138100370406, -128.9751602875624]}, "11": {"translate": [-526.1002833915534, -0.01930005762655072, 607.5459149420274]}, "12": {"translate": [-499.87202187496564, -26.61874063376613, 835.055043621851]}, "13": {"translate": [-475.8117986787387, -112.42617185678813, 1035.7197975766026]}, "14": {"translate": [-439.8537566033963, -199.451716900107, 1063.0729705381896]}, "15": {"translate": [-452.44471060108236, -231.50227397453443, 1148.6178635545934]}, "16": {"translate": [-520.4261219592483, -97.69740161233229, 1042.5488095847027]}, "17": {"translate": [-408.63967136553026, -111.85311367097354, 986.3771425322485]}, "18": {"translate": [-365.9497424565642, -67.73806016069622, 790.9269943829225]}, "19": {"translate": [-363.08233813103004, -120.60851276251215, 794.7117299453738]}, "20": {"translate": [-524.8356417832787, -28.252604914874993, 727.6304829044149]}, "21": {"translate": [-524.5224930199741, -35.20805483993427, 759.2401527447777]}, "22": {"translate": [-525.2169560070349, -25.630718856450596, 715.2552596886231]}, "23": {"translate": [-525.2169560070349, -25.630718856450596, 715.2552596886231]}, "24": {"translate": [-520.4261219592483, -97.69740161233229, 1042.5488095847027]}, "25": {"translate": [-549.8917365859593, -69.97311237138264, 1014.4026267751934]}, "26": {"translate": [-662.948456634721, -33.19492204049863, 808.0838707092807]}, "27": {"translate": [-575.7107548961184, -112.22372509620712, 837.017167057752]}, "28": {"translate": [-525.2309309858509, -37.39024980077856, 776.1244729034435]}, "29": {"translate": [-524.7016748750068, -44.720787499855874, 808.3441561693281]}, "30": {"translate": [-525.5769088854704, -36.83428638678265, 773.3276775468152]}, "31": {"translate": [-525.5769088854704, -36.83428638678265, 773.3276775468152]}},

@DA-fromindia
Copy link

DA-fromindia commented Jul 17, 2020

Hi Arash, thanks for the help.

How does 3d-pose-baseline deal with two or more people in view? Also, am I correct in assuming that if no data is detected for any frame that the program will not run through, as indicated by the following error:

File "src/openpose_3dpose_sandbox.py", line 56, in read_openpose_json
_data = data["people"][0]["pose_keypoints_2d"] if "pose_keypoints_2d" in data["people"][0] else data["people"][0]["pose_keypoints"]
IndexError: list index out of range

@ArashHosseini

hey!! do you find any solution for this?
i have one video from Youtube, first i generate Json with OpenPose and then pass it here , IT WORKS
but, when i use webcam video to create a Json, and pass it here , it throws this error

I am facing the same problem
@adampelah

@WindBlowMyAss
Copy link

  1. Your operating system: Ubuntu 18.04
  2. Your tensorflow version: 1.13.1
  3. Your python version: 3.6.7
  4. The stack trace of the error that you see

I am using @ArashHosseini 's version (using it with tf-pose-estimation), and I get a cache_on_fail error:

data/h36m/S11/MyPoses/3D_positions/WalkTogether.h5
/3d-pose-baseline/src/data_utils.py:462: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
  complete_train = copy.deepcopy( np.vstack( train_set.values() ))
2019-06-18 00:26:56.096188: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-06-18 00:26:58.450485: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x2d45eb0 executing computations on platform CUDA. Devices:
2019-06-18 00:26:58.450595: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): Tesla K40m, Compute Capability 3.5
2019-06-18 00:26:58.454522: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2200025000 Hz
2019-06-18 00:26:58.461810: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x2dfb080 executing computations on platform Host. Devices:
2019-06-18 00:26:58.461875: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
2019-06-18 00:26:58.462975: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties: 
name: Tesla K40m major: 3 minor: 5 memoryClockRate(GHz): 0.745
pciBusID: 0000:02:00.0
totalMemory: 11.17GiB freeMemory: 11.10GiB
2019-06-18 00:26:58.463045: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-06-18 00:26:58.464870: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-06-18 00:26:58.464909: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990]      0 
2019-06-18 00:26:58.464931: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0:   N 
2019-06-18 00:26:58.465852: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10798 MB memory) -> physical GPU (device: 0, name: Tesla K40m, pci bus id: 0000:02:00.0, compute capability: 3.5)
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:112: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.batch_normalization instead.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:112: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.batch_normalization instead.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:114: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
WARNING:tensorflow:From /3d-pose-baseline/src/linear_model.py:114: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
train_dir experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17
Loading model experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17/checkpoint-4874200
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1266: 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.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py:1266: 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.
INFO:tensorflow:Restoring parameters from experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17/checkpoint-4874200
INFO:tensorflow:Restoring parameters from experiments/All/dropout_0.5/epochs_200/lr_0.001/residual/depth_2/linear_size1024/batch_size_64/no_procrustes/maxnorm/batch_normalization/use_stacked_hourglass/predict_17/checkpoint-4874200
INFO:__main__:calc frame 0/187
2019-06-18 00:27:01.293396: I tensorflow/stream_executor/dso_loader.cc:152] successfully opened CUDA library libcublas.so.10.0 locally
Traceback (most recent call last):
  File "src/tf-pose-estimation_3dpose_sandbox.py", line 444, in <module>
    tf.app.run()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "src/tf-pose-estimation_3dpose_sandbox.py", line 388, in main
    if FLAGS.cache_on_fail:
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/flags.py", line 85, in __getattr__
    return wrapped.__getattr__(name)
  File "/usr/local/lib/python3.6/dist-packages/absl/flags/_flagvalues.py", line 473, in __getattr__
    raise AttributeError(name)
AttributeError: cache_on_fail

The code are downloaded directly from ArashHosseini's github, the only change I have made is in line 56 of openpose_3dpose_sandbox.py: _data = data["people"][0]["pose_keypoints"] to _data = data["people"][0]["pose_keypoints_2d"]

Based on the output of both OpenPose and tf-pose-estimation.

I can include the original images/json outputs/rendered outputs from OpenPose if required.

Command used: python3 src/tf-pose-estimation_3dpose_sandbox.py --camera_frame --residual --batch_norm --dropout 0.5 --max_norm --evaluateActionWise --use_sh --epochs 200 --load 4874200 --pose_estimation_json /data/3d-pose-baseline/MM_json/ --write_gif --gif_fps 30

Hey bro,may I ask your h36m dataset's structure?I think I lost some data,such as actions(.h5 file)

@zhaolengxiang
Copy link

AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'
how to solve

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

No branches or pull requests

10 participants