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

Grab screen with python multiprocessing up to 33FPS #82

Closed
pythonlessons opened this issue Dec 13, 2018 · 0 comments
Closed

Grab screen with python multiprocessing up to 33FPS #82

pythonlessons opened this issue Dec 13, 2018 · 0 comments

Comments

@pythonlessons
Copy link

General information:

  • OS name: Windows 10
  • OS architecture: 64 bits
  • Resolutions:
  • Python version: 3.6.7
  • MSS version: 3.2.0

So I am creating a project, where I am using TensorFlow object detection to detect enemies while playing CS:GO and shoot them. If someone is interested I wrote full step by step tutorial.

Anyway I am writing here because I am using MSS to grab a game screen. So at first I was getting ~20 FPS with grab screen, but when working on my project I decided to try improve this step, and I couldn't find better ways to grab screen in faster way, so I wrote a code while I am grabbing screen by using python multiprocessing. I divided whole script into two parts: first is to get a screen second to show a screen, these two parts are working in parallel processes so now I am receiving around 33 FPS. If someone is interested how I did this here is the link to my code.

Suggestion how I could make it work faster would be appreciated.

Use my example as much as you need !

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

No branches or pull requests

2 participants