YehLi / xmodaler

X-modaler is a versatile and high-performance codebase for cross-modal analytics(e.g., image captioning, video captioning, vision-language pre-training, visual question answering, visual commonsense reasoning, and cross-modal retrieval).
Other
1.02k stars 111 forks source link

MSRVTT input json format #11

Closed JoeHEZHAO closed 3 years ago

JoeHEZHAO commented 3 years ago

Dear Author

Thanks for your great work! I have a question about this file https://github.com/YehLi/xmodaler/blob/master/tools/msrvtt_preprocess.py.

I follow the Line4 of the above file to build the JSON file, but encounter the following error:

parsed input parameters: { "input_json": "./ourds_xmodaler/ourds_description_xm.json", "output_dir": "./ourds_xmodaler/preprocessed_files/", "max_length": 40, "word_count_threshold": 5 } Traceback (most recent call last): File "/Users/jackwu/PycharmProjects/nba_gametracker_scraper/msrvtt_preprocess.py", line 264, in main(params) File "/Users/jackwu/PycharmProjects/nba_gametracker_scraper/msrvtt_preprocess.py", line 224, in main sentences, videos, vid2split = load_list(params['input_json']) File "/Users/jackwu/PycharmProjects/nba_gametracker_scraper/msrvtt_preprocess.py", line 212, in load_list data = json.load(open(f, 'r')) IsADirectoryError: [Errno 21] Is a directory: '.'

Could you please specify the format for constructing the JSON file for a new dataset?

Thanks!!!

YehLi commented 3 years ago

I have upload the json file(videodatainfo_2016.json) to the msrvtt_dataset folder (https://drive.google.com/drive/folders/1vx9n7tAIt8su0y_3tsPJGvMPBMm8JLCZ?usp=sharing). You can construct your own JSON file following the format.

JoeHEZHAO commented 3 years ago

Thanks! It's much more clear.