1 /* 2 * Copyright (c) Meta Platforms, Inc. and affiliates. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 9 import UIKit 10 11 public struct Classification { 12 public let label: String 13 public let confidence: Float 14 15 public init(label: String, confidence: Float) { 16 self.label = label 17 self.confidence = confidence 18 } 19 } 20 21 public protocol ImageClassification { classifynull22 func classify(image: UIImage) throws -> [Classification] 23 } 24