-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Source 0(webcam) ends program early #1891
Comments
👋 Hello @HSDeCecco, thank you for your interest in YOLOv3 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://ultralytics.com or email Glenn Jocher at [email protected]. RequirementsPython>=3.6.0 with all requirements.txt installed including PyTorch>=1.7. To get started: $ git clone https://github.com/ultralytics/yolov3
$ cd yolov3
$ pip install -r requirements.txt EnvironmentsYOLOv3 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv3 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv3 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@HSDeCecco this should be fixed in the YOLOv5 repository in ultralytics/yolov5#6198, you could try to submit a similar PR here or use the YOLOv5 repo directly: |
Yup just ran it through yolov5 and ran it with a custom data set as well and everything works. Thanks for the info! |
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv3 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv3 🚀 and Vision AI ⭐! |
@HSDeCecco glad to hear that! If you have any more questions or run into any issues, feel free to ask. Keep up the great work! |
Search before asking
YOLOv3 Component
No response
Bug
When running detect.py I start it by using the command:
python detect.py --weights yolov3.pt --source 0
However whenever I set the source to 0 and try to run it on my webcam. The program almost stops instantly. It still creates the bounding boxes around people in the frame but the program does not continually run. Any info on how I would be able to solve this issue would be greatly appreciated.
Environment
yolov3 - Apple MacBook Pro M1
Minimal Reproducible Example
python detect.py --weights yolov3.pt --source 0
detect: weights=['yolov3.pt'], source=0, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False
YOLOv3 🚀 v9.6.0-5-g9d0e1cf torch 1.10.1 CPU
Fusing layers...
[W NNPACK.cpp:79] Could not initialize NNPACK! Reason: Unsupported hardware.
Model Summary: 261 layers, 61922845 parameters, 0 gradients, 156.1 GFLOPs
1/1: 0... Success (inf frames 1280x720 at nan FPS)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/anaconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/hdececco/Downloads/yolo_root/yolov3/utils/datasets.py", line 342, in update
time.sleep(1 / self.fps[i]) # wait time
ValueError: Invalid value NaN (not a number)
0: 384x640 2 persons, Done. (2.479s)
Speed: 1.8ms pre-process, 2478.8ms inference, 9.6ms NMS per image at shape (1, 3, 640, 640)
Results saved to runs/detect/exp11
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: