Closed DevJoris closed 4 years ago
could you print faceinfo directly?
Printing faceinfo directly works fine
Ill give u all of my code. Im writing a telegram bot that fetches faces from the chat and sends the user info about them
Sorry for deleting multiple comments leaked token accendatily
You have faceinfo but you cannot access the values in faceinfo right? I cannot open the web site link you shared.
Could you try to run the following code block and send me the printings.
from deepface import DeepFace
faceinfo = DeepFace.analyze("images/happy.jpeg")
print(resp_obj)
print("-------------------------")
for key, value in resp_obj.items():
print(key,": ",value)
It seems that you cannot process json objects. Please import json library as well.
Adding "import json" did not solve the problem. Also the code u send me above did not work. resp_obj is undefined I assume u meant face info with it.
Right. Could you share the print screen when you run the following code block.
from deepface import DeepFace
faceinfo = DeepFace.analyze("images/happy.jpeg")
print(faceinfo)
print("-------------------------")
for key, value in faceinfo.items():
print(key,": ",value)
It seems to stop at the line: faceinfo = DeepFace.analyze("image/happy.jpeg")
EDIT: This is not a new project. This is the project where I've sent u the code for. The pastebin link is in a couple posts above this one
Hmm weird. I get the exact same error when I try to load a model with Keras inside a function.
from keras import load_model
model = load_model(emotions.hdf5)
this will also trow the error
Replace resp_obj to faceinfo please. Then share the print screen again.
I get the exact same error message. Removing try and exept gives something weird. It will just say: Actions to do: ['emotion', 'age', 'gender', 'race']. And then stay on it. No error message nothing. Endless this
what was your tf and keras versions?
could you reinstall them for the following versions
pip install tensorflow==1.9.0 pip install keras==2.2.0
I have stopped using keras. I wanted to use your library now. Also pip install tensorflow==1.9.0 does not work. There is no tensor flow 1.9.0?
Collecting tensorflow==1.9.0 Could not find a version that satisfies the requirement tensorflow==1.9.0 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 1.15.2, 1.15.3, 2.0.0a0, 2.0.0b0, 2.0.0b1, 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2, 2.1.0, 2.1.1, 2.2.0rc0, 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0) No matching distribution found for tensorflow==1.9.0
Interesting. Here, you can check the tf 1.9.0
https://pypi.org/project/tensorflow/1.9.0/
Please try 1.13.1
1.13.1 did work. Im now installing it
Using tensor flow 1.13.1 worked!
I do get some errors
1:
/Users/Joris/PycharmProjects/TestMode/venv/lib/python3.7/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_qint8 = np.dtype([("qint8", np.int8, 1)])
2:
WARNING:tensorflow:From /Users/Joris/PycharmProjects/TestMode/venv/lib/python3.7/site-packages/tensorflow/python/ops/resource_variable_ops.py:435: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating:
But it did successfully get the emotions and everything! :D
these are warnings. you can discard and ignore.
happy to hear that.
Anyway how I can turn them off? I won't bother u anymore after this :D Anyways really really really thankful. Thanks for fast replies :D
Using os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' stops the second error but not the first
Hey there,
I just started with DeepFace and it seemed all to work. But something weirds happen when I put the exact same code (copied from the official page) in a function.
This is the code I try to run:
` try:
The error i'm getting: '_thread._local' object has no attribute 'value'
Could anyone help me out with this?