3DCNN input size matching probelm for converting nef (kneron 630)


I am converting 3DCNN to kneron 630.

tflite -> onnx (opt=1.1) -> optimized.onnx was successful.


When checking the input through netron, it is as follows.


When I run following code:

# print(video_np.shape) => (32, 32, 15, 3)

input_mapping = {"video": video_np}

bie_path = km.analysis(input_mapping, threads = 4)

fixed_results = ktc.kneron_inference(input_data, bie_file=bie_path, input_names=["video"], platform=630)

eval_result = km.evaluate()


# bin 

nef_path = ktc.compile([km])

In my opinion, the size of ndarray is (32,32,15,3), so I created the corresponding array and entered it as input, but the following error appears.



Can you guide me on how to solve this?

Comments

  • Hi Youngjun,

    We don't have access to your onnx model, but according to the model structure you provided, you will need to use onnx2onnx to convert your onnx model to a Kneron-supported onnx model first, then proceed with converting.

    Below is an example of an onnx model that is supported by Kneron:

  • Thank you Maria


    I tried to convernt to nef file for knero-630 with following code.

    I expected the output of the nef file to come out by specifying a specific folder,

    there is no error In CMD windows, but I don't get any nef file.

    =============================================================================

    test_conv_onnx2nef_3dcnn.py

    =============================================================================


    This is the cmd result when I run test_conv_onnx2nef_3dcnn.py


    =============================================================================

    Result

    =============================================================================



    =======================================================================================

    And I atteched the files in output foloder.



    Please give me adivice to get the nef file for 630 board.

  • Dear Maria,


    Is there any way to solve above problem??

    Please, give me advice to me.

    Thank you.

  • Hi Youngjun,

    Sorry for the late reply. Since I was away from office last week, I asked my coworker to reply to you, but he didn't, so I'll reply now.

    Based on your usage, you are likely using the Kneron Toolchain docker. Typically, if you successfully complete the '5. NEF Workflow' section, you can find the .nef files you generated under '/data1/batch_compile'. You can refer to the following link: https://doc.kneron.com/docs/#toolchain/manual_5_nef/

    If you ran docker with "docker run --rm -it -v /mnt/docker:/docker_mount kneron/toolchain:latest," please check the files under /data1/.

    If you ran docker with "docker run --rm -it -v /mnt/docker:/data1 kneron/toolchain:latest," please check the files under /mnt/docker.


    On the other hand, if you are using the Toolchain webgui, you can directly download the files. You can refer to this link: https://doc.kneron.com/docs/#toolchain/appendix/toolchain_webgui/

  • Thanks a lot. I solved the converting problem.

The discussion has been closed due to inactivity. To continue with the topic, please feel free to post a new discussion.