Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
• The pipeline being used
Please provide the output of “cat /etc/nv_tegra_release” and “deepstream-all --version”?
Please also provide the information about “ultralytics/DeepStream-Yolo”, it’s not maintained by Nvidia.
Not sure if this helps, but as far as basic setup this rudimentary python object detection using yolov8 works on my setup, showing basic components are present. Strangely it doesnt detect GPU so frame rate is only 1 or 2 FPS, but thats another topic.
thanks
import torch
import numpy as np
import cv2
from time import time
from ultralytics import YOLO
import supervision as sv
class ObjectDetection:
def __init__(self, capture_index):
self.capture_index = capture_index
self.device = 'cuda' if torch.cuda.is_available() else 'cpu'
print("Using Device: ", self.device)
self.model = self.load_model()
self.CLASS_NAMES_DICT = self.model.model.names
print(self.CLASS_NAMES_DICT)
self.box_annotator = sv.BoxAnnotator(sv.ColorPalette.default(), thickness=3, text_thickness=3,
text_scale=1.5)
def load_model(self):
model = YOLO("yolov8s.pt") # load a pretrained YOLOv8n model
model.fuse()
return model
def predict(self, frame):
results = self.model(frame)
return results
def plot_bboxes(self, results, frame):
xyxys = []
confidences = []
class_ids = []
# Extract detections for person class
for result in results:
boxes = result.boxes.cpu().numpy()
class_id = boxes.cls[0]
conf = boxes.conf[0]
xyxy = boxes.xyxy[0]
if class_id == 0.0:
xyxys.append(result.boxes.xyxy.cpu().numpy())
confidences.append(result.boxes.conf.cpu().numpy())
class_ids.append(result.boxes.cls.cpu().numpy().astype(int))
# Setup detections for visualization
detections = sv.Detections(
xyxy=results[0].boxes.xyxy.cpu().numpy(),
confidence=results[0].boxes.conf.cpu().numpy(),
class_id=results[0].boxes.cls.cpu().numpy().astype(int),
)
# Format custom labels
print(detections)
self.labels = [f"{self.CLASS_NAMES_DICT[class_id]} {confidence:0.2f}"
for _, mask, confidence, class_id, tracker_id
in detections]
# Annotate and display frame
frame = self.box_annotator.annotate(scene=frame, detections=detections, labels=self.labels)
return frame
def __call__(self):
cap = cv2.VideoCapture(self.capture_index)
assert cap.isOpened()
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)
while True:
start_time = time()
ret, frame = cap.read()
assert ret
results = self.predict(frame)
frame = self.plot_bboxes(results, frame)
end_time = time()
fps = 1/np.round(end_time - start_time, 2)
cv2.putText(frame, f'FPS: {int(fps)}', (20,70), cv2.FONT_HERSHEY_SIMPLEX, 1.5, (0,255,0),
2)
cv2.imshow('YOLOv8 Detection', frame)
if cv2.waitKey(5) & 0xFF == 27:
break
cap.release()
cv2.destroyAllWindows()
detector = ObjectDetection(capture_index=0)
detector()
jg@tensor:/media/jg/tensordisk/ultralytics$
From the current error reports alone, it should not be a problem with the model. Also some versions of related software are not compatible in your env. You can refer to the link below: platform-and-os-compatibility
Could you use the gst-inspect-1.0 nvdsosd cli to run in your env and attach your deepstream_app_config.txt?
jg@tensor:~$ ls -tl /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so
-rwxr-xr-x 1 jg jg 688992 Aug 22 2022 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so
jg@tensor:~$
I will look over that link regardless.
Thanks.
…
That link is the basic setup guide, which I followed to get to where we are.
The fact that the reference application “deepstream-app” is running should indicate the basic install was ok, right?
thanks.
No. Since your gst-inspect-1.0 nvdsosd cli did not succeed. Some dynamic libraries that this plugin relies on were not installed successfully. You can use ldd /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so cli to check which lib isn’t installed successfully.
Well, since I was forced to use the sdk-manager to ‘flash’ the board so I could use another gig of memory, that all seems to be gone and I have to start all over anyway.