JackyZhuo commited on
Commit
1782f05
·
1 Parent(s): c64e919
stage_2_fine-tuning/MDVP-Data/brief_caption/process.py DELETED
@@ -1,23 +0,0 @@
1
- import json
2
- import os
3
-
4
- with open('/data1/weifeng/huggingface/Draw-and-Understand/stage_2_fine-tuning/MDVP-Data/brief_caption/gpt4v_vg_brief_caption_point.json', 'r') as f:
5
- data = json.load(f)
6
-
7
- new_data = []
8
- for item in data:
9
- assert len(item["conversations"]) == 2
10
- for cc in item["conversations"]:
11
- if cc["from"] == "gpt":
12
- if ":Short Description" in cc["value"] or ":Short description" in cc["value"] or ":short description" in cc["value"] or ": Short Description" in cc["value"]:
13
- continue
14
- else:
15
- new_data.append(item)
16
- break
17
-
18
-
19
- with open('/data1/weifeng/huggingface/Draw-and-Understand/stage_2_fine-tuning/MDVP-Data/brief_caption/gpt4v_vg_brief_caption_bbox_point.json', 'w') as f:
20
- json.dump(new_data, f, ensure_ascii=False)
21
-
22
-
23
-