Converting UIImage to MLMultiArray for Keras Model

前端 未结 3 1489
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 09:41

In Python, I trained an image classification model with keras to receive input as a [224, 224, 3] array and output a prediction (1 or 0). When I load the save the model and

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-14 10:03

    In your Core ML conversion script you can supply the parameter image_input_names='data' where data is the name of your input.

    Now Core ML will treat this input as an image (CVPixelBuffer) instead of a multi-array.

提交回复
热议问题