创建VisionRequest(coreML.init)
函数
请求对象, 错误信息 = coreML.init(已编译的模型路径)
参数
- 已编译的模型路径 文本型
返回值
-
请求对象 对象型
-
错误信息 文本型
说明
创建VisionRequest对象请求, 成功返回 request对象
示例
local modelcPath = "/var/mobile/Media/svip/res/yolo11m.mlmodelc"
local request , err = coreML.init(modelcPath) --创建一个visionRequest
if (request) then
print("创建成功")
else
print("创建失败 err:"..err)
os.exit()
end