Load SDPose JSON:
The SDPoseLoadJson node is designed to facilitate the loading of pose keypoints data from JSON files, which are often used in AI-driven animation and motion capture applications. This node is particularly beneficial for users who need to process and manipulate pose data efficiently. It allows you to specify a target frame rate, enabling the node to automatically adjust the frame rate of the loaded data by either interpolating or duplicating frames. Additionally, it offers functionality to detect and fix empty frames, ensuring a smooth and continuous sequence of pose data. This node is essential for artists and developers working with pose data, as it provides a streamlined method to import and prepare data for further processing or visualization.
Load SDPose JSON Input Parameters:
json_path
The json_path parameter specifies the file path to the JSON file containing the pose keypoints data. This is a required parameter and must be a valid string path to the file. The JSON file should contain either a list of frames or a dictionary with fps and frames keys. The correct path ensures that the node can access and load the necessary data for processing.
target_fps
The target_fps parameter allows you to set a desired frame rate for the loaded data. It is a floating-point value with a default of 0, which means all frames will be read without adjustment. If set to a value greater than 0, the node will automatically resample the frames based on the JSON's original frame rate. The range is from 0 to 120, with a step of 1. This parameter is useful for synchronizing the pose data with other media or for optimizing performance.
interp_method
The interp_method parameter determines the method used for frame upsampling when the target_fps is greater than the original frame rate. It offers two options: interpolate for linear interpolation and duplicate for copying the nearest frame. The default is interpolate, which provides smoother transitions between frames. This parameter is only effective when increasing the frame rate and helps maintain the quality of the animation.
fix_empty_frames
The fix_empty_frames parameter is a boolean that, when enabled, automatically detects and repairs frames where no people are detected. It uses interpolation from valid neighboring frames to fill in these gaps, eliminating black frames. The default value is False. This feature is particularly useful for ensuring the continuity and completeness of the pose data, especially in scenarios where frame data might be missing or incomplete.
Load SDPose JSON Output Parameters:
pose_keypoints
The pose_keypoints output provides the loaded pose keypoints data, which can be used for further processing or visualization. This data is crucial for applications that require detailed pose information, such as animation or motion analysis.
frame_count
The frame_count output indicates the total number of frames successfully loaded from the JSON file. This information is useful for understanding the length and scope of the pose data sequence.
canvas_width
The canvas_width output specifies the width of the canvas or frame in which the pose data is intended to be displayed. This value helps in setting up the correct display environment for the pose data.
canvas_height
The canvas_height output specifies the height of the canvas or frame for the pose data. Like canvas_width, this value is important for ensuring the pose data is displayed correctly.
effective_fps
The effective_fps output provides the actual frame rate of the loaded data after any resampling has been applied. This value is important for synchronizing the pose data with other media or for performance analysis.
Load SDPose JSON Usage Tips:
- Ensure the
json_pathis correctly set to avoid file not found errors. Double-check the path for typos or incorrect directories. - Use the
target_fpsparameter to match the frame rate of your pose data with other media, such as video or audio, for seamless integration. - Enable
fix_empty_framesif you notice gaps or black frames in your pose data to maintain continuity and improve the quality of your animations.
Load SDPose JSON Common Errors and Solutions:
JSON file not found: <json_path>
- Explanation: This error occurs when the specified JSON file path is incorrect or the file does not exist.
- Solution: Verify that the
json_pathis correct and that the file exists at the specified location. Check for any typos or incorrect directory paths.
JSON wrapper format: 'frames' must be a list
- Explanation: This error indicates that the JSON file does not have the expected structure, specifically that the
frameskey is not a list. - Solution: Ensure that the JSON file is correctly formatted with a
frameskey that contains a list of frame data. If necessary, modify the JSON structure to meet this requirement.
