Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MasDennis/215fa6aed8e8e49fe622c51e0c449e59 to your computer and use it in GitHub Desktop.
Save MasDennis/215fa6aed8e8e49fe622c51e0c449e59 to your computer and use it in GitHub Desktop.
lazy var objectDetectionRequest: VNCoreMLRequest = {
do {
let model = try VNCoreMLModel(for: YOLOv3TinyInt8LUT().model)
let request = VNCoreMLRequest(model: model) { [weak self] request, error in
self?.processDetections(for: request, error: error)
}
return request
} catch {
fatalError("Failed to load Vision ML model.")
}
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment