Git Product home page Git Product logo

Comments (19)

serengil avatar serengil commented on May 22, 2024

could you print faceinfo directly?

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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

https://pastebin.com/r26h3M4V

Sorry for deleting multiple comments leaked token accendatily

from deepface.

serengil avatar serengil commented on May 22, 2024

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)

from deepface.

serengil avatar serengil commented on May 22, 2024

It seems that you cannot process json objects. Please import json library as well.

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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.

from deepface.

serengil avatar serengil commented on May 22, 2024

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)

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

Screenshot 2020-05-30 at 15 31 23

Screenshot 2020-05-30 at 15 31 28

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

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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

from deepface.

serengil avatar serengil commented on May 22, 2024

Replace resp_obj to faceinfo please. Then share the print screen again.

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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

from deepface.

serengil avatar serengil commented on May 22, 2024

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

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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?

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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

from deepface.

serengil avatar serengil commented on May 22, 2024

Interesting. Here, you can check the tf 1.9.0

https://pypi.org/project/tensorflow/1.9.0/

Please try 1.13.1

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

1.13.1 did work. Im now installing it

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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

from deepface.

serengil avatar serengil commented on May 22, 2024

these are warnings. you can discard and ignore.

happy to hear that.

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

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

from deepface.

DevJoris avatar DevJoris commented on May 22, 2024

Using os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' stops the second error but not the first

from deepface.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.