Blurit

Version License Platform

Blurit 是一个 SDK,用于匿名化包含面部和车牌的图片和视频。
欲了解更多关于 Blurit 的信息,请访问我们的网站

安装

CocoaPods

CocoaPods 是将 Blurit 添加到您项目的推荐方式。

  1. 在您的 Podfile 文件中为 Blurit 添加一个 pod 条目
pod 'Blurit_SDK'
  1. 通过运行 pod install 安装 pod。

  2. 在您需要的地方包含 Blurit,Objective-C 使用 #import <Blurit/Blurit.h>,Swift 使用 import Blurit

Swift Package Manager

dependencies: [
  .package(url: "https://github.com/wassafr/Blurit-ios.git", from: "1.0.0")
]

手动安装

  1. 下载最新代码版本,或将该仓库作为 git 子模块添加到您使用 git 跟踪的项目中。

  2. 在您需要的地方包含 Blurit,Objective-C 使用 #import <Blurit_SDK/Blurit_SDK.h>,Swift 使用 import Blurit_SDK

用法

要运行示例项目,只需打开并运行即可。框架已包含在内。请确保您也查看了Blurit 文档注意: 要使用 SDK,您需要一个许可证密钥,您可以从 Blurit 网站获取。

示例代码已添加注释,并展示了 SDK 的使用示例。

###基础知识

  1. 将以下导入添加到文件顶部
  import Blurit

  1. 实例化一个 Blurit 对象

`` bluritInstance = Blurit(licenceKey: "your license key", completion: nil)


3. Load the detection models in the Blurit instance

bluritInstance?.loadModels(completion: { (error) in if let error = error { print("❌ 无法初始化 Blurit (error.localizedDescription)") } else {

} })


4. Make prediction from picture

BluritService.shared.bluritInstance?.detectObjectsAsync(sourceImage: image, completion: { firstCompletionResult in

/// Handle detected objects

})


5. You can now use predictions to apply the blur 

BluritService.shared.bluritInstance?.anonymizeAsync(sourceImage: image, predictionResult: predictionResult, completion: { secondCompletionResult in

     /// Handle blurred picture

   })

要求

许可证

Blurit 在商业许可证下可用。有关更多信息,请参阅 LICENSE 文件。

作者

Wassa, contact@wassa.fr