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: An error occurs when using ./apps_python/app_edgeai.py configs/ox03c10_cam_example.yaml.

Part Number: TDA4VM

Tool/software:

Hi expert,

I have adapted the X3C camera. However, when using the Python script to retrieve the stream, an error "[ERROR] Error pulling tensor from GST Pipeline" occurs. Could you please help me figure out the cause? In addition, when using the GStreamer command alone to obtain the video stream, it is successful. 

root@j721e-evm:/opt/edgeai-gst-apps# GST_DEBUG=2 ./apps_python/app_edgeai.py configs/ox03c10_cam_example.yaml -n
0:00:00.791612640  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x120000: 'AVR (Audio Visual Research)' is not mapped
0:00:00.791704915  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x180000: 'CAF (Apple Core Audio File)' is not mapped
0:00:00.791731130  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped
0:00:00.791748045  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped
0:00:00.791760565  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped
0:00:00.791772760  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped
0:00:00.791786565  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped
0:00:00.791800675  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped
0:00:00.791818235  1906     0x126d1490 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped
libtidl_onnxrt_EP loaded 0x27e74a40
Final number of subgraphs created are : 1, - Offloaded Nodes - 289, Total Nodes - 289
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 !!!
  8139.796917 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
  8139.800393 s:  VX_ZONE_INIT:Enabled
  8139.800452 s:  VX_ZONE_ERROR:Enabled
  8139.800459 s:  VX_ZONE_WARNING:Enabled
  8139.806200 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
  8139.809080 s:  VX_ZONE_INIT:[tivxHostInitLocal:96] Initialization Done for HOST !!!
==========[INPUT PIPELINE(S)]==========

0:00:03.237540835  1905     0x29c46530 WARN                    v4l2 v4l2_calls.c:929:gst_v4l2_get_attribute:<source0:src> Failed to get value for control 9963776 on device '/dev/video-ox03c10-cam0'.
0:00:03.237755450  1905     0x29c46530 WARN                    v4l2 v4l2_calls.c:929:gst_v4l2_get_attribute:<source0:src> Failed to get value for control 9963777 on device '/dev/video-ox03c10-cam0'.
0:00:03.237817505  1905     0x29c46530 WARN                    v4l2 v4l2_calls.c:929:gst_v4l2_get_attribute:<source0:src> Failed to get value for control 9963778 on device '/dev/video-ox03c10-cam0'.
0:00:03.237874795  1905     0x29c46530 WARN                    v4l2 v4l2_calls.c:929:gst_v4l2_get_attribute:<source0:src> Failed to get value for control 9963779 on device '/dev/video-ox03c10-cam0'.
[PIPE-0]

v4l2src device=/dev/video-ox03c10-cam0 pixel-aspect-ratio=None ! capsfilter caps="video/x-raw, width=(int)1920, height=(int)1280;" ! tiovxdlcolorconvert ! capsfilter caps="video/x-raw, format=(string)NV12;" ! tiovxmultiscaler name=split_01
split_01. ! queue ! capsfilter caps="video/x-raw, width=(int)1280, height=(int)720;" ! 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)1168, height=(int)848;" ! tiovxmultiscaler target=1 ! capsfilter caps="video/x-raw, width=(int)416, height=(int)416;" ! 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)1280, height=(int)720;" ! queue ! mosaic_0.sink_0

tiovxmosaic target=1 background=/tmp/background_0 name=mosaic_0 src::pool-size=4
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)1280;" ! queue ! tiperfoverlay title=OX03C10 Camera ! kmssink sync=False max-lateness=5000000 qos=True processing-deadline=15000000 driver-name=tidss connector-id=40 plane-id=31 force-modesetting=True

[ERROR] Error pulling tensor from GST Pipeline

root@j721e-evm:/opt/edgeai-gst-apps# cat configs/ox03c10_cam_example.yaml
title: "OX03C10 Camera"
log_level: 2
inputs:
    # Needs fusion board and ox03c10 cameras conneted over FPD links
    # Overlay for fusion board and cameras should be applied in /run/media/BOOT-mmcblk1p1/uEnv.txt (Refer to Documentation)
    input0:
        source: /dev/video-ox03c10-cam0
        subdev-id: /dev/v4l-ox03c10-subdev0
        width: 1920
        height: 1280
        format: bggr12
        framerate: 30
models:
    model0:
        model_path: /opt/model_zoo/TVM-CL-3090-mobileNetV2-tv
        topN: 5
    model1:
        model_path: /opt/model_zoo/ONR-OD-8200-yolox-nano-lite-mmdet-coco-416x416
        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: 1280
        overlay-perf-type: graph
    output1:
        sink: /opt/edgeai-test-data/output/output_video.mkv
        width: 1920
        height: 1280
    output2:
        sink: /opt/edgeai-test-data/output/output_image_%04d.jpg
        width: 1920
        height: 1280
    output3:
        sink: remote
        width: 1920
        height: 1280
        port: 8081
        host: 127.0.0.1
        encoding: jpeg
        overlay-perf-type: graph

flows:
    flow0: [input0,model1,output0,[320,150,1280,720]]

Thank you very much!



  • Hello,

    Could you please share the working GStreamer pipeline?

    Thank you,

    Fabiana

  • Hi,

    I can get the video stream by using the following command.

    gst-launch-1.0 \
    v4l2src device=/dev/video-ox03c10-cam0 io-mode=dmabuf-import ! \
    video/x-bayer, width=1920, height=1280, format=bggr12 ! \
    tiovxisp sink_0::device=/dev/v4l-ox03c10-subdev0 sensor-name=SENSOR_SONY_OX03C10_UB953_D3 \
    dcc-isp-file=/opt/imaging/ox03c10/linear/dcc_viss.bin \
    sink_0::dcc-2a-file=/opt/imaging/ox03c10/linear/dcc_2a.bin format-msb=11 ! \
    video/x-raw, format=NV12, width=1920, height=1280 ! \
    kmssink driver-name=tidss sync=false

    However, when I use the command "GST_DEBUG=2 ./apps_python/app_edgeai.py configs/ox03c10_cam_example.yaml -n", it will report the error as described above.
  • Hello,

    Based on the GStreamer pipeline that was generated from running GST_DEBUG=2 ./apps_python/app_edgeai.py configs/ox03c10_cam_example.yaml -n, I assume you did not make the changes to the Edge AI application to support ox03c10 as an input. I suggest taking a look at the python application to understand how it reads the configuration builds the pipeline. Because ox03c10 & bggr12 is not listed as a sensor name and color format option, it does not include the required GStreamer elements.

    Thank you,

    Fabiana