Skip to content

Commit e3b93ee

Browse files
committed
Adding aambav0.01
- [x] updated readme file.added instructions to setup the project. - [x] Adding the base tensorflow example app to build on v0.01 - [x] Updated gradle to latest version - [x] Adding sample APK iunder Data/ReadyToUse-APK folder - [x] run build is successful :) - [x] rebuilt to just be sure 🍕
1 parent 4af7b0f commit e3b93ee

File tree

73 files changed

+4180
-62
lines changed

Some content is hidden

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

73 files changed

+4180
-62
lines changed

.gitignore

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,13 @@
1-
# Built application files
2-
*.apk
3-
*.ap_
4-
5-
# Files for the ART/Dalvik VM
6-
*.dex
7-
8-
# Java class files
9-
*.class
10-
11-
# Generated files
12-
bin/
13-
gen/
14-
out/
15-
16-
# Gradle files
17-
.gradle/
18-
build/
19-
20-
# Local configuration file (sdk path, etc)
21-
local.properties
22-
23-
# Proguard folder generated by Eclipse
24-
proguard/
25-
26-
# Log Files
27-
*.log
28-
29-
# Android Studio Navigation editor temp files
30-
.navigation/
31-
32-
# Android Studio captures folder
33-
captures/
34-
35-
# IntelliJ
361
*.iml
37-
.idea/workspace.xml
38-
.idea/tasks.xml
39-
.idea/gradle.xml
40-
.idea/assetWizardSettings.xml
41-
.idea/dictionaries
42-
.idea/libraries
43-
.idea/caches
44-
45-
# Keystore files
46-
# Uncomment the following line if you do not want to check your keystore files in.
47-
#*.jks
48-
49-
# External native build folder generated in Android Studio 2.2 and later
2+
.gradle
3+
/local.properties
4+
/.idea/libraries
5+
/.idea/modules.xml
6+
/.idea/workspace.xml
7+
.DS_Store
8+
/build
9+
/captures
5010
.externalNativeBuild
5111

52-
# Google Services (e.g. APIs or Firebase)
53-
google-services.json
54-
55-
# Freeline
56-
freeline.py
57-
freeline/
58-
freeline_project_description.json
59-
60-
# fastlane
61-
fastlane/report.xml
62-
fastlane/Preview.html
63-
fastlane/screenshots
64-
fastlane/test_output
65-
fastlane/readme.md
12+
/.gradle/
13+
/.idea/

Data/ReadyToUse-APK/aambav0.01.apk

10.1 MB
Binary file not shown.

Data/ReadyToUse-APK/output.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug"},"path":"app-debug.apk","properties":{}}]

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,25 @@
55
# The Aamba Project
66

77
An Object Detection Android App for visually challenged people.
8+
The app uses Tensorflow lite as backend. The machine learning model used is
9+
is MobileNet SSD trained on the famous COCO dataset. You do not have to do anything to download these pretrained models
10+
, the gradle script handles it for you.
811

912
---
1013

14+
# How to build it yourself
15+
16+
* Clone this repository to your local device.
17+
* Make sure you have latest Android Studio.
18+
* Open Android Studio, and from the Welcome screen, select Open an existing Android Studio project. Select this cloned folder.
19+
* Let the Android studio download it's gradle if it is your first time running the app in Studio.
20+
* (if error occurs then rebuild using build>rebuild)
21+
* Make sure your android device is connected.
22+
23+
# Model used
24+
25+
http://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
26+
1127
# Docs
1228

1329
Coming soon. :)

aamba.apk renamed to app.apk

File renamed without changes.

app/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build
2+
/build/

app/build.gradle

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'de.undercouch.download'
3+
4+
android {
5+
compileSdkVersion 28
6+
buildToolsVersion '28.0.3'
7+
defaultConfig {
8+
applicationId "org.tensorflow.lite.examples.detection"
9+
minSdkVersion 21
10+
targetSdkVersion 21
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
aaptOptions {
21+
noCompress "tflite"
22+
}
23+
compileOptions {
24+
sourceCompatibility = '1.8'
25+
targetCompatibility = '1.8'
26+
}
27+
}
28+
29+
// import DownloadModels task
30+
project.ext.ASSET_DIR = projectDir.toString() + '/src/main/assets'
31+
project.ext.TMP_DIR = project.buildDir.toString() + '/downloads'
32+
33+
// Download default models; if you wish to use your own models then
34+
// place them in the "assets" directory and comment out this line.
35+
//apply from: "download_model.gradle"
36+
37+
apply from:'download_model.gradle'
38+
39+
dependencies {
40+
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
41+
implementation 'androidx.appcompat:appcompat:1.0.0'
42+
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'
43+
implementation 'com.google.android.material:material:1.0.0'
44+
implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
45+
}

app/download_model.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
task downloadZipFile(type: Download) {
3+
src 'http://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip'
4+
dest new File(buildDir, 'zips/')
5+
overwrite true
6+
}
7+
8+
9+
task downloadAndUnzipFile(dependsOn: downloadZipFile, type: Copy) {
10+
from zipTree(downloadZipFile.dest)
11+
into project.ext.ASSET_DIR
12+
}
13+
14+
15+
task extractModels(type: Copy) {
16+
dependsOn downloadAndUnzipFile
17+
}
18+
19+
tasks.whenTaskAdded { task ->
20+
if (task.name == 'assembleDebug') {
21+
task.dependsOn 'extractModels'
22+
}
23+
if (task.name == 'assembleRelease') {
24+
task.dependsOn 'extractModels'
25+
}
26+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
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

app/src/main/AndroidManifest.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="org.tensorflow.lite.examples.detection">
3+
4+
<uses-sdk />
5+
6+
<uses-permission android:name="android.permission.CAMERA" />
7+
8+
<uses-feature android:name="android.hardware.camera" />
9+
<uses-feature android:name="android.hardware.camera.autofocus" />
10+
11+
<application
12+
android:allowBackup="false"
13+
android:icon="@drawable/ic_launcher"
14+
android:label="@string/app_name"
15+
android:roundIcon="@drawable/ic_launcher"
16+
android:supportsRtl="true"
17+
android:theme="@style/AppTheme">
18+
19+
<activity
20+
android:name=".DetectorActivity"
21+
android:label="@string/activity_name_detection"
22+
android:screenOrientation="portrait">
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN" />
25+
<category android:name="android.intent.category.LAUNCHER" />
26+
</intent-filter>
27+
</activity>
28+
29+
</application>
30+
</manifest>

0 commit comments

Comments
 (0)