Deep3DFaceReconstruction
Deep3DFaceReconstruction copied to clipboard
Cannot run demo.py after configuring the environment
(deep3d) user02@lthpc:~/liweijie/Deep3DFaceReconstruction-master$ python demo.py /home/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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/user02/.conda/envs/deep3d/lib/python3.6/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)]) WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/options.py:30: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/options.py:52: The name tf.train.piecewise_constant is deprecated. Please use tf.compat.v1.train.piecewise_constant instead.
WARNING:tensorflow:From demo.py:68: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
Using pre-trained .pb file. WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/utils.py:133: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.
WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/utils.py:134: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.
WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/face_decoder.py:119: The name tf.cross is deprecated. Please use tf.linalg.cross instead.
WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/face_decoder.py:121: calling l2_normalize (from tensorflow.python.ops.nn_impl) with dim is deprecated and will be removed in a future version. Instructions for updating: dim is deprecated, use axis instead WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/renderer/camera_utils.py:85: calling norm (from tensorflow.python.ops.linalg_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/renderer/rasterize_triangles.py:141: The name tf.reciprocal is deprecated. Please use tf.math.reciprocal instead.
WARNING:tensorflow:From /home/user02/liweijie/Deep3DFaceReconstruction-master/renderer/mesh_renderer.py:164: add_dispatch_support.rcond
parameter will change to the default of machine precision times max(M, N)
where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass rcond=None
, to keep using the old, explicitly pass rcond=-1
.
k,,,_ = np.linalg.lstsq(A,b)
/home/user02/liweijie/Deep3DFaceReconstruction-master/preprocess_img.py:74: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
trans_params = np.array([w0,h0,102.0/s,t[0],t[1]])
2021-03-09 16:49:53.667612: 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.
Traceback (most recent call last):
File "/home/user02/.conda/envs/deep3d/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call
return fn(*args)
File "/home/user02/.conda/envs/deep3d/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1341, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/user02/.conda/envs/deep3d/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: RasterizeTriangles expects vertices to have shape (-1, 4).
[[{{node RasterizeTriangles}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "demo.py", line 124, in
Errors may have originated from an input operation. Input Source operations connected to node RasterizeTriangles: Cast_6 (defined at /home/user02/liweijie/Deep3DFaceReconstruction-master/face_decoder.py:299) strided_slice_57 (defined at /home/user02/liweijie/Deep3DFaceReconstruction-master/renderer/rasterize_triangles.py:117)
Original stack trace for 'RasterizeTriangles':
File "demo.py", line 124, in
Seems that you use the wrong version of tf_mesh_renderer. In our experiment, we use an older version of it. Maybe you can check the instruction in the readme to see if you use the correct version.
I am getting a similar error is Node Matmul. Any idea with that?
I am getting a similar error is Node Matmul. Any idea with that?
hi,have you solved the problem? I encountered the same and have no ideas