You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thank you for providing such a nice script to work with gender prediction. I am able to generate the gender_dataset.model file from my own dataset by using train.py. After generating the model,i am using it in pre-dataset folder to check the accurate and running the detect_gender_webcam.py script to predict the gender from video.
While running the script with my own dataset model it is throwing error like as below.
'''Using TensorFlow backend.
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:469: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:470: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:471: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:472: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:473: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:476: 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)])
Traceback (most recent call last):
File "C:\Users\Ashok\computer vision\threshold gender\detect_gender_webcam.py", line 20, in
model = load_model(model_path)
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\models.py", line 270, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\models.py", line 347, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\layers_init.py", line 55, in deserialize
printable_module_name='layer')
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\generic_utils.py", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\models.py", line 1406, in from_config
if 'class_name' not in config[0] or config[0]['class_name'] == 'Merge':
KeyError: 0
'''
Can you please guide me how to resolve this issue.
The text was updated successfully, but these errors were encountered:
Hi,
Thank you for providing such a nice script to work with gender prediction. I am able to generate the gender_dataset.model file from my own dataset by using train.py. After generating the model,i am using it in pre-dataset folder to check the accurate and running the detect_gender_webcam.py script to predict the gender from video.
While running the script with my own dataset model it is throwing error like as below.
'''Using TensorFlow backend.
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:469: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:470: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:471: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:472: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:473: 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)])
C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:476: 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)])
Traceback (most recent call last):
File "C:\Users\Ashok\computer vision\threshold gender\detect_gender_webcam.py", line 20, in
model = load_model(model_path)
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\models.py", line 270, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\models.py", line 347, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\layers_init.py", line 55, in deserialize
printable_module_name='layer')
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\generic_utils.py", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "C:\Users\Ashok\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\models.py", line 1406, in from_config
if 'class_name' not in config[0] or config[0]['class_name'] == 'Merge':
KeyError: 0
'''
Can you please guide me how to resolve this issue.
The text was updated successfully, but these errors were encountered: