based on coremltools docs, we can pass savedModel directory to the ct.convert() method, but it doesnt work due to input/output unsupported dtype.
After downloading the SavedModel here's what i did:
import coremltools as ct
mlmodel = ct.convert("efficientdet_lite2_detection_1")
I get this error:
.
.
.
inputs.append(TensorType(name=inp, shape=shape, dtype=dtype))
File "/Users/smurf/miniconda3/envs/coreml_conv/lib/python3.9/site-packages/coremltools/converters/mil/input_types.py", line 215, in __init__
raise TypeError("dtype={} is unsupported for inputs/outputs of the model".format(dtype))
TypeError: dtype=<class 'coremltools.converters.mil.mil.types.type_int.make_int.<locals>.int'> is unsupported for inputs/outputs of the model
I think it's due to "uint8" input type, and they dont support it.
I try again with ImageType like this:
.
.
.
File "/Users/smurf/miniconda3/envs/coreml_conv/lib/python3.9/site-packages/coremltools/converters/mil/frontend/tensorflow/converter.py", line 374, in convert_main_graph
func_inputs[input_type.name] = mb.placeholder(
File "/Users/smurf/miniconda3/envs/coreml_conv/lib/python3.9/site-packages/coremltools/converters/mil/mil/builder.py", line 189, in placeholder
return Placeholder(shape, dtype, allow_rank0_input=allow_rank0_input)
File "/Users/smurf/miniconda3/envs/coreml_conv/lib/python3.9/site-packages/coremltools/converters/mil/mil/program.py", line 163, in __init__
raise ValueError('Rank-0 (input {}) is unsupported'.format(name))
ValueError: Rank-0 (input None) is unsupported
Hello,
Have you tried converting one of EfficientDet Lite family like lite2 found here: https://tfhub.dev/tensorflow/efficientdet/lite2/detection/1 using either SavedModel directory or tflite model ? or we we need to build a keras model ?
based on coremltools docs, we can pass savedModel directory to the ct.convert() method, but it doesnt work due to input/output unsupported dtype.
After downloading the SavedModel here's what i did:
I get this error:
I think it's due to "uint8" input type, and they dont support it. I try again with ImageType like this:
I got this error:
This is probably due to input shape:
I tried to change input shape:
Any ideas to solve this problem ?
Thank you