I’m trying to modify detectnet-camera.py in order to get source from RTSP instead of local webcam.
so i changed:
camera = jetson.utils.gstCamera(opt.width, opt.height, opt.camera)
gst = "rtspsrc location=rtsp://admin:Password@192.168.0.204:554/ latency=200 ! queue ! rtph264depay ! queue ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink" camera = cv2.VideoCapture(gst);
but before send frame to net.Detect is necessary to allocate it to CUDA memory and I was not able to find the way.
I found only the possibility to allocate to CUDA memory a local image using jetson.utils.loadImageRGBA(), but this means write to disk each frame read from RTSP and performance will drop down drammatically (and also SD life).
I tried using a ramdisk but is not a valid solution.