when i runing this script
trinity@trinity-desktop:~/jetson-inference/python/examples$ python detectnet.py rtsp://admin:admin123@192.168.1.28:554/cam/realmonitor?channel=1&subtype=0 --overlay=box,labels,conf
i am getting error [cuda] cudaEventElapsedTime(&cuda_time, mEventsGPU[evt], mEventsGPU[evt+1])
[cuda] device not ready (error 600) (hex 0x258)
[cuda] /home/trinity/jetson-inference/build/aarch64/include/jetson-inference/tensorNet.h:769 so can any one help me and i also provied the script
import sys
import argparse
import cv2
import numpy as np
from jetson_inference import detectNet
from jetson_utils import videoSource, videoOutput, Log,cudaAllocMapped,cudaResize
import time
parse the command line
parser = argparse.ArgumentParser(description=“Locate objects in a live camera stream using an object detection DNN.”,
formatter_class=argparse.RawTextHelpFormatter,
epilog=detectNet.Usage() + videoSource.Usage() + videoOutput.Usage() + Log.Usage())
parser.add_argument(“input”, type=str, default=“”, nargs=‘?’, help=“URI of the input stream”)
parser.add_argument(“output”, type=str, default=“”, nargs=‘?’, help=“URI of the output stream”)
parser.add_argument(“–network”, type=str, default=“ssd-mobilenet-v2”, help=“pre-trained model to load (see below for options)”)
parser.add_argument(“–overlay”, type=str, default=“box,labels,conf”, help=“detection overlay flags (e.g. --overlay=box,labels,conf)\nvalid combinations are: ‘box’, ‘labels’, ‘conf’, ‘none’”)
parser.add_argument(“–threshold”, type=float, default=0.5, help=“minimum detection threshold to use”)
try:
args = parser.parse_known_args()[0]
except:
print(“”)
parser.print_help()
sys.exit(0)
create video sources and outputs
input = videoSource(args.input, argv=[“–input-codec=h264”, “–width=1020”, “–height=600”])
output = videoOutput(args.output, argv=sys.argv)
load the object detection network
net = detectNet(args.network, sys.argv, args.threshold)
note: to hard-code the paths to load a model, the following API can be used:
net = detectNet(model=“/home/trinity/jetson-inference/python/training/detection/ssd/models/custom_object_detection_model/yolov8m.onnx”, labels=“/home/trinity/jetson-#inference/python/training/detection/ssd/models/custom_object_detection_model/labels.txt”,
input_blob=“images”, output_cvg=“output0”, output_bbox=“output0”
threshold=args.threshold )
process frames until EOS or the user exits
while True:
# capture the next image
img = input.Capture()
if img is None: # timeout
continue
print("image",img)
#img=cv2.resize(np.array(img),(800,640))
# detect objects in the image (with overlay)
print(args.overlay)
detections = net.Detect(img,img.width,img.height, overlay="box,labels,conf")
# print the detections
print("detected {:d} objects in image".format(len(detections)))
for detection in detections:
print("detections",detection)
# render the image
output.Render(img)
# update the title bar
output.SetStatus("{:s} | Network {:.0f} FPS".format(args.network, net.GetNetworkFPS()))
# print out performance info
net.PrintProfilerTimes()
# exit on input/output EOS
if not input.IsStreaming() or not output.IsStreaming():
break