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

Frame Loss in video stream #1510

Closed
Rollson opened this issue Nov 25, 2020 · 7 comments
Closed

Frame Loss in video stream #1510

Rollson opened this issue Nov 25, 2020 · 7 comments
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@Rollson
Copy link

Rollson commented Nov 25, 2020

❔Question

Hi, thank you for your great work:). Please I have 2 questions.

  1. detect.py stops running any time there is a frame loss in the HTTP video stream. I tried modifying the datasets.py to be able to handle frame loss but I couldn't fix it. Please what part of the datasets.py or detect.py can I modify to fix this frame loss issue and any ideas on how to do it?

  2. Also which is the proper way to specify the --source argument in detect.py. Is it
    python detect.py --source "http://"
    or
    python detect.py --source http://

why am asking is because when the URL is not specified as a string (i.e when I run it this way: python detect.py --source http:// ) , detect.py only run for some seconds and then stops.
Thanks for your response:)

Additional context

@Rollson Rollson added the question Further information is requested label Nov 25, 2020
@glenn-jocher
Copy link
Member

@Rollson thanks for the notice. Please supply a Colab notebook with a reproducible example that we can look at.

String encapsulation is up to you and has no effect on inference.

@Rollson
Copy link
Author

Rollson commented Dec 7, 2020

@glenn-jocher. thanks for your response. anytime there is a frame loss in the stream, it shows this error:

img = [letterbox(x, new_shape=self.img_size, auto=self.rect)[0] for x in img0]
File "/home//Dokuments/yolov5/utils/datasets.py", line 696, in letterbox
shape = img.shape[:2] # current shape [height, width]
AttributeError: 'NoneType' object has no attribute 'shape'

@glenn-jocher
Copy link
Member

glenn-jocher commented Dec 8, 2020

@Rollson so it seems that if there is a dropped frame, img will be equal to None, and this error will occur. Is there a way to reproduce this dropped stream event so we can test a fix?

@Rollson
Copy link
Author

Rollson commented Dec 21, 2020

@glenn-jocher there is no way I can reproduce the dropped stream apart from testing with the stream url

@glenn-jocher
Copy link
Member

@Rollson ok understood. If you can debug and produce a fix that's working on your side then, we'd be happy to review it as a PR.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale Stale and schedule for closing soon label Jan 21, 2021
@glenn-jocher
Copy link
Member

@Rollson this same issue identified in #2155 and #2196. We should have a fix soon, though quite late for you, apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale Stale and schedule for closing soon
Projects
None yet
Development

No branches or pull requests

2 participants