peteole commited on
Commit
e8bf783
·
verified ·
1 Parent(s): 877a22c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -38,6 +38,21 @@ This dataset is a downsampled version of the [COCO 2017 dataset](https://cocodat
38
  - segmentation: 256x256 image. Each pixel encodes the class of that pixel. See `class_names_dict.json` for a legend.
39
  - captions: a list of captions for the image, each by a different labeler.
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  ### License
42
 
43
  - **License Type**: [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/)
 
38
  - segmentation: 256x256 image. Each pixel encodes the class of that pixel. See `class_names_dict.json` for a legend.
39
  - captions: a list of captions for the image, each by a different labeler.
40
 
41
+
42
+ Use the dataset as follows:
43
+
44
+ ```python
45
+ import requests
46
+ from datasets import load_dataset
47
+
48
+ ds = load_dataset("peteole/coco2017-segmentation", split="train")
49
+
50
+ # Optional: Load the class names as dict
51
+ url = "https://huggingface.co/datasets/peteole/coco2017-segmentation/resolve/main/class_names_dict.json"
52
+ response = requests.get(url)
53
+ class_names_dict = response.json()
54
+ ```
55
+
56
  ### License
57
 
58
  - **License Type**: [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/)