Open JcbPrn opened 5 years ago
I was able to convert yolov2 into coreml.
yolov3 seems to be unable to convert coreML.
And here is yolov2 → .h conversion, here is .cfg Note.
If .h conversion can be done normally, coreML can be converted normally.
Thank you, but I can’t see any Hyperlinks to your mentioned files.
And the conversion of yolov3 works. It only doesn‘t work after training that model by myself. Did you train your weights file before converting it zu coreml?
hey! thanks! I successfully trained my first model, but after that I am not able to convert it using:
" import coremltools
coreml_model = coremltools.converters.keras.convert('model_data/trained_weights_final.h5', input_names='input1', image_input_names='input1', output_names=['output1', 'output2', 'output3'], image_scale=1/255.)
coreml_model.input_description['input1'] = 'Input image' coreml_model.output_description['output1'] = 'The 13x13 grid (Scale1)' coreml_model.output_description['output2'] = 'The 26x26 grid (Scale2)' coreml_model.output_description['output3'] = 'The 52x52 grid (Scale3)'
coreml_model.author = 'asdas' coreml_model.license = 'BlaBla' coreml_model.short_description = "erster YoloVersuch :D"
coreml_model.save('Yolov3.mlmodel') "
i am able to convert the pertrained model, but after training that model the converter says : " python3 converth5ToCoreML.py
Traceback (most recent call last):
File "converth5ToCoreML.py", line 3, in
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 793, in convert
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 579, in convertToSpec
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/coremltools/converters/keras/_keras2_converter.py", line 311, in _convert
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/engine/saving.py", line 419, in load_model
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/engine/saving.py", line 221, in _deserialize_model
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/utils/io_utils.py", line 302, in getitem
ValueError: Cannot create group in read only mode."
any idea? thank you !