When I put bie path in ktc.kneron_inference instead of onnx path it gives segmentation error
When I put bie path in ktc.kneron_inference API instead of onnx path it gives segmentation error for example Littleonnx model which I converted for Kl720
below is the error code
(base) root@edf75761b2af://workspace/william# python kl720_image_inference.py
/workspace/miniconda/lib/python3.7/site-packages/numpy/__init__.py:156: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
Using TensorFlow backend.
Segmentation fault (core dumped)
Please let me know how to fix this error
Comments
If you use Vmware , try add CPU and RAM to setting
I am using Docker version 20.10.7, build 20.10.7-0ubuntu1~18.04.1
How to fix the issue for docker??
Could you share your kl720_image_inference.py file?
# Code for Inference
import ktc
import onnx
from PIL import Image
import numpy as np
def preprocess(input_file):
image = Image.open(input_file)
image = image.convert("RGB")
image = Image.fromarray(np.array(image)[...,::-1])
img_data = np.array(image.resize((112, 96), Image.BILINEAR)) / 255
return img_data
input_data = [preprocess("/workspace/examples/LittleNet/pytorch_imgs/Abdullah_0001.png")]
#inf_results = ktc.kneron_inference(input_data, onnx_file="/workspace/examples/LittleNet/LittleNet.onnx", input_names=["data_out"])
#inf_results = ktc.kneron_inference(input_data, nef_file="/data1/batch_compile/models_720.nef", input_names=["data_out"])
inf_results = ktc.kneron_inference(input_data, bie_file="/data1/output.bie", input_names=["data_out"])
print('Section 3 E2E simulator result:')
print(inf_results)
Same as another case. ktc.kneron_inference 720 bie, must add platform=720
inf_results = ktc.kneron_inference(input_data, bie_file="/data1/output.bie", platform=720, input_names=["data_out"])
Thanks , Its working now.