skeleton datasets and transforms for pytorch
Project description
torch_skeleton
Efficient datasets and transforms for skeleton data
Installation
$ pip install torch_skeleton
Documentation
https://torch-skeleton.readthedocs.io/en/latest/index.html#
Datasets
Download and load raw dataset with preprocess
from torch_skeleton.datasets import NTU
import torch_skeleton.transforms as T
# dwonload ntu skeleton dataset
ntu = NTU(
root="data",
num_classes=60,
eval_type="subject",
split="train",
transform=T.Compose([
T.Denoise(),
T.CenterJoint(),
T.SplitFrames(),
]),
)
x, y = ntu[0]
Cache preprocessed samples to disk
from torch_skeleton.datasets import DiskCache
# cache preprocessing transforms to disk
cache = DiskCache(root="data/NTU", dataset=dataset)
x, y = cache[0]
Apply augmentations to a dataset
from torch_skeleton.datasets import Apply
# cache preprocessing transforms to disk
cache = Apply(
dataset=dataset,
transform=T.Compose([
T.SampleFrames(num_frames=20),
T.RandomRotate(degrees=17),
T.PadFrames(max_frames=20),
]),
)
x, y = cache[0]
Training Models using torch_skeleton
Example Training code using torch_skeleton
is available under examples
Supported models:
- SGN
License
torch_skeleton
was created by Chanhyuk Jung. It is licensed under the terms
of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
torch_skeleton-0.1.1.tar.gz
(17.1 kB
view hashes)
Built Distribution
Close
Hashes for torch_skeleton-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d750a18af946c9b0a0c27f41f13fb6f29cddae947eeb48a1390ae6ac4b5fdc30 |
|
MD5 | 644c0320b8d902a1069fefb950549854 |
|
BLAKE2b-256 | a50d2b1b33355524e4fc944c3b54f9cc05493375d0a924898c09d13d074edd90 |