facialAnalysisDetection2D
module use deepFace
python
API. The module analyze faces using pre-trained models and adds facial analysis doing prediction about some features like gender, age, race and emotions. Also use YARP
to send video source pre and post-procesed. Also admits YARP
source video like input. This module also publish detection results in YARP
port.
Documentation available on docs
facialAnalysisDetection2D
requires images source to detect. First run program will download pre-trained models about features to detect:
- Execute programs/facialAnalysisDetection2D.py, to start the program.
python3 facialAnalysisDetection2D.py
- Connect video source to
facialAnalysisDetection2D
.
yarp connect /videoSource /facialAnalysisDetection2D/img:i
NOTE:
- Video results are published on
/facialAnalysisDetection2D/img:o
- Data results are published on
/facialAnalysisDetection2D/data:o
facialRecognitionDetection2D
requires:
- Install OpenCV 3.0.0+
- Install YARP 2.3.XX+
- Install pip
- Install deepFace:
pip3 install deepface
NOTE:
This module use Tensorflow
backend.
Possible errors:
deepFace
requires Python 3.5.5
but Ubuntu 16.04
use Python 3.5.2
by default. You can add Python 3.6
with PPA repository like:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
To install pip
in Python 3.6
:
curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6
You can install the package with:
python3.6 -m pip install deepface
If pip
change the link to Python 3.6
by default, you can revert to link pip
to Python 3.5
with:
python3 -m pip install --upgrade --force pip
Tested on: ubuntu 14.04
, ubuntu 16.04
, ubuntu 18.04
, lubuntu 18.04
and raspbian
.