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

Unable to detect http and rstp under Windows 10 #9866

Closed
2 tasks done
SSTato opened this issue Oct 20, 2022 · 2 comments
Closed
2 tasks done

Unable to detect http and rstp under Windows 10 #9866

SSTato opened this issue Oct 20, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@SSTato
Copy link
Contributor

SSTato commented Oct 20, 2022

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Detection

Bug

I can correctly run python detect on Google Colab python detect.py --source 'https://ultralytics.com/images/zidane.jpg'
image

However, an error will be reported under Window10
image

The error reporting code is yolov5 6.2. When I use 5.0, it is normal. When I use 6.1, it also reports an error. If ROOT is removed, it can run successfully. However, there is no 5.0 process when detecting video streams.
image
After my search, the error is the judgment of "if Path(sources).is_file()", but when I correct it, there will still be other errors.
image

In any case, there are some problems with ’LoadStreams‘ under Windows10

Environment

YOLO:YOLOv5-6.2 2022-6-30 Python-3.7.13 torch-1.7.1+cu110 CUDA:0 (NVIDIA GeForce RTX 3060, 12288MiB)
OS:Windows10
python:3.7

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@SSTato SSTato added the bug Something isn't working label Oct 20, 2022
@SSTato
Copy link
Contributor Author

SSTato commented Oct 20, 2022

When I replace
if os.path.isfile(sources):
with open(sources) as f:
sources = [x.strip() for x in f.read().strip().splitlines() if len(x.strip())]
else:
sources = [sources]
with
sources = Path(sources).read_text().rsplit() if Path(sources).is_file() else [sources]
it works normally.

image

@glenn-jocher
Copy link
Member

@SSTato thanks! Can you please submit a PR with your fix?

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

No branches or pull requests

2 participants