Download plot_dataset.py from SitongGong/Ref_LVOS: direct link, hf CLI and curl.
- Browser
- Download file 479 Bytes
-
https://huggingface.co/datasets/SitongGong/Ref_LVOS/resolve/main/plot_dataset.py
- Command line
-
hf download hf://datasets/SitongGong/Ref_LVOS/plot_dataset.py
-
curl -L -o plot_dataset.py https://huggingface.co/datasets/SitongGong/Ref_LVOS/resolve/main/plot_dataset.py
479 Bytes
| import json | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from matplotlib import rcParams | |
| # 设置全局字体为 Times New Roman | |
| plt.rcParams['font.family'] = 'serif' | |
| # 加载 JSON 数据 | |
| json_path = "/Users/gongsitong/Desktop/dataset_processing/Ref_LVOS/video_exp.json" | |
| with open(json_path, 'r') as f: | |
| json_dict = json.load(f)["videos"] | |
| for video_name, video_dict in json_dict.items(): | |
| for exp_id, exp_dict in video_dict["expressions"].items(): | |
| exp_dict |