Hi,
It should work like this:
net = jetson.inference.detectNet(“SSD-Mobilenet-v2”, threshold=0.5)
#threthold < 1camera = jetson.utils.gstCamera(1280, 720, “/dev/video0”)
display = jetson.utils.glDisplay()
while display.IsOpen():
img, width, height = camera.CaptureRGBA()
detections = net.Detect(img, width, height, opt.overlay)
for detection in detections:
print(net.GetClassDesc(detection.ClassID))
display.RenderOnce(img, width, height)
display.SetTitle(“Object Detection | Network {:.0f}FPS”.format(net.GetNetworkFPS()))
Thanks.