Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Sources/DeepLook/API/DeepLook.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import UIKit
import Vision

/// Reference to `LKRecognition.default` for quick bootstrapping and examples.
@available (iOS 13.0, *)
public let DeepLook = LKDeepLook.default

@available (iOS 13.0, *)
public class LKDeepLook {

/// shared instance.
Expand Down
4 changes: 3 additions & 1 deletion Sources/DeepLook/API/Detecotor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import Foundation
import UIKit

/// Reference to `LKDetector.default` for quick bootstrapping and examples.
@available(iOS 13.0, *)
public let Detector = LKDetector.default

@available (iOS 13.0, *)
public class LKDetector {

// shared instance
Expand Down Expand Up @@ -92,7 +94,7 @@ public class LKDetector {
}
}


@available (iOS 13.0, *)
private extension LKDetector {

func analyze(
Expand Down
2 changes: 2 additions & 0 deletions Sources/DeepLook/API/ImageProcessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import Foundation
import UIKit

/// Reference to `LKImageProcessor.default` for quick bootstrapping and examples.
@available (iOS 13.0, *)
public let ImageProcessor = LKImageProcessor.default

@available (iOS 13.0, *)
public class LKImageProcessor {

// shared instance
Expand Down
3 changes: 3 additions & 0 deletions Sources/DeepLook/API/Recognition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import Foundation
import UIKit

/// Reference to `LKRecognition.default` for quick bootstrapping and examples.
@available (iOS 13.0, *)
public let Recognition = LKRecognition.default

@available (iOS 13.0, *)
public class LKRecognition {

// shared instance
Expand Down Expand Up @@ -252,6 +254,7 @@ public class LKRecognition {
}
}

@available (iOS 13.0, *)
private extension LKRecognition {
func groupFaces(faces: [Face], clusterOptions: ClusterOptions) -> [[Face]] {
switch clusterOptions.clusterType {
Expand Down
1 change: 1 addition & 0 deletions Sources/DeepLook/Enum/TaskResult.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Created by Amir Lahav on 30/07/2022.
// Copyright © 2019 la-labs. All rights reserved.

@available (iOS 13.0, *)
public enum TaskResult<Success: Sendable>: Sendable {
case success(Success)
case failure(Error)
Expand Down
1 change: 1 addition & 0 deletions Sources/DeepLook/Extention/Operator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func |> <U, T> (x: U, f: (U) throws -> T) rethrows -> T {
return try f(x)
}

@available (iOS 13.0, *)
func |> <U, T> (x: U, f: (U) async throws -> T) async rethrows -> T {
return try await f(x)
}
Expand Down
3 changes: 3 additions & 0 deletions Sources/DeepLook/ML/Actions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ typealias JobPipeline = (ProcessInput) throws -> ProcessOutput
typealias CustomFilter<T> = (ProcessInput) throws -> T

/// Reference to `LKActions.default` for quick bootstrapping and examples.
@available (iOS 13.0, *)
public let Actions = LKActions.default

@available (iOS 13.0, *)
public class LKActions {

/// Models
Expand Down Expand Up @@ -520,6 +522,7 @@ public class LKActions {
}
}

@available (iOS 13.0, *)
private extension LKActions {

func boundingBoxToRects(observation: [VNFaceObservation]) -> [CGRect] {
Expand Down
1 change: 1 addition & 0 deletions Sources/DeepLook/Manager/ActionType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public extension ActionType {
}
}

@available (iOS 13.0, *)
public extension ActionType {
static var faceLocation: ActionType<ProcessInput> {
.init(process: Actions.faceLocation)
Expand Down
1 change: 1 addition & 0 deletions Sources/DeepLook/Manager/Processor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ typealias AsyncMultiplePipe<Input,Output> = ([Input]) async throws -> [Output]
typealias GenericStackProcessor<Input,Output> = (Stack<[Input]>) async throws -> [Output]
typealias StackProcessor = (Stack<[ProcessAsset]>) throws -> [ProcessAsset]

@available (iOS 13.0, *)
class Processor {
static func singleInputProcessor<Input, Output>(
element: Input,
Expand Down
1 change: 1 addition & 0 deletions Sources/DeepLook/Manager/Vision.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Vision {
static let assetService = AssetService()
}

@available (iOS 13.0, *)
extension Vision {

static func detect(objects stack: Stack<[ProcessInput]>,
Expand Down
2 changes: 1 addition & 1 deletion Sources/DeepLook/Services/ImageFetcherService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import AppKit
import UIKit
#endif


@available (iOS 13.0, *)
public class ImageFetcherService {

private let imgManager = PHImageManager.default()
Expand Down