shadow9909 / HandGestureRecognition

0 stars 1 forks source link

Error #1

Open ItxMuneeb opened 4 years ago

ItxMuneeb commented 4 years ago

(Bro i am getting this error after entering any number. please suggest me what should i do?)

What would you like to do ? 1- Use pretrained model for gesture recognition & layer visualization 2- Train the model (you will require image samples for training under .\imgfolder) 3- Visualize feature maps of different layers of trained model 4- Exit 1 Will load default weight file Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py", line 1551, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Negative dimension size caused by subtracting 3 from 1 for 'conv2d_1/convolution' (op: 'Conv2D') with input shapes: [?,1,200,200], [3,3,200,50].

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "trackgesture.py", line 381, in Main() File "trackgesture.py", line 212, in Main mod = myNN.loadCNN(0) File "/home/pi/GestureNew/HandGestureRecognition3/gestureCNN.py", line 216, in loadCNN input_shape=(img_channels, img_rows, img_cols))) File "/usr/local/lib/python3.7/dist-packages/keras/engine/sequential.py", line 166, in add layer(x) File "/usr/local/lib/python3.7/dist-packages/keras/engine/base_layer.py", line 489, in call output = self.call(inputs, kwargs) File "/usr/local/lib/python3.7/dist-packages/keras/layers/convolutional.py", line 171, in call dilation_rate=self.dilation_rate) File "/usr/local/lib/python3.7/dist-packages/keras/backend/tensorflow_backend.py", line 3717, in conv2d kwargs) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/ops/nn_ops.py", line 898, in convolution name=name) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/ops/nn_ops.py", line 976, in convolution_internal name=name) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/ops/gen_nn_ops.py", line 1071, in conv2d data_format=data_format, dilations=dilations, name=name) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/op_def_library.py", line 793, in _apply_op_helper op_def=op_def) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py", line 3299, in create_op op_def=op_def) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py", line 1714, in init control_input_ops) File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/framework/ops.py", line 1554, in _create_c_op raise ValueError(str(e)) ValueError: Negative dimension size caused by subtracting 3 from 1 for 'conv2d_1/convolution' (op: 'Conv2D') with input shapes: [?,1,200,200], [3,3,200,50].

shadow9909 commented 4 years ago

I have not added the trained model file, you have to train the model once on your own and then you can use this option.

jalotra commented 3 years ago

Where did you got the DataMerged from ? And where are the ground truths for training? If possible provide the model weights that you have trained.