Wednesday, August 10, 2022

NVIDIA Jetson Body Pose Estimation (PoseNet)

NVIDIA Jetson Body Pose Estimation (PoseNet)

What is Pose Estimation and PoseNet?

Pose estimation consists of locating various body parts (aka keypoints) that form a skeletal topology (aka links). Pose estimation has a variety of applications including gestures, AR/VR, HMI (human/machine interface), and posture/gait correction. Pre-trained models are provided for human body and hand pose estimation that are capable of detecting multiple people per frame.

The poseNet object accepts an image as input, and outputs a list of object poses. Each object pose contains a list of detected keypoints, along with their locations and links between keypoints. You can query these to find particular features. poseNet can be used from Python and C++.

Pre-trained Pose Estimation Models

ModelCLI argumentNetworkType enumKeypoints
Pose-ResNet18-Bodyresnet18-bodyRESNET18_BODY18
Pose-ResNet18-Handresnet18-handRESNET18_HAND21
Pose-DenseNet121-Bodydensenet121-bodyDENSENET121_BODY18

Run Demo Code

Default Model :  Pose-ResNet18-Body
Keypoints : 18



For Image


[image]  saved ‘pose.jpg'  (1920x1080, 3 channels)


[TRT]    ------------------------------------------------

[TRT]    Timing Report networks/Pose-ResNet18-Body/pose_resnet18_body.onnx

[TRT]    ------------------------------------------------

[TRT]    Pre-Process   CPU   0.08505ms  CUDA   0.75511ms

[TRT]    Network       CPU 141.51538ms  CUDA 140.91484ms

[TRT]    Post-Process  CPU  11.97670ms  CUDA  11.82979ms

[TRT]    Visualize     CPU  34.30075ms  CUDA  34.65588ms

[TRT]    Total         CPU 187.87788ms  CUDA 188.15562ms

[TRT]    ------------------------------------------------



For Image  

Model : Pose-DenseNet121-Body

[image]  saved 'pose.jpg'  (1920x1080, 3 channels)


[TRT]    ------------------------------------------------

[TRT]    Timing Report networks/Pose-DenseNet121-Body/pose_densenet121_body.onnx

[TRT]    ------------------------------------------------

[TRT]    Pre-Process   CPU   0.09818ms  CUDA   0.79229ms

[TRT]    Network       CPU  91.03501ms  CUDA  90.19708ms

[TRT]    Post-Process  CPU  14.73071ms  CUDA  14.91401ms

[TRT]    Visualize     CPU  39.99346ms  CUDA  39.82302ms

[TRT]    Total         CPU 145.85736ms  CUDA 145.72641ms

[TRT]    ------------------------------------------------




For Video 

Default Model :  Pose-ResNet18-Body
Keypoints : 18




Video Inference Performance : 14 -17 FPS

posenet: detected 4 person(s)


[TRT]    ------------------------------------------------

[TRT]    Timing Report networks/Pose-ResNet18-Body/pose_resnet18_body.onnx

[TRT]    ------------------------------------------------

[TRT]    Pre-Process   CPU   0.11573ms  CUDA   0.76760ms

[TRT]    Network       CPU  67.07027ms  CUDA  65.11172ms

[TRT]    Post-Process  CPU  11.31063ms  CUDA  11.28625ms

[TRT]    Visualize     CPU   2.35010ms  CUDA   1.99943ms

[TRT]    Total         CPU  80.84673ms  CUDA  79.16499ms

[TRT]    ------------------------------------------------


Hardware and OS

  • NVIDIA Jetson Nano 4GB
  • Jetpack SDK 4.6.1

Reference


Jetson Inference




Adun Nantakaew อดุลย์ นันทะแก้ว 081-6452400
LINE : adunnan