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

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]

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

Uploaded Source

Built Distribution

torch_skeleton-0.1.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for torch_skeleton-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3211b8e5c7e7bf61e944504ed9e149771d80d666ebdc7ca08d19a9c0e68ed98
MD5 7478d7b8d68d0b24f07c3cd3f51933c6
BLAKE2b-256 d4b54d6019d22f39f367e40e6a7f65097fb9175c46971cbb0cdf83b976b73f37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_skeleton-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20341764f924022f46a3e2da808d959e84effaf197e0686d075f9a75d120d266
MD5 a56cf94de03c247b2875df53c54cf1d4
BLAKE2b-256 130cb016f2e3d2b32875bae7fa48175288aec04dcfddf4198ab0a8ee278049d1

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