Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
Because of un-manageable amounts of spam despite our use of CAPTCHAs, email authorization, and other tools, we have discontinued this forum (see the 700k+ registered users with validated email addresses at right?). Please email us any questions or post bug reports and feature requests on GitHub at https://github.com/jevois -- The content below remains available for future reference.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Best module to use for high FPS vehicle & object detection in a road setting?

0 votes
Hello, I am working on a project to design a system to mount on a bicycle for vehicle detection (optionally other objects on road as well).

I have tried to use some of the openCV stuff but it seems that it's limiting my frame rate to <5FPS which is not going to work for this project.

On the website it says TensorFlow will get up to 83 FPS.  Is this because C++ runs faster than python?

Is there any way to get python working with vehicle recognition at >30fps or am i confined to c++?


asked Oct 23, 2019 in Programmer Questions by navyjosh (120 points)

1 Answer

0 votes
The main limitation of python is that it does not support true multithreading. So you are kind of stuck with using one core of JeVois when you could use 4 in C++ easily using std::async() to launch threads.

Now, having said that, you should also be aware that not much in terms of machine vision is actually implemented in python. Even OpenCV, that is all C++ under the hood. When you use OpenCV in python, that just calls the underlying C++ OpenCV implementation. For this reason, some OpenCV functions may still be highly efficient and multithreaded. So, usually, for pure OpenCV code, there is not much speed difference between python and C++, since python just calls the OpenCV C++ code. You would see big differences if, for example, you have a loop over all pixels in an image, and then do something in that loop. The loop may run much slower in python than C++. But as long as you only use image-level functions (like, for example, add two images) then the speed difference is negligible since the same optimized C++ code for matrix addition will be executed in both cases.

For TensorFlow and 83fps: this is with the smallest variant of MobileNets V1 quantized, that network runs at about 83fps. If you can cast your problem into something that a CNN could solve, then you can train your own mobilenet and run it on JeVois. See here:

answered Oct 23, 2019 by JeVois (46,580 points)
Thank you for your feedback, I think I will start this training link.

To piggyback on this question, I have another concern with the jevois-inventor software.

I am testing out the built-in modules for the camera, and some of them which claim to be 30fps or so are barely reaching 10% of that fps.

for example the built-in module: YUYV 320 264 30.0 YUYV 320 240 30.0 JeVois PyClassificationDNN

this advertises 30 fps but when i load it in the inventor i'm only getting 3.6 FPS

Is there something wrong with my camera or the software?