Example #1
0
def download_datasets(root: str):
    """
    Download the Imagenet-Sketch dataset archives and expand them
    in the folder provided as parameter.
    """
    url = "https://drive.google.com/uc?export=download&id=1Mj0i5HBthqH1p_yeXzsg22gZduvgoNeA"
    output_file_name = "ImageNet-Sketch.zip"
    download_google_drive_url(url=url,
                              output_path=root,
                              output_file_name=output_file_name)
    extract_archive(os.path.join(root, output_file_name), root)
Example #2
0
def download_caltech_101(root: str):
    """
    Download the FOOD101 dataset archive and expand it in the folder provided as parameter
    """
    url = "http://www.vision.caltech.edu/Image_Datasets/Caltech101/101_ObjectCategories.tar.gz"
    output_file_name = "101_ObjectCategories.tar.gz"
    url = get_redirected_url(url)
    url = to_google_drive_download_url(url)
    download_google_drive_url(url=url,
                              output_path=root,
                              output_file_name=output_file_name)
    extract_archive(os.path.join(root, output_file_name), root)