# Pose Estimation

This function block is used for detecting specific body parts in an image and drawing a skeleton to visualize the estimated posture. It utilizes deep learning models to identify key points associated with human poses.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Image Any` The input image from which pose estimation will be performed.

`Show Skeleton` A Boolean input that allows you to toggle the visibility of the skeleton overlay on the image.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Image Any` The output modified image displaying the detected pose and, if enabled, the skeleton.

`Selected Body Part Positions` This output provides a mapping of detected body parts and their positions in the image.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Confidence` A slider that adjusts the confidence threshold for detecting body parts. Higher values require more certainty from the model to consider a point valid.

`Class Names` A table view that allows you to select which body parts should be detected and displayed in the output.

## 🎨 Features <a href="#features" id="features"></a>

`Real-Time Detection` This block uses a pre-trained deep learning model to detect body parts in real time and visualize results.

`Customizable Detection` Users can select specific body parts to monitor, making this tool flexible for various applications.

`Skeleton Visualization` The detected positions can be connected with lines to form a skeleton, helping in visual understanding of the pose.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. **Input Image**: Connect an image containing a person or human figure to the `Image Any` input.
2. **Show Skeleton Option**: Optionally connect a boolean signal to the `Show Skeleton` input to enable/disable the skeleton overlay.
3. **Adjust Confidence**: Use the `Confidence` slider to adjust the minimum confidence level required for detecting body parts.
4. **Select Body Parts**: Check or uncheck body parts in the `Class Names` table to configure which body parts should be detected.
5. **Evaluate**: Run the block to perform pose estimation. The output will be the modified image and detected body part positions.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When run, this block will output an image displaying the detected body parts and a skeleton if enabled, along with a dictionary of body parts and their positions.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

<details>

<summary>Improving Detection Accuracy</summary>

Adjust the `Confidence` slider to find an optimal balance between detection sensitivity and false positives. A higher value may yield more accurate detections.

</details>

<details>

<summary>Selecting Specific Body Parts</summary>

Select only the necessary body part classes you need to analyze; this will simplify the output and focus on the relevant parts of the body.

</details>

<details>

<summary>Preprocessing Input Images</summary>

Consider preprocessing input images with contrast adjustment, resizing, or filtering before sending them to this block to enhance detection results.

</details>

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>No Detections Found</summary>

If the block fails to detect any body parts, ensure the input image is clear and well-lit. Lowering the confidence threshold may also help in detecting more points.

</details>

<details>

<summary>Skeleton Not Showing</summary>

Make sure the `Show Skeleton` input is activated and check if any body parts are being detected. If no parts are detected, the skeleton won’t appear.

</details>
