Datasets:
ivelin
commited on
Commit
·
67afdfb
1
Parent(s):
97cff20
chore: checkpoint
Browse filesSigned-off-by: ivelin <[email protected]>
- README.md +21 -0
- ui_refexp.py +3 -1
README.md
CHANGED
|
@@ -10,6 +10,27 @@ language:
|
|
| 10 |
pretty_name: UI understanding
|
| 11 |
size_categories:
|
| 12 |
- 10K<n<100K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
|
|
|
|
| 10 |
pretty_name: UI understanding
|
| 11 |
size_categories:
|
| 12 |
- 10K<n<100K
|
| 13 |
+
dataset_info:
|
| 14 |
+
features:
|
| 15 |
+
- name: screenshot
|
| 16 |
+
dtype: image
|
| 17 |
+
- name: prompt
|
| 18 |
+
dtype: string
|
| 19 |
+
- name: target_bounding_box
|
| 20 |
+
dtype: string
|
| 21 |
+
config_name: ui_refexp
|
| 22 |
+
splits:
|
| 23 |
+
- name: train
|
| 24 |
+
num_bytes: 562037265
|
| 25 |
+
num_examples: 15624
|
| 26 |
+
- name: validation
|
| 27 |
+
num_bytes: 60399225
|
| 28 |
+
num_examples: 471
|
| 29 |
+
- name: test
|
| 30 |
+
num_bytes: 69073969
|
| 31 |
+
num_examples: 565
|
| 32 |
+
download_size: 6515012176
|
| 33 |
+
dataset_size: 691510459
|
| 34 |
---
|
| 35 |
|
| 36 |
|
ui_refexp.py
CHANGED
|
@@ -225,6 +225,7 @@ class UIRefExp(datasets.GeneratorBasedBuilder):
|
|
| 225 |
else:
|
| 226 |
labels = [sample]
|
| 227 |
image_labels[image_id] = labels
|
|
|
|
| 228 |
for file_path, file_obj in images:
|
| 229 |
image_id = re.search("(\d+).jpg", file_path)
|
| 230 |
if image_id:
|
|
@@ -232,8 +233,9 @@ class UIRefExp(datasets.GeneratorBasedBuilder):
|
|
| 232 |
if image_id in files_to_keep:
|
| 233 |
for labels in image_labels[image_id]:
|
| 234 |
bb_json = json.dumps(labels["target_bounding_box"])
|
| 235 |
-
yield
|
| 236 |
"screenshot": {"path": file_path, "bytes": file_obj.read()},
|
| 237 |
"prompt": labels["prompt"],
|
| 238 |
"target_bounding_box": bb_json
|
| 239 |
}
|
|
|
|
|
|
| 225 |
else:
|
| 226 |
labels = [sample]
|
| 227 |
image_labels[image_id] = labels
|
| 228 |
+
_id = 0
|
| 229 |
for file_path, file_obj in images:
|
| 230 |
image_id = re.search("(\d+).jpg", file_path)
|
| 231 |
if image_id:
|
|
|
|
| 233 |
if image_id in files_to_keep:
|
| 234 |
for labels in image_labels[image_id]:
|
| 235 |
bb_json = json.dumps(labels["target_bounding_box"])
|
| 236 |
+
yield _id, {
|
| 237 |
"screenshot": {"path": file_path, "bytes": file_obj.read()},
|
| 238 |
"prompt": labels["prompt"],
|
| 239 |
"target_bounding_box": bb_json
|
| 240 |
}
|
| 241 |
+
_id += 1
|