chrisc36 commited on
Commit
275aa4c
·
verified ·
1 Parent(s): abeda52

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -3
README.md CHANGED
@@ -42,16 +42,30 @@ Quick links:
42
 
43
  ## Loading
44
  ```python
45
- pixmo_points_dataset = datasets.load_dataset("allenai/pixmo-points")
46
  ```
47
 
48
  ## Data Format
49
- Images are stored as URLs that will need to be downloaded separately.
 
 
 
 
 
 
50
  Image hashes are included to support double-checking that the downloaded image matches the annotated image.
51
  It can be checked like this:
52
 
 
 
 
 
 
 
 
 
53
  ```
54
- ```
55
 
56
  ## License
57
  This dataset is licensed under ODC-BY-1.0. It is intended for research and educational use in accordance with Ai2's [Responsible Use Guidelines](https://allenai.org/responsible-use).
 
42
 
43
  ## Loading
44
  ```python
45
+ data = datasets.load_dataset("allenai/pixmo-points")
46
  ```
47
 
48
  ## Data Format
49
+ Images are stored as URLs that will need to be downloaded separately. Note image urls can be repeated in the data.
50
+
51
+ The `points` fields contains the x, y coordinates specified in pixels.
52
+ The `label` field contains the string of name of what is being pointed at, this can be a simple object a more complex referring expression.
53
+
54
+
55
+ ## Image Checking
56
  Image hashes are included to support double-checking that the downloaded image matches the annotated image.
57
  It can be checked like this:
58
 
59
+ ```python
60
+ from hashlib import sha256
61
+ import requests
62
+
63
+ example = data[0]
64
+ image_bytes = requests.get(example["image_url"]).content
65
+ byte_hash = sha256(image_bytes).hexdigest()
66
+ assert byte_hash == example["image_sha256"]
67
  ```
68
+
69
 
70
  ## License
71
  This dataset is licensed under ODC-BY-1.0. It is intended for research and educational use in accordance with Ai2's [Responsible Use Guidelines](https://allenai.org/responsible-use).