class_docstr: Pose feature extractor.
  
  Extracts pose features based on estimated body landmark keypoints.
docstr: Convert keypoint predictions to 1D feature vectors.
  
  Post-processing consists of flattening and normalizing to bbox coordinates.
  
  Args:
      keypoint_detections (list[dict]): Outputs of the keypoint extractor
  
  Returns:
      list[Tensor]: List of pose feature tensors for each image
docstr_tok: ["Convert","keypoint","predictions","to","1D","feature","vectors",".","Post-processing","consists","of","flattening","and","normalizing","to","bbox","coordinates",".","Args",":","keypoint_detections","(","list","[","dict","]",")",":","Outputs","of","the","keypoint","extractor","Returns",":","list","[","Tensor","]",":","List","of","pose","feature","tensors","for","each","image"]
code: def _post_process(keypoint_detections: list[dict]) -> list[Tensor]:
      """Convert keypoint predictions to 1D feature vectors.
  
      Post-processing consists of flattening and normalizing to bbox coordinates.
  
      Args:
          keypoint_detections (list[dict]): Outputs of the keypoint extractor
  
      Returns:
          list[Tensor]: List of pose feature tensors for each image
      """
      poses = []
      for detection in keypoint_detections:
          boxes = detection["boxes"].unsqueeze(1)
          keypoints = detection["keypoints"]
          normalized_keypoints = (
              keypoints[..., :2] - boxes[..., :2]
          ) / (boxes[..., 2:] - boxes[..., :2])
          poses.append(
              normalized_keypoints.reshape(
                  normalized_keypoints.shape[0], -1
              )
          )
      return poses
  
imports: from __future__ import annotations
  from enum import Enum
  import torch
  from torch import Tensor, nn
  from torchvision.models.detection import KeypointRCNN_ResNet50_FPN_Weights, keypointrcnn_resnet50_fpn
  from torchvision.models.detection.roi_heads import keypointrcnn_inference
  from torchvision.ops import roi_align
  from torchvision.transforms import Normalize
  from anomalib.models.ai_vad.clip import clip
label_desc: Use image node_id 2 for calling the PoseExtractor obj's underlying member method code with example usage: obj._post_process(keypoint_detections) and returns: poses