Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
devzwy committed May 14, 2019
1 parent bb8c4d9 commit 2f13a4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# open_nsfw_android
色情图片离线识别,200ms,可断网测试,成功率100%,原库为雅虎的python开源项目open_nsfw

```
val nsfwBean = NsfwHelper.getInstance(this, true, 1).scanBitmapSyn(bitmap)
nsfwBean?.sfw ...
nsfwBean?.nsfw ...
```
Demo运行结果:
![图片](https://github.com/devzwy/open_nsfw_android/blob/master/img/1.png)
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class MainActivity : AppCompatActivity() {
tvv.setText("识别成功:\n\tSFW score : ${nsfwBean?.sfw}\n\tNSFW score : ${nsfwBean?.nsfw}")
if (nsfwBean?.nsfw ?: 0f > 0.7) {
tvv.text = "${tvv.text.toString()} \n \t - 色情图片"
}else
{
}else {
tvv.text = "${tvv.text.toString()} \n \t - 正常图片"
}
// //异步识别,接口回调识别结果
Expand Down

0 comments on commit 2f13a4d

Please sign in to comment.