How does human pose estimation work?
- Authors
- Name
- Amit Shekhar
- Published on
Human Pose Estimation works by finding the keypoints of the body, like the head, elbows, and knees, in a picture and then connecting them into a stick figure.
In this blog, we will learn about how Human Pose Estimation works. We will also see what a keypoint is, how a computer finds the keypoints in a picture, how it connects them into a skeleton, the difference between top-down and bottom-up approaches, 2D vs 3D pose estimation, and where it is used and where it struggles.
We will cover the following:
- What is Human Pose Estimation?
- Why do we need Human Pose Estimation?
- What is a keypoint?
- The central idea
- How the computer sees an image
- Step 1: Detecting the keypoints
- Step 2: Connecting the keypoints
- Heatmaps: how the computer marks each keypoint
- Top-down vs Bottom-up approaches
- 2D vs 3D Pose Estimation
- A simple step-by-step walkthrough
- Where Human Pose Estimation is used
- Challenges in Human Pose Estimation
I am Amit Shekhar, Founder @ Outcome School, I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.
I teach AI and Machine Learning at Outcome School.
Let's get started.
What is Human Pose Estimation?
Let's understand the terms Pose and Estimation.
A pose is simply the position of our body. When we raise our hand, that is a pose. When we sit, that is another pose. When we run, that is yet another pose.
Estimation means making a guess based on what we can see.
So, Human Pose Estimation is the task of looking at a picture or a video of a person and figuring out the position of their body.
The computer looks at the image and tells us where the head is, where the shoulders are, where the elbows are, where the knees are, and so on.
Once the computer knows where all these body parts are, it understands the pose of the person.
Why do we need Human Pose Estimation?
Let's say we are building an app that checks if a person is doing a yoga pose correctly.
The app needs to know where the person's arms and legs are. Only then can it say whether the pose is right or wrong.
Or, let's say we are building a fitness app that counts how many push-ups we do. The app needs to track the body going up and down. To do that, it must know the position of the shoulders, elbows, and hips.
Or, suppose a video game lets us control a character by moving our own body. The game must understand our movements in real time.
In all of these cases, the computer must first understand the human pose.
So, here comes Human Pose Estimation to the rescue.
What is a keypoint?
Before we go further, we must understand one word.
A keypoint is a single, important point on the human body.
Think of the human body as a stick figure that we drew as children. A stick figure has dots for the joints and lines connecting them.
Each dot is a keypoint.
Common keypoints are the nose, the left eye, the right eye, the left shoulder, the right shoulder, the left elbow, the right elbow, the wrists, the hips, the knees, and the ankles.
Many pose estimation systems track around 17 to 25 keypoints for one person.
So, when we say the computer finds the pose, what it really does is find the location of each keypoint.
Once it has all the keypoints, it has the pose.
The central idea
Let me give the big picture first, and then we will go into the details.
Human Pose Estimation works in two steps.
Step 1: Find all the important body points, which are the keypoints. For example, find where the left elbow is in the image.
Step 2: Connect these points in the correct order to form a skeleton. For example, connect the shoulder to the elbow, and the elbow to the wrist.
Let's see it in a diagram like below:
Step 1: Find the dots Step 2: Join the dots
o o
|
o o o----+----o
| | |
o o o | o
| | |
o o o | o
|
o o o--+--o
| |
o o o o
| |
o o o o
Here, we can see that on the left we only have loose dots, which are the keypoints. On the right, we join those dots in the correct order and a stick figure appears. That stick figure is the pose.
We will learn about each of them in detail.
How the computer sees an image
To understand how the computer finds keypoints, we must first understand how a computer sees a picture.
For us, a picture is a person standing in a park.
For a computer, a picture is just a big grid of tiny squares. Each tiny square is called a pixel.
Each pixel is just a number that tells the color and brightness at that spot.
So, the whole image is just a giant table of numbers to the computer. It does not see a "person". It only sees numbers.
Now, the question is, how does the computer turn these plain numbers into an understanding of where the elbow is?
The answer is a special kind of model called a neural network.
A neural network is a model that learns patterns from many examples, instead of being told every single rule by hand.
So, we do not write code that says "an elbow looks like this". Instead, we show the neural network thousands of labeled images, and it learns by itself what an elbow looks like.
We have a detailed blog on Convolutional Neural Networks that explains how a neural network reads an image.
Planning your move into AI?
No matter which tech domain you work in today, with your effort, you can transition to these roles:
- AI Engineer
- Forward Deployed Engineer
- AI Agent Engineer
- Harness Engineer
- Voice AI Engineer
- AI Architect
- LLM Engineer
- LLM Inference Engineer
- Gen AI Engineer
- MLOps Engineer
- ML Engineer
- Deep Learning Engineer
Our AI and Machine Learning Program at Outcome School takes you there.
Step 1: Detecting the keypoints
Now, let's see how the computer detects the keypoints.
First, we need to train the neural network. Training means teaching the network using examples.
We collect a large number of images of people. In each image, a human has already marked the correct location of every keypoint by hand. For example, a human has clicked exactly where the left knee is.
These marked images are called the training data.
Now we show all these images to the neural network. The network looks at each image and makes a guess about where each keypoint is.
In the beginning, its guesses are very wrong. It can say the elbow is in the sky.
So, we compare its guess with the correct answer that the human marked. The difference between the guess and the correct answer is called the error.
The parameters of the network then get updated slowly to reduce this error. It does this again and again, over millions of examples.
Over time, the guesses get better and better.
After enough training, the network becomes very good at finding keypoints in images it has never seen before.
This is how the computer learns to detect keypoints.
To master Neural Networks, Loss Functions, Gradient Descent, and Backpropagation, and to build a Neural Network from scratch, check out our AI and Machine Learning Program at Outcome School.
Step 2: Connecting the keypoints
Finding the keypoints is only half the job. Now we must connect them in the correct way.
Let's say the computer has found a shoulder, an elbow, and a wrist.
It must connect the shoulder to the elbow, and the elbow to the wrist. Only then do we get an arm.
The set of correct connections is fixed and known in advance. We know that a shoulder connects to an elbow. We know that a knee connects to an ankle.
This fixed map of connections is sometimes called the skeleton structure.
Here is the fixed map of connections:
nose
|
elbow -- shoulder -- shoulder -- elbow
| | | |
wrist | | wrist
| |
hip ------ hip
| |
knee knee
| |
ankle ankle
Here, we can see which point connects to which point. A shoulder always connects to an elbow and a hip, and an elbow always connects to a wrist. This map never changes, so the computer can use it for every person.
So, the computer takes all the keypoints it found, and joins them using this known skeleton structure.
After joining, we get a stick figure drawn over the person.
That stick figure is the pose.
Heatmaps: how the computer marks each keypoint
Now, let's go one level deeper to understand exactly how the network points to a keypoint.
We can think that the network simply says "the elbow is at this exact spot". But it actually works in a different way.
For each keypoint, the network produces something called a heatmap.
A heatmap is a separate image where each pixel holds a value showing how likely it is that the keypoint is at that location.
Let's understand this with an example.
Suppose the network is looking for the left elbow. It creates a heatmap for the left elbow. In that heatmap, the area where the elbow most likely is will glow bright. Areas far from the elbow will stay dark.
So, the bright spot is where the network believes the elbow is.
The computer then picks the brightest spot in the heatmap. That spot becomes the final location of the left elbow.
The network creates one such heatmap for each keypoint. One for the nose, one for the left shoulder, one for the right knee, and so on.
So, the network does not give one hard answer. Instead, it gives a soft map of confidence, and we pick the most confident spot.
This is one reason pose estimation is more robust when the image is a little blurry or the body part is slightly hidden.
A quick note for you
No matter which tech domain you work in, get familiar with these topics:
- LLM
- RAG
- MCP
- Agent
- Fine-tuning
- Quantization
We put it all together in one video:
AI Engineering Explained: LLM, RAG, MCP, Agent, Fine-Tuning, and Quantization
No need to stop reading - bookmark it and watch later when you get time. Future you will thank you.
Now, let's get back to the topic.
Top-down vs Bottom-up approaches
So far, we talked about one person in the image. But many images have more than one person.
When there are many people, we must figure out which keypoint belongs to which person.
There are two main ways to do this. Let's understand both.
The first one is the top-down approach.
In the top-down approach, the computer first finds each person in the image and draws a box around each one. Then, inside each box, it runs pose estimation for that single person.
Finding each person and drawing a box around them is the job of Object Detection, and we have a detailed blog on How does Object Detection work? that explains this in depth.
So, it goes from the whole picture down to each person, and then to the keypoints. That is why it is called top-down.
Advantage: It is usually more accurate, because it focuses on one person at a time.
Disadvantage: It is slower when there are many people, because it must run once for every person.
The second one is the bottom-up approach.
In the bottom-up approach, the computer first finds all the keypoints of everyone in the image at once. Then it groups the keypoints together to form each person.
So, it goes from the small points up to the full people. That is why it is called bottom-up.
Advantage: It is usually faster, because it processes the whole image once, no matter how many people are there.
Disadvantage: Grouping the keypoints correctly can become hard when people are very close together.
Let me tabulate the differences between top-down and bottom-up for your better understanding.
| Point | Top-down | Bottom-up |
|---|---|---|
| First step | Find each person | Find all keypoints |
| Second step | Find keypoints per person | Group keypoints into people |
| Speed with many people | Slower | Faster |
| Accuracy | Usually higher | Usually slightly lower |
| Best when | Few people, need accuracy | Many people, need speed |
2D vs 3D Pose Estimation
Now, let's understand another important difference.
In 2D Pose Estimation, the computer finds the position of each keypoint on a flat image. It gives us two numbers for each keypoint, the left-right position and the up-down position.
But the real world is not flat. A person can lean toward the camera or away from it. A flat image cannot show this depth.
So, here comes 3D Pose Estimation into the picture.
In 3D Pose Estimation, the computer also estimates the depth, which means how far each keypoint is from the camera. It gives us three numbers for each keypoint instead of two.
3D is harder, because guessing depth from a single flat image is tricky. But it is very useful for things like motion capture in movies and realistic video games.
So, we choose 2D or 3D based on our use case.
Stay updated: Subscribe to our newsletter to get our latest AI and Machine Learning blogs straight to your inbox.
A simple step-by-step walkthrough
Let's put everything together with one simple example.
Suppose we give the computer a photo of a person waving their hand.
Step 1: The image enters the computer as a grid of pixels, which are just numbers.
Step 2: The trained neural network looks at these numbers and creates a heatmap for each keypoint.
Step 3: For each heatmap, the computer picks the brightest spot. This gives the location of each keypoint, such as the nose, shoulders, elbows, and wrists.
Step 4: The computer connects these keypoints using the known skeleton structure. The shoulder joins the elbow, and the elbow joins the wrist.
Step 5: We now have a stick figure drawn over the person. Since one wrist is high up near the head, we understand that the person is waving.
We can see the full flow in a diagram like below:
Photo of person
↓
Grid of pixels (just numbers)
↓
Trained neural network
↓
One heatmap per keypoint
↓
Pick the brightest spot in each heatmap
↓
Keypoint locations (nose, shoulders, elbows, ...)
↓
Join keypoints using the skeleton structure
↓
Stick figure = the pose (person is waving)
Here, we can see the full journey. The photo enters as plain numbers, the network turns them into heatmaps, we pick the brightest spots to get the keypoints, and finally we join the keypoints to get the pose.
Where Human Pose Estimation is used
Now that we understand how it works, let's see where it is used in real life.
- Fitness apps: They track our body to count exercises and check our form during workouts.
- Yoga and sports coaching: They compare our pose with the correct pose and guide us to improve.
- Video games: They let us control characters using our own body movements.
- Movies and animation: They capture an actor's movements and apply them to digital characters. This is called motion capture.
- Healthcare: Doctors use it to study how a patient walks or moves during recovery.
- Safety systems: They can detect if a person has fallen down and may need help.
- Augmented Reality: Apps place virtual clothes or effects on our body in the correct positions.
Challenges in Human Pose Estimation
Let's understand the main challenges.
The first challenge is occlusion. Occlusion means a body part is hidden. For example, one arm may be hidden behind the back. The computer must then make a guess about the hidden part.
The second challenge is crowded scenes. When many people stand close together, it becomes hard to decide which keypoint belongs to which person.
The third challenge is unusual poses. Most training images show common poses like standing or walking. A very unusual pose, like a gymnast bending backward, is harder to handle.
The fourth challenge is bad image quality. Blurry images, poor lighting, or low resolution make the keypoints harder to find.
The fifth challenge is speed. For live video, the computer must process many images every second. Doing this fast and accurately at the same time is difficult.
So, now we have understood how Human Pose Estimation works, from a plain grid of pixels to a full understanding of how a person is standing, sitting, or moving.
Frequently Asked Questions
How many keypoints does Human Pose Estimation track?
Many pose estimation systems track around 17 to 25 keypoints for one person. Common keypoints are the nose, the eyes, the shoulders, the elbows, the wrists, the hips, the knees, and the ankles. Once the computer finds the location of each keypoint, it has the pose.
Why does pose estimation use heatmaps instead of exact coordinates?
Heatmaps give a soft map of confidence instead of one hard answer. For each keypoint, the network creates a heatmap where the likely location glows bright, and the computer picks the brightest spot. This is one reason pose estimation is more robust when the image is a little blurry or the body part is slightly hidden.
What training data does a pose estimation model need?
It needs a large number of images of people where a human has already marked the correct location of every keypoint by hand. The network guesses the keypoints, compares its guess with the marked answer, and its parameters get updated to reduce the error. It does this again and again over millions of examples.
How is Human Pose Estimation used in motion capture?
In movies and animation, pose estimation captures an actor's movements and applies them to digital characters. This is called motion capture. 3D Pose Estimation is very useful here, because it also estimates how far each keypoint is from the camera, which gives three numbers for each keypoint instead of two.
That's it for now.
Thanks
Amit Shekhar
Founder @ Outcome School
You can connect with me on:
Follow Outcome School on:
