This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: SDK

Part Number: TDA4VM
Other Parts Discussed in Thread: 4213

Tool/software:

I am trying the SDK 9.2.

I run the default demo, it is running like this:

root@tda4vm-sk:/opt/edgeai-gst-apps/apps_python# python3 app_edgeai.py ../configs/object_detection.yaml
libtidl_onnxrt_EP loaded 0x39211760
Final number of subgraphs created are : 1, - Offloaded Nodes - 283, Total Nodes - 283
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=5) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
4212.865192 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
4212.865268 s: VX_ZONE_INIT:Enabled
4212.865277 s: VX_ZONE_ERROR:Enabled
4212.865282 s: VX_ZONE_WARNING:Enabled
4212.865828 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0
4212.865924 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1
4212.866013 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2
4212.866109 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3
4212.866119 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
4212.866584 s: VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
[ERROR] Could not get allowed GstCaps of device
4213.130218 s: VX_ZONE_ERROR:[vxGetStatus:1020] Reference is NULL
4213.134274 s: VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
4213.138731 s: VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initialization Done !!!
APP: Deinit ... !!!
REMOTE_SERVICE: Deinit ... !!!
REMOTE_SERVICE: Deinit ... Done !!!
IPC: Deinit ... !!!
IPC: DeInit ... Done !!!
MEM: Deinit ... !!!
DDR_SHARED_MEM: Alloc's: 15 alloc's of 32899080 bytes
DDR_SHARED_MEM: Free's : 15 free's of 32899080 bytes
DDR_SHARED_MEM: Open's : 0 allocs of 0 bytes
MEM: Deinit ... Done !!!
APP: Deinit ... Done !!!
root@tda4vm-sk:/opt/edgeai-gst-apps/apps_python#

There is an error in the log. If this is a problem of SDK?
And the yaml file is like this:

root@tda4vm-sk:/opt/edgeai-gst-apps/configs# cat object_detection.yaml
title: "Object Detection"
log_level: 2
inputs:
input0:
source: /dev/video-usb-cam0
format: jpeg
width: 1280
height: 720
framerate: 30
input1:
source: /opt/edgeai-test-data/videos/video0_1280_768.h264
format: h264
width: 1280
height: 768
framerate: 30
loop: True
input2:
source: /opt/edgeai-test-data/images/%04d.jpg
width: 1280
height: 720
index: 0
framerate: 1
loop: True
models:
model0:
model_path: /opt/model_zoo/TVM-OD-5120-ssdLite-mobDet-DSP-coco-320x320
viz_threshold: 0.6
model1:
model_path: /opt/model_zoo/TFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320
viz_threshold: 0.6
model2:
model_path: /opt/model_zoo/ONR-OD-8200-yolox-nano-lite-mmdet-coco-416x416
viz_threshold: 0.6
outputs:
output0:
sink: kmssink
width: 1920
height: 1080
overlay-perf-type: graph
output1:
sink: /opt/edgeai-test-data/output/output_video0.mkv
width: 1920
height: 1080
output2:
sink: /opt/edgeai-test-data/output/output_image_%04d.jpg
width: 1920
height: 1080
output3:
sink: remote
width: 1920
height: 1080
port: 8081
host: 127.0.0.1
encoding: jpeg
overlay-perf-type: graph

flows:
flow0: [input1,model2,output0,[320,150,1280,720]]
root@tda4vm-sk:/opt/edgeai-gst-apps/configs#

Regards,
Makoto.

  • Hello Makoto,

    Try running the following command for object detection:

    root@tda4vm-sk:/opt/edgeai-gst-apps# ./apps_python/app_edgeai.py ./configs/object_detection.yaml

    For more on running the out of box demos: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-sk-tda4vm/09_02_00/exports/edgeai-docs/common/sample_apps.html#python-c-apps

    Thank you,

    Fabiana

  • Hi Fabiana,

    I've run that demo.
    I want to confirm that if the log when demo is running like below is a SDK problem or not?

    ---------------------------------log↓--------------------------------------
    [ERROR] Could not get allowed GstCaps of device
    4213.130218 s: VX_ZONE_ERROR:[vxGetStatus:1020] Reference is NULL
    ---------------------------------log↑--------------------------------------

    I am using this input

    --------------------------------object_detection.yaml↓-------------
    input1:
    source: /opt/edgeai-test-data/videos/video0_1280_768.h264
    format: h264
    width: 1280
    height: 768
    framerate: 30
    loop: True
    --------------------------------object_detection.yaml↑-------------

    Regards,
    Makoto.

  • Hi Makoto,

    I have tested this on my end with the same configuration file and was able to run the demo with no issue. Do you have a display connected when running the application?

    Thank you,

    Fabiana

  • Dear Fabiana

    I didn't connect a display when running the application.

    Regards,
    Makoto.

  • Hi Makoto,

    Could you try connecting to a display or changing the ouput0 to output1 in your flow like such:

    flow0: [input1,model2,output1,[320,150,1280,720]]

    Thank you,

    Fabiana

  • Dear Fabiana,
    I tried output1.

    But I got other errors when running.
    I attach the rtsp_src_example.yaml (as rtsp_src_example.yaml.txt)
    and the run.log

    What is going wrong?

    Thank you,

    Makoto

    title RTSP stream
    log_level 2
    inputs
        # httpsgist.github.comSantiago-vdk80c378a315722a1b813ae5da1661f890
        # Steps given in the above url can be used to create an rtsp src in a
        # linux machine
        input0
            source rtsp192.168.11.1118088livestream2 # rtsp stream url
            width 640
            height 480
            framerate 30
            loop False
    models
        model0
            model_path optmodel_zooONR-CL-6360-regNetx-200mf
            topN 5
        model1
            model_path optmodel_zooTFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320
            viz_threshold 0.6
        model2
            model_path optmodel_zooONR-SS-8610-deeplabv3lite-mobv2-ade20k32-512x512
            alpha 0.4
    outputs
        output0
            sink kmssink
            width 1920
            height 1080
            overlay-perf-type graph
        output1
            sink optedgeai-test-dataoutputoutput_video.mkv
            width 640
            height 480
        output2
            sink optedgeai-test-dataoutputoutput_image_%04d.jpg
            width 640
            height 480
        output3
            sink remote
            width 1920
            height 1080
            port 8081
            host 127.0.0.1
            encoding jpeg
            overlay-perf-type graph
    
    flows
        flow0 [input0,model0,output1]
    
    root@tda4vm-sk:/opt/edgeai-gst-apps# cd apps_python/
    root@tda4vm-sk:/opt/edgeai-gst-apps/apps_python# python3 app_edgeai.py ../configs/rtsp_src_example.yaml 
    libtidl_onnxrt_EP loaded 0x3b973700 
    Final number of subgraphs created are : 1, - Offloaded Nodes - 103, Total Nodes - 103 
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
       408.833889 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
       408.837078 s:  VX_ZONE_INIT:Enabled
       408.837092 s:  VX_ZONE_ERROR:Enabled
       408.837101 s:  VX_ZONE_WARNING:Enabled
       408.839354 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0 
       408.839459 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1 
       408.839565 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2 
       408.839663 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3 
       408.839724 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
       408.844267 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    ==========[INPUT PIPELINE(S)]==========
    
    
    ** (python3:1593): CRITICAL **: 01:25:07.934: gst_v4l2_buffer_pool_orphan: assertion 'bpool' failed
    [PIPE-0]
    
    rtspsrc location=rtsp://192.168.11.111:8088/live/stream2 latency=0 proxy-id=None proxy-pw=None ! rtph264depay ! h264parse ! v4l2h264dec capture-io-mode=5 ! tiovxmemalloc pool-size=12 ! capsfilter caps="video/x-raw, format=(string)NV12;" ! tiovxmultiscaler name=split_01
    split_01. ! queue ! capsfilter caps="video/x-raw, width=(int)640, height=(int)480;" ! tiovxdlcolorconvert out-pool-size=4 ! capsfilter caps="video/x-raw, format=(string)RGB;" ! appsink max-buffers=2 drop=True name=sen_0
    split_01. ! queue ! capsfilter caps="video/x-raw, width=(int)340, height=(int)256;" ! tiovxdlcolorconvert out-pool-size=4 ! capsfilter caps="video/x-raw, format=(string)RGB;" ! videobox qos=True left=58 right=58 top=16 bottom=16 ! tiovxdlpreproc out-pool-size=4 data-type=3 tensor-format=1 ! capsfilter caps="application/x-tensor-tiovx;" ! appsink max-buffers=2 drop=True name=pre_0
    
    
    ==========[OUTPUT PIPELINE]==========
    
    appsrc do-timestamp=True format=3 block=True name=post_0 ! tiovxdlcolorconvert ! capsfilter caps="video/x-raw, format=(string)NV12, width=(int)640, height=(int)480;" ! v4l2h264enc extra-controls="controls, frame_level_rate_control_enable=(int)1, video_bitrate=(int)10000000, video_gop_size=(int)30;" ! h264parse ! matroskamux writing-app=GStreamer Matroska muxer ! filesink sync=False location=/opt/edgeai-test-data/output/output_video.mkv
    
    [ERROR] Error pulling tensor from GST Pipeline
       414.923404 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
       414.927951 s:  VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initialization Done !!!
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: DeInit ... Done !!!
    MEM: Deinit ... !!!
    DDR_SHARED_MEM: Alloc's: 54 alloc's of 22075056 bytes 
    DDR_SHARED_MEM: Free's : 54 free's  of 22075056 bytes 
    DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes 
    MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!
    

  • Hi Makoto,

    Try running the configuration file below, only changing the input source (line 8) to your RTSP stream URL.

    title: "RTSP stream"
    log_level: 2
    inputs:
        # https://gist.github.com/Santiago-vdk/80c378a315722a1b813ae5da1661f890
        # Steps given in the above url can be used to create an rtsp src in a
        # linux machine
        input0:
            source: rtsp://10.24.51.126:8554/test # rtsp stream url
            width: 1280
            height: 720
            framerate: 30
            loop: True
    models:
        model0:
            model_path: /opt/model_zoo/ONR-CL-6360-regNetx-200mf
            topN: 5
        model1:
            model_path: /opt/model_zoo/TFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320
            viz_threshold: 0.6
        model2:
            model_path: /opt/model_zoo/ONR-SS-8610-deeplabv3lite-mobv2-ade20k32-512x512
            alpha: 0.4
    outputs:
        output0:
            sink: kmssink
            width: 1920
            height: 1080
            overlay-perf-type: graph
        output1:
            sink: /opt/edgeai-test-data/output/output_video.mkv
            width: 1920
            height: 1080
        output2:
            sink: /opt/edgeai-test-data/output/output_image_%04d.jpg
            width: 1920
            height: 1080
        output3:
            sink: remote
            width: 1920
            height: 1080
            port: 8081
            host: 127.0.0.1
            encoding: jpeg
            overlay-perf-type: graph
    
    flows:
        flow0: [input0,model0,output1,[320,150,1280,720]]

    Thank you,

    Fabiana

  • Dear Fabiana,

    I tried as your reply.
    I attached the log.

    However, my RTSP is 640x480.

    root@tda4vm-sk:/opt/edgeai-gst-apps/apps_python# cat ../configs/tmp.yaml
    title: RTSP stream
    log_level: 2
    inputs:
        # https://gist.github.com/Santiago-vdk/80c378a315722a1b813ae5da1661f890
        # Steps given in the above url can be used to create an rtsp src in a
        # linux machine
        input0:
            source: rtsp://192.168.11.111:8088/live/stream2 # rtsp stream url
            width: 1280
            height: 720
            framerate: 30
            loop: True
    models:
        model0:
            model_path: /opt/model_zoo/ONR-CL-6360-regNetx-200mf
            topN: 5
        model1:
            model_path: /opt/model_zoo/TFL-OD-2020-ssdLite-mobDet-DSP-coco-320x320
            viz_threshold: 0.6
        model2:
            model_path: /opt/model_zoo/ONR-SS-8610-deeplabv3lite-mobv2-ade20k32-512x512
            alpha: 0.4
    outputs:
        output0:
            sink: kmssink
            width: 1920
            height: 1080
            overlay-perf-type: graph
        output1:
            sink: /opt/edgeai-test-data/output/output_video.mkv
            width: 1920
            height: 1080
        output2:
            sink: /opt/edgeai-test-data/output/output_image_%04d.jpg
            width: 1920
            height: 1080
        output3:
            sink: remote
            width: 1920
            height: 1080
            port: 8081
            host: 127.0.0.1
            encoding: jpeg
            overlay-perf-type: graph
    
    flows:
        flow0: [input0,model0,output1,[320,150,1280,720]]
    root@tda4vm-sk:/opt/edgeai-gst-apps/apps_python# python3 app_edgeai.py ../configs/tmp.yaml 
    libtidl_onnxrt_EP loaded 0x228f28f0 
    Final number of subgraphs created are : 1, - Offloaded Nodes - 103, Total Nodes - 103 
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
      8626.899167 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
      8626.899371 s:  VX_ZONE_INIT:Enabled
      8626.899416 s:  VX_ZONE_ERROR:Enabled
      8626.899455 s:  VX_ZONE_WARNING:Enabled
      8626.900268 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0 
      8626.900505 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1 
      8626.900655 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2 
      8626.900790 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3 
      8626.900841 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
      8626.901277 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    ==========[INPUT PIPELINE(S)]==========
    
    [ERROR] Error pulling tensor from GST Pipeline
    [PIPE-0]
    
    rtspsrc location=rtsp://192.168.11.111:8088/live/stream2 latency=0 proxy-id=None proxy-pw=None name=source0
    
    
    ==========[OUTPUT PIPELINE]==========
    
    appsrc do-timestamp=True format=3 block=True name=post_0 ! tiovxdlcolorconvert ! capsfilter caps="video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720;" ! queue ! mosaic_0.sink_0
    
    tiovxmosaic target=1 background=/tmp/background_0 name=mosaic_0 src::pool-size=2
    sink_0::startx="<320>" sink_0::starty="<150>" sink_0::widths="<1280>" sink_0::heights="<720>"
    ! capsfilter caps="video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080;" ! v4l2h264enc extra-controls="controls, frame_level_rate_control_enable=(int)1, video_bitrate=(int)10000000, video_gop_size=(int)30;" ! h264parse ! matroskamux writing-app=GStreamer Matroska muxer ! filesink sync=False location=/opt/edgeai-test-data/output/output_video.mkv
    
      8632.311488 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
      8632.315985 s:  VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initialization Done !!!
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: DeInit ... Done !!!
    MEM: Deinit ... !!!
    DDR_SHARED_MEM: Alloc's: 24 alloc's of 53919024 bytes 
    DDR_SHARED_MEM: Free's : 24 free's  of 53919024 bytes 
    DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes 
    MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!

    Thank you,

    Makoto

  • Hi Makoto,

    Responses will be delayed this week due to on-site training. Thank you for understanding.

    -Fabiana

  • Hi Makto,

    Could you try running the cpp application instead? Instructions on how to do so can be found here: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-sk-tda4vm/09_02_00/exports/edgeai-docs/common/sample_apps.html#python-c-apps

    Thank you,

    Fabiana