The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
Dataset Overview
This dataset contains sequences of MediaPipe pose landmarks for several padel strokes.
Classes
- Forehand - filename: forehand (i).pkl
- Backhand - filename: backhand (i).pkl
- Forehand Volley - filename: fhvolley (i).pkl
- Backhand Volley - filename: bhvolley (i).pkl
- Bandeja - filename: bandeja (i).pkl
- Smash - filename: smash (i).pkl
File Contents
Each .pkl
file contains the PoseLandmarkerResult
returned by detect_for_video
from MediaPipe.
PoseLandmarkerResult
Structure
Landmarks:
Landmark #0
:x
: 0.638852y
: 0.671197z
: 0.129959visibility
: 0.9999997615814209presence
: 0.9999984502792358
Landmark #1
:x
: 0.634599y
: 0.536441z
: -0.06984visibility
: 0.999909presence
: 0.999958
- ... (33 landmarks per pose)
WorldLandmarks:
Landmark #0
:x
: 0.067485y
: 0.031084z
: 0.055223visibility
: 0.9999997615814209presence
: 0.9999984502792358
Landmark #1
:x
: 0.063209y
: -0.00382z
: 0.020920visibility
: 0.999976presence
: 0.999998
- ... (33 world landmarks per pose)
More information on its format can be found here.
Loading Data
Loading PoseLandmarkerResult
To load a PoseLandmarkerResult
from a .pkl
file, use the following code:
import joblib
detection_results = joblib.load(pkl_filepath)
Loading the Complete Dataset
To load the dataset into arrays X
, Y
, Z
, and labels
, use the sample code below. Make sure to point folderpath
to the directory containing the dataset files.
import os
import joblib
def build_coordinates_dataset(folderpath):
all_files = os.listdir(folderpath)
pkl_filepaths = [os.path.join(folderpath, pkl_filepath) for pkl_filepath in all_files if pkl_filepath.endswith(".pkl")]
print(f'{len(pkl_filepaths)} samples found')
X, Y, Z, labels = [], [], [], []
for pkl_filepath in pkl_filepaths:
detection_results = joblib.load(pkl_filepath)
try:
loaded_pose_landmarks = detection_results
x_frames, y_frames, z_frames = [], [], []
for frame_detection_result in loaded_pose_landmarks:
landmarks = frame_detection_result.pose_world_landmarks[0]
x_landmarks, y_landmarks, z_landmarks = [], [], []
for i in landmarks:
x_landmarks.append(i.x)
y_landmarks.append(i.y)
z_landmarks.append(i.z)
x_frames.append(x_landmarks)
y_frames.append(y_landmarks)
z_frames.append(z_landmarks)
X.append(x_frames)
Y.append(y_frames)
Z.append(z_frames)
labels.append(os.path.basename(pkl_filepath)[:3])
except Exception as e:
print(e)
print(f"Error loading {pkl_filepath}")
return X, Y, Z, labels
To load the dataset into arrays X, Y, Z, and labels, use the sample code below. Make sure to point folderpath to the directory containing the dataset files.
- Downloads last month
- 10