added download process
This commit is contained in:
parent
5bf2c86ddd
commit
5da8b10c64
|
@ -744,9 +744,31 @@
|
|||
"\n",
|
||||
"Specifically, you should download the `gtFine_trainvaltest` and `leftImg8bit_trainvaltest` and specify the corresponding data splits into the dataloader.\n",
|
||||
"\n",
|
||||
"Below is a quick dataset class to help you load and preprocess the Cityscapes examples."
|
||||
"Below is a quick dataset class to help you load and preprocess the Cityscapes examples. You can also run the code below to download the dataset, after you've created an account at http://cityscapes-dataset.com."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "AAjgcHDS64_o"
|
||||
},
|
||||
"source": [
|
||||
"# Store necessary cookies\n",
|
||||
"import getpass, os\n",
|
||||
"username = input(\"What is your Cityscapes username? (http://cityscapes-dataset.com) \")\n",
|
||||
"password = getpass.getpass(\"What is your Cityscapes password? \")\n",
|
||||
"os.mkdir(\"data\")\n",
|
||||
"os.system(f\"wget --keep-session-cookies --save-cookies=data/cookies.txt --post-data 'username={username}&password={password}&submit=Login' https://www.cityscapes-dataset.com/login/\")\n",
|
||||
"# Download data\n",
|
||||
"!cd data; wget --load-cookies cookies.txt --content-disposition https://www.cityscapes-dataset.com/file-handling/?packageID=1\n",
|
||||
"!cd data; wget --load-cookies cookies.txt --content-disposition https://www.cityscapes-dataset.com/file-handling/?packageID=3\n",
|
||||
"# Unzip data\n",
|
||||
"!cd data; unzip leftImg8bit_trainvaltest\n",
|
||||
"!cd data; unzip gtFine_trainvaltest"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
|
@ -938,11 +960,11 @@
|
|||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "w-2lU4TnK5ik",
|
||||
"outputId": "a51b2643-9efe-4141-f9c3-7cba91398cc4",
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/",
|
||||
"height": 1000
|
||||
}
|
||||
},
|
||||
"outputId": "a51b2643-9efe-4141-f9c3-7cba91398cc4"
|
||||
},
|
||||
"source": [
|
||||
"from torchvision.utils import make_grid\n",
|
||||
|
|
Loading…
Reference in New Issue