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

Minor fix on yolov5 webcam demo #466

Merged
merged 6 commits into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

import cv2
import time
# Importing torch to avoid "RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED" error
import torch

from opendr.engine.data import Image
from opendr.perception.object_detection_2d import YOLOv5DetectorLearner
Expand Down Expand Up @@ -44,6 +46,7 @@ def __next__(self):


if __name__ == '__main__':
torch.__version__ # Dummy usage of torch to avoid imported but not used pyflakes error
parser = argparse.ArgumentParser()
parser.add_argument("--device", help="Device to use (cpu, cuda)", type=str, default="cuda", choices=["cpu", "cuda"])
parser.add_argument("--model", help="Model to use", type=str, default="yolov5s",
Expand Down
Loading