PPE estimator aggregation example#
What it does#
Aggregation example loads video frames and starts to track multiple persons on it, estimating their body position and ppe attributes. After all tracking information for each person has been collected example aggregates these results and prints them out to the console.
Prerequisites#
This example assumes that you have read the FaceEngine Handbook already (or at least have it somewhere nearby for reference) and are familiar with some core concepts, like memory management, object ownership and life-time control. This sample will not explain these aspects in detail.
Example walkthrough#
To get familiar with FSDK usage and common practices, please go through example_extraction first.
How to run#
Run the command from ”FSDK_ROOT”.
<install_prefix>/ppe_aggregation [data_path]
Note: image_list_path is a text file that contains absolute paths to each video frame to process. For example, if you have frames that have prefix img_*, to make a text file from it you could run the following command:
find "$PWD" | sort | grep img_ > list.txt
Sample video frames for this example located in the following path
$/examples/images/ppe_frames
Building for linux#
Building command (from FSDK_ROOT/examples/build):
$ cmake -DFSDK_ROOT=<absolute_path_to_fsdk_root_dir>
-DTSDK_ROOT=<absolute_path_to_tsdk_root_dir>
-DWITH_PPE_EXAMPLE=ON
-DCMAKE_INSTALL_PREFIX=<absolute_path_to_installation_dir_of_your_choise>
-DCMAKE_MODULE_PATH=<absolute_path_to_fsdk_root_dir>/examples/cmake ../example_ppe_aggregation
$ cmake --build . --config Release --target install
Building for windows#
Building command (from FSDK_ROOT/examples/build):
$ cmake -G "Visual Studio 14 2015 Win64"
-DFSDK_ROOT=<absolute_path_to_fsdk_root_dir>
-DTSDK_ROOT=<absolute_path_to_tsdk_root_dir>
-DWITH_PPE_EXAMPLE=ON
-DCMAKE_INSTALL_PREFIX=<absolute_path_to_installation_dir_of_your_choise>
-DCMAKE_MODULE_PATH=<absolute_path_to_fsdk_root_dir>/examples/cmake ../example_ppe_aggregation
$ cmake --build . --config Release --target install
Visalising output#
Example visualisation is turned off by default to simplify demo's build step. If you want to visualise demo output you should also pass the following additional flags to cmake:
-DPPE_VISUALISE_DATA=ON -DOpenCV_DIR=<absolute_flag_to_opencv>
With visualisation turned on example saves frames processed by Track Engine in the current directory and plots bounding boxes, human keypoints and track Ids on top of it.
Note: since human keypoints redetection is not supported yet, demo temporarily turns off redetection feature in the track engine.