-
-
Save icebeam7/8b2c510e2d628a4dab2e38120615b27d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import urllib.request | |
import zipfile | |
# Descargue el conjunto de datos de Github | |
data_url = "https://github.com/hnky/dataset-lego-figures/raw/master/_download/simpsons-lego-dataset.zip" | |
data_path = "./data-train" | |
download_path = os.path.join(data_path,"simpsons-lego-dataset.zip") | |
if not os.path.exists(data_path): | |
os.mkdir(data_path); | |
urllib.request.urlretrieve(data_url, filename=download_path) | |
# Descomprima el dataset | |
zip_ref = zipfile.ZipFile(download_path, 'r') | |
zip_ref.extractall(data_path) | |
zip_ref.close() | |
print("Data extracted in: {}".format(data_path)) | |
os.remove(download_path) | |
print("Downloaded file removed: {}".format(download_path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment