facebookresearch / video-long-term-feature-banks

Long-Term Feature Banks for Detailed Video Understanding
Apache License 2.0
373 stars 62 forks source link

How to make inferences on other datasets via your trained models? #66

Open ffcarina opened 2 years ago

ffcarina commented 2 years ago

Hello, I wonder if it is feasible to directly infer our dataset (replace the Charades dataset with our dataset with the same structure in DATASET.md) using your trained models?

I ran the following command: (The folder “trained_models/charades_r50_lfb_nl/” contains your trained model 100866795 lfb_model.pkl and model_final.pkl downloaded from README.md.)

python -u tools/test_net.py \
  --config_file ./configs/charades_r50_lfb_nl.yaml \
  LFB.LOAD_LFB True \
  LFB.LOAD_LFB_PATH  ./trained_models/charades_r50_lfb_nl \
  TEST.PARAMS_FILE ./trained_models/charades_r50_lfb_nl/model_final.pkl

But got an error:

Traceback (most recent call last):
  File "tools/test_net.py", line 205, in <module>
    main()
  File "tools/test_net.py", line 201, in main
    test_net()
  File "tools/test_net.py", line 94, in test_net
    test_one_crop(lfb=lfb, suffix='_final_test')
  File "tools/test_net.py", line 126, in test_one_crop
    test_model.build_model(lfb=lfb, suffix=suffix, shift=shift)
  File "./lib/models/model_builder_video.py", line 105, in build_model
    shift=shift,
  File "./lib/datasets/dataloader.py", line 411, in get_input_db
    shift=shift, lfb=lfb, suffix=suffix)
  File "./lib/datasets/charades.py", line 89, in __init__
    len(self._image_paths), len(self._lfb))
AssertionError: num videos 60 != num videos in LFB 1

I don't understand why “num videos in LFB is 1”? Could you tell me how to solve the problem? Thank you very much!