Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation of video_sm using trained weights #87

Open
ManyThanks1204 opened this issue Sep 12, 2024 · 1 comment
Open

Evaluation of video_sm using trained weights #87

ManyThanks1204 opened this issue Sep 12, 2024 · 1 comment

Comments

@ManyThanks1204
Copy link

#!/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!

@Andy1621
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants