Zexin Li

Please keep honest, open, patient, happy and visionary.

0%

Download ImageNet1k from HuggingFace

Synopsis

To whom needs access ImageNet-1k from HuggingFace Hub.

Prerequisite checklist

  1. Enough disk (>150GB)
  2. Anaconda pip
  3. Run the following code:
    1
    2
    3
    4
    5
    6
    pip install datasets
    # use a linux command screen to prevent session crashed
    # refer to https://www.geeksforgeeks.org/screen-command-in-linux-with-examples/
    screen -S download
    # get a token from https://huggingface.co/settings/tokens
    huggingface-cli login

Download ImageNet-1k with Token Assess

1
2
3
4
# refer to https://huggingface.co/datasets/imagenet-1k
# refer to https://discuss.huggingface.co/t/imagenet-1k-is-not-available-in-huggingface-dataset-hub/25040
from datasets import load_dataset
dset = load_dataset('imagenet-1k', split='train', use_auth_token=True)

Welcome to my other publishing channels