Closed Chalkeys closed 1 year ago
The maximum fps should be about 70 fps, since I would wait a frame so that the mouse movement one frame ago can be reflected on the screen, which can avoid double move. Your fps seems to be lower than 70. There're two possible reasons for this.
Well I was not there into the inference step yet and that's why I believe it's a dxcam issue. It is not uncommon as seen in some of these issues (this and this). The screenshots took average 0.03s which made the screenshot FPS somewhere around 30 and overall FPS around 20 (with .pt weight tho). But now it's solved. Since I can't reproduce the issue, here are some potential solutions (or at least partial solutions):
After these two steps I've got 90 FPS in capturing screen:
Therefore, I would suggest replacing the dxcam with dxshot or just use win32 api so that screencapture is no longer the bottleneck for higher performance computers and higher refresh rate users.
As of model selection, I'm still at the stage of finding a better way to convert .onnx to .trt with Windows11 since the method you provided is for Linux and Windows is giving me a headache... I will start a new issue dedicated to it I guess.
Thank you for the suggestion. I'll replace it later this week. I have provided the converted trt model in the model dir. If you want to convert it by yourself, this repo might be helpful.
I believe Tensorrt engines are environment specific which means everyone has to create their own .trt or .engine from the pytorch weight unless the dev envs are completely identical. Forementioned repo as well as this repo are optimized for Linux and they both require a very specific combo of Window, CUDA, cuDNN and TensorRT versions to be able to work fine. I'm still trying to find a working cuDNN and TensorRT version for CUDA 11.8 or 12.0 as I do have other projects that need CUDA version to be updated.
Oh, I've learned a lot. Thanks for the explanation. Good luck for the environment setup.
Thank you for sharing the code. I noticed that you are using DXCam to capture screenshots. However, it seems that the performance is not living up to its claimed potential, as the FPS appears to be settling between 30-34. Have you encountered this issue before? If so, do you have any suggestions for a potential solution? Thanks!
Here is my platform info: OS name: Windows 11 Pro OS architecture: 64 bits Resolutions: Monitor 1: 2560x1440 144Hz Python version: 3.10.0 Videocard: Gigabyte 2080 CPU: AMD Ryzen 7 3900x