jeffbass / imagezmq

A set of Python classes that transport OpenCV images from one computer to another using PyZMQ messaging.
MIT License
1.01k stars 160 forks source link

Getting FPS of around 3 #8

Closed alter-sachin closed 4 years ago

alter-sachin commented 5 years ago

Hi, I have seen such behaviour where we get only 3frames per second over the network. Is this normal behaviour ? Any way I could pump this up ? Please let me know a direction for the same.

jeffbass commented 5 years ago

Yes, low FPS can be normal depending on your application. A lot of things affect FPS when transmitting images over the network:

  1. Image size
  2. Image compression
  3. Network loading; especially the number of RPi's transmitting images simultaneously
  4. WiFi versus ethernet The image size / compression factors have been the rate limiting items for me, but I always check all 4 of the above. I use relatively small images sizes (320 x 240 is my most common size when transmitting from Raspberry Pi). I also use jpeg compression (which cuts image size by 60-90%). You can see the jpeg compression example in the test program in this repository. I do not find the 320 x 240 image size limiting because I have to use smaller sizes with most deep machine learning techniques downstream anyway. But if you need larger images sizes, network bandwidth and network load will be the dominant issues.
alter-sachin commented 5 years ago

@jeffbass You are a very kind man indeed, will use these heuristics and run some tests. Thanks!

jeffbass commented 4 years ago

You're welcome! I've added my comments above to a question in the FAQ, so I'm closing this issue.