TimeSearch-R-raw / data.py
CSDDSFSFSAFSAF's picture
Add files using upload-large-folder tool
bbaf249 verified
from longvideobench import LongVideoBenchDataset
YOUR_DATA_PATH = '/data/shuimu.chen/LongVideoBench'
import debugpy
try:
# 5678 is the default attach port in the VS Code debug configurations. Unless a host and port are specified, host defaults to 127.0.0.1
debugpy.listen(("localhost", 9518))
print("Waiting for debugger attach")
debugpy.wait_for_client()
except Exception as e:
pass
# validation
dataset = LongVideoBenchDataset(YOUR_DATA_PATH, "lvb_val.json", max_num_frames=64)
# test
# dataset = LongVideoBenchDataset(YOUR_DATA_PATH, "lvb_test_wo_gt.json", max_num_frames=64)
print(dataset[0]["inputs"]) # A list consisting of PIL.Image and strings.