GEEIA-TFG-DFU is a tool that works with .bag
files generated by Intel® RealSense™ D400 Series cameras to anonymize faces and filter unwanted frame intervals. It loads configurations from a YAML file and uses metadata stored in an Excel spreadsheet to identify and exclude the unwanted intervals in the recordings. The tool applies the RetinaFace facial detection model to detect the faces and OpenCV to blur them, ensuring the privacy of individuals. Finally, it generates new .bag
files containing only the useful and anonymized frames while preserving the metadata for compatibility with the RealSense™ SDK.
The first step is to create a Python environment using Anaconda Navigator. You can do this by using the environment.yml
file located in the /dependencies
folder of this repository. This will set up the necessary environment with the required dependencies.
The package bagpy
available on PyPi does not contain the latest version of rosbag
nor cv_bridge
. Therefore, it is necessary to install these packages directly from the authors' repositories.
I've set up git submodules that point to the relevant repositories:
ros_comm
forrosbag
: ros_comm (Noetic-devel branch)vision_opencv
forcv_bridge
: vision_opencv (Noetic branch)
These packages are specifically for the Noetic Ninjemys distribution of ROS 1 (Learn more about ROS Noetic).
To use cv_bridge
, it is also necessary to integrate it with the cv_bridge_boost
package. This package is available in the simple repository. I have set up a submodule to integrate this package into the installation process.
To install the latest versions of rosbag
and cv_bridge
, as well as the necessary dependencies, run the following commands from the root of the project:
cd dependencies/packages/cv_bridge
pip install .
cd ../../repositories/ros_comm/tools/rosbag
pip install .
These commands will ensure that you have the most updated versions of these packages and their dependencies properly installed.
Once the installation is complete, you will be ready to run the tool.