Skip to content

Commit edbe140

Browse files
committed
tensorFlow小型demo,与官网相比去掉了很多很多没用的类简单集成
1 parent f3f7902 commit edbe140

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1707
-1
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

.idea/gradle.xml

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
��Demo ��Ϊ����android����TensorFlowģ�͵�
22
������Щ���TensorFlow�����ϵ�demo���ɵ��Լ���Ŀ��ȴ���Ҳ���ͷ������ʹ��
33

4-
���� ����Ŀ����ͷ��ʱû���������� �߰汾android���ܲ������ģ����Dz���Ӱ���Ķ��ͼ��ɣ�
4+
���� ����Ŀ����ͷ��ʱû���������� �߰汾android���ܲ������ģ����Dz���Ӱ���Ķ��ͼ��ɣ�
5+
6+
7+
��������̹���һЩ������Ļ���tensorFlow��һ��С����
8+
9+
Ŀǰ����Ŀ��android5.1����û���� �⼸���пջ�����7.0��8.0

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 26
5+
buildToolsVersion "27.0.2"
6+
defaultConfig {
7+
applicationId "com.youbanganda"
8+
minSdkVersion 15
9+
targetSdkVersion 26
10+
versionCode 1
11+
versionName "1.0"
12+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
compileOptions {
21+
targetCompatibility 1.8
22+
sourceCompatibility 1.8
23+
}
24+
}
25+
26+
dependencies {
27+
implementation fileTree(dir: 'libs', include: ['*.jar'])
28+
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
29+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
30+
testImplementation 'junit:junit:4.12'
31+
androidTestImplementation 'com.android.support.test:runner:0.5'
32+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
33+
34+
35+
compile 'org.tensorflow:tensorflow-android:1.4.0'
36+
37+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.youbanganda;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.youbanganda", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.youbanganda"
5+
>
6+
<!--android:sharedUserId="android.uid.system"-->
7+
<uses-permission android:name="android.permission.INSTALL_PACKAGES"
8+
tools:ignore="ProtectedPermissions" />
9+
<uses-permission android:name="android.permission.SHUTDOWN"
10+
tools:ignore="ProtectedPermissions" />
11+
<!-- Required -->
12+
<permission
13+
android:name="com.youbanganda.permission.JPUSH_MESSAGE"
14+
android:protectionLevel="signature" />
15+
<!-- Required -->
16+
<uses-permission android:name="com.youbanganda.permission.JPUSH_MESSAGE" />
17+
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
18+
<!-- 用于开启 debug 版本的应用在6.0 系统上 层叠窗口权限 -->
19+
<uses-permission android:name="android.permission.INTERNET" />
20+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
21+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
22+
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
23+
<uses-permission android:name="android.permission.WAKE_LOCK" />
24+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
25+
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
26+
<!-- 写系统权限 -->
27+
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"
28+
tools:ignore="ProtectedPermissions" />
29+
<uses-permission android:name="android.permission.MASTER_CLEAR"
30+
tools:ignore="ProtectedPermissions" />
31+
<!-- 恢复出厂设置权限 -->
32+
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
33+
<uses-permission android:name="android.permission.REORDER_TASKS" />
34+
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
35+
<!-- 语言设置权限 -->
36+
<uses-permission android:name="android.permission.SEND_SMS" />
37+
<!-- 发送短信权限 -->
38+
<uses-permission android:name="android.permission.RECEIVE_SMS" />
39+
<!-- 接收短信权限 -->
40+
<uses-permission android:name="android.permission.READ_SMS" />
41+
<!-- 接收短信权限 -->
42+
<uses-permission android:name="android.permission.WRITE_SMS" />
43+
<!-- 接收短信权限 -->
44+
<uses-permission android:name="android.permission.CALL_PHONE" />
45+
<!-- 拨打电话的权限 -->
46+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
47+
<!-- 取得网络状态的权限 -->
48+
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
49+
<!-- 取得GSM信号强度权限 -->
50+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
51+
<!-- 使用GPS权限 -->
52+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
53+
<!-- 读取本机号码和IMEI权限 -->
54+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
55+
<!-- 设置WIFI热点的权限 -->
56+
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
57+
<!-- 发送GPS冷启命令的权限 -->
58+
<uses-permission android:name="android.permission.GET_TASKS" />
59+
<!-- 获取当前活动的activity -->
60+
<uses-permission android:name="android.permission.CAMERA" />
61+
<!-- 访问照像机的权限 -->
62+
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
63+
<!-- 允许挂载和移除文件系统可移动存储器 -->
64+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
65+
<!-- 允许写扩展存储器 -->
66+
<uses-permission android:name="android.permission.RECEIVE_MMS" />
67+
<!-- 接收彩信权限 -->
68+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
69+
<uses-permission android:name="android.permission.SET_TIME_ZONE" />
70+
<!-- 允许设置系统时区 -->
71+
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
72+
<uses-permission android:name="android.permission.VIBRATE" />
73+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
74+
<!-- 录制视频/音频权限 -->
75+
76+
<uses-permission android:name="android.permission.REBOOT"
77+
tools:ignore="ProtectedPermissions" />
78+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
79+
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE"
80+
tools:ignore="ProtectedPermissions" />
81+
<uses-permission android:name="android.permission.DELETE_CACHE_FILES"
82+
tools:ignore="ProtectedPermissions" />
83+
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM"
84+
tools:ignore="ProtectedPermissions" />
85+
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
86+
87+
<application
88+
android:allowBackup="true"
89+
android:icon="@mipmap/ic_launcher"
90+
android:label="@string/app_name"
91+
android:persistent="true"
92+
android:supportsRtl="true"
93+
android:theme="@android:style/Theme.Light.NoTitleBar"
94+
android:largeHeap="true"
95+
tools:node="replace">
96+
<activity android:name=".MainActivity">
97+
<intent-filter>
98+
<action android:name="android.intent.action.MAIN" />
99+
100+
<category android:name="android.intent.category.LAUNCHER" />
101+
</intent-filter>
102+
</activity>
103+
</application>
104+
105+
</manifest>
+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
???
2+
openeyes
3+
closeeyes
4+
phone
5+
smoke
6+
headdown
7+
other
8+
train
9+
truck
10+
boat
11+
traffic light
12+
fire hydrant
13+
???
14+
stop sign
15+
parking meter
16+
bench
17+
bird
18+
cat
19+
dog
20+
horse
21+
sheep
22+
cow
23+
elephant
24+
bear
25+
zebra
26+
giraffe
27+
???
28+
backpack
29+
umbrella
30+
???
31+
???
32+
handbag
33+
tie
34+
suitcase
35+
frisbee
36+
skis
37+
snowboard
38+
sports ball
39+
kite
40+
baseball bat
41+
baseball glove
42+
skateboard
43+
surfboard
44+
tennis racket
45+
bottle
46+
???
47+
wine glass
48+
cup
49+
fork
50+
knife
51+
spoon
52+
bowl
53+
banana
54+
apple
55+
sandwich
56+
orange
57+
broccoli
58+
carrot
59+
hot dog
60+
pizza
61+
donut
62+
cake
63+
chair
64+
couch
65+
potted plant
66+
bed
67+
???
68+
dining table
69+
???
70+
???
71+
toilet
72+
???
73+
tv
74+
laptop
75+
mouse
76+
remote
77+
keyboard
78+
cell phone
79+
microwave
80+
oven
81+
toaster
82+
sink
83+
refrigerator
84+
???
85+
book
86+
clock
87+
vase
88+
scissors
89+
teddy bear
90+
hair drier
91+
toothbrush
21.8 MB
Binary file not shown.
21.8 MB
Binary file not shown.

0 commit comments

Comments
 (0)