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: the problem in TVM with last inference scirpts.

Part Number: TDA4VM

HI Debapriya.

here is log_pc and log tvm.

root@j7-evm:/opt/edgeai-tidl-tools/yolov5_onnx_0728# python3 yolo_onnx_inference_tidl.py --model_path ./yolov5s6_640_ti_lite_37p4_56p0.onnx --model_prototxt ./yolov5s6_640_ti_lite_metaarch.prototxt  --inference
libtidl_onnxrt_EP loaded 0xd2c5590 
Final number of subgraphs created are : 1, - Offloaded Nodes - 320, Total Nodes - 320 
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 !!!
   431.469716 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
   431.472975 s:  VX_ZONE_INIT:Enabled
   431.472997 s:  VX_ZONE_ERROR:Enabled
   431.473002 s:  VX_ZONE_WARNING:Enabled
   431.476860 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
   431.477034 s:  VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
Starting Inference
1/8
TIDL Meta PipeLine (Proto) File  : ./yolov5s6_640_ti_lite_metaarch.prototxt  
yolo_v3
yolo_v3
Number of OD backbone nodes = 192 
Size of odBackboneNodeIds = 192 

Preliminary subgraphs created = 1 
Final number of subgraphs created are : 1, - Offloaded Nodes - 320, Total Nodes - 320 
TIDL Meta PipeLine (Proto) File  : ./yolov5s6_640_ti_lite_metaarch.prototxt  
yolo_v3
yolo_v3

 ************** Frame index 1 : Running float import ************* 
INFORMATION: [TIDL_ResizeLayer] Resize_107 Any resize ratio which is power of 2 and greater than 4 will be placed by combination of 4x4 resize layer and 2x2 resize layer. For example a 8x8 resize will be replaced by 4x4 resize followed by 2x2 resize.
INFORMATION: [TIDL_ResizeLayer] Resize_123 Any resize ratio which is power of 2 and greater than 4 will be placed by combination of 4x4 resize layer and 2x2 resize layer. For example a 8x8 resize will be replaced by 4x4 resize followed by 2x2 resize.
INFORMATION: [TIDL_ResizeLayer] Resize_139 Any resize ratio which is power of 2 and greater than 4 will be placed by combination of 4x4 resize layer and 2x2 resize layer. For example a 8x8 resize will be replaced by 4x4 resize followed by 2x2 resize.
WARNING: [TIDL_E_DATAFLOW_INFO_NULL] ti_cnnperfsim.out fails to allocate memory in MSMC. Please look into perfsim log. This model can only be used on PC emulation, it will get fault on target.
****************************************************
**          4 WARNINGS          0 ERRORS          **
****************************************************
 0.0s:  VX_ZONE_INIT:Enabled
 0.16s:  VX_ZONE_ERROR:Enabled
 0.19s:  VX_ZONE_WARNING:Enabled
 0.1036s:  VX_ZONE_INIT:[tivxInit:178] Initialization Done !!!

**********  Frame Index 1 : Running float inference **********

**********  Frame Index 2 : Running fixed point mode for calibration **********

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /workspace/edgeai-tidl-tools/yolov5_onnx_0728/artifacts/tempDir/detections_tidl_io_.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T   13400.59  .... ..... ... .... .....
#    1 . .. T   13332.97  .... ..... ... .... .....
~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /workspace/edgeai-tidl-tools/yolov5_onnx_0728/artifacts/tempDir/detections_tidl_io_.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T    7748.07  .... ..... ... .... .....
#    1 . .. T    7708.69  .... ..... ... .... .....
 
 
 *****************   Calibration iteration number 0 completed ************************ 
 
 
 

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /workspace/edgeai-tidl-tools/yolov5_onnx_0728/artifacts/tempDir/detections_tidl_io_.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T    7716.91  .... ..... ... .... .....
#    1 . .. T    7846.09  .... ..... ... .... .....
 
 
 *****************   Calibration iteration number 1 completed ************************ 
 
 
 

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /workspace/edgeai-tidl-tools/yolov5_onnx_0728/artifacts/tempDir/detections_tidl_io_.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T    7956.18  .... ..... ... .... .....
#    1 . .. T    7788.32  .... ..... ... .... .....
 
 
 *****************   Calibration iteration number 2 completed ************************ 
 
 
 

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /workspace/edgeai-tidl-tools/yolov5_onnx_0728/artifacts/tempDir/detections_tidl_io_.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T    7897.44  .... ..... ... .... .....
#    1 . .. T    7970.02  .... ..... ... .... .....
 
 
 *****************   Calibration iteration number 3 completed ************************ 
 
 
 

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /workspace/edgeai-tidl-tools/yolov5_onnx_0728/artifacts/tempDir/detections_tidl_io_.qunat_stats_config.txt 
 ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

#    0 . .. T    7873.18  .... ..... ... .... .....
#    1 . .. T    7746.24  .... ..... ... .... .....
 
 
 *****************   Calibration iteration number 4 completed ************************ 
 
 
 

