π»Creating your first dataset
Inserting JSON
Creating and inserting your first dataset
Downloading a dataset
import os
from tensorflow.keras.utils import get_file
root_dir = "datasets"
annotations_dir = os.path.join(root_dir, "annotations")
images_dir = os.path.join(root_dir, "train2014")
annotation_file = os.path.join(annotations_dir, "captions_train2014.json")
# Download caption annotation files
annotation_zip = get_file(
"captions.zip",
cache_dir=os.path.abspath("."),
origin="http://images.cocodataset.org/annotations/annotations_trainval2014.zip",
extract=True,
)
# Download image files
image_zip = get_file(
"train2014.zip",
cache_dir=os.path.abspath("."),
origin="http://images.cocodataset.org/zips/train2014.zip",
extract=True,
)Creating a new dataset
Things to note about documents
Last updated
Was this helpful?