Skip to main content

Pikapi is a perception library for interaction with agents.

Project description

PIKAPI

This repository contains perception algorithms for interaction with agetns. The name comes from capitals of "Perception toward Interaction with Kawaii Agents and Pretty Individuals". My focus is making the world full of kawaii characters.

Requirements

This repository is currently tested on Ubuntu 18.04 and python3.7.7. So it might work around these OS and python versions.

For python, please install following modules.

  • numpy
  • pyqt5
  • scipy
  • opencv > 3

Getting the result in Python

Python Graph Runner for GPU

Graph Runner API is an API with higher level than calculator framework API in mediapipe. This API is provided with python binding using pybind11 and it support GPU.

To run simple app using this graph runner API, please follow these steps.

python setup.py build_ext
python apps/run_face_mesh_live.py

Python Graph Runner for CPU

To run graph runner for cpu (pure python). Run the following command.

cd modules/face
wget -O - https://raw.githubusercontent.com/PINTO0309/PINTO_model_zoo/master/030_BlazeFace/05_float16_quantization/download_new.sh | bash
wget -O - https://raw.githubusercontent.com/PINTO0309/PINTO_model_zoo/master/032_FaceMesh/05_float16_quantization/download.sh | bash
cd ../../

python3 tools/generate_proto.py

# If you use non-system python, it is necessary to point to the path of python.
# to make a python binding appropriately.
# export PYTHON_BIN_PATH=$YOUR_PYTHON_PATH
bash development/prepare_framework_bindings.sh
python apps/run_face_mesh_live_cpu.py

Apps

Head Gesture Recognition

This app is for recognizing head gesture. Currently supported gesture is nodding and shaking head. (Video)

# To run on GPU.
python setup.py build_ext
GLOG_minloglevel=2 python apps/recognize_head_gesture.py

# To run on CPU.
cd modules/face
wget -O - https://raw.githubusercontent.com/PINTO0309/PINTO_model_zoo/master/030_BlazeFace/05_float16_quantization/download_new.sh | bash
wget -O - https://raw.githubusercontent.com/PINTO0309/PINTO_model_zoo/master/032_FaceMesh/05_float16_quantization/download.sh | bash
cd ../../

python3 tools/generate_proto.py

# If you use non-system python, it is necessary to point to the path of python.
# to make a python binding appropriately.
# export PYTHON_BIN_PATH=$YOUR_PYTHON_PATH
bash development/prepare_framework_bindings.sh
GLOG_minloglevel=2 python apps/recognize_head_gesture.py

Development Code

Code that is used to develop algorithms are included under /development.

License

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page