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

gender_dataset.model #22

Open
ashokkumarsam opened this issue Jan 13, 2020 · 1 comment
Open

gender_dataset.model #22

ashokkumarsam opened this issue Jan 13, 2020 · 1 comment

Comments

@ashokkumarsam
Copy link

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.

@shivangbajaj
Copy link

Can you help me with training the dataset? Which dataset did you use

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

No branches or pull requests

2 participants