jrterven / KinZ-Python

Python library for Azure Kinect
BSD 2-Clause "Simplified" License
27 stars 7 forks source link

KinZ for Python A library for Azure Kinect

At the time of this writing, there are no official python bindings for Kinect for Azure.
This library allows to use Azure Kinect directly in Python.

Installation:

  1. Install the Azure Kinect SDK as described here where it says Microsoft installer. For Windows, Download the .exe and follow the steps. For Ubuntu use the sudo apt install commands shown in the same page.
  2. For Body tracking functionality (optional), you need an NVIDIA GPU and install CUDA. Download from here.
  3. For Body tracking functionality (optional), install the Azure Kinect Body Tracking SDK. For Windows, download the msi installer from here. For Ubuntu simply run the sudo apt install command provided in the webpage.
  4. Before compiling the code for Matlab, make sure the Kinect works correctly using the viewers provided my Microsoft, e.g. C:\Program Files\Azure Kinect SDK v1.4.1\tools\k4aviewer.exe and C:\Program Files\Azure Kinect Body Tracking SDK\tools\k4abt_simple_3d_viewer.exe. In Linux just type k4aviewer or k4abt_simple_3d_viewer in the terminal.
  5. Install the Python requirements (see environment.yaml). To create a fully functional conda environment run:
    conda env create --file environment.yaml
  6. Install the library with:
    pip install .
  7. To install KinZ with body tracking functionality run:
    CFLAGS="-l:libk4abt.so -DBODY" pip install .

Demos

Inside demos directory, you'll find demos showing all the features of the library.
Currently, there are only 6 demos:

Streaming Speed

The streaming speeds in Python are the following:

Resolution FPS Unaligned FPS Aligned Depth2Color
1280 x 720 30 30
1920 x 1080 30 30
2560 x 1440 30 22
2048 x 1536 30 30
3840 x 2160 30 16
4096 x 3072 15 9

Uninstall:

pip uninstall kinz

Coming soon ...

Hand pose estimation

Color image keypoints alt text

Depth image keypoints alt text

For more details checkout the wiki pages.

Citation

@article{terven_cordova_kinz,  
title = {KinZ an azure kinect toolkit for Python and Matlab},  
journal = {Science of Computer Programming},  
pages = {102702},  
year = {2021},  
author = {Juan R. Terven and Diana M. Córdova-Esparza},  
keywords = {Azure Kinect, Python, Matlab}}

Link to paper