I created an image recognition .mlmodel file in the Create ML app. I am now using it in an iOS app.
It works great on iPhone 11 and iPhone 12 (and the corresponding models) but not on iPhone 8, iPhone 8 Plus and iPhone X. There are likely other models it does not work on but those are the ones I can confirm so far.
The code I am using is:
On the models where this does not work, the error printed in the console is:
Error Domain=com.apple.CoreML Code=1 "Predicted feature named 'classLabel' was not output by pipeline" UserInfo={NSLocalizedDescription=Predicted feature named 'classLabel' was not output by pipeline}
Due to the lack of documentation on CoreML I could not find a solid trace on this error. There are some random posts on Stack Overflow and there's also Git issues on the Turicreate Github (the underlying Python library which Core ML runs) but nothing that seems to give direct answers to this issue.
Any help would be greatly appreciated. Thanks!
It works great on iPhone 11 and iPhone 12 (and the corresponding models) but not on iPhone 8, iPhone 8 Plus and iPhone X. There are likely other models it does not work on but those are the ones I can confirm so far.
The code I am using is:
Code Block do { let prediction = try self.model.prediction(image: pixelBuffer!) } catch { print("\(error)") }
On the models where this does not work, the error printed in the console is:
Error Domain=com.apple.CoreML Code=1 "Predicted feature named 'classLabel' was not output by pipeline" UserInfo={NSLocalizedDescription=Predicted feature named 'classLabel' was not output by pipeline}
Due to the lack of documentation on CoreML I could not find a solid trace on this error. There are some random posts on Stack Overflow and there's also Git issues on the Turicreate Github (the underlying Python library which Core ML runs) but nothing that seems to give direct answers to this issue.
Any help would be greatly appreciated. Thanks!