pose_format.utils.openpose_test module

Classes:

TestLoadOpenpose([methodName])

Test cases for loading OpenPose data

TestLoadOpenposeDirectory([methodName])

Testcases for loading OpenPose data from a directory

TestOpenposeComponents([methodName])

Test cases for OpenPose components

class pose_format.utils.openpose_test.TestLoadOpenpose(methodName='runTest')[source]

Bases: TestCase

Test cases for loading OpenPose data

Methods:

test_load_openpose_data_shape()

Tests if loaded data has expected shape

test_load_openpose_data_shape_missing_frames()

Tests if data shape from load_openpose with missing frames.

test_load_openpose_extracts_correct_number_of_people()

Tests if correct number of people are extracted

test_load_openpose_fixed_num_frames()

Tests load_openpose's output shape with a fixed number of frames

test_load_openpose_fixed_num_frames_and_missing_frames()

Tests load_openpose's output shape with fixed frames & missing frames

test_load_openpose_returns_pose_object()

Test if loaded data is type Pose

test_load_openpose_data_shape()[source]

Tests if loaded data has expected shape

test_load_openpose_data_shape_missing_frames()[source]

Tests if data shape from load_openpose with missing frames.

test_load_openpose_extracts_correct_number_of_people()[source]

Tests if correct number of people are extracted

test_load_openpose_fixed_num_frames()[source]

Tests load_openpose’s output shape with a fixed number of frames

test_load_openpose_fixed_num_frames_and_missing_frames()[source]

Tests load_openpose’s output shape with fixed frames & missing frames

test_load_openpose_returns_pose_object()[source]

Test if loaded data is type Pose

class pose_format.utils.openpose_test.TestLoadOpenposeDirectory(methodName='runTest')[source]

Bases: TestCase

Testcases for loading OpenPose data from a directory

Methods:

test_get_frame_id_no_prefix()

Tests frame ID extraction from a filename with no prefix.

test_get_frame_id_nonzero()

Tests if frame ID works correctly for a filename with non-zero ID

test_get_frame_id_several_digits()

Tests frame ID extraction from a filename with several digits in ID

test_get_frame_id_zero()

Test if frame ID extraction works correctly for a filename with ID 0.

test_load_openpose_directory_data_shape()

Tests shape of data returned by load_openpose_directory

test_load_openpose_directory_data_shape_add_empty_keys()

Test the data shape from load_openpose_directory when adding empty keys.

test_load_openpose_directory_data_shape_missing_frames()

Test the data shape from load_openpose_directory with missing frames.

test_load_openpose_directory_data_shape_no_file_prefix()

Test the data shape from load_openpose_directory without file prefix.

test_load_openpose_directory_extracts_correct_number_of_people()

Test if the correct number of people are extracted by load_openpose_directory.

test_load_openpose_directory_returns_pose_object()

Tests if loading from a directory returns an instance of Pose

test_get_frame_id_no_prefix()[source]

Tests frame ID extraction from a filename with no prefix.

test_get_frame_id_nonzero()[source]

Tests if frame ID works correctly for a filename with non-zero ID

test_get_frame_id_several_digits()[source]

Tests frame ID extraction from a filename with several digits in ID

test_get_frame_id_zero()[source]

Test if frame ID extraction works correctly for a filename with ID 0.

test_load_openpose_directory_data_shape()[source]

Tests shape of data returned by load_openpose_directory

test_load_openpose_directory_data_shape_add_empty_keys()[source]

Test the data shape from load_openpose_directory when adding empty keys.

test_load_openpose_directory_data_shape_missing_frames()[source]

Test the data shape from load_openpose_directory with missing frames.

test_load_openpose_directory_data_shape_no_file_prefix()[source]

Test the data shape from load_openpose_directory without file prefix.

test_load_openpose_directory_extracts_correct_number_of_people()[source]

Test if the correct number of people are extracted by load_openpose_directory.

test_load_openpose_directory_returns_pose_object()[source]

Tests if loading from a directory returns an instance of Pose

class pose_format.utils.openpose_test.TestOpenposeComponents(methodName='runTest')[source]

Bases: TestCase

Test cases for OpenPose components

Methods:

test_openpose_components_names()

Tests the names in OpenPose components

test_openpose_components_total_points()

Tests if total points in OpenPose components match expected value

test_openpose_num_points_per_component_face()

Tests number of points for the 'face_keypoints_2d' component matches expected

test_openpose_num_points_per_component_hand_left()

Tests if number of points for the 'hand_left_keypoints_2d' component matches expected

test_openpose_num_points_per_component_hand_right()

Tests if the number of points for the 'hand_right_keypoints_2d' component matches expected value

test_openpose_num_points_per_component_pose()

Tests number of points for the 'pose_keypoints_2d' component match expected

test_openpose_components_names()[source]

Tests the names in OpenPose components

test_openpose_components_total_points()[source]

Tests if total points in OpenPose components match expected value

test_openpose_num_points_per_component_face()[source]

Tests number of points for the ‘face_keypoints_2d’ component matches expected

test_openpose_num_points_per_component_hand_left()[source]

Tests if number of points for the ‘hand_left_keypoints_2d’ component matches expected

test_openpose_num_points_per_component_hand_right()[source]

Tests if the number of points for the ‘hand_right_keypoints_2d’ component matches expected value

test_openpose_num_points_per_component_pose()[source]

Tests number of points for the ‘pose_keypoints_2d’ component match expected