facebookresearch / SlowFast

PySlowFast: video understanding codebase from FAIR for reproducing state-of-the-art video models.
Apache License 2.0
6.48k stars 1.2k forks source link

Issues when running Input Videos Visualization with Grad-CAM #416

Open ljorquera opened 3 years ago

ljorquera commented 3 years ago

Hello,

I am trying to run the Input Videos Visualization with Grad-CAM, and I am having some issues.

I am using the ./SLOWFAST_8x8_R50.pkl pre-trained model and mi configuration is as follows:

TENSORBOARD:
ENABLE: True
CLASS_NAMES_PATH: /home/ubuntu/src/slowfast/kinectics.names
MODEL_VIS:
    ENABLE: True
    MODEL_WEIGHTS: False
    ACTIVATIONS: False
    INPUT_VIDEO: False
    LAYER_LIST: ['s5/pathway1_res2', 's5/pathway0_res2']
    GRAD_CAM:
    ENABLE: True
    LAYER_LIST: ['s5/pathway1_res2', 's5/pathway0_res2']
                # The number of layer must be equal to the number of pathway(s).

DEMO:
ENABLE: True
LABEL_FILE_PATH: /home/ubuntu/src/slowfast/kinectics.names

I am passing the following parameters via the command line:

DEMO.INPUT_VIDEO /home/ubuntu/src/ava/videos_15min/Ag-pXiLrd48.mp4 DEMO.OUTPUT_FILE /tmp/a.mp4 DATA.PATH_TO_DATA_DIR /home/ubuntu/src/kinectics/ActivityNet/Crawler/Kinetics/kdata2

I needed to pass the DATA.PATH_TO_DATA_DIR even when I am using the pretrained model because if I don't I get an error while processing the data (I followed the code ant that's because TENSORBOARD is enabled)

With this parameters I can run run_net.py OK and I get an output video but I don't see any GRAD CAM information on the video (I was expecting some heat map but I only get action labels)

Can you help me see what I am doing wrong? Thanks

ljorquera commented 3 years ago

@Shumpei-Kikuta I saw you managed to make this work, could you help me? Thanks

jpainam commented 2 years ago

Hi, I have this error also The number of chosen CNN layers must be equal to the number of pathway(s), given 2 layer(s).

Did you solve it?