rohitgirdhar / CATER

CATER: A diagnostic dataset for Compositional Actions and TEmporal Reasoning
https://rohitgirdhar.github.io/CATER/
Apache License 2.0
103 stars 19 forks source link

Error while testing #18

Closed abhaygargab closed 4 years ago

abhaygargab commented 4 years ago

Hello Rohit,

While trying to run the following command for testing: "python launch.py -c configs_cater/001_I3D_NL_localize_imagenetPretrained_32f_8SR.yaml"

i am getting the following error:

Running PYTHONPATH=pwd/lib/:$PYTHONPATH PYTHONPATH=pwd/external_lib/average-precision/python:$PYTHONPATH python tools/test_net_video.py --config_file configs_cater/001_I3D_NL_localize_imagenetPretrained_32f_8SR.yaml CHECKPOINT.DIR outputs/configs_cater/001_I3D_NL_localize_imagenetPretrained_32f_8SR.yaml TEST.TEST_FULLY_CONV True 2>&1 | tee outputs/configs_cater/001_I3D_NL_localize_imagenetPretrained_32f_8SR.yaml/log_test_net_video.py.txt

/home/u1698461/Downloads/CATER-master/baselines/video-nonlocal-net/lib/core/config.py:349: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. yaml_config = AttrDict(yaml.load(fopen)) Ignoring @/caffe2/caffe2/contrib/nccl:nccl_ops as it is not a valid file. Ignoring @/caffe2/caffe2/contrib/gloo:gloo_ops as it is not a valid file. Ignoring @/caffe2/caffe2/contrib/gloo:gloo_ops_gpu as it is not a valid file. Traceback (most recent call last): File "tools/test_net_video.py", line 351, in main() File "tools/test_net_video.py", line 336, in main cfg_from_file(args.config_file) File "/home/u1698461/Downloads/CATER-master/baselines/video-nonlocal-net/lib/core/config.py", line 350, in cfg_from_file merge_dicts(yaml_config, __C) File "/home/u1698461/Downloads/CATER-master/baselines/video-nonlocal-net/lib/core/config.py", line 333, in merge_dicts type(dict_b[key]), type(value), key) ValueError: Type mismatch (<class 'bytes'> vs. <class 'str'>) for config key: DATADIR

Initially i was getting similar error while generating LMDB running : python process_data/cater/gen_lmdbs.py

Traceback (most recent call last): File "create_video_lmdb.py", line 116, in main() File "create_video_lmdb.py", line 111, in main create_an_lmdb_database(args.list_file, args.dataset_dir) File "create_video_lmdb.py", line 70, in create_an_lmdb_database video_tensor.string_data.append(video_data) TypeError: '/home/u1698461/Downloads/CATER-master/max2action/videos/CATER_new_005360.avi' has type str, but expected one of: bytes

which i resolved by changing the following line in create_video_lmdb.py, from: def create_an_lmdb_database(list_file, output_file, use_local_file=True): to: def create_an_lmdb_database(list_file, output_file, use_local_file=False):

But i am not able to resolve the error at the top. Can you please guide to the solution or perhaps explain what to look for to solve the error?

I have installed Caffe2 in python=3.6 environment using : "conda install pytorch-nightly-cpu -c pytorch"

Thank You..

abhaygargab commented 4 years ago

Solved this error by doing the environment setup and re installations using python=2.7