Add pose estimation keypoint preprocessing to Sapiens2ImageProcessor
Author: Sainava
Pull request: yes

<!-- ci-dashboard-badge:start -->
[![CI](https://transformers-ci.lor-e.huggingface.cool/badge/pr?pr=47199)](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47199)
<!-- ci-dashboard-badge:end -->

# What does this PR do?

As discussed with @guarin in the previous Sapiens2 loss function PR (#46764), this PR implements the preprocessing data pipeline required for Sapiens2 pose estimation fine-tuning.

Specifically, it updates `Sapiens2ImageProcessor` (`_preprocess_image_like_inputs`) to handle raw keypoint coordinates. It implements:
1. **Vectorized 2D Gaussian Heatmap Generation:** Transforms raw `(x, y)` image coordinates into scaled `(H, W)` heatmap targets using inverse affine transformations based on the cropped bounding boxes.
2. **Visibility Masking:** Handles COCO-style visibility flags, zeroing out weights for invisible or out-of-bounds keypoints.
3. **Memory-Optimized Weight Tensors:** Formats the `label_weights` to `(num_kps, 1, 1)` to utilize PyTorch broadcasting during loss calculation, avoiding dense `(num_kps, H, W)` allocations.

## Testing
I ran the full integration test suite for the Sapiens2 Image Processor locally to verify all shapes, visibility masking, and exceptions function as expected.
**Command run:** `pytest tests/models/sapiens2/test_image_processing_sapiens2.py`
**Results:** `22 passed, 7 skipped` (All passing)

- [X] I confirm that this is not a pure code agent PR.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://huggingface.co/docs/transformers/contributing) and the
      [Pull Request](https://huggingface.co/docs/transformers/pr_checks) checks?
- [X] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes according to the [guidelines](https://github.com/huggingface/transformers/tree/main/docs)?
- [X] Did you write any new necessary [tests](https://huggingface.co/docs/transformers/testing)?

## Who can review?

Hi @guarin , following up on our chat in #46764! Here is the initial implementation for the Sapiens2 preprocessing pipeline we discussed.

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_47199). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: sapiens2

<!-- ci-dashboard-recap:start -->

---

### CI recap

**Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47199)
**Latest run:** [29166551086:2](https://github.com/huggingface/transformers/actions/runs/29167708850)
**Result:** `success` | **Jobs:** 5 | **Tests:** 317 | **Failures:** 7 | **Duration:** 4m 8s

<!-- ci-dashboard-recap:end -->

Hey @guarin,

I've implemented the changes.

Regarding the `np.maximum` : The original codebase uses a single global `(K, H, W)` tensor for all people, which requires `np.maximum` to prevent overlapping keypoints from summing past 1.0. Because our implementation creates isolated `(num_kps, H, W)` tensors per individual person crop, cross-person overlap is not possible, making `np.maximum` unnecessary here I think.

Let me know if anything else is needed :)