Skip to content
This repository was archived by the owner on Apr 8, 2023. It is now read-only.

Commit 8176f50

Browse files
author
dev_zwy@aliyun.com
committed
升级gradle与部分第三方库
1 parent b259649 commit 8176f50

File tree

7 files changed

+126
-11
lines changed

7 files changed

+126
-11
lines changed

.idea/codeStyles/Project.xml

Lines changed: 109 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![](https://jitpack.io/v/devzwy/open_nsfw_android.svg)](https://jitpack.io/#devzwy/open_nsfw_android) [![](https://img.shields.io/badge/Base-TensorFlow-brightgreen.svg)](https://github.com/devzwy/open_nsfw_android) [![](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)
33
[![](https://img.shields.io/badge/%E4%BD%9C%E8%80%85-赵文贇-orange.svg)](https://github.com/devzwy/open_nsfw_android) [![](https://img.shields.io/badge/QQ-3648415-brightgreen.svg)](https://github.com/devzwy/KUtils) [![](https://img.shields.io/badge/微信-admin_zwy-brightgreen.svg)](https://github.com/devzwy/open_nsfw_android) [![](https://img.shields.io/badge/Mail-dev_zwy@aliyun.com-green.svg)](https://github.com/devzwy/open_nsfw_android) ![Mozilla Add-on](https://img.shields.io/amo/stars/dustman.svg?label=stars&logo=1&logoColor=1&style=popout)
44

5-
### 色情图片离线识别,基于TensorFlow实现。识别只需200ms,可断网测试,成功率99%,调用只要一行代码,从雅虎的开源项目open_nsfw移植,tflite(6M)为训练好的模型(已量化),该模型文件可用于iOS、java、C++等平台,Python使用生成的tfLite文件检测图片的速度远远快于实用原模型.
5+
### 色情图片离线识别,基于TensorFlow实现。识别只需200ms,可断网测试,成功率99%,调用只要一行代码,从雅虎的开源项目open_nsfw移植,tflite(6M)为训练好的模型(已量化),该模型文件可用于iOS、java、C++等平台,Python使用生成的tfLite文件检测图片的速度远远快于使用原模型.
66
### 页面最底部有测试Demo和效果图片,请勿在公共场所打开。
77

88
### 使用

app/build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
compileSdkVersion 28
99
defaultConfig {
1010
applicationId "com.example.open_nsfw_android"
11-
minSdkVersion 15
11+
minSdkVersion 19
1212
targetSdkVersion 28
1313
versionCode 5
1414
versionName "1.2.8"
@@ -23,6 +23,12 @@ android {
2323
aaptOptions {
2424
noCompress "tflite"
2525
}
26+
27+
//添加
28+
compileOptions {
29+
sourceCompatibility JavaVersion.VERSION_1_8
30+
targetCompatibility JavaVersion.VERSION_1_8
31+
}
2632
}
2733

2834
dependencies {
@@ -36,8 +42,8 @@ dependencies {
3642
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
3743

3844

39-
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
40-
implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.2.3'
45+
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
46+
implementation 'com.github.LuckSiege.PictureSelector:picture_library:2.2.5'
4147
implementation project(path: ':nsfw')
4248
// implementation 'com.github.devzwy:open_nsfw_android:1.2.7'
4349
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.3.41'
4+
ext.kotlin_version = '1.3.50'
55
repositories {
66
google()
77
jcenter()
88

99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.4.2'
11+
classpath 'com.android.tools.build:gradle:3.5.1'
1212
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

nsfw/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ android {
66
compileSdkVersion 28
77

88
defaultConfig {
9-
minSdkVersion 15
9+
minSdkVersion 19
1010
targetSdkVersion 28
1111
versionCode 5
1212
versionName "1.2.8"
@@ -32,8 +32,8 @@ dependencies {
3232
testImplementation 'junit:junit:4.12'
3333
androidTestImplementation 'com.android.support.test:runner:1.0.2'
3434
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
35-
implementation 'org.tensorflow:tensorflow-lite:+'
36-
implementation 'org.tensorflow:tensorflow-lite-gpu:+'
35+
implementation 'org.tensorflow:tensorflow-lite:1.14.0'
36+
implementation 'org.tensorflow:tensorflow-lite-gpu:1.14.0'
3737
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3838
}
3939
repositories {

0 commit comments

Comments
 (0)