【发布时间】:2017-12-07 10:48:54
【问题描述】:
我尝试了最近在 iOS 中引入的 Core ML 来识别和分类图像。问题是,它没有为发送的图像提供正确的结果。
如果我发送地球图像(Globe),它会给我这个类作为气泡。下面是我使用的代码,
let model = Resnet50()
let pixelBuffer: CVPixelBuffer = (modelImg.pixelBuffer())!
if let prediction = try? model.prediction(image: pixelBuffer) {
print( "Found it!! It is a/an \(prediction.classLabel)")
}
是否可以在现有 Core ML 模型之上使用自定义用例训练模型?(例如 Resnet50)
【问题讨论】:
-
IN 除了接受的答案之外,还有一件事要记住 - 在 CoreML 中,如果没有应用程序更新,就无法更新经过训练的模型。我丢失了一个关于 CoreML 不是 的博客的链接,但我找到了一个很好的资源,可以使用 CoreML 工具作为这个 repo 的自述文件:github.com/hollance/YOLO-CoreML-MPSNNGraph/blob/master/…
标签: swift image-recognition ios11 coreml