Open ManyThanks1204 opened 1 month ago
If you want to use this script, please follow DATA.md to prepare the csv. After testing, it will generate some test files with softmax score.
If you only want to infer one video, please prepare the data transform as in the dataset, and them feedforward the sampled frames, thus obtain the softmax score.
!/bin/bash
export CUDA_VISIBLE_DEVICES=1 export MASTER_PORT=$((12000 + RANDOM % 20000)) export OMP_NUM_THREADS=1
VIDEO_PATH='name.mp4' OUTPUT_DIR='k10' WEIGHT_PATH='checkpoint-latest.pth'
python run_class_finetuning.py \ --model videomamba_middle \ --finetune ${WEIGHT_PATH} \ --eval_data_path ${VIDEO_PATH} \ --output_dir ${OUTPUT_DIR} \ --batch_size 1 \ --num_sample 1 \ --input_size 224 \ --short_side_size 224 \ --test_num_segment 4 \ --test_num_crop 1 \ --eval I used this infer.sh and tried to evaluate a video, but it raised an error: "FileNotFoundError: [Errno 2] No such file or directory: 'you_data_path/test.csv'". Could you please give a detailed guide on how to evaluate a video? Thank you for your great work!