Turicreate: Access YOLO model from object detection

Created on 17 Apr 2018  路  8Comments  路  Source: apple/turicreate

Is there a way to access the retrained darknet YOLO model files after training object detection with Turicreate?

question

All 8 comments

Hi @smahurkar! What do you mean by accessing the retrained darknet YOLO model? Do you mean accessing the model weights specifically?

If you mean the weights, there is unfortunately no easy and documented way of doing this.

I meant getting the weights and config files after the training.

I was hoping to use the trained object detection model on other platforms besides iOS (Android and Web). Is there a way to export models from Turicreate to Tensorflow/Darknet models?

The best way that I can think of is to run model.export_coreml('Detector.mlmodel') on your model and then use coremltools to inspect it.

For instance:

import coremltools
mlmodel = coremltools.models.MLModel('Detector.mlmodel')
spec = mlmodel.get_spec()
print(spec.neuralNetwork.layers[0])

Converting it manually to another format will be a lot of work. You may want to look for a converter that can convert from Core ML to your preferred format.

@gustavla Thank you! I will try that.

I know of tools that can convert other formats to Core ML. However, I am yet to see a tool that can convert Core ML to other formats. Are you aware of any tools that can do this i.e. converting Core ML to any other format?

I have not tested either of these packages, but this package claims Core ML -> ONNX: https://github.com/onnx/onnxmltools
After that, the description of this one suggests it can do ONNX -> TF: https://github.com/onnx/onnx-tensorflow

Again, I can't guarantee success because I haven't tried it, but hopefully it's a starting point. I'll close this issue, but please feel free to add more information here for others to see if you figure it out. Thanks!

I tried this without success.

@zoecarver did you tried this ?
Can able to convert coreml to onnx, but when convert from onnx to tf , i got issue

Any help appreciated !

Nope, sorry.

Was this page helpful?
0 / 5 - 0 ratings