Skip to main content

!Alpha Version! - This repository contains code to make datasets stored on th 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


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

Uploaded Source

Built Distribution

hcai_datasets-0.0.1-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file hcai-datasets-0.0.1.tar.gz.

File metadata

  • Download URL: hcai-datasets-0.0.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7

File hashes

Hashes for hcai-datasets-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fe7aeef5eb2e504fc74c42bb6368595744bcc4b898f6c9fb19eef1ffa368c2ba
MD5 c3f80a4cc9959c5af2c925157ec74737
BLAKE2b-256 fc699342a84476178a8e87502fb5e3703308c10431e5840f40a22ff2e3caa19f

See more details on using hashes here.

File details

Details for the file hcai_datasets-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: hcai_datasets-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7

File hashes

Hashes for hcai_datasets-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 493565e54b403e097d0841b28ead2796a6b0edf843fe7b45677ef031703d6384
MD5 ec4b7f099340d16ddc8756fb5c242039
BLAKE2b-256 db78d8f8e4c78c7b778beb51d89b0c3ee9fcc16b011d5ea8ae24eaf4173c9c80

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