Ma-Dan / YOLOv3-CoreML

YOLOv3 for iOS implemented using CoreML.
MIT License
171 stars 46 forks source link

ValueError: Cannot create group in read only mode #14

Open wiamadaya opened 5 years ago

wiamadaya commented 5 years ago

i successfully trained a custom tiny yolo model using this repo https://github.com/qqwweee/keras-yolo3 and working properly during the testing. However when performing coreml conversion i received the following error

image

i perform the following conversion in the README without issue, so the problem should be lying in my custom tiny yolo model

The model is converted from Keras h5 model, follow the Quick Start guide keras-yolo3 to get YOLOv3 Keras h5 model, then use coreml.py to convert h5 model to CoreML model.

wiamadaya commented 5 years ago

is it related to this issue https://github.com/keras-team/keras/issues/6937?

because what i can see in https://github.com/qqwweee/keras-yolo3/blob/master/train.py#L66 and https://github.com/qqwweee/keras-yolo3/blob/master/train.py#L85 they are all model.save_weights

dmytro-kushnir commented 4 years ago

hey @wiamadaya for custom models, you need to load architecture also (it should stored in .json file by keras-yolov3)

JcbPrn commented 4 years ago

I got the same issue. any progress? please help.

henry2304 commented 4 years ago

I have the same issue, and saw the error might relate to how the models are stored/loaded - thanks for the note @DIma-Kush. However, I'm not sure if fixing this would then involve modifying the coremltools code, or there's any easier solution? Did you have any progress on this, @JcbPrn or @wiamadaya? Thanks for any advice,