open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.15k stars 1.22k forks source link

Problem to test my c3d model #2443

Open pgutierrezce opened 1 year ago

pgutierrezce commented 1 year ago

The doc issue

Hi, I have a problem, until a while ago, I have been using the scrip: demo/long_video_demo.py to test the model, but since some time ago here, this script has disappeared and I can't find its replacement, I have researched and it is said to use demo_skeleton, but I wouldn't know how to configure it.

the execution of video_long would be:

python demo/long_video_demo.py \ work_dirs/c3d_sports1m_16x1x1_45e_ucf101_split_1_rgb/c3d_sports1m_16x1x1_45e_ucf101_rgb.py \ /work_dirs/c3d_sports1m_16x1x1_45e_ucf101_split_1_rgb/best_top1_acc_epoch_45.pth \ video.mp4 label_map.txt out.mp4 \ --device cuda:0 --input-step 3 --stride 0.10

what I am using for demo_skeleton or for demo_spatiotemporal_det

python demo/demo_spatiotemporal_det.py aaa.mp4 out.mp4 \ --config work_dirs/c3d_sports1m-pretrained_8xb30-16x1x1-45e_ucf101-rgb/c3d_sports1m-pretrained_8xb30-16x1x1-45e_ucf101-rgb.py \ --checkpoint work_dirs/c3d_sports1m-pretrained_8xb30-16x1x1-45e_ucf101-rgb/best_acc_top1_epoch_40.pth \ --label-map tools/data/ucf101/label_map.txt \ --predict-stepsize 8 \ --output-stepsize 3 \ --output-fps 10

python demo/demo_skeleton.py aaa.mp4 out.mp4 \ --config work_dirs/c3d_sports1m-pretrained_8xb30-16x1x1-45e_ucf101-rgb/c3d_sports1m-pretrained_8xb30-16x1x1-45e_ucf101-rgb.py \ --checkpoint work_dirs/c3d_sports1m-pretrained_8xb30-16x1x1-45e_ucf101-rgb/best_acc_top1_epoch_40.pth \ --label-map tools/data/ucf101/label_map.txt

I don't know if you can help me figure out how to get my model to work, since with both demo_spatiotemporal_det and demo_skeleton the output is : killed

Suggest a potential alternative/fix

No response

hukkai commented 1 year ago

@pgutierrezce What task do you want to test? Action recognition, action section or some tasks else?

pgutierrezce commented 1 year ago

Action recognition, in the previous long video script, I set the video to the desired dimensions, with these:

parameters --device cuda:0 --input-step 3 --stride 0.10

I put the action that happened, with a number that varied according to the action.

in this link you can see an image of what I had before.

https://prnt.sc/MrONjNCUMfDi

hukkai commented 1 year ago

I see. We will add this function back @pgutierrezce

pgutierrezce commented 1 year ago

thank you very much @hukkai , but with what is now in the repository, how could I do what I have indicated in this thread ?