3D-ResNets-PyTorch icon indicating copy to clipboard operation
3D-ResNets-PyTorch copied to clipboard

can not find opts.json

Open Atrin4000 opened this issue 5 years ago • 4 comments

HI, when I run the main.py it show me: that I "can not find opts.json in results path". I also can not run following command: "python main.lua -h"

Atrin4000 avatar Jun 03 '19 16:06 Atrin4000

hi, I met the same problem. So, how to solve it? Would you share it? Thanks.

gitxdf avatar Nov 13 '19 05:11 gitxdf

I'm facing the same issue.

I downloaded the new version of the code and I'm getting this missing file error 'opts.json' in the results folder.

FileNotFoundError: [Errno 2] No such file or directory: '~\data\results\opts.json'

I`m running the HMDB_51 dataset.

I follow these steps:

Download videos and train/test splits here. Convert from avi to jpg files using util_scripts/generate_video_jpgs.py python -m util_scripts.generate_video_jpgs avi_video_dir_path jpg_video_dir_path hmdb51 Generate annotation file in json format similar to ActivityNet using util_scripts/hmdb51_json.py annotation_dir_path includes brush_hair_test_split1.txt, ... python -m util_scripts.hmdb51_json annotation_dir_path jpg_video_dir_path dst_json_path

I set the structure as it is: / data/ kinetics_videos/ jpg/ .../ (directories of class names) .../ (directories of video names) ... (jpg files) results/ save_100.pth kinetics.json

The help code is running python main.py -h

But when a try to run the code to train python main.py --root_path ~/data --video_path hmdb51_videos/jpg --annotation_path hmdb51_1.json --result_path results --dataset hmdb51 --model resnet --model_depth 50 --n_classes 51 --batch_size 128 --n_threads 4 --checkpoint 5

I'm getting this error: FileNotFoundError: [Errno 2] No such file or directory: '~\\data\\results\\opts.json'

I'm using OS Windows, VS Code, Python 3.7.5 64-bit and I install these libraries h5py==2.10.0 joblib==0.14.1 numpy==1.18.2 pandas==1.0.3 Pillow==7.1.1 python-dateutil==2.8.1 pytz==2019.3 scikit-learn==0.22.2.post1 scipy==1.4.1 six==1.14.0 sklearn==0.0 torch==1.4.0 torchvision==0.5.0

guilhermesurek avatar Apr 10 '20 16:04 guilhermesurek

I found the problem... It was in the --root-path. Instead of ~/data use just data

Before python main.py --root_path ~/data --video_path hmdb51_videos/jpg --annotation_path hmdb51_1.json --result_path results --dataset hmdb51 --model resnet --model_depth 50 --n_classes 51 --batch_size 128 --n_threads 4 --checkpoint 5

After python main.py --root_path data --video_path hmdb51_videos/jpg --annotation_path hmdb51_1.json --result_path results --dataset hmdb51 --model resnet --model_depth 50 --n_classes 51 --batch_size 128 --n_threads 4 --checkpoint 5

guilhermesurek avatar Apr 10 '20 21:04 guilhermesurek

I ran into this too, thanks @guilhermesurek!

AlinaWithAFace avatar May 01 '21 20:05 AlinaWithAFace