piekarskipiotr/flutter-nude-detector
Flutter 裸露檢測套件。
- Stars
- 4
- Forks
- 4
- 最近推送(UTC)
- 2023年11月3日
- 專案狀態
- 已封存
語言DartRubySwiftKotlinObjective-C
技術主題
使用的依賴
依賴清單 7 項
- flutter
{"sdk":"flutter"} - google_mlkit_image_labeling
>=0.5.0 <0.10.0 - path
^1.8.2 - path_provider
^2.0.14 - flutter_test開發依賴
{"sdk":"flutter"} - mocktail開發依賴
>=0.3.0 <2.0.0 - very_good_analysis開發依賴
>=3.1.0 <6.0.0
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
展開 / 收合專案 README
flutter_nude_detector
style: very good analysis Powered by Mason License: MIT
An easy-to-use nudity detector build with google_mlkit_image_labeling package and using a pre-build .tflite model by nipunru from nsfw-detector-android repository.
Installation
Add package to your flutter project
flutter pub add flutter_nude_detector
Download .tflite model and save it in:
project/
assets/
ml_models/
nude.tflite
Modify pubspec.yaml file
flutter:
assets:
- assets/ml_models/
Now you are ready to use the package 🎉
🧑🏻💻 Usage
final hasNudity = await FlutterNudeDetector.detect(path: imagePath);
Function properties — hasNudity
| Property name | Type | Description |
|---|---|---|
| path | String | required argument |
| threshold | double | optional argument, default value is set to 0.7 |
| modelAssetsPath | String | optional argument, default value is set to assets/ml_models/nude.tflite |