Open kpis-msa opened 4 years ago
Do you have a opts.json file? And if so what is its path location? Is it at 'data/results/opts.json'?
Thank you very much for your response. BTW, I don't have any idea for opts.json. Please tell me what is it and where I can get it.
I'm waiting for your reply.
Hello,
The opts.json
file will be rewritten by the main.py routine, it's a persistent file for you to know what options you've used to run your code. Try just creating an empty opts.json
in the path 'data/results/'.
Thank you.
I tried to predict using pretrained model as follows:
’ python main.py --root_path data --video_path mit_videos/a064-0224C.mp4 --annotation_path actionlist.csv --result_path results --dataset mit --resume_path results/r3d50_M_200ep.pth --model_depth 50 --n_classes 339 --nthreads 4 --no train --no_val --inference --output_topk 5 --inference_batch_size 1
here
a064-0224C.mp4 is one of the videos of the stair center. actionlist.csv is the caption file of the stair center. r3d50_M_200ep.pth is the pretrained model name.
Then, the output message from the command is as follows:
Traceback (most recent call last): File "main.py", line 415, in
opt = get_opt()
File "main.py", line 80, in get_opt
with (opt.result_path / 'opts.json').open('w') as opt_file:
File "/home/xxxxxxxx/anaconda3/lib/python3.8/pathlib.py", line 1218, in open
return io.open(self, mode, buffering, encoding, errors, newline,
File "/home/xxxxxxxx/anaconda3/lib/python3.8/pathlib.py", line 1074, in _opener
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'data/results/opts.json'
What's wrong? How do I fix the bug?
Best Regards,