JacobChalk / TIM

Codebase for the paper: "TIM: A Time Interval Machine for Audio-Visual Action Recognition"
36 stars 5 forks source link

extract perception_test audio feature problems #27

Closed WannaSir closed 3 months ago

WannaSir commented 3 months ago

i use following command to extract audio features:


export CUDA_VISIBLE_DEVICES=6,7
python tools/run_net.py --cfg /data/nvme2/dky/lc/TIM/feature_extractors/auditory_slowfast/configs/PERCEPTION/SLOWFAST_R50.yaml \
NUM_GPUS 2 \
OUTPUT_DIR /data/hdd/lishenshen/timfeature_data/perception_test-feature \
PERCEPTION.AUDIO_DATA_DIR /data/hdd/lishenshen/data/perception_test/valid_audios/audios \
PERCEPTION.TEST_LIST /data/nvme2/dky/lc/TIM/annotations/Perception_Test/Perception_Test_1_second_validation_feature_times.pkl \
TEST.CHECKPOINT_FILE_PATH /data/nvme2/dky/lc/TIM/feature_extractors/auditory_slowfast/pretrained_models/asf_vggsound.pyth \
TEST.NUM_FEATURES 1

and then obtain files: feature.npy and metadata.npy, then i post-process the features with numpy files using the follow command: python utils/make_npyfiles.py --feature_file /data/hdd/lishenshen/timfeature_data/perception_test-feature/features.npy --pickle_file /data/nvme2/dky/lc/TIM/annotations/Perception_Test/Perception_Test_1_second_validation_feature_times.pkl --out_dir /data/hdd/lishenshen/timfeature_data/perception_test-feature/val_a

but there will be an error : File "/data/nvme2/dky/lc/TIM/feature_extractors/auditory_slowfast/utils/make_npyfiles.py", line 26, in main assert len(feature) == len(feature_pandas) AssertionError but i do not konw how to fix it ,thank you!

WannaSir commented 3 months ago
image

and the length of them are above

JacobChalk commented 3 months ago

The length of the feature array should indeed be 593655, the same as the pandas data frame.

The extracted features were of size 57 due to an old piece of residual test code left over. We have fixed this now so that the data loader will construct properly and extract all of the videos, rather than a single specific video. Apologies for the inconvenience!