Hi,
I had model compile issue like above link , now I compiled sample models using EdgeAI TIDL Tools.
and copy the compiled models to SK-TDA4VM's model zoo directory like below:
od-ort-ssd-lite_mobilenetv2_fpn │ ├── param.yaml │ ├── artifacts │ ├── allowedNode.txt │ ├── boxeslabels_tidl_io_1.bin │ ├── boxeslabels_tidl_net.bin │ ├── boxeslabels_tidl_net.bin.layer_info.txt │ ├── boxeslabels_tidl_net.bin.svg │ ├── boxeslabels_tidl_net.bin_netLog.txt │ ├── onnxrtMetaData.txt │ └── runtimes_visualization.svg │ └── model ├── ssd-lite_mobilenetv2_fpn.onnx └── ssd-lite_mobilenetv2_fpn.prototxt
After copied model files, I tested CL/SS/OD models using CPP based EdgeAI Apps.
The CL/SS networks are works. but OD networks are not working.
(OD networks is work using EdgeAI TIDL Tools on PC)
Log when running OD network on CPP-based EdgeAI Apps.
root@j7-evm:/opt/edge_ai_apps/apps_cpp# ./bin/Release/app_edgeai ../configs/object_detection.yaml Number of subgraphs:1 , 107 nodes delegated out of 107 nodes 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 !!! 664.341727 s: GTC Frequency = 200 MHz APP: Init ... Done !!! 664.341809 s: VX_ZONE_INIT:Enabled 664.341815 s: VX_ZONE_ERROR:Enabled 664.341820 s: VX_ZONE_WARNING:Enabled 664.342515 s: VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!! 664.342834 s: VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!! [01:49:16.000.000439]:DEBUG:[OutputInfo:0438] CONSTRUCTOR [01:49:16.000.000452]:DEBUG:[GstWrapperBuffer:0094] CONSTRUCTOR [01:49:16.000.000472]:DEBUG:[OutputInfo:0438] CONSTRUCTOR [01:49:16.000.000484]:DEBUG:[GstWrapperBuffer:0094] CONSTRUCTOR [01:49:16.000.000504]:DEBUG:[OutputInfo:0438] CONSTRUCTOR [01:49:16.000.000534]:DEBUG:[MosaicInfo:0649] CONSTRUCTOR [01:49:16.000.000549]:DEBUG:[FlowInfo:1011] CONSTRUCTOR libtidl_onnxrt_EP loaded 0x34d2a460 Final number of subgraphs created are : 1, - Offloaded Nodes - 494, Total Nodes - 494 APP: Init ... !!! MEM: Init ... !!! MEM: Initialized DMA HEAP (fd=4) !!! MEM: Init ... Done !!! IPC: Init ... !!! IPC: Init ... Done !!! REMOTE_SERVICE: Init ... !!! REMOTE_SERVICE: Init ... Done !!! 566.016988 s: GTC Frequency = 200 MHz APP: Init ... Done !!! 566.017090 s: VX_ZONE_INIT:Enabled 566.017097 s: VX_ZONE_ERROR:Enabled 566.017103 s: VX_ZONE_WARNING:Enabled 566.017880 s: VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!! 566.018154 s: VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!! [01:49:31.15198.198457]:DEBUG:[DlTensor:0062] DEFAULT CONSTRUCTOR [01:49:31.15198.198526]:DEBUG:[DlTensor:0080] COPY CONSTRUCTOR [01:49:31.15198.198549]:DEBUG:[~DlTensor:0136] DESTRUCTOR [01:49:31.15198.198577]:DEBUG:[DlTensor:0062] DEFAULT CONSTRUCTOR [01:49:31.15198.198589]:DEBUG:[DlTensor:0080] COPY CONSTRUCTOR [01:49:31.15198.198600]:DEBUG:[DlTensor:0080] COPY CONSTRUCTOR [01:49:31.15198.198610]:DEBUG:[~DlTensor:0136] DESTRUCTOR [01:49:31.15198.198628]:DEBUG:[ORTInferer:0158] CONSTRUCTOR [01:49:31.15198.198890]:DEBUG:[DlTensor:0080] COPY CONSTRUCTOR [01:49:31.15198.198915]:DEBUG:[DlTensor:0080] COPY CONSTRUCTOR [01:49:31.15198.198927]:DEBUG:[DlTensor:0080] COPY CONSTRUCTOR [01:49:31.15199.199143]:DEBUG:[InferencePipe:0107] CONSTRUCTOR [01:49:31.15199.199168]:DEBUG:[SubFlowInfo:0913] CONSTRUCTOR [01:49:31.15232.232934]:DEBUG:[GstPipe:0134] CONSTRUCTOR [01:49:31.15232.232985]:INFO:[GstPipe:0136] SRC_CMDS: [01:49:31.15232.232997]:INFO:[GstPipe:0139] multifilesrc location=/opt/edge_ai_apps/data/images/%04d.jpg loop=1 index=0 stop-index=-1 caps=image/jpeg,framerate=1/1 ! jpegdec ! videoscale ! video/x-raw, width=1280, height=720 ! tiovxcolorconvert ! video/x-raw, format=NV12 ! tiovxmultiscaler name=multiscaler_split_20 multiscaler_split_20. ! queue ! video/x-raw, width=1280, height=720 ! tiovxcolorconvert out-pool-size=4 target=1 ! video/x-raw, format=RGB ! appsink drop=true max-buffers=2 name=flow0_sensor0 multiscaler_split_20. ! queue ! video/x-raw, width=512, height=512 ! tiovxdlpreproc data-type=3 channel-order=0 mean-0=0.000000 mean-1=0.000000 mean-2=0.000000 scale-0=1.000000 scale-1=1.000000 scale-2=1.000000 tensor-format=rgb out-pool-size=4 ! application/x-tensor-tiovx ! appsink drop=true max-buffers=2 name=flow0_pre_proc0 [01:49:31.15233.233014]:INFO:[GstPipe:0141] SINK_CMD: appsrc format=GST_FORMAT_TIME is-live=true block=true do-timestamp=true name=flow0_post_proc0 ! tiovxcolorconvert ! video/x-raw,format=NV12 ! queue ! mosaic0.sink_0 appsrc format=GST_FORMAT_TIME block=true num-buffers=1 name=background0 ! tiovxcolorconvert ! video/x-raw,format=NV12 ! queue ! mosaic0.background tiovxmosaic name=mosaic0 sink_0::startx=320 sink_0::starty=180 sink_0::width=1280 sink_0::height=720 ! video/x-raw, format=NV12, width=1920, height=1080 ! kmssink sync=false driver-name=tidss [01:49:31.15319.319066]:DEBUG:[GstWrapperBuffer:0094] CONSTRUCTOR [01:49:31.15319.319210]:DEBUG:[GstWrapperBuffer:0094] CONSTRUCTOR [01:49:31.15319.319221]:INFO:[inferenceThread:0227] Starting inference thread. MEM: ERROR: Alloc failed with status = 12 !!! 665.294935 s: VX_ZONE_ERROR:[tivxMemBufferAlloc:80] Shared mem ptr allocation failed Segmentation fault (core dumped)
Is there additional work to run OD models?
I attached compiled OD models.
Download: https://drive.google.com/file/d/1-cuvAOlSoC0TaRyt8KKmNsWTP7hxzxGL/view?usp=sharing
And modified 'object_detection.yaml'
title: "Object Detection Demo" log_level: 2 inputs: input0: source: /dev/video1 format: jpeg width: 1280 height: 720 framerate: 30 input1: source: /opt/edge_ai_apps/data/videos/video_0000_h264.mp4 format: h264 width: 1280 height: 720 framerate: 25 loop: False input2: source: /opt/edge_ai_apps/data/images/%04d.jpg width: 1280 height: 720 index: 0 framerate: 1 loop: True models: model0: model_path: /opt/model_zoo/TVM-OD-5020-yolov3-mobv1-gluon-mxnet-416x416 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-8050-ssd-lite-regNetX-800mf-fpn-bgr-coco-512x512 viz_threshold: 0.6 model3: model_path: /opt/model_zoo/test/od-ort-ssd-lite_mobilenetv2_fpn viz_threshold: 0.3 model4: model_path: /opt/model_zoo/test/od-tfl-ssd_mobilenet_v2_300_float viz_threshold: 0.3 outputs: output0: sink: kmssink width: 1920 height: 1080 output1: sink: /opt/edge_ai_apps/data/output/videos/output_video.mkv width: 1920 height: 1080 output2: sink: /opt/edge_ai_apps/data/output/images/output_image_%04d.jpg width: 1920 height: 1080 flows: flow0: input: input2 models: [model3] outputs: [output0] mosaic: mosaic0: width: 1280 height: 720 pos_x: 320 pos_y: 180
Regards,
Lee