!Alpha Version! - This repository contains code to make datasets stored on the corpora network drive of the chair compatible with the [tensorflow dataset api](https://www.tensorflow.org/api_docs/python/tf/data/Dataset)
Project description
Description
This repository contains code to make datasets stored on th corpora network drive of the chair compatible with the tensorflow dataset api .
Currently available Datasets
Dataset | Status | Url |
---|---|---|
audioset | ❌ | https://research.google.com/audioset/ |
ckplus | ✅ | http://www.iainm.com/publications/Lucey2010-The-Extended/paper.pdf |
faces | ✅ | https://faces.mpdl.mpg.de/imeji/ |
is2021_ess | ❌ | - |
librispeech | ❌ | https://www.openslr.org/12 |
Example Usage
import os
import tensorflow as tf
import tensorflow_datasets as tfds
import hcai_datasets
from matplotlib import pyplot as plt
# Preprocessing function
def preprocess(x, y):
img = x.numpy()
return img, y
# Creating a dataset
ds, ds_info = tfds.load(
'hcai_example_dataset',
split='train',
with_info=True,
as_supervised=True,
builder_kwargs={'dataset_dir': os.path.join('path', 'to', 'directory')}
)
# Input output mapping
ds = ds.map(lambda x, y: (tf.py_function(func=preprocess, inp=[x, y], Tout=[tf.float32, tf.int64])))
# Manually iterate over dataset
img, label = next(ds.as_numpy_iterator())
# Visualize
plt.imshow(img / 255.)
plt.show()
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
hcai-datasets-0.0.2.tar.gz
(13.5 kB
view hashes)
Built Distribution
Close
Hashes for hcai_datasets-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5249757ecbed03c1e911fbfddd3d33554067b0be7a8c509760084c5e78c3113b |
|
MD5 | 30d51ffdd210778607786df763bc84ef |
|
BLAKE2b-256 | 3ccfa22c1e0c4e41e8ab390afbf8537b554faabd3d7de9c32f2b7d69d6dbbea2 |