Skip to main content

Skeleton Transformer Module in Pytorch

Pytorch implementation of "skeleton transformer module", which is mentioned in Skeleton-based Action Recognition with Convolutional Neural Networks.

Install

You can install this module from PyPI.

pip install skeletorch

How to use

Module

skeletorch.SkeletonTransformer

Parameters:

All parameters are required.

timesteps: Timesteps of input time-series data (equal to number of frames, mentioned as 'T' in the paper)

kpts_dim: Dimentions of keypoints (usually 2 (x, y) or 3 (x, y, z))

input_kpts_num: Number of joints in original keypoints (mentioned as 'N' in the paper)

output_dim: Dimentions of output (mentioned as 'M' in the paper)

Input:

x: 2-dimentional tensor of shape (timesteps, input_kpts_num*kpts_dim)

Example

import torch

from skeletorch import SkeletonTransformer



# parameters

timesteps = 20

kpts_dim = 3

input_kpts_num = 17

output_dim = 10



# input (the size is (20, 51) in this example)

x = torch.Tensor(torch.randn(timesteps, kpts_dim*input_kpts_num))



# make layer

layer = SkeletonTransformer(timesteps, kpts_dim, input_kpts_num, output_dim)



layer(x)

Of course you can use this module in your Pytorch network.

Keras implementation

We also have Keras implementation of this module:

https://github.com/Yutsuro/skeleton-transformer-Keras

Release files for skeletorch 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skeletorch 0.1.1
File Size Uploaded
skeletorch-0.1.1.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for skeletorch 0.1.1
File Interpreter ABI Platform
skeletorch-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / skeletorch-0.1.1.tar.gz

Download URL skeletorch-0.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
01e818bf947234b0525dff5c22ef62006081917d26a7772aa2793da9321b27ac
BLAKE2b-256 checksum
How to use checksums
b6d63a693f043e3ec382839c50828295b6de7a854f60d07a62cb8d23fea5b04a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release files / skeletorch-0.1.1-py3-none-any.whl

Download URL skeletorch-0.1.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d24c9c1cd03ad25f3f512d1cbc57ffde14e71d3efe8b63d3b7dbeb21f2a22679
BLAKE2b-256 checksum
How to use checksums
2c5fcfe8e7b2c996c75e34db475fc45e0160ebdec6b410a104b2fdff3001ee62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page