Ishwar B commited on
Commit
ac61d04
·
1 Parent(s): edf9f31

Expose image column for viewer

Browse files
README.md CHANGED
@@ -47,6 +47,8 @@ dataset_info:
47
  sequence: string
48
  - name: image_path
49
  dtype: string
 
 
50
  splits:
51
  - name: train
52
  num_bytes: 1101143
@@ -66,6 +68,8 @@ dataset_info:
66
  - name: image_id
67
  dtype: string
68
  - name: observed_classes
 
 
69
  sequence: string
70
  - name: target_classes
71
  sequence: string
 
47
  sequence: string
48
  - name: image_path
49
  dtype: string
50
+ - name: image
51
+ dtype: image
52
  splits:
53
  - name: train
54
  num_bytes: 1101143
 
68
  - name: image_id
69
  dtype: string
70
  - name: observed_classes
71
+ - name: image
72
+ dtype: image
73
  sequence: string
74
  - name: target_classes
75
  sequence: string
data/clue/train.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:efa1537ff34d0d2b5f72e922e84f8cfa4114b1fb185025908d10cca04add5166
3
- size 1101143
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8373cf3c06ddc497a04bfaac97f9eb239dac7079780af0df714cacb2a92dbfc6
3
+ size 1158823
data/mep/train.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d8efcec1604098a9072d2848afaf4141a47a072760f1d19e28bab0e45b6020cf
3
- size 845579
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:071afec281eadb85e990757114d4932973068c60a832ada8add3076db26a651e
3
+ size 888139
data/stats.json CHANGED
@@ -1,13 +1,13 @@
1
  {
2
  "clue": {
3
  "num_examples": 1648,
4
- "num_bytes": 1101143,
5
  "source_path": "raw/clue_metadata.jsonl",
6
  "output_path": "data/clue/train.jsonl"
7
  },
8
  "mep": {
9
  "num_examples": 1216,
10
- "num_bytes": 845579,
11
  "source_path": "raw/mep_metadata.jsonl",
12
  "output_path": "data/mep/train.jsonl"
13
  }
 
1
  {
2
  "clue": {
3
  "num_examples": 1648,
4
+ "num_bytes": 1158823,
5
  "source_path": "raw/clue_metadata.jsonl",
6
  "output_path": "data/clue/train.jsonl"
7
  },
8
  "mep": {
9
  "num_examples": 1216,
10
+ "num_bytes": 888139,
11
  "source_path": "raw/mep_metadata.jsonl",
12
  "output_path": "data/mep/train.jsonl"
13
  }
scripts/build_viewer_files.py CHANGED
@@ -45,7 +45,13 @@ def _normalize_record(record: MutableMapping[str, object]) -> MutableMapping[str
45
  record.setdefault("detected_classes", observed)
46
 
47
  record["target_classes"] = record.get("target_classes", [])
48
- record["image_path"] = record.get("image_path")
 
 
 
 
 
 
49
  return record
50
 
51
 
 
45
  record.setdefault("detected_classes", observed)
46
 
47
  record["target_classes"] = record.get("target_classes", [])
48
+
49
+ image_path = record.get("image_path")
50
+ record["image_path"] = image_path
51
+ if image_path:
52
+ record["image"] = image_path
53
+ else:
54
+ record["image"] = None
55
  return record
56
 
57