------------------ Network Compiler Traces -----------------------------
successful Memory allocation
substitute string tidl_net_ not found
INFORMATION: [TIDL_ResizeLayer] Resize_107 Any resize ratio which is power of 2 and greater than 4 will be placed by combination of 4x4 resize layer and 2x2 resize layer. For example a 8x8 resize will be replaced by 4x4 resize followed by 2x2 resize.
INFORMATION: [TIDL_ResizeLayer] Resize_123 Any resize ratio which is power of 2 and greater than 4 will be placed by combination of 4x4 resize layer and 2x2 resize layer. For example a 8x8 resize will be replaced by 4x4 resize followed by 2x2 resize.
INFORMATION: [TIDL_ResizeLayer] Resize_139 Any resize ratio which is power of 2 and greater than 4 will be placed by combination of 4x4 resize layer and 2x2 resize layer. For example a 8x8 resize will be replaced by 4x4 resize followed by 2x2 resize.
****************************************************
**          3 WARNINGS          0 ERRORS          **
****************************************************

  • Hi Hyunji,

    The compilation seems to have completed correctly. Can you please share the artifacts? It will be helpful for our debug.

    For the EVM inference, does the execution hang there?

    Regards, Debapriya

  • hi Debapriya  

    yes, the execution hang there.

    but when I use the other complie option, the execution does not hang, but the model's ouput is not "detections".

    so I use yout nms code, but I got only wrong results.
    If I share my compile options, is it helpful?
    here is the artifactsyolov5_0728.zip
    Regards,Hyunji.

     

  • Hi Hyunji,

    Can you please share the entire artifacts folder. If you look into the "artifacts" folder that I shared, it  has many other files. Please share them all. All of them needs to be copied to EVM.

    "but when I use the other complie option" - which compile option are you referring here?

    Regards, Debapriya

  • HI Debapriya  

    the other compile option is this.

    compile_options = {
        'tidl_tools_path' : TIDL_TOOLS_PATH,   #os.environ['TIDL_TOOLS_PATH']
        'artifacts_folder' : ARTIFACTS_PATH,
        'tensor_bits' : 16,
        'accuracy_level' : 1,
        'deny_list' : "",
        'max_num_subgraphs' : 1,    # default 16
        'advanced_options:calibration_frames' : 2,
        'advanced_options:calibration_iterations' : 3 # used if accuracy_level = 1
        }
    I used this option by referring to "edgeai-tidl-tools/examples/osrt_python/ort/onnxrt_ep.py"
    Regards,Hyunji.
  • Hi Hyunji,

    PFA the script with small modification. I tested it on EVM and it ran. PFA the script and evm log. 

    If you see the hang issue again, can you insert some print statement and check where exactly the execution is getting stuck.

    Regards, Debapriya

    root@j7-evm:~/debu/yolov5_onnx# python3 yolo_onnx_inference_tidl.py --infer
    libtidl_onnxrt_EP loaded 0x17898e00
    Final number of subgraphs created are : 1, - Offloaded Nodes - 320, Total Nodes - 320
    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 !!!
     11435.424450 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
     11435.424517 s:  VX_ZONE_INIT:Enabled
     11435.424526 s:  VX_ZONE_ERROR:Enabled
     11435.424540 s:  VX_ZONE_WARNING:Enabled
     11435.425100 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
     11435.426230 s:  VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
    Starting Inference
    1/8
    2/8
    3/8
    4/8
    5/8
    6/8
    7/8
    8/8
     11436.395001 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:100] De-Initialization Done for HOST !!!
     11436.399369 s:  VX_ZONE_INIT:[tivxDeInitLocal:193] De-Initialization Done !!!
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: DeInit ... Done !!!
    MEM: Deinit ... !!!
    MEM: Alloc's: 7 alloc's of 15935413 bytes
    MEM: Free's : 7 free's  of 15935413 bytes
    MEM: Open's : 0 allocs  of 0 bytes
    MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!
    
    # dependencies
    # Anaconda Python 3.7 for Linux - download and install from: https://www.anaconda.com/distribution/
    # pytorch, torchvision - install using: conda install pytorch torchvision -c pytorch
    # timm - install using: pip install timm
    
    import os
    import numpy as np
    import cv2
    import argparse
    import onnxruntime as rt
    
    
    parser = argparse.ArgumentParser()
    parser.add_argument("--model_path", type=str, default="./yolov5s6_640_ti_lite_37p4_56p0.onnx")
    parser.add_argument("--model_prototxt", type=str, default="./yolov5s6_640_ti_lite_metaarch.prototxt")
    parser.add_argument("--img_calib_path", type=str, default="./sample_calib_ips_640x640.txt")
    parser.add_argument("--img_path", type=str, default="./sample_ips_640x640.txt")
    parser.add_argument("--dst_path", type=str, default="./sample_ops_onnxrt_det")
    parser.add_argument("--compile", default=False, action="store_true")
    parser.add_argument("--inference", default=False, action="store_true")
    
    args = parser.parse_args()
    output_dir =  "./artifacts/"
    os.makedirs(output_dir, exist_ok=True)
    
    if args.compile:
        for root, dirs, files in os.walk(output_dir, topdown=False):
            [os.remove(os.path.join(root, f)) for f in files]
            [os.rmdir(os.path.join(root, d)) for d in dirs]
    
    calibration_frames = 2
    calibration_iterations = 5
    
    compile_options = {
    "artifacts_folder": "./artifacts/",
    "tensor_bits":8,
    "accuracy_level":1,
    #"debug_level": 3,
    "advanced_options:calibration_frames": calibration_frames,
    "advanced_options:calibration_iterations": calibration_iterations,
    "advanced_options:output_feature_16bit_names_list" : "370, 680, 990, 1300",
    'object_detection:meta_layers_names_list' : args.model_prototxt,
    'object_detection:meta_arch_type' : 6,
    "ti_internal_nc_flag" : 1601,
    #"add_data_convert_ops" : 3,
    }
    
    if args.inference:
        compile_options["tidl_tools_path"] = ""
    else:
        compile_options["tidl_tools_path"] = os.environ["TIDL_TOOLS_PATH"]
    
    so = rt.SessionOptions()
    # EP_list = ['TIDLCompilationProvider','CPUExecutionProvider']
    # sess = rt.InferenceSession(args.model_path ,providers=EP_list, provider_options=[compile_options, {}], sess_options=so)
    # input_details = sess.get_inputs()
    
    
    _CLASS_COLOR_MAP = [
        (0, 0, 255) , # Person (blue).
        (255, 0, 0) ,  # Bear (red).
        (0, 255, 0) ,  # Tree (lime).
        (255, 0, 255) ,  # Bird (fuchsia).
        (0, 255, 255) ,  # Sky (aqua).
        (255, 255, 0) ,  # Cat (yellow).
    ]
    
    
    def read_img(img_file, img_mean=127.5, img_scale=1/127.5):
        img = cv2.imread(img_file)[:, :, ::-1]
        img = cv2.resize(img, (640,640), interpolation=cv2.INTER_LINEAR)
        img = (img - img_mean) * img_scale
        img = np.asarray(img, dtype=np.float32)
        img = np.expand_dims(img,0)
        img = img.transpose(0,3,1,2)
        return img
    
    
    def model_import_image_list_tidl(model_path, img_path=None, mean=None, scale=None):
        "model compilation"
        img_file_list = list(open(img_path))[:calibration_frames]
        EP_list = ['TIDLCompilationProvider','CPUExecutionProvider']
        sess = rt.InferenceSession(model_path ,providers=EP_list, provider_options=[compile_options, {}], sess_options=so)
    
        input_name = sess.get_inputs()[0].name
        for img_index, img_file  in enumerate(img_file_list):
            img_file = img_file.split(' ')[0].rstrip()
            input = read_img(img_file, mean, scale)
            output = sess.run([], {input_name: input})
    
    
    def model_infer_image_list_tidl(model_path, img_path=None, mean=None, scale=None, dst_path=None):
        "inference on sample images"
        os.makedirs(args.dst_path, exist_ok=True)
        EP_list = ['TIDLExecutionProvider','CPUExecutionProvider']
        sess = rt.InferenceSession(model_path ,providers=EP_list, provider_options=[compile_options, {}], sess_options=so)
        input_name = sess.get_inputs()[0].name
        img_file_list = list(open(img_path))
        max_index = 20
        print("Starting Inference")
        for img_index, img_file  in enumerate(img_file_list):
            print(f"{img_index+1}/{len(img_file_list)}")
            img_file = img_file.split(' ')[0].rstrip()
            input = read_img(img_file, mean, scale)
            output = sess.run([], {input_name: input})
            output = np.squeeze(output[0])
            dst_file = os.path.join(dst_path, os.path.basename(img_file))
            post_process(img_file, dst_file, output, score_threshold=0.5)
    
    
    
    def post_process(img_file, dst_file, output, score_threshold=0.3):
        """
        Draw bounding boxes on the input image. Dump boxes in a txt file.
        """
        det_bboxes, det_scores, det_labels = output[:, 0:4], output[:, 4], output[:, 5]
        img = cv2.imread(img_file)
        #To generate color based on det_label, to look into the codebase of Tensorflow object detection api.
        dst_txt_file = dst_file.replace('png', 'txt')
        f = open(dst_txt_file, 'wt')
        for idx in range(len(det_bboxes)):
            det_bbox = det_bboxes[idx]
            if det_scores[idx]>0:
                f.write("{:8.0f} {:8.5f} {:8.5f} {:8.5f} {:8.5f} {:8.5f}\n".format(det_labels[idx], det_scores[idx], det_bbox[1], det_bbox[0], det_bbox[3], det_bbox[2]))
            if det_scores[idx]>score_threshold:
                color_map = _CLASS_COLOR_MAP[int(det_labels[idx]) %len(_CLASS_COLOR_MAP)]
                img = cv2.rectangle(img, (int(det_bbox[0]), int(det_bbox[1])), (int(det_bbox[2]), int(det_bbox[3])), color_map[::-1], 2)
                cv2.putText(img, "id:{}".format(int(det_labels[idx])), (int(det_bbox[0]+5),int(det_bbox[1])+15), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color_map[::-1], 2)
                cv2.putText(img, "score:{:2.1f}".format(det_scores[idx]), (int(det_bbox[0] + 5), int(det_bbox[1]) + 30), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color_map[::-1], 2)
        cv2.imwrite(dst_file, img)
        f.close()
    
    
    
    def main():
        if args.compile:
            model_import_image_list_tidl(model_path=args.model_path, img_path=args.img_calib_path,
                                       mean=0.0, scale=0.00392156862745098)
        elif args.inference:
            model_infer_image_list_tidl(model_path=args.model_path, img_path=args.img_path,
                                   mean=0.0, scale=0.00392156862745098,
                                   dst_path=args.dst_path)
    
    
    if __name__== "__main__":
        main()
    
    

  • hi Debapriya

    Thanks to your new code, it became clear that there was a problem with my EVM.

    the execution hang "output = sess.run([], {input_name: input})" , so I can't get any output.

    and now I want to fix the EVM problem.

    What should I check first?

    if I reinstall ONNX, Will the problem be solved?  

    Regards,Hyunji.

  • Hi Hyunji,

    I tested the model with sdk8.2 . Which sdk version are you using?

    Regards, Debapriya

  • HI Debapriya

    here is My sdk version.

    • SK-TDA4VM SDK : 08.01.00.02
    • edgeai-tidl-tools :github.com/.../edgeai-tidl-tools ( tag: 08_02_00_01-rc3 )   

    Unfortunately, I don't know How to update SDK.

    Regards,Hyunji.

  • Hi Hyunji,

    You need to use same release for both sdk and tidl-tools.

    YOLOv5 is supported in SDK8.1 as well. Hence, you can use 8.1 release of edgeai-tidl-tools as well as sdk. 

    https://github.com/TexasInstruments/edgeai-tidl-tools/releases/tag/08_01_00_09-rc1

  • hi Debapriya

    when I use 8.1 release of edgeai-tidl-tools as well as sdk,the execution hang same position.

    the execution never goes through this code "output = sess.run([], {input_name: input}) " 

    I have no idea to fix my problem, and I don't understand why you and I have different results even though we used the same code/same model.

    I don't understand why the execution hang onnxinferencesession on TVM.

    Regards,Hyunji.

  • Hi Hyunji,

    Did you recompile the model using 8.1 release of edgeai-tidl-tools? 

    Regards, Debapriya

  • Hi Debapriya

    Of course, but nothing changes.

    Do you think I should update the sdk?

    Or  Could you verify the problem if I send my EVM to you?

    If that's not possible, Could I borrow a working your EVM?

    Regards,Hyunji.

  • Hi Hyunji,

    Can you set "debug_level" : 1 in the compile_options in python script shared by Debapriya and share the console log?

    Regards,

    Anand

  • hello A

    here is two log file. one is compile log in PC, and the other is inference log in TI EVM board.

    log_pc2.txt15787.log_EVM_0822.txt.log

    Regards,

    Hyunji.

  • Hi Hyunji,

    Thanks for the log. Can you also run the following steps on EVM to get a more detailed log and share it:

    - Keep "debug_level" : 1 in the python script

    Run following on EVM cmd line:

    - Run "/opt/vx_app_arm_remote_log.out &"

    - export TIDL_RT_DEBUG=3

    Then execute the python script and share the log.

    Regards,

    Anand

  • Hello,

    the problem is Memory out in ONNXruntime.

    here is log.txt

    [BEGIN] 2022-09-02 ���� 11:18:58
    root@j7-evm:/opt/edgeai-tidl-tools/yolov5_onnx_0728# export TIDL_RT_DEBUG=3^C
    del_prototxt ./yolov5s6_640ti_lite_metaarch.prototxt --inference
    Traceback (most recent call last):
      File "yolo_onnx_inference_tidl.py", line 52, in <module>
        compile_options["tidl_tools_path"] = os.environ["TIDL_TOOLS_PATH"]
      File "/usr/lib/python3.8/os.py", line 675, in __getitem__
        raise KeyError(key) from None
    KeyError: 'TIDL_TOOLS_PATH'
    root@j7-evm:/opt/edgeai-tidl-tools/yolov5_onnx_0728# echo $TIDL_TOOLS_PATH
    /usr/lib
    root@j7-evm:/opt/edgeai-tidl-tools/yolov5_onnx_0728# python3 yolo_onnx_inference_tidl.py --model_path ./yolov5s6_640_ti_lite_37p4_56p0.onnx --model_prototxt ./yolov5s6_640ti_lite_metaarch.prototxt --inference
    libtidl_onnxrt_EP loaded 0x29504510 
    artifacts_folder                                = ./artifacts/ 
    debug_level                                     = 1 
    Parsing ONNX Model 
    Final number of subgraphs created are : 1, - Offloaded Nodes - 320, Total Nodes - 320 
    In TIDL_createStateCommon 
    Compute on node : TIDLExecutionProvider_TIDL_0_0
      0,            Conv, 3, 1, images, 167
      1,            Relu, 1, 1, 167, 168
      2,            Conv, 3, 1, 168, 169
      3,            Relu, 1, 1, 169, 170
      4,            Conv, 3, 1, 170, 171
      5,            Relu, 1, 1, 171, 172
      6,            Conv, 3, 1, 172, 173
      7,            Relu, 1, 1, 173, 174
      8,            Conv, 3, 1, 174, 175
      9,            Relu, 1, 1, 175, 176
     10,            Conv, 3, 1, 176, 177
     11,            Relu, 1, 1, 177, 178
     12,             Add, 2, 1, 174, 179
     13,            Conv, 3, 1, 172, 180
     14,            Relu, 1, 1, 180, 181
     15,          Concat, 2, 1, 179, 182
     16,            Conv, 3, 1, 182, 183
     17,            Relu, 1, 1, 183, 184
     18,            Conv, 3, 1, 184, 185
     19,            Relu, 1, 1, 185, 186
     20,            Conv, 3, 1, 186, 187
     21,            Relu, 1, 1, 187, 188
     22,            Conv, 3, 1, 188, 189
     23,            Relu, 1, 1, 189, 190
     24,            Conv, 3, 1, 190, 191
     25,            Relu, 1, 1, 191, 192
     26,             Add, 2, 1, 188, 193
     27,            Conv, 3, 1, 193, 194
     28,            Relu, 1, 1, 194, 195
     29,            Conv, 3, 1, 195, 196
     30,            Relu, 1, 1, 196, 197
     31,             Add, 2, 1, 193, 198
     32,            Conv, 3, 1, 198, 199
     33,            Relu, 1, 1, 199, 200
     34,            Conv, 3, 1, 200, 201
     35,            Relu, 1, 1, 201, 202
     36,             Add, 2, 1, 198, 203
     37,            Conv, 3, 1, 186, 204
     38,            Relu, 1, 1, 204, 205
     39,          Concat, 2, 1, 203, 206
     40,            Conv, 3, 1, 206, 207
     41,            Relu, 1, 1, 207, 208
     42,            Conv, 3, 1, 208, 209
     43,            Relu, 1, 1, 209, 210
     44,            Conv, 3, 1, 210, 211
     45,            Relu, 1, 1, 211, 212
     46,            Conv, 3, 1, 212, 213
     47,            Relu, 1, 1, 213, 214
     48,            Conv, 3, 1, 214, 215
     49,            Relu, 1, 1, 215, 216
     50,             Add, 2, 1, 212, 217
     51,            Conv, 3, 1, 217, 218
     52,            Relu, 1, 1, 218, 219
     53,            Conv, 3, 1, 219, 220
     54,            Relu, 1, 1, 220, 221
     55,             Add, 2, 1, 217, 222
     56,            Conv, 3, 1, 222, 223
     57,            Relu, 1, 1, 223, 224
     58,            Conv, 3, 1, 224, 225
     59,            Relu, 1, 1, 225, 226
     60,             Add, 2, 1, 222, 227
     61,            Conv, 3, 1, 210, 228
     62,            Relu, 1, 1, 228, 229
     63,          Concat, 2, 1, 227, 230
     64,            Conv, 3, 1, 230, 231
     65,            Relu, 1, 1, 231, 232
     66,            Conv, 3, 1, 232, 233
     67,            Relu, 1, 1, 233, 234
     68,            Conv, 3, 1, 234, 235
     69,            Relu, 1, 1, 235, 236
     70,            Conv, 3, 1, 236, 237
     71,            Relu, 1, 1, 237, 238
     72,            Conv, 3, 1, 238, 239
     73,            Relu, 1, 1, 239, 240
     74,             Add, 2, 1, 236, 241
     75,            Conv, 3, 1, 234, 242
     76,            Relu, 1, 1, 242, 243
     77,          Concat, 2, 1, 241, 244
     78,            Conv, 3, 1, 244, 245
     79,            Relu, 1, 1, 245, 246
     80,            Conv, 3, 1, 246, 247
     81,            Relu, 1, 1, 247, 248
     82,            Conv, 3, 1, 248, 249
     83,            Relu, 1, 1, 249, 250
     84,         MaxPool, 1, 1, 250, 254
     85,         MaxPool, 1, 1, 254, 255
     86,         MaxPool, 1, 1, 255, 256
     87,          Concat, 4, 1, 250, 257
     88,            Conv, 3, 1, 257, 258
     89,            Relu, 1, 1, 258, 259
     90,            Conv, 3, 1, 259, 260
     91,            Relu, 1, 1, 260, 261
     92,            Conv, 3, 1, 261, 262
     93,            Relu, 1, 1, 262, 263
     94,            Conv, 3, 1, 263, 264
     95,            Relu, 1, 1, 264, 265
     96,            Conv, 3, 1, 259, 266
     97,            Relu, 1, 1, 266, 267
     98,          Concat, 2, 1, 265, 268
     99,            Conv, 3, 1, 268, 269
    100,            Relu, 1, 1, 269, 270
    101,            Conv, 3, 1, 270, 271
    102,            Relu, 1, 1, 271, 272
    103,          Resize, 3, 1, 272, 277
    104,          Concat, 2, 1, 277, 278
    105,            Conv, 3, 1, 278, 279
    106,            Relu, 1, 1, 279, 280
    107,            Conv, 3, 1, 280, 281
    108,            Relu, 1, 1, 281, 282
    109,            Conv, 3, 1, 282, 283
    110,            Relu, 1, 1, 283, 284
    111,            Conv, 3, 1, 278, 285
    112,            Relu, 1, 1, 285, 286
    113,          Concat, 2, 1, 284, 287
    114,            Conv, 3, 1, 287, 288
    115,            Relu, 1, 1, 288, 289
    116,            Conv, 3, 1, 289, 290
    117,            Relu, 1, 1, 290, 291
    118,          Resize, 3, 1, 291, 296
    119,          Concat, 2, 1, 296, 297
    120,            Conv, 3, 1, 297, 298
    121,            Relu, 1, 1, 298, 299
    122,            Conv, 3, 1, 299, 300
    123,            Relu, 1, 1, 300, 301
    124,            Conv, 3, 1, 301, 302
    125,            Relu, 1, 1, 302, 303
    126,            Conv, 3, 1, 297, 304
    127,            Relu, 1, 1, 304, 305
    128,          Concat, 2, 1, 303, 306
    129,            Conv, 3, 1, 306, 307
    130,            Relu, 1, 1, 307, 308
    131,            Conv, 3, 1, 308, 309
    132,            Relu, 1, 1, 309, 310
    133,          Resize, 3, 1, 310, 315
    134,          Concat, 2, 1, 315, 316
    135,            Conv, 3, 1, 316, 317
    136,            Relu, 1, 1, 317, 318
    137,            Conv, 3, 1, 318, 319
    138,            Relu, 1, 1, 319, 320
    139,            Conv, 3, 1, 320, 321
    140,            Relu, 1, 1, 321, 322
    141,            Conv, 3, 1, 316, 323
    142,            Relu, 1, 1, 323, 324
    143,          Concat, 2, 1, 322, 325
    144,            Conv, 3, 1, 325, 326
    145,            Relu, 1, 1, 326, 327
    146,            Conv, 3, 1, 327, 370
    147,         Reshape, 2, 1, 370, 388
    148,       Transpose, 1, 1, 388, 389
    149,         Sigmoid, 1, 1, 389, 390
    150,           Slice, 5, 1, 390, 395
    151,             Mul, 2, 1, 395, 397
    152,             Sub, 2, 1, 397, 399
    153,             Add, 2, 1, 399, 401
    154,             Mul, 2, 1, 401, 403
    155,         Reshape, 2, 1, 403, 410
    156,          Expand, 2, 1, 410, 420
    157,         Reshape, 2, 1, 420, 530
    158,       ScatterND, 3, 1, 390, 531
    159,           Slice, 5, 1, 531, 536
    160,             Mul, 2, 1, 536, 538
    161,             Pow, 2, 1, 538, 541
    162,             Mul, 2, 1, 541, 544
    163,         Reshape, 2, 1, 544, 551
    164,          Expand, 2, 1, 551, 561
    165,         Reshape, 2, 1, 561, 671
    166,       ScatterND, 3, 1, 531, 672
    167,         Reshape, 2, 1, 672, 679
    168,            Conv, 3, 1, 327, 328
    169,            Relu, 1, 1, 328, 329
    170,          Concat, 2, 1, 329, 330
    171,            Conv, 3, 1, 330, 331
    172,            Relu, 1, 1, 331, 332
    173,            Conv, 3, 1, 332, 333
    174,            Relu, 1, 1, 333, 334
    175,            Conv, 3, 1, 334, 335
    176,            Relu, 1, 1, 335, 336
    177,            Conv, 3, 1, 330, 337
    178,            Relu, 1, 1, 337, 338
    179,          Concat, 2, 1, 336, 339
    180,            Conv, 3, 1, 339, 340
    181,            Relu, 1, 1, 340, 341
    182,            Conv, 3, 1, 341, 680
    183,         Reshape, 2, 1, 680, 698
    184,       Transpose, 1, 1, 698, 699
    185,         Sigmoid, 1, 1, 699, 700
    186,           Slice, 5, 1, 700, 705
    187,             Mul, 2, 1, 705, 707
    188,             Sub, 2, 1, 707, 709
    189,             Add, 2, 1, 709, 711
    190,             Mul, 2, 1, 711, 713
    191,         Reshape, 2, 1, 713, 720
    192,          Expand, 2, 1, 720, 730
    193,         Reshape, 2, 1, 730, 840
    194,       ScatterND, 3, 1, 700, 841
    195,           Slice, 5, 1, 841, 846
    196,             Mul, 2, 1, 846, 848
    197,             Pow, 2, 1, 848, 851
    198,             Mul, 2, 1, 851, 854
    199,         Reshape, 2, 1, 854, 861
    200,          Expand, 2, 1, 861, 871
    201,         Reshape, 2, 1, 871, 981
    202,       ScatterND, 3, 1, 841, 982
    203,         Reshape, 2, 1, 982, 989
    204,            Conv, 3, 1, 341, 342
    205,            Relu, 1, 1, 342, 343
    206,          Concat, 2, 1, 343, 344
    207,            Conv, 3, 1, 344, 345
    208,            Relu, 1, 1, 345, 346
    209,            Conv, 3, 1, 346, 347
    210,            Relu, 1, 1, 347, 348
    211,            Conv, 3, 1, 348, 349
    212,            Relu, 1, 1, 349, 350
    213,            Conv, 3, 1, 344, 351
    214,            Relu, 1, 1, 351, 352
    215,          Concat, 2, 1, 350, 353
    216,            Conv, 3, 1, 353, 354
    217,            Relu, 1, 1, 354, 355
    218,            Conv, 3, 1, 355, 990
    219,         Reshape, 2, 1, 990, 1008
    220,       Transpose, 1, 1, 1008, 1009
    221,         Sigmoid, 1, 1, 1009, 1010
    222,           Slice, 5, 1, 1010, 1015
    223,             Mul, 2, 1, 1015, 1017
    224,             Sub, 2, 1, 1017, 1019
    225,             Add, 2, 1, 1019, 1021
    226,             Mul, 2, 1, 1021, 1023
    227,         Reshape, 2, 1, 1023, 1030
    228,          Expand, 2, 1, 1030, 1040
    229,         Reshape, 2, 1, 1040, 1150
    230,       ScatterND, 3, 1, 1010, 1151
    231,           Slice, 5, 1, 1151, 1156
    232,             Mul, 2, 1, 1156, 1158
    233,             Pow, 2, 1, 1158, 1161
    234,             Mul, 2, 1, 1161, 1164
    235,         Reshape, 2, 1, 1164, 1171
    236,          Expand, 2, 1, 1171, 1181
    237,         Reshape, 2, 1, 1181, 1291
    238,       ScatterND, 3, 1, 1151, 1292
    239,         Reshape, 2, 1, 1292, 1299
    240,            Conv, 3, 1, 355, 356
    241,            Relu, 1, 1, 356, 357
    242,          Concat, 2, 1, 357, 358
    243,            Conv, 3, 1, 358, 359
    244,            Relu, 1, 1, 359, 360
    245,            Conv, 3, 1, 360, 361
    246,            Relu, 1, 1, 361, 362
    247,            Conv, 3, 1, 362, 363
    248,            Relu, 1, 1, 363, 364
    249,            Conv, 3, 1, 358, 365
    250,            Relu, 1, 1, 365, 366
    251,          Concat, 2, 1, 364, 367
    252,            Conv, 3, 1, 367, 368
    253,            Relu, 1, 1, 368, 369
    254,            Conv, 3, 1, 369, 1300
    255,         Reshape, 2, 1, 1300, 1318
    256,       Transpose, 1, 1, 1318, 1319
    257,         Sigmoid, 1, 1, 1319, 1320
    258,           Slice, 5, 1, 1320, 1325
    259,             Mul, 2, 1, 1325, 1327
    260,             Sub, 2, 1, 1327, 1329
    261,             Add, 2, 1, 1329, 1331
    262,             Mul, 2, 1, 1331, 1333
    263,         Reshape, 2, 1, 1333, 1340
    264,          Expand, 2, 1, 1340, 1350
    265,         Reshape, 2, 1, 1350, 1460
    266,       ScatterND, 3, 1, 1320, 1461
    267,           Slice, 5, 1, 1461, 1466
    268,             Mul, 2, 1, 1466, 1468
    269,             Pow, 2, 1, 1468, 1471
    270,             Mul, 2, 1, 1471, 1474
    271,         Reshape, 2, 1, 1474, 1481
    272,          Expand, 2, 1, 1481, 1491
    273,         Reshape, 2, 1, 1491, 1601
    274,       ScatterND, 3, 1, 1461, 1602
    275,         Reshape, 2, 1, 1602, 1609
    276,          Concat, 4, 1, 679, 1610
    277,           Split, 1, 1, 1610, 1616
    278,         Squeeze, 1, 1, 1616, 1617
    279,          Gather, 2, 1, 1610, 1612
    280,            Cast, 1, 1, 1612, 1613
    281,         Greater, 2, 1, 1613, 1615
    282,          Gather, 2, 1, 1615, 1619
    283,         NonZero, 1, 1, 1619, 1621
    284,       Transpose, 1, 1, 1621, 1622
    285,         Squeeze, 1, 1, 1622, 1623
    286,          Gather, 2, 1, 1617, 1624
    287,           Slice, 5, 1, 1624, 1629
    288,           Slice, 5, 1, 1624, 1639
    289,             Div, 2, 1, 1639, 1658
    290,             Sub, 2, 1, 1629, 1662
    291,           Slice, 5, 1, 1624, 1634
    292,           Slice, 5, 1, 1624, 1644
    293,             Div, 2, 1, 1644, 1661
    294,             Sub, 2, 1, 1634, 1663
    295,             Add, 2, 1, 1629, 1664
    296,             Add, 2, 1, 1634, 1665
    297,           Slice, 5, 1, 1624, 1649
    298,           Slice, 5, 1, 1624, 1654
    299,             Mul, 2, 1, 1649, 1655
    300,          ArgMax, 1, 1, 1655, 1668
    301,            Cast, 1, 1, 1668, 1669
    302,       ReduceMax, 1, 1, 1655, 1667
    303,          Concat, 6, 1, 1662, 1670
    304,         Reshape, 2, 1, 1667, 1672
    305,            Cast, 1, 1, 1672, 1673
    306,         Greater, 2, 1, 1673, 1675
    307,         NonZero, 1, 1, 1675, 1677
    308,       Transpose, 1, 1, 1677, 1678
    309,         Squeeze, 1, 1, 1678, 1679
    310,          Gather, 2, 1, 1670, 1680
    311,           Slice, 5, 1, 1680, 1685
    312,       Unsqueeze, 1, 1, 1685, 1688
    313,          Gather, 2, 1, 1680, 1687
    314,       Unsqueeze, 1, 1, 1687, 1689
    315,       Unsqueeze, 1, 1, 1689, 1690
    316, NonMaxSuppression, 4, 1, 1688, 1693
    317,          Gather, 2, 1, 1693, 1695
    318,         Squeeze, 1, 1, 1695, 1696
    319,          Gather, 2, 1, 1680, detections
    
    Input tensor name -  images 
    Output tensor name - detections 
    ************ in TIDL_subgraphRtCreate ************ 
     TIDL_RT_OVX: Set default TIDLRT params done
    Calling appInit() in TIDL-RT!
    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 !!!
       942.991766 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
       942.995056 s:  VX_ZONE_INIT:Enabled
       942.995079 s:  VX_ZONE_ERROR:Enabled
       942.995085 s:  VX_ZONE_WARNING:Enabled
       942.999187 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
       942.999391 s:  VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
    TIDL_RT_OVX: Init ... 
    TIDL_RT_OVX: Mapping config file ...
    TIDL_RT_OVX: Mapping config file ... Done. 37256 bytes
    TIDL_RT_OVX: Tensors, input = 1, output = 1
    TIDL_RT_OVX: Mapping network file
    TIDL_RT_OVX: Mapping network file... Done 14632192 bytes
    TIDL_RT_OVX: Init done.
    TIDL_RT_OVX: Creating graph ... 
    TIDL_RT_OVX: input_sizes[0] = 641, dim = 640 padL = 1 padR = 0
    TIDL_RT_OVX: input_sizes[1] = 412163, dim = 640 padT = 1 padB = 2
    TIDL_RT_OVX: input_sizes[2] = 3, dim = 3 
    TIDL_RT_OVX: input_sizes[3] = 1, dim = 1 
    TIDL_RT_OVX: input_buffer = 0xffff79c20000 1236489
    TIDL_RT_OVX: Creating graph ... Done.
    [C7x_1 ]    943.035011 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 0 @ space = 17, size = 15208, align = 128 ... 
    [C7x_1 ]    943.034979 s:  VX_ZONE_INFO:Enabled
    .. 
    [C7x_1 ]    943.035075 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 1 @ space = 17, size = 136, align = 128 ... 
    [C7x_1 ]    943.035075 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 1 @ space = 17, size = 136, align = 128 ... 
     
     
    [C7x_1 ]    943.035132 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 2 @ space = 0, size = 16384, align = 128 ... 
    [C7x_1 ]    943.035132 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 2 @ space = 0, size = 16384, align = 128 ... 
     
     
    [C7x_1 ]    943.035189 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 3 @ space = 1, size = 458752, align = 128 ... 
    [C7x_1 ]    943.035189 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 3 @ space = 1, size = 458752, align = 128 ... 
    . 
    . 
    [C7x_1 ]    943.035246 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 4 @ space = 2, size = 8159232, align = 128 ... 
    [C7x_1 ]    943.035246 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 4 @ space = 2, size = 8159232, align = 128 ... 
    .. 
    .. 
    [C7x_1 ]    943.035304 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 5 @ space = 17, size = 14207920, align = 128 ... 
    [C7x_1 ]    943.035304 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 5 @ space = 17, size = 14207920, align = 128 ... 
    0 ... 
    0 ... 
    [C7x_1 ]    943.035481 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 6 @ space = 17, size = 256, align = 128 ... 
    [C7x_1 ]    943.035481 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 6 @ space = 17, size = 256, align = 128 ... 
    [C7x_1 ]    943.035509 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:181] Allocated memory record 6 @ space = 17 and size = 256, addr = e4000000 ... 
    [C7x_1 ]    943.035509 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:181] Allocated memory record 6 @ space = 17 and size = 256, addr = e4000000 ... 
    [C7x_1 ]    943.035537 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 7 @ space = 17, size = 2471676, align = 128 ... 
    [C7x_1 ]    943.035537 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 7 @ space = 17, size = 2471676, align = 128 ... 
     ... 
     ... 
    [C7x_1 ]    943.035608 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 8 @ space = 17, size = 128, align = 128 ... 
    [C7x_1 ]    943.035608 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 8 @ space = 17, size = 128, align = 128 ... 
    [C7x_1 ]    943.035637 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:181] Allocated memory record 8 @ space = 17 and size = 128, addr = e4000400 ... 
    [C7x_1 ]    943.035637 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:181] Allocated memory record 8 @ space = 17 and size = 128, addr = e4000400 ... 
    [C7x_1 ]    943.035665 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 9 @ space = 17, size = 3200, align = 128 ... 
    [C7x_1 ]    943.035665 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 9 @ space = 17, size = 3200, align = 128 ... 
     
     
    [C7x_1 ]    943.035721 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 10 @ space = 17, size = 5431680, align = 128 ... 
    [C7x_1 ]    943.035721 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 10 @ space = 17, size = 5431680, align = 128 ... 
    0 ... 
    0 ... 
    [C7x_1 ]    943.035813 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 11 @ space = 17, size = 1211776, align = 128 ... 
    [C7x_1 ]    943.035813 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 11 @ space = 17, size = 1211776, align = 128 ... 
    0 ... 
    0 ... 
    [C7x_1 ]    943.035872 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 12 @ space = 17, size = 1600783, align = 128 ... 
    [C7x_1 ]    943.035872 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 12 @ space = 17, size = 1600783, align = 128 ... 
     ... 
     ... 
    [C7x_1 ]    943.035930 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 13 @ space = 17, size = 8388608, align = 128 ... 
    [C7x_1 ]    943.035930 s:  VX_ZONE_INFO:[tivxAlgiVisionAllocMem:172] Allocating memory record 13 @ space = 17, size = 8388608, align = 128 ... 
    0 ... 
    0 ... 
    [C7x_1 ]    943.036046 s:  VX_ZONE_INFO:Disabled
    TIDL_RT_OVX: Verifying TIDL graph ... Done.
    ************ TIDL_subgraphRtCreate done ************ 
    Starting Inference
    1/8
    1/8 read_img
    1/8 sess.run
     *******   In TIDL_subgraphRtInvoke  ******** 
    TIDL_RT_OVX: Set default TIDLRT tensor done
    TIDL_RT_OVX: Set default TIDLRT tensor done
    TIDL_RT_OVX: Running Graph ... 
    TIDL_RT_OVX : ElementType - 1, 6 
    TIDL_RT_OVX: input_sizes[0] = 641, dim = 640 padL = 1 padR = 0
    TIDL_RT_OVX: input_sizes[1] = 412163, dim = 640 padT = 1 padB = 2
    TIDL_RT_OVX: input_sizes[2] = 3, dim = 3 
    TIDL_RT_OVX: input_sizes[3] = 1, dim = 1 
    TIDL_RT_OVX : ElementType - 1, 6 
    TIDL_RT_OVX : Reformat input Buffer 
    TIDL_RT_OVX : ElementType - 6, 1 | Scale - 1.000000, 128.000000 | Zp - 0, 0 | Layout - 0, 0 | CP - 412163, 409600
    TIDL_RT_OVX: input_buffer = 0xffff79c20000 1236489
    TIDL_RT_OVX: memset_out_tensor_tidlrt_tiovx  ... Done.
    ^C^Cexit
    reboot
    

    what is the solution in this case?

    Regards,

    Hyunji

  • Hi Hyunji, 

    The execution is getting stuck during processing of the network, the init part seems to have happened correctly. Can you enable another level of debug as shown below and share the log: debug_level to 3 instead of 1, this will give another hierarchy of prints to help understand the issue.

    - Set "debug_level" : 3 in the python script

    Run the following on EVM cmd line:

    - Run "/opt/vx_app_arm_remote_log.out &"

    - export TIDL_RT_DEBUG=3

    This model is validated on EVM as part of 8.1 release as well, so most likely it is some setup issue, I don't think it is specific to your EVM. Please share log with above, let's try to get some more pointers from there.

    Regards,

    Anand 

  • HI Anand ,

    I agree your opinion. And that's why I asked you to borrow the board you used or the set up board.

    Can't I get a board that works normally?

    We have been having problems with board setup since before, so I think there will be problems even if I set it up again.

    ti_log_220906.txt

    Regards,

    Hyunji

  • Hi Hyunji,

    1) In my understanding, you are using the following version of tools :

         - Edgeai-tidl-tools --> Release 08_01_00_09-rc1 (https://github.com/TexasInstruments/edgeai-tidl-tools/releases/tag/08_01_00_09-rc1)

         - Edge AI SDK for EVM setup -> 8.1 release -- https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-SK-TDA4VM/08.01.00.02

         Can you confirm if this understanding is correct?

    2) I tried running the model on my end with the following setup (same as in point 1):

         - Edgeai-tidl-tools --> Release 08_01_00_09-rc1 (https://github.com/TexasInstruments/edgeai-tidl-tools/releases/tag/08_01_00_09-rc1)

         - Edge AI SDK -> 8.1 release -- https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-SK-TDA4VM/08.01.00.02

        ---> The inference goes through fine on my end for this model with artifacts generated from above

    I am attaching my artifacts, can you check if these work fine for you?

    1108.artifacts_yolov5s6_8.1.zip

    Regards, 

    Anand

  • hello, Anand

         Can you confirm if this understanding is correct?

          >>> yes, it's exactly correct.

    I have a goodnews, your model work fine and the inference result is very good.

    then, what's problem in my case?

    What are the commands or options you used to compile?

    Regards,

    Hyunji

  • Hi Hyunji,

    I think the edgeai-tidl-tools repo you are using is not pointing to all the 8.1 tools for some reason, something is still pointing to 8.2 version. It could be due to the fact that you already had 8.2 installed as part of your setup, may be some tools didn't get updated to 8.1.

    Can you try doing a fresh clone of the edgeai-tidl-tools repo with 08_01_00_09-rc1 tag (https://github.com/TexasInstruments/edgeai-tidl-tools/releases/tag/08_01_00_09-rc1). Create a fresh conda environment on PC with python 3.6 and re-run the setup.sh script, then do compilation to generate artifacts and try running inference on EVM with these artifacts. I am hoping that should solve the issue.

    Let me know if this works.

    Regards,

    Anand

  • hello, Anand

    okay, I try it again.

    In addition, I would like to  run my customized model on the board, so will the GitHub - TexasInstruments/edgeai-yolov5 at r8.2 version be okay?

    when I turn the previously converted model, the memory will be out.

    could you give me branch/tag  edge_yolov5 information that fits my test environment.

    Regards,

    Hyunji

  • Hi Hyunji,

    I would suggest trying out things in following order:

    1) Make sure yolov5s6 model compilation + inference works fine in 8.1 edgeai-tidl-tools fresh setup as discussed above -- please confirm this when you run

    2) As long as you are using edgeai-yolov5 repo only for training the network (not using the pre-compiled artifacts from this repo), you can use any release tag 8.1 onwards to export it

    3) Since we have the 8.4 version of tools released now, I would suggest upgrading to these since it may have some bug fixes 8.1/8.2 did not have

       - Do the EVM setup to use the 8.4 Edgeai SDK (https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-SK-TDA4VM/08.04.00.10)

       - Do a fresh setup for edgeai-tidl-tools 8.4 version (https://github.com/TexasInstruments/edgeai-tidl-tools/releases/tag/08.04.00.06)

       - Compile and infer yolov5s6 model to make sure setup is correct

       - Try compilation and inference on custom model

    Regards,

    Anand

  • hi 

    I have the export problem in yolov5s.pt.

    it's already been the same problem for someone else.(yolov5s compiled by TIDL fault · Issue #37 · TexasInstruments/edgeai-yolov5 · GitHub)

    And this problem is also the one I suggested when I asked for board verification.

    It works well for onnx that you provided me with not exported(yolov5s6_640_ti_lite_37p4_56p0.onnx), but there is a
    Segmentation fault error for the other  ultralytics onnx models that have been exported.

    The difference between the provided prototxt and the exported prototxt  is num_heads.

    exported(yolov5s6_640_ti_lite_37p4_56p0.onnx)'s num_heads is 4, but exported ultralytics/yolov5's num_heads is 3.

    what is fiinal heads? is it segmentation head??

    I know the num_heads and matched_names can get from onnx_model.graph.node[i+1].op_type is "Reshape".

    why Reshape is 4 times?

    I want to export/compile/inference trained  ultralytics/yolov5's yolov5s model on TI EVM.

    Please tell me how to inference the ultralytics's yolov5s model in EVM instead of your yolov5s model.

    I need only ultralytics's yolov5s model.

    Regards,

    Hyunji

  • Hi Hyunji,

    Can you help confirm if my understanding of the current status is correct:

    1) Are you saying you are able to now compile yolov5s6 model and run inference on EVM successfully, with the fresh setup I suggested above with 8.1 version for both edge AI SDK and edgeai-tidl-tools?

    2) With (1) being true, now you are trying to run yolov5s ultralytics model and facing issue in compiling it.

    Regards,

    Anand

  • hello, Anand

    1) yes. you are able to now compile yolov5s6 model and run inference on EVM successfully with 8.1 version for both edge AI SDK and edgeai-tidl-tools.

    2) I am facing issue in inferencing in EVM.

    I have sent you our dummy  pt model before, so I want the our model to be able to be inferenced in EVM.

    I try to complie and inference the exported yolov5s ultralytics(it have focus layer and replace your focus layer)/custom model( it is  our dummy and have not focus layer). they work well in PC, but the exported dummy model which have not foucs layer doesn't work in EVM.

    I think the reason is the num of head. Therefore, I am requesting 8.1 version code that can be work well in EVM for the yolo model with 3 heads. 

    Is it possible?

    Regards,

    Anand

  • Hi Hyunji,

    • We don't support the official models from Ultralytics. You will have to train as well as export using edgeai-yolov5 repository.
    • Models trained from the official repo cannot be exported in edgeai-yolov5 repo.
    • If you have trained a model using edgeai-yolov5 and seeing some issue in export, please share the .pt file .

    Regards, Debapriya