Resize SDPose Keypoints:
SDPoseResizeKeypoints is a node designed to adjust the scale of skeletal keypoint coordinates and update the canvas dimensions accordingly. This node is particularly useful for AI artists who work with pose estimation data and need to adapt the size of pose keypoints to fit different canvas dimensions while maintaining the integrity of the pose structure. The node offers flexibility in resizing by allowing you to specify new dimensions for the canvas and decide whether to maintain the aspect ratio of the original pose. Additionally, it provides options for smart cropping to ensure that keypoints are not lost when the aspect ratio is preserved, making it a powerful tool for managing pose data across various applications.
Resize SDPose Keypoints Input Parameters:
pose_keypoints
This parameter represents the input pose keypoints that you want to resize. It is expected to be a list of frames, each containing keypoint data for individuals in the frame. The function of this parameter is to provide the node with the necessary data to perform the resizing operation.
new_width
This parameter specifies the new width for the canvas. It allows you to define the target width for the resized keypoints, with a default value of 512. The minimum value is 1, and the maximum is 8192. Adjusting this parameter impacts the horizontal scaling of the keypoints.
new_height
This parameter specifies the new height for the canvas. Similar to new_width, it allows you to define the target height for the resized keypoints, with a default value of 512. The minimum value is 1, and the maximum is 8192. Adjusting this parameter impacts the vertical scaling of the keypoints.
keep_aspect_ratio
This boolean parameter determines whether the aspect ratio of the original pose should be maintained during resizing. The default value is True. When enabled, the node will attempt to resize the keypoints while preserving the original proportions, which is crucial for maintaining the natural appearance of the pose.
allow_crop
This boolean parameter allows for smart cropping when the aspect ratio is maintained, and the new dimensions do not match the original proportions. The default value is False. When enabled, the node will intelligently crop the canvas based on the bounding box of the keypoints to ensure no keypoints are lost.
padding_top
This parameter specifies the number of pixels to extend the bounding box upward when cropping is enabled. It is only effective when allow_crop is True. The default value is 10, with a minimum of 0 and a maximum of 200. This parameter helps in adjusting the vertical positioning of the keypoints within the canvas.
padding_bottom
This parameter specifies the number of pixels to extend the bounding box downward when cropping is enabled. It functions similarly to padding_top, with the same default, minimum, and maximum values. It helps in fine-tuning the vertical alignment of the keypoints.
Resize SDPose Keypoints Output Parameters:
resized_pose
This output parameter contains the resized pose keypoints. It reflects the adjusted keypoint coordinates and updated canvas dimensions based on the input parameters. The resized pose is crucial for further processing or visualization, ensuring that the keypoints fit the new canvas size while maintaining their structural integrity.
Resize SDPose Keypoints Usage Tips:
- To maintain the natural proportions of the pose, enable the
keep_aspect_ratioparameter. This is especially useful when resizing poses for different canvas sizes without distorting the original structure. - Use the
allow_cropparameter in conjunction withkeep_aspect_ratioto ensure that keypoints are not lost when the new dimensions do not match the original aspect ratio. This feature is beneficial for preserving important pose details.
Resize SDPose Keypoints Common Errors and Solutions:
"pose_keypoints must be a list of frames"
- Explanation: This error occurs when the input
pose_keypointsis not provided as a list or is empty. - Solution: Ensure that the
pose_keypointsparameter is a valid list containing frame data with keypoints.
"Invalid canvas dimensions"
- Explanation: This error might occur if the
new_widthornew_heightparameters are set outside their allowed range. - Solution: Verify that the
new_widthandnew_heightvalues are within the specified range of 1 to 8192. Adjust them accordingly to fit within these limits.
