forked from NVlabs/VILA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NVlabs#87 from yukang2017/main
VILA Benchmark using GPT-4 for evaluation
- Loading branch information
Showing
4 changed files
with
78 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
import json | ||
|
||
path_to_pred = "/home/ligengz/workspace/VILA-internal/vertex-ai-gemini-15_pexel_1k_new_prompt.json" | ||
labels_json = json.load(open("/lustre/fs2/portfolios/nvr/users/yukangc/datasets/Video-Benchmark-Label-0605.json")) | ||
|
||
videos = [] | ||
preds_dict = {} | ||
for item in preds_json: | ||
videos.append(item.split("/")[-1].split(".")[0]) | ||
preds_dict[item.split("/")[-1].split(".")[0]] = preds_json[item] | ||
|
||
model = "Gemini" | ||
pred_path = "./eval_output/%s"%model | ||
|
||
output_json = [] | ||
for item in labels_json: | ||
video_name = item['video_name'] | ||
item_output = item | ||
item_output['pred'] = preds_dict[video_name]['output'] | ||
output_json.append(item_output) | ||
|
||
json.dump(output_json, open(os.path.join(pred_path, "pred.json"), "w")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters