upload dataset file to repo
Browse files- lisa_data/llava.py +9 -0
lisa_data/llava.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
|
| 3 |
+
data = json.load(open('/mnt/workspace/workgroup/yuanyq/code/LISA/dataset/llava_dataset/llava_instruct_150k.json'))
|
| 4 |
+
|
| 5 |
+
for d in data:
|
| 6 |
+
d['image'] = 'coco/train2017/'+d['image']
|
| 7 |
+
|
| 8 |
+
with open('llava_instruct_150k.json', 'w') as f:
|
| 9 |
+
f.write(json.dumps(data, indent=4))
|