nyoki-mtl / keras-facenet

Facenet implementation by Keras2
553 stars 216 forks source link

using coreml model #6

Closed sam199488 closed 6 years ago

sam199488 commented 6 years ago

i got this error while trying to test the corml model :

"[coreml] A Core ML custom neural network layer requires an implementation named 'scaling' which was not found in the global namespace." and "[coreml] Error creating Core ML custom layer implementation from factory for layer "scaling"."

nyoki-mtl commented 6 years ago

@sam199488

I confirmed that coremltools can convert the model but I did not make an iOS application because I don't have a Mac. I think you need to make a class called 'scaling' in Swift. 'scaling' is just a function of multiplication defined on on the code below. https://github.com/nyoki-mtl/keras-facenet/blob/2a571cfa9033f32543ade2394d3d267e55c2926b/code/inception_resnet_v1.py#L25-L26

Please refer to the link below. http://machinethink.net/blog/coreml-custom-layers/#putting-the-model-into-the-app