Yes I feel the issue is in the ssd_mobilenet_v2_coco.uff.1.1.7103.GPU.FP16.engine file creation.
$ ./detectnet-camera --width=1280 --height=720 /dev/video0
[TRT] Layer(Reformat): GridAnchor copy, Tactic: 1002, GridAnchor[Float(2,4332,1)] → concat_priorbox[Float(2,4332,1)]
[TRT] Layer(Reformat): GridAnchor_1 copy, Tactic: 0, GridAnchor_1[Float(2,2400,1)] → concat_priorbox[Float(2,2400,1)]
[TRT] Layer(Reformat): GridAnchor_2 copy, Tactic: 0, GridAnchor_2[Float(2,600,1)] → concat_priorbox[Float(2,600,1)]
[TRT] Layer(Reformat): GridAnchor_3 copy, Tactic: 0, GridAnchor_3[Float(2,216,1)] → concat_priorbox[Float(2,216,1)]
[TRT] Layer(Reformat): GridAnchor_4 copy, Tactic: 0, GridAnchor_4[Float(2,96,1)] → concat_priorbox[Float(2,96,1)]
[TRT] Layer(Reformat): GridAnchor_5 copy, Tactic: 0, GridAnchor_5[Float(2,24,1)] → concat_priorbox[Float(2,24,1)]
[TRT] Layer(PluginV2): NMS, Tactic: 0, concat_box_conf[Float(174447,1,1)], Squeeze[Float(7668,1,1)], concat_priorbox[Float(2,7668,1)] → NMS[Float(1,100,7)], NMS_1[Float(1,1,1)]
[TRT] device GPU, completed building CUDA engine
[TRT] network profiling complete, writing engine cache to networks/SSD-Mobilenet-v2/ssd_mobilenet_v2_coco.uff.1.1.7103.GPU.FP16.engine
[TRT] failed to open engine cache file for writing networks/SSD-Mobilenet-v2/ssd_mobilenet_v2_coco.uff.1.1.7103.GPU.FP16.engine
[TRT] device GPU, completed writing engine cache to networks/SSD-Mobilenet-v2/ssd_mobilenet_v2_coco.uff.1.1.7103.GPU.FP16.engine
[TRT] device GPU, loaded networks/SSD-Mobilenet-v2/ssd_mobilenet_v2_coco.uff
[TRT] Deserialize required 221087 microseconds.
[TRT]
[TRT] CUDA engine context initialized on device GPU:
[TRT] – layers 108
[TRT] – maxBatchSize 1
[TRT] – workspace 0
[TRT] – deviceMemory 28495360
[TRT] – bindings 3
[TRT] binding 0
– index 0
– name ‘Input’
– type FP32
– in/out INPUT
– # dims 3
– dim #0 3 (SPATIAL)
– dim #1 300 (SPATIAL)
– dim #2 300 (SPATIAL)
[TRT] binding 1
– index 1
– name ‘NMS’
– type FP32
– in/out OUTPUT
– # dims 3
– dim #0 1 (SPATIAL)
– dim #1 100 (SPATIAL)
– dim #2 7 (SPATIAL)
[TRT] binding 2
– index 2
– name ‘NMS_1’
– type FP32
– in/out OUTPUT
– # dims 3
– dim #0 1 (SPATIAL)
– dim #1 1 (SPATIAL)
– dim #2 1 (SPATIAL)
[TRT]
[TRT] binding to input 0 Input binding index: 0
[TRT] binding to input 0 Input dims (b=1 c=3 h=300 w=300) size=1080000
[TRT] binding to output 0 NMS binding index: 1
[TRT] binding to output 0 NMS dims (b=1 c=1 h=100 w=7) size=2800
[TRT] binding to output 1 NMS_1 binding index: 2
[TRT] binding to output 1 NMS_1 dims (b=1 c=1 h=1 w=1) size=4
[TRT]
[TRT] device GPU, networks/SSD-Mobilenet-v2/ssd_mobilenet_v2_coco.uff initialized.
[TRT] W = 7 H = 100 C = 1
[TRT] detectNet – maximum bounding boxes: 100
[TRT] detectNet – loaded 91 class info entries
[TRT] detectNet – number of object classes: 91
Segmentation fault (core dumped)
This is the same error I’m facing when I run:
$ roslaunch ros_deep_learning detectnet.ros1.launch
But there the code executes without giving Segmentation Fault.