dusty-nv / jetson-inference

Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
https://developer.nvidia.com/embedded/twodaystoademo
MIT License
7.72k stars 2.97k forks source link

detectnet unable to use other network(peoplenet/ssd-mobilenet-v1) with latest git version #1794

Closed lida2003 closed 2 weeks ago

lida2003 commented 7 months ago

Hi

I found that detectnet failed using peoplenet/ssd-mobilenet-v1 , but it's OK with ssd-mobilenet-v2(default).

Any idea?

PS: models have been downloaded sucessfully.

$ git log -n 1
commit fe8b42c8da75c1c353dc59fa1fd079820024b89d (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Dustin Franklin <dustinf@nvidia.com>
Date:   Wed Jan 3 10:33:22 2024 -0500

    Merge pull request #1769 from ABADY1000/patch-1

    Update detectnet-camera-2.md to add track parameter to --overlay options
daniel@daniel-nvidia:~/Jetson/jetson-inference/build/aarch64/bin$ ./detectnet ../../../../mobile_car_ext2.mp4 --network=peoplenet
[gstreamer] initialized gstreamer, version 1.20.3.0
[gstreamer] gstDecoder -- creating decoder for ../../../../mobile_car_ext2.mp4
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NvMMLiteBlockCreate : Block : BlockType = 261 

(detectnet:9409): GStreamer-CRITICAL **: 17:32:48.769: gst_debug_log_valist: assertion 'category != NULL' failed

(detectnet:9409): GStreamer-CRITICAL **: 17:32:48.769: gst_debug_log_valist: assertion 'category != NULL' failed

(detectnet:9409): GStreamer-CRITICAL **: 17:32:48.769: gst_debug_log_valist: assertion 'category != NULL' failed

(detectnet:9409): GStreamer-CRITICAL **: 17:32:48.769: gst_debug_log_valist: assertion 'category != NULL' failed
[gstreamer] gstDecoder -- discovered video resolution: 1280x720  (framerate 25.000000 Hz)
[gstreamer] gstDecoder -- discovered video caps:  video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3.1, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] filesrc location=../../../../mobile_car_ext2.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder name=decoder enable-max-performance=1 ! video/x-raw(memory:NVMM) ! nvvidconv name=vidconv ! video/x-raw ! appsink name=mysink
[video]  created gstDecoder from file:///home/daniel/Jetson/jetson-inference/build/aarch64/bin/../../../../mobile_car_ext2.mp4
------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI: file:///home/daniel/Jetson/jetson-inference/build/aarch64/bin/../../../../mobile_car_ext2.mp4
     - protocol:  file
     - location:  ../../../../mobile_car_ext2.mp4
     - extension: mp4
  -- deviceType: file
  -- ioType:     input
  -- codec:      H264
  -- codecType:  v4l2
  -- width:      1280
  -- height:     720
  -- frameRate:  25
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
------------------------------------------------
[OpenGL] glDisplay -- X screen 0 resolution:  1920x1080
[OpenGL] glDisplay -- X window resolution:    1920x1080
[OpenGL] glDisplay -- display device initialized (1920x1080)
[video]  created glDisplay from display://0
------------------------------------------------
glDisplay video options:
------------------------------------------------
  -- URI: display://0
     - protocol:  display
     - location:  0
  -- deviceType: display
  -- ioType:     output
  -- width:      1920
  -- height:     1080
  -- frameRate:  0
  -- numBuffers: 4
  -- zeroCopy:   true
