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

Issue with audio inference #1

Closed
karlbernard2 opened this issue Jul 22, 2022 · 6 comments
Closed

Issue with audio inference #1

karlbernard2 opened this issue Jul 22, 2022 · 6 comments

Comments

@karlbernard2
Copy link

I'm trying to test your model, but I ran into an issue with the audio inference, maybe you would have some ideas what could be wrong?

`docker run --gpus all rlleshi/phar python src/demo/multimodial_demo.py /mnt/videos/tr_87505_hd.mp4 /mnt/videos/demo.mp4
Resizing video for faster inference...
Moviepy - Building video temp/tr_87505_hd.mp4.
MoviePy - Writing audio in tr_87505_hdTEMP_MPY_wvf_snd.mp3
MoviePy - Done.
Moviepy - Writing video temp/tr_87505_hd.mp4

Moviepy - Done !
Moviepy - video ready temp/tr_87505_hd.mp4
load checkpoint from local path: checkpoints/har/timeSformer.pth
Performing RGB inference...
100%|██████████| 12/12 [00:17<00:00, 1.44s/it]load checkpoint from local path: checkpoints/har/audio.pth
Performing audio inference...

8%|▊ | 1/12 [00:14<02:43, 14.88s/it]
Traceback (most recent call last):
File "src/demo/multimodial_demo.py", line 601, in
main()
File "src/demo/multimodial_demo.py", line 562, in main
audio_inference(clip, args.coefficients)
File "src/demo/multimodial_demo.py", line 385, in audio_inference
results = inference_recognizer(AUDIO_MODEL, out_feature)
File "/workspace/phar/mmaction2/mmaction/apis/inference.py", line 99, in inference_recognizer
raise RuntimeError('The type of argument video is not supported: '
RuntimeError: The type of argument video is not supported: <class 'str'>`

@rlleshi
Copy link
Owner

rlleshi commented Jul 25, 2022

Hi karlbernard,
could you try to put a time.sleep(1) just above results = inference_recognizer(AUDIO_MODEL, out_feature), here?

subprocess.run is supposed to be blocking through.

@gauharbains
Copy link

I'm running into a similar issue. Does this ^ fix it ?

@gauharbains
Copy link

@rlleshi I tried this, but it didn't solve it.

@rlleshi
Copy link
Owner

rlleshi commented Aug 9, 2022

@gauharbains could you please try to apply this fix in this PR here.

So just replace the glob search in mmaction2/tools/data/build_audio_features.py file with this line:

files = glob.glob(args.audio_home_path + '/*' * args.level + args.ext)

@gauharbains
Copy link

@rlleshi That worked for me, thanks!

@rlleshi
Copy link
Owner

rlleshi commented Aug 9, 2022

Fixed at 4a14ea4

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

3 participants