Skip to content

Commit edff3cd

Browse files
Update README.md
1 parent da74675 commit edff3cd

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

9_part grab screen multiprocessing/README.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ if __name__=="__main__":
5757
q = multiprocessing.JoinableQueue()
5858
5959
# creating new processes
60-
p1 = multiprocessing.Process(target=GRABMSS_screeb, args=(q, ))
61-
p2 = multiprocessing.Process(target=SHOWMSS_screeb, args=(q, ))
60+
p1 = multiprocessing.Process(target=GRABMSS_screen, args=(q, ))
61+
p2 = multiprocessing.Process(target=SHOWMSS_screen, args=(q, ))
6262
6363
# starting our processes
6464
p1.start()
@@ -71,7 +71,7 @@ We begin with creaginf a chared queue.
7171
# Queue
7272
q = multiprocessing.JoinableQueue()
7373
```
74-
With following lines we are creating p1 and p2 processes which will run in background. p1 function will call GRABMSS_screeb() function and p2 will call SHOWMSS_screeb() function. As an argument for these functions we must give arguments, we give q there.
74+
With following lines we are creating p1 and p2 processes which will run in background. p1 function will call GRABMSS_screen() function and p2 will call SHOWMSS_screen() function. As an argument for these functions we must give arguments, we give q there.
7575
```
7676
# creating new processes
7777
p1 = multiprocessing.Process(target=GRABMSS_screen, args=(q, ))
@@ -83,3 +83,16 @@ Final step is to start our processes, after these commands our grab screen funct
8383
p1.start()
8484
p2.start()
8585
```
86+
87+
For comparison I ran old code without multiprocessing and with multiprocessing. Here is results without multiprocessing:
88+
<p align="center">
89+
<img src="https://github.com/pythonlessons/TensorFlow-object-detection-tutorial/blob/master/1_part%20images/09_FPS_slow.JPG"
90+
</p>
91+
We can see that average is about 19-20 FPS.
92+
Here is results with multiprocessing:
93+
<p align="center">
94+
<img src="https://github.com/pythonlessons/TensorFlow-object-detection-tutorial/blob/master/1_part%20images/09_FPS_fast.JPG"
95+
</p>
96+
We can see that average is about 32 FPS. So our final result is that our grab screen improoved in around 50%. I would like like to impoove it more, but for now I don't have ideas how to do that. Anyway reults are much better than before !
97+
98+
### Original text version of tutorial you can visit [here](http://pylessons.com/).

0 commit comments

Comments
 (0)