我将 MTCNN caffe 模型转换为 coreML 用于对象检测。并遵循 object-c 项目中的 Vision 指南,如下所示:
MLModel *model = [[[net12 alloc] init] model];
VNCoreMLModel *coreMLModel = [VNCoreMLModel modelForMLModel: model error:nil];
VNCoreMLRequest *coreMLRequest = [[VNCoreMLRequest alloc] initWithModel: coreMLModel completionHandler:
(VNRequestCompletionHandler) ^(VNRequest *request, NSError *error){
定义的输出是两个MLMultiArray,一个是confidence,一个是boundingBox。
如何转换 MLMultiArray 以获得置信度值和边界框值?
有一些快速用于对象检测的示例https://github.com/apple/turicreate/tree/master/userguide/object_detection ,但我找不到与objective-c类似的示例。