Convert SSD MobileNet V2 to CoreML
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 850
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 10
Description
## ❓Question
I have an SSD MobileNet V2 model trained with Tensorflow Object detection API. How can I convert it to coreml?
I tried the following steps but it did not work:
- Convert checkpoints to saved model using `exporter_main_v2.py`
- Load model `model = tf.saved_model.load("path/to/model)`
- Run `coremltools.convert(model, source="tensorflow")`
I got an error:
`NotImplementedError: Expected model format: [SavedModel | [concrete_function] | tf.keras.Model | .h5], got ._UserObject object at 0x7fab1a41cd90>`
ubuntu 18
python version 3.7.6
Tensorflow version 2.8.2
coremltools version 5.2
Contributor guide
Research direction
Start with the TensorFlow Object Detection API export step using exporter_main_v2.py, then inspect how the resulting SavedModel is passed to coremltools.convert. Reproduce the reported error with Python 3.7.6, TensorFlow 2.8.2, and coremltools 5.2; done means documenting or confirming a working conversion path for SSD MobileNet V2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100