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

Stream with 0fps? #3196

Closed
424124 opened this issue May 17, 2021 · 3 comments · Fixed by #3216
Closed

Stream with 0fps? #3196

424124 opened this issue May 17, 2021 · 3 comments · Fixed by #3216
Labels
bug Something isn't working

Comments

@424124
Copy link

424124 commented May 17, 2021

Tried to run detect.py on a live camera stream but there is no movement in the popup.

Fusing layers...
Model Summary: 224 layers, 7266973 parameters, 0 gradients
1/1: 0... success (640x480 at 0.00 FPS).
Exception in thread Thread-1
Exception in thread :
Thread-2Traceback (most recent call last):
:
File "C:\Users\Admin\anaconda3\lib\threading.py", line 932, in _bootstrap_inner
Traceback (most recent call last):
File "C:\Users\Admin\anaconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()self.run()

File "C:\Users\Admin\anaconda3\lib\threading.py", line 870, in run
File "C:\Users\Admin\anaconda3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "c:\OG\yolov5\utils\datasets.py", line 326, in update
self._target(*self._args, **self._kwargs)
File "c:\OG\yolov5\utils\datasets.py", line 326, in update
time.sleep(1 / self.fps) # wait time
time.sleep(1 / self.fps) # wait timeZeroDivisionError
: ZeroDivisionErrorfloat division by zero:
float division by zero

it still attempts to detect but on a still 0FPS or still frame?

0: 480x640 1 stop sign, Done. (0.018s)
0: 480x640 1 stop sign, Done. (0.017s)
0: 480x640 1 stop sign, Done. (0.016s)
0: 480x640 1 stop sign, Done. (0.014s)
0: 480x640 1 stop sign, Done. (0.016s)
0: 480x640 1 stop sign, Done. (0.012s)
0: 480x640 1 stop sign, Done. (0.017s)
0: 480x640 1 stop sign, Done. (0.013s)

@424124 424124 added the bug Something isn't working label May 17, 2021
@glenn-jocher
Copy link
Member

@424124 0 FPS sounds like a great stream haha

I assume we'll need to add some floor to the wait time op to account for these types of streams (!).

@glenn-jocher glenn-jocher linked a pull request May 17, 2021 that will close this issue
@glenn-jocher
Copy link
Member

glenn-jocher commented May 17, 2021

@424124 good news 😃! Your original issue may now been fixed ✅ in PR #3216. To receive this update you can:

  • git pull from within your yolov5/ directory
  • git clone https://github.com/ultralytics/yolov5 again
  • Force-reload PyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)
  • View our updated notebooks: Open In Colab Open In Kaggle

Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀!

@424124
Copy link
Author

424124 commented May 18, 2021

@glenn-jocher Thanks, that fixed the issue perfectly!
0FPS is quite a stream haha..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants