Skip to main content

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


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.2.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

torch_skeleton-0.1.2-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file torch_skeleton-0.1.2.tar.gz.

File metadata

  • Download URL: torch_skeleton-0.1.2.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for torch_skeleton-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ae0f49cc43b8f9164dab15c43049c0bd2358303129f8e9f2b27f2410e4462cb4
MD5 256ccf9fd38f90d8ae868dd99f67ffcf
BLAKE2b-256 c6a83f568dc1676cb37e0df64aedf4d45a4a7fa46e319ee4922cad4e128301a7

See more details on using hashes here.

File details

Details for the file torch_skeleton-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for torch_skeleton-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f094c6306792dc22ee48fbde582e316b70563ef7884f1a8df946db991b15cd4
MD5 1a5600addd173a07684b92ca040a3f42
BLAKE2b-256 b85c2e2f1aed750f3acd1722d20da2815dfa842c99db781640c7c717a900111d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page