Closed vvkv closed 6 years ago
You should be able to just drop your own mlmodel file into Xcode. Is that not working for you?
Thank you for the quick turnaround. I did try dropping my own model file into xcode, but that gave an error that said "Argument labels '(image:)' do not match any available overloads". I have attached a screenshot to the error in the YOLO.swift file below for further reference. From a little bit of research it seems like it has more to do with the API than the mlmodel, but I'm still unsure as to how to go about resolving it.
Xcode automatically creates this class for you. The label image: was used because that's what the input in my model is called. If your model has an input with a different name, Xcode will use that instead.
Awesome! Thank you so much. This helped me figure it out
I'm also trying to add my own model (trained to recognise only one class) - does xcode somehow change this automatically or am I supposed to manually change the names?
The names of the classes are part of the model and should automatically work. But the name of the input (and perhaps output) can vary between models and you may have to change this yourself in the code.
Thanks! For the for the coreml converter step - it says that the dimensions 125x13x13 are hard-coded, however the model I'm using only has 1 class and would need to be 30x13x13 - where should I look to change this?
Search the code for the number 125. ;-) There is probably also a numClasses variable that you need to change from 20 to 1.
Thank you for this! How can we take this a step further and add our own model (still YOLO but trained with custom classes - https://github.com/AlexeyAB/darknet)
I have managed to convert the trained model to the .mlmodel format.
Thanks