Zedge commited on
Commit
b79470e
·
verified ·
1 Parent(s): 9064cc2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -9
README.md CHANGED
@@ -139,20 +139,18 @@ This dataset is ready for commercial/non-commercial use.
139
  ```python
140
  from datasets import load_dataset
141
 
142
- # Load the entire dataset
143
- dataset = load_dataset("Dataseeds/DataSeeds-Sample-Dataset-DSD")
144
 
145
- # Load specific split
146
- train_data = load_dataset("Dataseeds/DataSeeds-Sample-Dataset-DSD", split="train")
147
- val_data = load_dataset("Dataseeds/DataSeeds-Sample-Dataset-DSD", split="validation")
148
 
149
- # Access images and annotations
150
- sample = dataset["train"][0]
151
- image = sample["image"] # PIL Image object
152
  title = sample["image_title"]
153
  description = sample["image_description"]
154
  segments = sample["segmented_objects"]
155
- masks = sample["segmentation_masks"]
156
 
157
  print(f"Title: {title}")
158
  print(f"Description: {description}")
 
139
  ```python
140
  from datasets import load_dataset
141
 
142
+ # Load the training split of the dataset
143
+ dataset = load_dataset("Dataseeds/DataSeeds.AI-Sample-Dataset-DSD", split="train")
144
 
145
+ # Access the first sample
146
+ sample = dataset[0]
 
147
 
148
+ # Extract the different features from the sample
149
+ image = sample["image"] # The PIL Image object
 
150
  title = sample["image_title"]
151
  description = sample["image_description"]
152
  segments = sample["segmented_objects"]
153
+ masks = sample["segmentation_masks"] # The PIL Image object for the mask
154
 
155
  print(f"Title: {title}")
156
  print(f"Description: {description}")