This repository contains a ROS 2 wrapper for OpenFace, which allows to extract the following information from an RGB video, see msgs.
- 2D/3D Facial Landmarks
- Head Pose
- 2D/3D Eye Landmarks
- Gaze
- Left Eye
- Right Eye
- Compound
- Action Units
Please feel free to follow the installation scripts provided in the scripts
folder, namely the ROS 2 Eloquent
installation script (if not already installed) and ROS2 OpenFace
installation script, which encapsulates the rest.
These are the build/run-time requirements for this package.
1) ROS 2 Eloquent with Development Tools
2) OpenFace 2 (tested with 2.2.0)
Together with its dependencies, such as dlib 9 (tested with 9.13) and OpenCV 4 (tested with 4.1.2).
3) cv_bridge (with support for OpenCV 4)
Build with colcon.
First, source the ROS 2 global installation (if not done before).
source /opt/ros/eloquent/setup.bash
Then source the ROS 2 workspace overlay (if not done before).
source /path/to/ros2_openface/install/local_setup.bash
Now it can be run with your favourite camera or video from ros2bag.
ros2 launch openface openface.launch.py
This repository is based on the amazing work of authors that contributed to OpenFace as well as its the underlying frameworks it utilises.
This project is licensed under BSD 3-Clause License.
You have to respect OpenFace, dlib, and OpenCV licenses, together with licenses of the datasets used for OpenFace model training.