Closed andysingal closed 8 months ago
It looks like the problem is with OpenCV video capture which is not able to grab frames from the webcam. Maybe you need to give explicit permissions for the process to access webcamera. Can you please check whether this code works for you and shows a video:
cap = cv2.VideoCapture(cv2.CAP_ANY)
while cv2.waitKey(1) != ord('q'):
_ret, frame = cap.read()
cv2.imshow("Webcam", frame)
gi
here is my current code: it works with the code you share, how to make it work with the below code
import cv2
import torch
from super_gradients.training import models
device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
model = models.get("yolo_nas_s", pretrained_weights="coco").to(device)
model.predict_webcam(conf=0.7)
@andysingal I was not able to reproduce the issue with the latest build of SG. Which version of SG are you using?
🐛 Describe the bug
for code:
ERROR
Versions