Problem using on board camera

I have been trying to get a TX 2 camera to work with: https://github.com/naisy/realtime_object_detection

I can get the webcam to work, but when I change the config settings for it to use the “onboard camera” (I took it off a TX2) it says:

Traceback (most recent call last):
  File "run_stream.py", line 123, in main
    detection.start(cfg)
  File "/home/nvidia/Downloads/realtime_object_detection-master/lib/detection_nms_v2.py", line 192, in start
    video_reader.start(VIDEO_INPUT, WIDTH, HEIGHT, save_to_file=SAVE_TO_FILE)
  File "/home/nvidia/Downloads/realtime_object_detection-master/lib/webcam.py", line 46, in start
    raise IOError(("Couldn't open video file or webcam."))
OSError: Couldn't open video file or webcam.

When I run this:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=1024, height=768, framerate=120/1, format=NV12' ! nvvidconv flip-method=0 ! nvegltransform ! nveglglessink -e

in the console it opens a window and shows live video from the camera so I don’t think its missing a plug-in

I have tried playing around with the config.yml file changing “camera_input” to all sorts of things (nvcamerasrc to nvarguscamerasrc, etc.) but haven’t seen any change. I am sure I am just missing something but hopefully someone can help.

Also, I am new to all of this (and I do mean all) so I apologize if its something simple. Eventually I want to use a D3 camera, but I am currently waiting for it to be supported so until then I would like to use something other then the webcam…

Did you modify the config.yml to use the nvarguscamerasrc like below?

video_input: “nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)I420, framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink”

I have tried that, but I re-tried and still got this:

Traceback (most recent call last):
  File "run_stream.py", line 123, in main
    detection.start(cfg)
  File "/home/nvidia/Downloads/realtime_object_detection-master/lib/detection_nms_v2.py", line 192, in start
    video_reader.start(VIDEO_INPUT, WIDTH, HEIGHT, save_to_file=SAVE_TO_FILE)
  File "/home/nvidia/Downloads/realtime_object_detection-master/lib/webcam.py", line 46, in start
    raise IOError(("Couldn't open video file or webcam."))
OSError: Couldn't open video file or webcam.

Should not run to the webcam.py !?