def download_datasets(root: str): """ Download the Imagenet-R dataset archives and expand them in the folder provided as parameter """ IMAGENET_R_URL = "https://people.eecs.berkeley.edu/~hendrycks/imagenet-r.tar" download_and_extract_archive(url=IMAGENET_R_URL, download_root=root)
def download_dataset(root: str): """ Download the K700 dataset video path, annotations and videos """ # Download the video path and the annotations for split in ["train", "val"]: download_url( root=root, url=f"https://s3.amazonaws.com/kinetics/700_2020/{split}/k700_2020_{split}_path.txt", ) download_url( root=root, url=f"https://s3.amazonaws.com/kinetics/700_2020/annotations/{split}.csv", ) # Download all the videos and expand the archive for split in ["train", "val"]: with open(os.path.join(root, f"k700_2020_{split}_path.txt")) as f: for line in f: video_batch_url = line.strip() split_root = os.path.join(root, split) download_and_extract_archive( url=video_batch_url, download_root=split_root )
def download_dtd_dataset(root: str): """ Download the Oxford Pets dataset archives and expand them in the folder provided as parameter """ url = "https://www.robots.ox.ac.uk/~vgg/data/dtd/download/dtd-r1.0.1.tar.gz" download_and_extract_archive(url, root)
def download_oxford_pets(root: str): """ Download the Oxford Pets dataset archives and expand them in the folder provided as parameter """ url_folder = "https://www.robots.ox.ac.uk/~vgg/data/pets/data/" for url_file in ["images.tar.gz", "annotations.tar.gz"]: download_and_extract_archive(url=url_folder + url_file, download_root=root)
def download_oxford_flowers(root: str): """ Download the Oxford Pets dataset archives and expand them in the folder provided as parameter """ url_folder = "https://www.robots.ox.ac.uk/~vgg/data/flowers/102/" download_and_extract_archive(url_folder + "102flowers.tgz", download_root=root) for url_file in ["imagelabels.mat", "setid.mat"]: download_url(url_folder + url_file, root)
def download_dataset(root: str): """ Download the iWildCam2020 dataset URL taken from: https://github.com/p-lambda/wilds/blob/main/wilds/datasets/iwildcam_dataset.py """ URL = "https://worksheets.codalab.org/rest/bundles/0x6313da2b204647e79a14b468131fcd64/contents/blob/" download_and_extract_archive(url=URL, download_root=root, filename="archive.tar.gz")
def download_fgvc_aircraft(root: str): """ Download the FGVC Aircraft dataset archives and expand them in the folder provided as parameter """ url_folder = "https://www.robots.ox.ac.uk/~vgg/data/fgvc-aircraft/archives/" for url_file in [ "fgvc-aircraft-2013b.tar.gz", "fgvc-aircraft-2013b-annotations.tar.gz", ]: download_and_extract_archive(url_folder + url_file, root)
def download_oxford_dataset(root: str): """ Download the Oxford dataset archive and expand it in the folder provided as parameter """ images_url = "https://www.robots.ox.ac.uk/~vgg/data/oxbuildings/oxbuild_images.tgz" download_and_extract_archive(images_url, root) metadata_url = ( "http://cmp.felk.cvut.cz/revisitop/data/datasets/roxford5k/gnd_roxford5k.pkl" ) download_url(metadata_url, root)
def download_dataset(root: str): """ Download the KITTI dataset archive and expand it in the folder provided as parameter """ IMAGE_URL = ( "https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_image_2.zip" ) LABEL_URL = ( "https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_label_2.zip" ) download_and_extract_archive(url=IMAGE_URL, download_root=root) download_and_extract_archive(url=LABEL_URL, download_root=root)
def download_dataset(root: str): """ Download the CLEVR dataset archive and expand it in the folder provided as parameter """ URLS = [ "https://cs.nyu.edu/~ylclab/data/norb-v1.0-small/smallnorb-5x46789x9x18x6x2x96x96-training-dat.mat.gz", "https://cs.nyu.edu/~ylclab/data/norb-v1.0-small/smallnorb-5x46789x9x18x6x2x96x96-training-cat.mat.gz", "https://cs.nyu.edu/~ylclab/data/norb-v1.0-small/smallnorb-5x46789x9x18x6x2x96x96-training-info.mat.gz", "https://cs.nyu.edu/~ylclab/data/norb-v1.0-small/smallnorb-5x01235x9x18x6x2x96x96-testing-dat.mat.gz", "https://cs.nyu.edu/~ylclab/data/norb-v1.0-small/smallnorb-5x01235x9x18x6x2x96x96-testing-cat.mat.gz", "https://cs.nyu.edu/~ylclab/data/norb-v1.0-small/smallnorb-5x01235x9x18x6x2x96x96-testing-info.mat.gz", ] for url in URLS: download_and_extract_archive(url=url, download_root=root)
def download_dataset(root: str): """ Download the Standford Cars dataset archives and expand them in the folder provided as parameter """ download_and_extract_archive(url=TRAIN_IMAGE_URL, download_root=root) download_and_extract_archive(url=TRAIN_ANNOT_URL, download_root=root) download_and_extract_archive(url=TEST_IMAGE_URL, download_root=root) download_url(url=TEST_ANNOT_URL, root=root)
def download_gtsrb(root: str): """ Download the GTSRB dataset archives and expand them in the folder provided as parameter """ url_training = "https://sid.erda.dk/public/archives/daaeac0d7ce1152aea9b61d9f1e19370/GTSRB-Training_fixed.zip" url_test = "https://sid.erda.dk/public/archives/daaeac0d7ce1152aea9b61d9f1e19370/GTSRB_Final_Test_Images.zip" url_test_gt = "https://sid.erda.dk/public/archives/daaeac0d7ce1152aea9b61d9f1e19370/GTSRB_Final_Test_GT.zip" download_and_extract_archive(url_training, download_root=root) download_and_extract_archive(url_test, download_root=root) download_and_extract_archive(url_test_gt, download_root=root)
def download_dataset(input_dir_path: str): """ Download the iNaturalist2018 annotations and dataset """ logger.info("========Downloading Annotations ========") download_and_extract_archive( url=TRAINING_ANNOTATIONS_URL, download_root=input_dir_path ) download_and_extract_archive(url=VAL_ANNOTIATIONS_URL, download_root=input_dir_path) logger.info("========Downloading Images. This may take awhile! ========") download_and_extract_archive(url=IMAGES_URL, download_root=input_dir_path)
def download_dataset(root: str): """ Download the EuroSAT dataset archive and expand it in the folder provided as parameter """ URL = "http://madm.dfki.de/files/sentinel/EuroSAT.zip" download_and_extract_archive(url=URL, download_root=root)
def download_dataset(root: str): """ Download the CLEVR dataset archive and expand it in the folder provided as parameter """ URL = "https://dl.fbaipublicfiles.com/clevr/CLEVR_v1.0.zip" download_and_extract_archive(url=URL, download_root=root)
def download_dataset(root: str): """ Download the dSprites dataset archive and expand it in the folder provided as parameter """ URL = "https://github.com/deepmind/dsprites-dataset/archive/master.zip" download_and_extract_archive(url=URL, download_root=root)
def download_dataset(root: str): """ Download the FOOD101 dataset archive and expand it in the folder provided as parameter """ URL = "http://data.vision.ee.ethz.ch/cvl/food-101.tar.gz" download_and_extract_archive(url=URL, download_root=root)
def download_dataset(root: str): """ Download the SUN397 dataset archive and expand it in the folder provided as parameter """ URL = "http://vision.princeton.edu/projects/2010/SUN/SUN397.tar.gz" download_and_extract_archive(url=URL, download_root=root)