概要
CoreMLを使用したNSFW(いわゆるポルノ)検出器
機械学習計測したスター増加
- 24時間
- +1
- 7日間
- +3
- 15日間
- +5
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルNSFWDetector is a small (17 kB) CoreML Model to scan images for nudity. It was trained using CreateML to distinguish between porn/nudity and appropriate pictures. With the main focus on distinguishing between instagram model like pictures and porn.
Usage
guard #available(iOS 12.0, *), let detector = NSFWDetector.shared else {
return
}
detector.check(image: image, completion: { result in
switch result {
case let .success(nsfwConfidence: confidence):
if confidence > 0.9 {
// 😱🙈😏
} else {
// ¯\_(ツ)_/¯
}
default:
break
}
})
If you want to enforce stricter boundaries for your platform, just apply a lower threshold for the confidence.
Installation
Swift Package Manager
dependencies: [
.package(url: "https://github.com/lovoo/NSFWDetector.git", .upToNextMajor(from: "1.1.2"))
]
Cocoapods
pod 'NSFWDetector'
⚠️ Because the model was trained with CreateML, you need Xcode 10 and above to compile the project.
App Size
The Machine Learning Model is only 17 kB in size, so App size won't be affected compared to other libraries using the yahoo model.
Using just the Model
If you don't want to use the Detection Code, you can also just download the MLModel file directly from the latest Release.
Feedback
If you recognize issues with certain kind of pictures, feel free to reach out via Mail or Twitter.
Author
Michael Berg, [email protected]
License
NSFWDetector is available under the BSD license. See the LICENSE file for more info.
関連プロジェクトを探す
読み込み中…