------------------------------------------------
[TRT]    running model command:  tao-model-downloader.sh peoplenet_deployable_quantized_v2.6.1
sh: 1: tao-model-downloader.sh: not found
[TRT]    failed to download model after 2 retries
[TRT]    if this error keeps occuring, see here for a mirror to download the models from:
[TRT]       https://github.com/dusty-nv/jetson-inference/releases
[TRT]    failed to download built-in detection model 'peoplenet'
detectnet:  failed to load detectNet model
daniel@daniel-nvidia:~/Jetson/jetson-inference/build/aarch64/bin$ ./detectnet ../../../../mobile_car_ext2.mp4 --network=ssd-mobilenet-v1
[gstreamer] initialized gstreamer, version 1.20.3.0
[gstreamer] gstDecoder -- creating decoder for ../../../../mobile_car_ext2.mp4
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NvMMLiteBlockCreate : Block : BlockType = 261 

(detectnet:9377): GStreamer-CRITICAL **: 17:31:53.713: gst_debug_log_valist: assertion 'category != NULL' failed

(detectnet:9377): GStreamer-CRITICAL **: 17:31:53.713: gst_debug_log_valist: assertion 'category != NULL' failed

(detectnet:9377): GStreamer-CRITICAL **: 17:31:53.713: gst_debug_log_valist: assertion 'category != NULL' failed

(detectnet:9377): GStreamer-CRITICAL **: 17:31:53.713: gst_debug_log_valist: assertion 'category != NULL' failed
[gstreamer] gstDecoder -- discovered video resolution: 1280x720  (framerate 25.000000 Hz)
[gstreamer] gstDecoder -- discovered video caps:  video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3.1, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] filesrc location=../../../../mobile_car_ext2.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder name=decoder enable-max-performance=1 ! video/x-raw(memory:NVMM) ! nvvidconv name=vidconv ! video/x-raw ! appsink name=mysink
[video]  created gstDecoder from file:///home/daniel/Jetson/jetson-inference/build/aarch64/bin/../../../../mobile_car_ext2.mp4
------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI: file:///home/daniel/Jetson/jetson-inference/build/aarch64/bin/../../../../mobile_car_ext2.mp4
     - protocol:  file
     - location:  ../../../../mobile_car_ext2.mp4
     - extension: mp4
  -- deviceType: file
  -- ioType:     input
  -- codec:      H264
  -- codecType:  v4l2
  -- width:      1280
  -- height:     720
  -- frameRate:  25
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
------------------------------------------------
[OpenGL] glDisplay -- X screen 0 resolution:  1920x1080
[OpenGL] glDisplay -- X window resolution:    1920x1080
[OpenGL] glDisplay -- display device initialized (1920x1080)
[video]  created glDisplay from display://0
------------------------------------------------
glDisplay video options:
------------------------------------------------
  -- URI: display://0
     - protocol:  display
     - location:  0
  -- deviceType: display
  -- ioType:     output
  -- width:      1920
  -- height:     1080
  -- frameRate:  0
  -- numBuffers: 4
  -- zeroCopy:   true
------------------------------------------------

detectNet -- loading detection network model from:
          -- model        networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff
          -- input_blob   'Input'
          -- output_blob  'Postprocessor'
          -- output_count 'PostProcessor_1'
          -- class_labels networks/SSD-Mobilenet-v1/ssd_coco_labels.txt
          -- threshold    0.500000
          -- batch_size   1

