DVS Gesture Chain
Official implementation of the dataset defined in Spiking Neural Networks for event-based action recognition: A new task to understand their advantage
Installation
From PyPI:
pip install dvsgc
From GitHub source code:
git clone https://github.com/VicenteAlex/DVS-Gesture-Chain.git
pip install requirements
Documentation
Just instantiate DVSGestureChain and run it as a torchvision.datasets.DatasetFolder:
Inherits from torchvision.datasets.DatasetFolder
CLASS dvsgc.DVSGestureChain(
root, frames_number, split, validation=0.2, split_by='number', alpha_min=0.5, alpha_max=0.7, seq_len=4,
class_num=3, repeat=True, dvsg_path=None, transform=None, target_transform=None)
Arguments:
- root (str): root path of the dataset
- frames_number (int): the integrated frame number
- split (str): split from: ['train', 'validation', 'test']
- validation (float): fraction of the training set to use for validation
- split_by (str):
timeornumber - alpha_min (float): lower bound for the gesture duration as a factor of its total duration
- alpha_max (float): upper bound for the gesture duration as a factor of its total duration
- seq_len (int): number of gestures in the chain
- class_num (int): number of classes to use (up to 11)
- repeat (bool): whether to allow repetition of the same gesture twice in a row
- dvsg_path (str): If DVS-Gesture events are saved in another folder they can be retrieved by indicating the path here, else they will be created again in root
- transform (Optional[Callable]): a function/transform that takes in a sample and returns a transformed version.
- target_transform (Optional[Callable]): a function/transform that takes in the target and transforms it.
Usage:
Example:
train_set = dvsgc.DVSGestureChain(root=dataset_dir, split='train', frames_number=T)
train_loader = torch.utils.data.DataLoader(train_set, batch_size=N, shuffle=True, num_workers=4, pin_memory=True, drop_last=True)
validation_set = dvsgc.DVSGestureChain(root=dataset_dir, split='validation', frames_number=T)
validation_loader = torch.utils.data.DataLoader(validation_set, batch_size=N, shuffle=True, num_workers=4, pin_memory=True, drop_last=True)
Downloading the data:
DVS-GC requires to download the data from the original DVS-Gesture dataset, as this is not downloaded automatically, the first time the dataset is used the following message will appear: "This dataset can not be downloaded automatically, please download files manually and put files at root/download". Follow the instructions and download the DVS-Gesture files into that folder. Then re-run.
Saving memory:
The first time the dataset is used, the code will extract DVS-Gestures to the folder "extract", then build events from it in the folder "events_np" and then, from those events, create the frames for the DVS-GC dataset in a "DVSGC..." folder.
Once events_np is created, the extract folder and download folder are no longer necessary.
The "events_np" folder will be used every time a new DVS-GC dataset is created with different parameters. Alternatively, if an already existing DVS-GC dataset is used, "events_np" is not necessary.
Metadata
Release files for dvsgc 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dvsgc-0.1.2.tar.gz | 8.1 kB | Without provenance | Details for dvsgc-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dvsgc-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for dvsgc-0.1.2-py3-none-any.whl |
Total release size: 16.9 kB
Release files / dvsgc-0.1.2.tar.gz
| Download URL | dvsgc-0.1.2.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cbb2bc9434c23be9c20955ac4d2e29a437bf9026a5ee968d213e3f527b0ae67
|
|
BLAKE2b-256 checksum How to use checksums |
6e9e2f514a08502baf97d6706f012a4811cafdb36805c11aadd6452b450c259f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / dvsgc-0.1.2-py3-none-any.whl
| Download URL | dvsgc-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd3e5d6db13d5e800105e63f05947e574740caff0c00013a296ab447631af80d
|
|
BLAKE2b-256 checksum How to use checksums |
8d41a78faa9d5e2b332a3ff435b6451522658de56e2ee5e93d42b3d96c850566
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for dvsgc 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.