Skip to content

Commit

Permalink
Tutorials: fix dataset contribution tutorial (#2469)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart authored Dec 16, 2024
1 parent 7e63038 commit 9ed8a60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/tutorials/contribute_non_geo_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,15 @@
"source": [
"import os\n",
"import shutil\n",
"import tempfile\n",
"\n",
"import numpy as np\n",
"from PIL import Image\n",
"\n",
"# Define the root directory and subdirectories\n",
"root_dir = 'my_new_dataset'\n",
"sub_dirs = ['sub_dir_1', 'sub_dir_2', 'sub_dir_3']\n",
"# Normally this would be the current directory (tests/data/my_new_dataset)\n",
"root_dir = os.path.join(tempfile.gettempdir(), 'my_new_dataset')\n",
"sub_dirs = ['image', 'target']\n",
"splits = ['train', 'val', 'test']\n",
"\n",
"image_file_names = ['sample_1.png', 'sample_2.png', 'sample_3.png']\n",
Expand Down

0 comments on commit 9ed8a60

Please sign in to comment.