ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.46k stars 16.28k forks source link

ZED + YOLOv5 Implementation #7138

Closed kmat231 closed 2 years ago

kmat231 commented 2 years ago

Search before asking

YOLOv5 Component

Validation, Detection, Integrations

Bug

OpenGL_accelerate module loaded Using accelerated ArrayDatatype Intializing Network... Initializing Camera... Initialized Camera fatal: cannot change to '/usr/local/zed/samples/object': No such file or directory YOLOv5 🚀 2022-3-20 torch 1.11.0+cu113 CUDA:0 (NVIDIA GeForce RTX 3050 Laptop GPU, 3910MiB)

freeglut (detector.py): ERROR: Internal error in function fgOpenWindow /home/kanary/.local/lib/python3.8/site-packages/torch/_utils.py:79: UserWarning: CUDA warning: driver shutting down (Triggered internally at ../c10/cuda/impl/CUDAGuardImpl.h:45.) return newtype(self.size()).copy(self, non_blocking) /home/kanary/.local/lib/python3.8/site-packages/torch/_utils.py:79: UserWarning: CUDA warning: driver shutting down (Triggered internally at ../c10/cuda/impl/CUDAGuardImpl.h:61.) return newtype(self.size()).copy(self, non_blocking) Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, self._kwargs) File "detector.py", line 100, in torch_thread model = attempt_load(weights, map_location=device) # load FP32 File "/usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov5/./yolov5/models/experimental.py", line 96, in attempt_load ckpt = torch.load(attempt_download(w), map_location=map_location) # load File "/home/kanary/.local/lib/python3.8/site-packages/torch/serialization.py", line 712, in load return _load(opened_zipfile, map_location, pickle_module, pickle_load_args) File "/home/kanary/.local/lib/python3.8/site-packages/torch/serialization.py", line 1046, in _load result = unpickler.load() File "/home/kanary/.local/lib/python3.8/site-packages/torch/serialization.py", line 1016, in persistent_load load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location)) File "/home/kanary/.local/lib/python3.8/site-packages/torch/serialization.py", line 1001, in load_tensor wrap_storage=restore_location(storage, location), File "/home/kanary/.local/lib/python3.8/site-packages/torch/serialization.py", line 973, in restore_location return default_restore_location(storage, str(map_location)) File "/home/kanary/.local/lib/python3.8/site-packages/torch/serialization.py", line 176, in default_restore_location result = fn(storage, location) File "/home/kanary/.local/lib/python3.8/site-packages/torch/serialization.py", line 158, in _cuda_deserialize return obj.cuda(device) File "/home/kanary/.local/lib/python3.8/site-packages/torch/_utils.py", line 79, in _cuda return newtype(self.size()).copy(self, non_blocking) RuntimeError: CUDA error: driver shutting down CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. [1]- Killed python3 object_detection.py (wd: /usr/local/zed/samples/tutorials/tutorial 6 - object detection/python) (wd now: /usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov5) [2]+ Killed python3 object_detection.py (wd: /usr/local/zed/samples/tutorials/tutorial 6 - object detection/python) (wd now: /usr/local/zed/samples/object detection/custom detector/python/pytorch_yolov5)

Environment

Minimal Reproducible Example

python3 detector.py –weights yolov5m.pt

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 2 years ago

👋 Hello @kmat231, thank you for your interest in YOLOv5 🚀! 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 support@ultralytics.com.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 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.

glenn-jocher commented 2 years ago

fatal: cannot change to '/usr/local/zed/samples/object': No such file or directory

github-actions[bot] commented 2 years ago

👋 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 YOLOv5 🚀 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 YOLOv5 🚀 and Vision AI ⭐!

urbansound8K commented 2 years ago

did you solve it? I got same

glenn-jocher commented 11 months ago

@urbansound8K thanks for reaching out! The issue "fatal: cannot change to '/usr/local/zed/samples/object': No such file or directory" seems to be related to the file path. You may need to adjust the file path in your script to ensure it points to the correct location.

As for the CUDA error, it seems to be related to the GPU driver shutting down. Make sure your GPU drivers are up to date and consider setting CUDA_LAUNCH_BLOCKING=1 for debugging.

Let me know if you need further assistance!