[TRT]    TensorRT version 8.6.2
[TRT]    loading NVIDIA plugins...
[TRT]    Registered plugin creator - ::BatchedNMSDynamic_TRT version 1
[TRT]    Registered plugin creator - ::BatchedNMS_TRT version 1
[TRT]    Registered plugin creator - ::BatchTilePlugin_TRT version 1
[TRT]    Registered plugin creator - ::Clip_TRT version 1
[TRT]    Registered plugin creator - ::CoordConvAC version 1
[TRT]    Registered plugin creator - ::CropAndResizeDynamic version 1
[TRT]    Registered plugin creator - ::CropAndResize version 1
[TRT]    Registered plugin creator - ::DecodeBbox3DPlugin version 1
[TRT]    Registered plugin creator - ::DetectionLayer_TRT version 1
[TRT]    Registered plugin creator - ::EfficientNMS_Explicit_TF_TRT version 1
[TRT]    Registered plugin creator - ::EfficientNMS_Implicit_TF_TRT version 1
[TRT]    Registered plugin creator - ::EfficientNMS_ONNX_TRT version 1
[TRT]    Registered plugin creator - ::EfficientNMS_TRT version 1
[TRT]    Could not register plugin creator -  ::FlattenConcat_TRT version 1
[TRT]    Registered plugin creator - ::GenerateDetection_TRT version 1
[TRT]    Registered plugin creator - ::GridAnchor_TRT version 1
[TRT]    Registered plugin creator - ::GridAnchorRect_TRT version 1
[TRT]    Registered plugin creator - ::InstanceNormalization_TRT version 1
[TRT]    Registered plugin creator - ::InstanceNormalization_TRT version 2
[TRT]    Registered plugin creator - ::LReLU_TRT version 1
[TRT]    Registered plugin creator - ::ModulatedDeformConv2d version 1
[TRT]    Registered plugin creator - ::MultilevelCropAndResize_TRT version 1
[TRT]    Registered plugin creator - ::MultilevelProposeROI_TRT version 1
[TRT]    Registered plugin creator - ::MultiscaleDeformableAttnPlugin_TRT version 1
[TRT]    Registered plugin creator - ::NMSDynamic_TRT version 1
[TRT]    Registered plugin creator - ::NMS_TRT version 1
[TRT]    Registered plugin creator - ::Normalize_TRT version 1
[TRT]    Registered plugin creator - ::PillarScatterPlugin version 1
[TRT]    Registered plugin creator - ::PriorBox_TRT version 1
[TRT]    Registered plugin creator - ::ProposalDynamic version 1
[TRT]    Registered plugin creator - ::ProposalLayer_TRT version 1
[TRT]    Registered plugin creator - ::Proposal version 1
[TRT]    Registered plugin creator - ::PyramidROIAlign_TRT version 1
[TRT]    Registered plugin creator - ::Region_TRT version 1
[TRT]    Registered plugin creator - ::Reorg_TRT version 1
[TRT]    Registered plugin creator - ::ResizeNearest_TRT version 1
[TRT]    Registered plugin creator - ::ROIAlign_TRT version 1
[TRT]    Registered plugin creator - ::RPROI_TRT version 1
[TRT]    Registered plugin creator - ::ScatterND version 1
[TRT]    Registered plugin creator - ::SpecialSlice_TRT version 1
[TRT]    Registered plugin creator - ::Split version 1
[TRT]    Registered plugin creator - ::VoxelGeneratorPlugin version 1
[TRT]    completed loading NVIDIA plugins.
[TRT]    detected model format - UFF  (extension '.uff')
[TRT]    desired precision specified for GPU: FASTEST
[TRT]    requested fasted precision for device GPU without providing valid calibrator, disabling INT8
[TRT]    [MemUsageChange] Init CUDA: CPU +12, GPU +0, now: CPU 44, GPU 3184 (MiB)
[TRT]    Trying to load shared library libnvinfer_builder_resource.so.8.6.2
[TRT]    Loaded shared library libnvinfer_builder_resource.so.8.6.2
[TRT]    [MemUsageChange] Init builder kernel library: CPU +1154, GPU +1151, now: CPU 1233, GPU 4380 (MiB)
[TRT]    CUDA lazy loading is enabled.
[TRT]    native precisions detected for GPU:  FP32, FP16, INT8
[TRT]    selecting fastest native precision for GPU:  FP16
[TRT]    found engine cache file networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff.1.1.8602.GPU.FP16.engine
[TRT]    found model checksum networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff.sha256sum
[TRT]    echo "$(cat networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff.sha256sum) networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff" | sha256sum --check --status
[TRT]    model matched checksum networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff.sha256sum
[TRT]    loading network plan from engine cache... networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff.1.1.8602.GPU.FP16.engine
[TRT]    device GPU, loaded networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff
[TRT]    Loaded engine size: 14 MiB
[TRT]    Local registry did not find FlattenConcat_TRT creator. Will try parent registry if enabled.
[TRT]    Global registry found FlattenConcat_TRT creator.
[TRT]    Local registry did not find GridAnchor_TRT creator. Will try parent registry if enabled.
[TRT]    Global registry found GridAnchor_TRT creator.
[TRT]    Local registry did not find FlattenConcat_TRT creator. Will try parent registry if enabled.
[TRT]    Global registry found FlattenConcat_TRT creator.
[TRT]    Local registry did not find NMS_TRT creator. Will try parent registry if enabled.
[TRT]    Global registry found NMS_TRT creator.
[TRT]    Trying to load shared library libcublas.so.12
[TRT]    Loaded shared library libcublas.so.12
[TRT]    Using cublas as plugin tactic source
[TRT]    [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +4, GPU +1, now: CPU 103, GPU 4382 (MiB)
[TRT]    Trying to load shared library libcudnn.so.8
[TRT]    Loaded shared library libcudnn.so.8
[TRT]    Using cuDNN as plugin tactic source
[TRT]    [MemUsageChange] Init cuDNN: CPU +2, GPU +0, now: CPU 105, GPU 4382 (MiB)
[TRT]    Deserialization required 50669 microseconds.
[TRT]    [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +13, now: CPU 0, GPU 13 (MiB)
[TRT]    Trying to load shared library libcublas.so.12
[TRT]    Loaded shared library libcublas.so.12
[TRT]    Using cublas as plugin tactic source
[TRT]    [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +0, now: CPU 105, GPU 4382 (MiB)
[TRT]    Trying to load shared library libcudnn.so.8
[TRT]    Loaded shared library libcudnn.so.8
[TRT]    Using cuDNN as plugin tactic source
[TRT]    [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 105, GPU 4382 (MiB)
[TRT]    Total per-runner device persistent memory is 3072
[TRT]    Total per-runner host persistent memory is 209824
[TRT]    Allocated activation device memory of size 5609984
[TRT]    [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +6, now: CPU 0, GPU 19 (MiB)
[TRT]    CUDA lazy loading is enabled.
[TRT]    
[TRT]    CUDA engine context initialized on device GPU:
[TRT]       -- layers       75
[TRT]       -- maxBatchSize 1
[TRT]       -- deviceMemory 5609984
[TRT]       -- bindings     3
[TRT]       binding 0
                -- index   0
                -- name    'Input'
                -- type    FP32
                -- in/out  INPUT
                -- # dims  3
                -- dim #0  3
                -- dim #1  300
                -- dim #2  300
[TRT]       binding 1
                -- index   1
                -- name    'Postprocessor'
                -- type    FP32
                -- in/out  OUTPUT
                -- # dims  3
                -- dim #0  1
                -- dim #1  100
                -- dim #2  7
[TRT]       binding 2
                -- index   2
                -- name    'Postprocessor_1'
                -- type    FP32
                -- in/out  OUTPUT
                -- # dims  3
                -- dim #0  1
                -- dim #1  1
                -- dim #2  1
[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 Postprocessor  binding index:  1
[TRT]    binding to output 0 Postprocessor  dims (b=1 c=1 h=100 w=7) size=2800
[TRT]    3: Cannot find binding of given name: PostProcessor_1
[TRT]    failed to find requested output layer PostProcessor_1 in network
[TRT]    device GPU, failed to create resources for CUDA engine
[TRT]    failed to create TensorRT engine for networks/SSD-Mobilenet-v1/ssd_mobilenet_v1_coco.uff, device GPU
[TRT]    detectNet -- failed to initialize.
detectnet:  failed to load detectNet model
lida2003 commented 2 weeks ago

@wangke5437 Network issue, use a proxy or download model mannually.