Skip to content

Commit

Permalink
add train cub 200
Browse files Browse the repository at this point in the history
Signed-off-by: ChengZi <[email protected]>
  • Loading branch information
zc277584121 committed Feb 23, 2023
1 parent e56dfa7 commit 7c28cd6
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions fine_tune/5_train_cub_200_2011.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,9 @@
"\n",
"And here is a [Benchmarks](https://paperswithcode.com/dataset/cub-200-2011) about this dataset you can refer to.\n",
"First, you should download it to your local path from [Images and annotations](https://drive.google.com/file/d/1hbzc_P1FuxMkcabkgn9ZKinBwW683j45/view).\n",
"When you downloaded it, you can see this structure.\n",
"```\n",
"├── 1.jpg\n",
"├── 2.jpg\n",
"├── 3.jpg\n",
"├── README.md\n",
"└── data\n",
" ├── CUB_200_2011.tgz\n",
" └── segmentations.tgz\n",
"```\n",
"\n",
"Just extract `CUB_200_2011.tgz` and rename folder `images` to `images_orig`.\n",
"\n",
" cd data\n",
" tar zxvf CUB_200_2011.tgz\n",
" cd CUB_200_2011\n",
" mv images images_orig\n",
Expand Down Expand Up @@ -121,9 +111,11 @@
},
"outputs": [],
"source": [
"import shutil\n",
"\n",
"data_dir = os.path.join(root_dir, orig_images_folder)\n",
"new_data_dir = os.path.join(root_dir, new_images_folder)\n",
"if os.path.exists(data_dir):\n",
"if os.path.exists(data_dir) and os.path.exists(new_data_dir):\n",
" pass\n",
"else:\n",
" os.makedirs(os.path.join(new_data_dir, 'train'), exist_ok=True)\n",
Expand Down Expand Up @@ -957,4 +949,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}

0 comments on commit 7c28cd6

Please sign in to comment.