serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://www.youtube.com/watch?v=WnUVYQP4h44&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E&index=1
MIT License
11.82k stars 2.02k forks source link

Hello, has anyone effectively used this module on a raspberry pi zero or raspi 3b+ #403

Closed fwuffyboi closed 2 years ago

fwuffyboi commented 2 years ago

Hi, i was wondering if anyone here has used this module on a raspi zero with a speed of about 1 frame every 2 - 5 seconds?

serengil commented 2 years ago

I did. What do you wonder?

SlevinKlvra commented 2 years ago

Hi. I am trying to run DeepFace in a Raspberry Pi 4. I am just doing a simple script giving to the program a simple png image and I am always same result:

Using TensorFlow backend. Directory /home/pi /.deepface created Directory /home/pi /.deepface/weights created Traceback (most recent call last): File "emotion_detection.py", line 8, in analyze = DeepFace.analyze(image,actions=['emotions']) File "/home/pi/.local/lib/python3.7/site-packages/deepface/DeepFace.py", line 450, in analyze resp_obj["region"][parameter] = int(region[i]) #int cast is for the exception - object of type 'float32' is not JSON serializable IndexError: list index out of range

fwuffyboi commented 2 years ago

I did. What do you wonder?

Was it fast? Are the dataset downloads the same size on all platforms? And was it as effective? Sorry for all the questions lol

serengil commented 2 years ago

@SlevinKlvra, i think there is a typo. it should be emotion (singular) instead of emotions (plural)

analyze = DeepFace.analyze(image,actions=['emotion'])

serengil commented 2 years ago

@fwuffyboi it depends on complex models and unfortunately it won't be really real-time. it would be some freezes.