OpenPose Research Notes

Share

Background

Our lab works a lot on human reconstruction. OpenPose is a very strong project in human pose estimation, and studying it helps with entering the human reconstruction field.

It is also an open-source project with about 25k GitHub stars and roughly 120k lines of code. From a software-development perspective, its architecture is also worth studying. So I decided to research it.

The image below shows one OpenPose result.

dance_foot

You can see that each person is drawn with reasonable torso and joint positions, and the algorithm can run in real time. The result is quite good.

0. PPT

Based on online materials and my own understanding, I organized an OpenPose-principles PPT:

File: OpenPose Download

PPT about OpenPose software design:

File: OpenPose Download

Research Plan

The research mainly means understanding the papers and running the code. It consists of:

  1. Reading and analyzing the papers.
  2. Downloading and compiling the source code.
  3. Running some demos provided by the project.
  4. Reading and analyzing OpenPose’s code architecture.

1. Paper Reading and Analysis

The OpenPose line of work consists of several papers.

First is Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields, where they proposed the PAFs algorithm.

Then came OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields. In this work, they improved the whole system, increased speed and accuracy, integrated body, foot, hand, and face keypoints, and finally completed the OpenPose open-source library.

Abstract

The abstract mainly explains that OpenPose uses their proposed PAFs, Part Affinity Fields, algorithm. Compared with traditional bottom-up systems, it has better performance. In bottom-up systems, cost increases linearly with the number of people in the scene, while OpenPose keeps the same computational cost. OpenPose is also the first open-source real-time framework integrating body, foot, hand, and face keypoints.

1.1 Introduction

1.2 Method

1.2.1

Understanding the Part Affinity Fields paper

How to evaluate CMU’s OpenPose project?

VGG network: Understanding VGG in one article

The difference between concat and add in deep learning:

v2-04817784bef75d724d38cc22fcad8e35_720w

Non-Maximum Suppression

2. Downloading and Compiling Source Code

Although OpenPose also provides precompiled binaries, I compiled it from source in order to study its structure.

The documentation section for compilation:

Compiling and Running OpenPose from Source

Compiling this project requires CUDA. Download it from the official website:

CUDA Toolkit 11.8 Downloads

2.1 Compiling Source Code on Windows

Compiling from source on Windows is relatively simple. You only need Git or GitHub Desktop, CMake GUI, and CUDA.

On my Windows 11 x64 machine, compilation completed smoothly.

3. Running Demos

The project provides many demos. I tested most of them, and they could run directly. The experience was very good.

QQ–20221107210632

Find its dataset and run it myself once

4. Reading and Analyzing OpenPose Code Architecture

OpenPose source-code reading summary

According to the information in its GitHub repository, OpenPose is mainly written in C++ and uses GPU parallel computing. It implements two works from their lab:

OpenPose_Realtime_Multi-Person_2D_Pose

and

Hand Keypoint Detection in Single Images using Multiview Bootstrapping

Its documentation is at /doc/index.html.

The overall code structure is introduced in md_doc_very_advanced_library_structure_1_library_deep_overview.html.

This document introduces OpenPose’s core data structures: Array and Datum.

Most structures are written as templates, making them generic enough to be used in different places. Array is the data-storage structure of OpenPose. Datum is the data structure returned and passed into later threads. Threads communicate through this structure.

It then introduces OpenPose thread management.

It explains thread creation, running, and management. Since it is also implemented with templates, custom functions can be conveniently attached into this process management.

Finally, it introduces the core system: the multi-person keypoint detection module.

It introduces the Caffe-based pose extractor and how to initialize it. Then it explains how to detect poses in a crowd, including input values and return values. Finally, it introduces rendering the results back to the image using the PoseRenderer module. The documentation differs from the actual current program, and some API parameters do not match.

The overall UML diagram is in UML.pdf.

Read more

可多路视频播放的VisionOS 媒体查看器开发

可多路视频播放的VisionOS 媒体查看器开发

开发一款能够同时播放多个视频的vision pro媒体查看器。 0:00 /0:40 1× 缘起 Vision Pro 发布时我就特别想买,毕业工作后终于有资金购入并加入Apple开发者计划,从今年五月到现在也用了快小半年,用起来确实挺爽。 但是有些痛点还是很难受,其中一个痛点就是无法同时播放多个视频音频(实际上VisionOS提供了同时播放音频的API,但是似乎我用的APP都是不遵守🤣 导致都在抢占),因此为了满足我自己的这个痛点,也学习一下Vision OS 的应用开发,甚至完成度足够的话考虑上架App Store,便有了这个目标是多视频同时播放的媒体查看器项目。 现有工作 我购买了4XVR、Infuse、Moon Player、ES 文件助手(这款只有iPad OS版,不是专供Vision OS的),这几个月体验下来,全都存在我提到的和其他APP抢占音频通道,无法同时播放的问题,其他的我的主观的体验如下: 4XVR:使用最多,用起来最舒服,格式支持很全,VR视频也能看,号称全v

By Feiran Yu