'How to import a manually downloaded dataset in Tensorflow?

I know that it can be loaded using tfds.load('nyu_depth_v2') and I have try it but it fails I suspect due to my slow internet connection

I have downloaded the dataset nyu_depth_v2 from http://datasets.lids.mit.edu/fastdepth/data/nyudepthv2.tar.gz obtained from https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/image/nyu_depth_v2.py

So after downloading it I have extracted it using the extract but when I run:

ds = tfds.load('nyu_depth_v2', split='train', shuffle_files=True, download=False)

I get this message :

AssertionError: Dataset nyu_depth_v2: could not find data in /home/nicko/tensorflow_datasets. Please make sure to call dataset_builder.download_and_prepare(), or pass download=True to tfds.load() before trying to access the tf.data.Dataset object.

Please let me know what I am missing or if it's impossible to do it the way I am doing it.



Solution 1:[1]

Some datasets are new and this is better that first install tfds_nightly like below:

$ pip install tfds-nightly

and you need to set download=True and your error excatly says : pass download=True to tfds.load()

ds = tfds.load('nyu_depth_v2', split='train', shuffle_files=True, download=True)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1