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

Compatibility with Virtual Webcams on Windows #1

Open
Edszx opened this issue Sep 16, 2020 · 3 comments
Open

Compatibility with Virtual Webcams on Windows #1

Edszx opened this issue Sep 16, 2020 · 3 comments

Comments

@Edszx
Copy link

Edszx commented Sep 16, 2020

Hi, thank you very much for the program!, would it be possible to add compatibility for virtual webcam sources (not real USB webcams) like IP Webcam (Android), Droidcam, or Webcamoid? (I think they all use DirectShow filters)

@KennardWang
Copy link
Owner

Thank you for your sincere feedback! I think it may be an interesting question because I never meet a problem like this while debugging( I only test on computer's webcam ), I will do some researches on it and try to find a solution. By the way, if you could tackle with this problem, please tell me how to work out it, thanks!

@954-Ivory
Copy link

954-Ivory commented Feb 9, 2023

I ran it on GPU(GTX 1060) by DroidCamApp(windows, connect by USB).

This block will raise the IndexError:

roll = np.clip(-(180 + np.degrees(steady_pose[2])), -50, 50)
pitch = np.clip(-(np.degrees(steady_pose[1])) - 15, -40, 40) # the 15 here is my camera angle.
yaw = np.clip(-(np.degrees(steady_pose[0])), -50, 50)

I changed it like this:

if steady_pose:
    roll = np.clip(-(180 + np.degrees(steady_pose[2])), -50, 50)
    pitch = np.clip(-(np.degrees(steady_pose[1])) - 15, -40, 40)  # the 15 here is my camera angle.
    yaw = np.clip(-(np.degrees(steady_pose[0])), -50, 50)

But it still just render 6 FPS.

Need I commit a PR for this?

我英语比较差,如果看不懂的话,我们就用中文聊吧。
😄

@KennardWang
Copy link
Owner

@954-Ivory Thank you very much for pointing out this bug, I guess the reason might be: Mobile USB camera does not initialize the value of roll, yaw, pitch etc. before position calibration. I modify the code and could you plz do me a favor to test again by your DroidCamApp? Btw, there are several possible reasons for low FPS (in my case, the GPU FPS is around 28):

  • Not install CUDA or use a non-cuda torch version
  • Incompatible version of CUDA and torch
  • Run too many programs and occupy the resource

非常感谢你指出这个bug,我想原因可能是,如果使用移动USB摄像头,源代码没有在位置校准前初始化roll, yaw, pitch等变量的值,所以我修改了源代码,能否请你使用DroidCamApp再帮我测试一下?顺带一提,个人认为FPS低的原因可能有以下几个(我自己测试的GPU版本的FPS在28左右):

  • 未安装CUDA,或者使用了CPU版本的torch
  • CUDA和torch版本不兼容
  • 有其他运行程序占用GPU资源

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