Spaces:
Sleeping
Sleeping
File size: 780 Bytes
ae1ea8a 43002be ae1ea8a 43002be ae1ea8a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# Script to automatically download and cache dataset
# Usage: python download.py
#
# To learn more about the dataset, access:
# https://www.cityscapes-dataset.com/
import os
import sys
import pip
# Download and cache dataset
def main():
pass
def download(name='cityscapes', path='data/downloads'):
"""Select one of the available and implemented datasets to download:
name=any(['cityscapes', 'camvid', 'labelme'])
"""
if name == 'cityscapes':
download_cityscapes(path)
else:
raise NotImplementedError
def download_cityscapes(path='data/downloads'):
if hasattr(pip, 'main'):
pip.main(['install', 'cityscrapesscripts'])
else:
raise EnvironmentError("pip is not installed")
if __name__ == "__main__":
main()
|