Update README.md
Browse files
README.md
CHANGED
|
@@ -109,7 +109,7 @@ This dataset is ready for commercial/non-commercial use.
|
|
| 109 |
| Column Name | Description | Data Type |
|
| 110 |
|-------------|-------------|-----------|
|
| 111 |
| `image_id` | Unique identifier for the image | string |
|
| 112 |
-
| `
|
| 113 |
| `image_title` | Human-written title summarizing the content or subject | string |
|
| 114 |
| `image_description` | Human-written narrative describing what is visibly present | string |
|
| 115 |
| `scene_description` | Technical and compositional details about image capture | string |
|
|
@@ -146,7 +146,7 @@ val_data = load_dataset("Dataseeds/GuruShots-Sample-Dataset-GSD", split="validat
|
|
| 146 |
|
| 147 |
# Access images and annotations
|
| 148 |
sample = dataset["train"][0]
|
| 149 |
-
image = sample["
|
| 150 |
title = sample["image_title"]
|
| 151 |
description = sample["image_description"]
|
| 152 |
segments = sample["segmented_objects"]
|
|
@@ -168,7 +168,7 @@ import torch
|
|
| 168 |
dataset = load_dataset("Dataseeds/GuruShots-Sample-Dataset-GSD", split="train")
|
| 169 |
|
| 170 |
# Convert to PyTorch format
|
| 171 |
-
dataset.set_format(type="torch", columns=["
|
| 172 |
|
| 173 |
# Create DataLoader
|
| 174 |
dataloader = DataLoader(dataset, batch_size=16, shuffle=True)
|
|
@@ -185,7 +185,7 @@ dataset = load_dataset("Dataseeds/GuruShots-Sample-Dataset-GSD", split="train")
|
|
| 185 |
|
| 186 |
# Convert to TensorFlow Dataset
|
| 187 |
tf_dataset = dataset.to_tf_dataset(
|
| 188 |
-
columns=["
|
| 189 |
batch_size=16,
|
| 190 |
shuffle=True
|
| 191 |
)
|
|
|
|
| 109 |
| Column Name | Description | Data Type |
|
| 110 |
|-------------|-------------|-----------|
|
| 111 |
| `image_id` | Unique identifier for the image | string |
|
| 112 |
+
| `image` | Image file, PIL type | image |
|
| 113 |
| `image_title` | Human-written title summarizing the content or subject | string |
|
| 114 |
| `image_description` | Human-written narrative describing what is visibly present | string |
|
| 115 |
| `scene_description` | Technical and compositional details about image capture | string |
|
|
|
|
| 146 |
|
| 147 |
# Access images and annotations
|
| 148 |
sample = dataset["train"][0]
|
| 149 |
+
image = sample["image"] # PIL Image object
|
| 150 |
title = sample["image_title"]
|
| 151 |
description = sample["image_description"]
|
| 152 |
segments = sample["segmented_objects"]
|
|
|
|
| 168 |
dataset = load_dataset("Dataseeds/GuruShots-Sample-Dataset-GSD", split="train")
|
| 169 |
|
| 170 |
# Convert to PyTorch format
|
| 171 |
+
dataset.set_format(type="torch", columns=["image", "image_title", "segmentation_masks"])
|
| 172 |
|
| 173 |
# Create DataLoader
|
| 174 |
dataloader = DataLoader(dataset, batch_size=16, shuffle=True)
|
|
|
|
| 185 |
|
| 186 |
# Convert to TensorFlow Dataset
|
| 187 |
tf_dataset = dataset.to_tf_dataset(
|
| 188 |
+
columns=["image", "image_title"],
|
| 189 |
batch_size=16,
|
| 190 |
shuffle=True
|
| 191 |
)
|