Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 3.82 KB

File metadata and controls

83 lines (53 loc) · 3.82 KB

Human Pose Estimation

This example demonstrates how to build a 2-stage DepthAI pipeline for human pose estimation. The pipeline consists of YOLOv6 nano object detector and Lite-HRNet pose estimation model. The example works on both RVC2 and RVC4. For realtime application you will need to use OAK4 cameras.

As an alternative you can use the end-to-end YOLOv8 Nano Pose Estimation or YOLOv8 Large Pose Estimation models with generic example.

There are 4 models available for the Lite-HRNet models. If you choose to use a different model please adjust fps_limit accordingly.

Demo

Human pose estimation

Source

Usage

Running this example requires a Luxonis device connected to your computer. Refer to the documentation to setup your device if you haven't done it already.

You can run the example fully on device (STANDALONE mode) or using your computer as host (PERIPHERAL mode).

Here is a list of all available parameters:

-m MODEL, --model MODEL
                    Pose model to run the inference on. (default: luxonis/lite-hrnet:18-coco-192x256)
-d DEVICE, --device DEVICE
                    Optional name, DeviceID or IP of the camera to connect to. (default: None)
-fps FPS_LIMIT, --fps_limit FPS_LIMIT
                    FPS limit for the model runtime. (default: 5 for RVC2 and 30 for RVC4)
-media MEDIA_PATH, --media_path MEDIA_PATH
                    Path to the media file you aim to run the model on. If not set, the model will run on the camera input. (default: None)

Peripheral Mode

Installation

You need to first prepare a Python >= 3.10 environment with the following packages installed:

You can simply install them by running:

pip install -r requirements.txt

Running in peripheral mode requires a host computer and there will be communication between device and host which could affect the overall speed of the app. Below are some examples of how to run the example.

Examples

python3 main.py

This will run the human pose estimation example with the default device, default model, and camera input.

python3 main.py --media <PATH_TO_VIDEO>

This will run the human pose estimation example with the default device and the video file.

python3 main.py --model luxonis/lite-hrnet:30-coco-192x256 --fps_limit 5

This will run the human pose estimation example with the default device and camera input, but with the luxonis/lite-hrnet:30-coco-192x256 model and a 5 FPS limit.

Standalone Mode (RVC4 only)

Running the example in the standalone mode, app runs entirely on the device. To run the example in this mode, first install the oakctl tool using the installation instructions here.

The app can then be run with:

oakctl connect <DEVICE_IP>
oakctl app run .

This will run the example with default argument values. If you want to change these values you need to edit the oakapp.toml file (refer here for more information about this configuration file).