openvinotoolkit / open_model_zoo

Pre-trained Deep Learning models and demos (high quality and extremely fast)
https://docs.openvino.ai/latest/model_zoo.html
Apache License 2.0
4.09k stars 1.37k forks source link

Driver Actions with camera (-v cam) returns: ZeroDivisionError: division by zero. #224

Closed flaviojpriotti closed 5 years ago

flaviojpriotti commented 5 years ago

Hi, I'm having problems to run the model Action Recognition by using a camera (-v cam). Each time I've tried the system returns: ZeroDivisionError: division by zero.

I believe this issue may be happening due to it is trying to estimate some value based on the video's FPS and that info is not available when using a camera.

Screenshot from 2019-07-10 14-31-15

Looking forward to your comments. Thanks in advance.

Flavio

snosov1 commented 5 years ago

I didn't run it, but to me it looks like the issue is that print_statistics is called before the timer has even started. So, 2 issues:

  1. Can you, please, check why this happens?
  2. Can you, please, consider adding respective checks to the IncrementalTimer methods that perform division (i.e. fps, avg, std)? Basically, the idea is that if ._times is equal to 0, the avg should be 0, fps 0 (or NaN?), std - 0, too.
Wovchena commented 5 years ago

@flaviojpriotti, thank you for your report. The option cam does not work for the demo. It will be removed from the description soon: https://github.com/opencv/open_model_zoo/pull/229#discussion_r302990631

Wovchena commented 5 years ago

@flaviojpriotti, camera input support have been added back (https://github.com/opencv/open_model_zoo/pull/233/). You can now use it with -i 0.

Wovchena commented 5 years ago

@flaviojpriotti, can the issue be closed?

flaviojpriotti commented 5 years ago

Hi @Wovchena , I used -i 0 and works for me, with OpenVino Release 2.

Thank you very much, regards!

Flavio