AI Watch A1 uses one Intel RealSense D435 camera and OpenPose in order to achieve multi-person 3D skeleton detection. Once this task is completed, AI Watch A1 provides support to send each detected skeleton and its joint points' 3D coordinates (room and D435's details have to be specified) via Kafka, in order to let further detached computation possible.
- AI Watch A1 documentation was generated using Doxygen
- Bachelor Thesis in Computer Science: PDF TesiOnline
Note: Instructions for MacOS with Intel CPU / M1 chip
-
Install RealSense SDK 2.0 and its own dependencies. The following guides are really helpful: build RealSense for macOS Monterey (Intel + Apple Silicon), macOS installation for Intel RealSense SDK.
-
Install OpenPose and its own dependencies. Useful guides: build openpose with/without GPU support for macOS, OpenPose for M1/Intel. In order to properly choose the
GPU_MODE
during OpenPose installation and/or in order to install OpenPose on other operating systems, check out this page: OpenPose Docs. If you have MacOS with Intel CPU and a GPU that matches OpenPose prerequisites, then you can setGPU_MODE
toOPENCL
(GPU-accelerated, it is harder to install but provides a faster runtime speed). Otherwise, if you have a MacOS with M1 chip, it's suggested to setGPU_MODE
toCPU_ONLY
.
-
Install Apache Kafka, Confluent and their own dependencies. Confluent is not mandatory, but without it, you will have to set up the Kafka environment on your own. Useful guides: how to install Apache Kafka on Mac, how to install Confluent.
-
Run the following command in your terminal:
git clone --recursive [email protected]:dennewbie/AI_Watch_A1.git
After that, remove all the files named
emptyFileForPadding.txt
in the cloned folder. -
From
/AI_Watch_A1/src/AI_Watch_A1/
folder, run the following commands in your terminal:mkdir build && cd build
-
Copy OpenPose's
models
folder to the project's build folder. -
Copy OpenPose's
BoostConfig.cmake
,FindGFlags.cmake
andFindGlog.cmake
files to thebuild/cmake/modules/
folder. -
Update
caffe lib
path insideCMakeLists.txt
. Then run the following commands in your terminal:cmake .. && make -j `sysctl -n hw.logicalcpu`
-
This step is optional. Run the following command in your terminal:
sudo make install
-
Now let's start the Kafka environment. Run the following commands in a new terminal session located on the parent folder of the
confluent
folder. Set the environment variable for the Confluent Platform home directory:export CONFLUENT_HOME=confluent-7.2.1
Add the Confluent Platform bin directory to your PATH:
export PATH=$PATH:$CONFLUENT_HOME/bin
Test your installation by running the confluent command:
confluent --help
Your output should show the available commands for managing Confluent Platform.
Start Confluent Platform by using the Confluent CLI confluent local services start command. This command starts all of the Confluent Platform components, including Kafka, ZooKeeper, Schema Registry, HTTP REST Proxy for Kafka, Kafka Connect, ksqlDB, and Control Center.
confluent local services start
Your output should resemble:
Starting Zookeeper Zookeeper is [UP] Starting Kafka Kafka is [UP] Starting Schema Registry Schema Registry is [UP] Starting Kafka REST Kafka REST is [UP] Starting Connect Connect is [UP] Starting KSQL Server KSQL Server is [UP] Starting Control Center Control Center is [UP]
The confluent local commands are intended for a single-node development environment and are not suitable for a production environment. The data that are produced are transient and are intended to be temporary. For production-ready workflows, check Confluent website.
The Confluent CLI requires Java version 1.8 or 1.11. See Confluent versions interoperability.
In order to improve speed and general performance, you could disable images' showing and change the number of frames captured per second. In this last option, capturing too few frames per second reduces output' quality. Furthermore, it's also possible to reduce OpenPose's network resolution, but a significant drawback is reduced accuracy.
Place the camera in a way that it can "see" the left and the right wall of the room.
-
Navigate to http://localhost:9021 and create a new topic
topic1
with default settings. Now go to/AI_Watch_A1/src/AI_Watch_A1/
and set up your Kafka parameters within theconfiguration_file.ini
file. At this point:-
if internal OpenPose execution is chosen, then run the following command in your terminal:
sudo ./AI_Watch_A1.bin --num_gpu 1 --num_gpu_start 2 --image_dir rs_images/rgb --write_json op_output/op --logging_level 255
-
if external OpenPose execution is chosen, then set up your OpenPose parameters within the
conf.conf
file, run the following command in your terminal:sudo ./AI_Watch_A1.bin
-
Note that the internal OpenPose execution is suggested.
-
The module can rarely get stuck on the following invocation located in
RealSenseD435Manager::23
:rs2::pipeline_profile myPipelineProfile = pipelineStream.start(myConfiguration);
This means some errors have occurred, due to the USB connection while starting the camera's environment. In order to fix that, just exit the program, unplug the RealSense camera from the USB cable, and connect it again.
- Intel RealSense SDK
- OpenPose
- OpenCV
- OpenCL
- Kafka
- Kafka C/C++ library
- Confluent
- jsoncpp
- Doxygen
- StarUML
- Sketch
In order to contribute to AI Watch A1, please follow the contribution guidelines.
- Dr. Paola Barra, CS Professor at the University of Naples Parthenope.
AI Watch A1 is licensed under the Apache License, Version 2.0. Copyright 2022. Please, see the license for further details and the /licenses
folder for the used libraries' licenses details.
@report{AIWatchA1,
author = {Denny Caruso},
title = {Multi-person 3D skeleton detection with depth camerasβ},
institution = {University of Naples, Parthenope},
year = {2022}
}
- Dr. Alessio Ferone, CS Assistant Professor at the University of Naples Parthenope.
a.a. 2021/2022