Closed oishi89 closed 5 years ago
I read and found out something in the closed issues. It seems to be "the full YOLO model contains a type of layer that is currently not supported by Core ML." I was using yolo-voc.2.0.cfg for training so do you think I would had used yolo-voc.cfg (YOLO V1) instead ?
This app only supports Tiny YOLO, not the full one.
I retrained all of my data using tiny-yolo-voc.cfg so the convert was working but after converting to Keras my model was unable to recognize any object despite it had worked properly in Darknet. Do you have any idea ?
So then could we get an update to the full one?
I don't see the point in supporting the full YOLO on mobile as it will be very slow. Better to use something like the new MobileNetV2 with SSDLite.
I got same error when I convert my model. I use yolov2-tiny-voc to do this step.
Traceback (most recent call last):
File "coreml.py", line 11, in
I use the same weights in Forge and NNGraph, both success. Just fail in coreML.
Hi, I just solve this problem. Use keras==2.0.6 can convert model successfully.
I use keras==2.0.6, it works. Higher version such as 2.2.0 is not working. BTW, I use anaconda and run on macOS
Hi I always getting the issue when trying to convert Keras to CoreML. I tried multiple solutions like switching among Keras 1.2.2 , 2.0.6 and 2.0.8. The Keras model is my own trained model using darknet and yolo-voc.2.0.cfg and It was converted to Keras successfully as the first step of your tutorial.
File "coreml.py", line 11, in
image_scale=1/255.)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 489, in convert
predicted_probabilities_output = predicted_probabilities_output)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 158, in _convert
model = _keras.models.load_model(model)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/models.py", line 142, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/models.py", line 193, in model_from_config
return layer_from_config(config, custom_objects=custom_objects)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 40, in layer_from_config
custom_objects=custom_objects)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/engine/topology.py", line 2582, in from_config
process_layer(layer_data)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/engine/topology.py", line 2560, in process_layer
custom_objects=custom_objects)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 40, in layer_from_config
custom_objects=custom_objects)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/layers/core.py", line 682, in from_config
function = func_load(config['function'], globs=globs)
File "/Users/ln160c/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 183, in func_load
code = marshal.loads(code.encode('raw_unicode_escape'))
ValueError: bad marshal data (unknown type code)