swook / GazeML

Gaze Estimation using Deep Learning, a Tensorflow-based framework.
MIT License
507 stars 141 forks source link

ValueError: could not broadcast input array from shape (216,360,3) into shape (216,280,3) #54

Open kaisark opened 4 years ago

kaisark commented 4 years ago

Step 1: I verified the virtual environment could read video input and write video output with another python application. Step 2: I then ran the demo app (debug mode) with the same video input file that was validated in step 1 (env=tensorflow 1.12/cuda 9.0/Python 3.6.9).

Here is the error:

File "elg_demo.py", line 223, in _visualize_output bgr[v0:v1, u0:u1] = eye_image_raw ValueError: could not broadcast input array from shape (216,360,3) into shape (216,280,3)


(dl4cvpy36-tf.12) ubuntu@ip-172-31-0-76:~/cviz/GazeML/src$ python3 elg_demo.py -v debug --from_video /home/ubuntu/cviz/GazeML/driving-drowsy.mov --record_video /home/ubuntu/cviz/GazeML/video-out/driving-drowsy.avi /home/ubuntu/.virtualenvs/dl4cvpy36-tf.12/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: 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/ubuntu/.virtualenvs/dl4cvpy36-tf.12/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: 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/ubuntu/.virtualenvs/dl4cvpy36-tf.12/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_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/ubuntu/.virtualenvs/dl4cvpy36-tf.12/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: 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/ubuntu/.virtualenvs/dl4cvpy36-tf.12/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: 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/ubuntu/.virtualenvs/dl4cvpy36-tf.12/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: 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)]) 2019-12-16 02:24:43.940549: 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-12-16 02:24:47.134274: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2019-12-16 02:24:47.134705: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties: name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235 pciBusID: 0000:00:1e.0 totalMemory: 11.17GiB freeMemory: 11.10GiB 2019-12-16 02:24:47.134735: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0 2019-12-16 02:24:49.512019: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-12-16 02:24:49.512094: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 2019-12-16 02:24:49.512109: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N 2019-12-16 02:24:49.512409: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10758 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:1e.0, compute capability: 3.7) 16/12 02:24 INFO Initialized data source: "Video" 16/12 02:24 DEBUG I do not know how to create a summary for videostream/frame_index ([2]) 16/12 02:24 DEBUG I do not know how to create a summary for videostream/eye_index ([2]) 16/12 02:25 INFO Built model. Parsing Inputs... 16/12 02:25 INFO ------------------------------ 16/12 02:25 INFO Approximate Model Statistics 16/12 02:25 INFO ------------------------------ 16/12 02:25 INFO FLOPS per input: 1,006,288,359.0 16/12 02:25 INFO Trainable Parameters: 712,527 16/12 02:25 INFO ------------------------------ INFO:tensorflow:Restoring parameters from /home/ubuntu/cviz/GazeML/outputs/ELG_i180x108_f60x36_n64_m3/checkpoints/hourglass/model-4203370 16/12 02:25 INFO Restoring parameters from /home/ubuntu/cviz/GazeML/outputs/ELG_i180x108_f60x36_n64_m3/checkpoints/hourglass/model-4203370 INFO:tensorflow:Restoring parameters from /home/ubuntu/cviz/GazeML/outputs/ELG_i180x108_f60x36_n64_m3/checkpoints/radius/model-4203370 16/12 02:25 INFO Restoring parameters from /home/ubuntu/cviz/GazeML/outputs/ELG_i180x108_f60x36_n64_m3/checkpoints/radius/model-4203370 Exception in thread visualization: Traceback (most recent call last): File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/local/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "elg_demo.py", line 223, in _visualize_output bgr[v0:v1, u0:u1] = eye_image_raw ValueError: could not broadcast input array from shape (216,360,3) into shape (216,280,3)

2019-12-16 02:25:19.946175: W tensorflow/core/kernels/queue_base.cc:277] _0_Video/fifo_queue: Skipping cancelled enqueue attempt with queue not closed