-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into crt_memory
- Loading branch information
Showing
599 changed files
with
18,499 additions
and
6,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
/app/src/main/jni/jni_helper_func.h | ||
/app/src/main/jni/org_apache_tvm_native_c_api.cc | ||
/app/src/main/jni/org_apache_tvm_native_c_api.h | ||
/app/src/main/obj/ | ||
gradle/ | ||
app/src/main/assets/models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[//]: # Licensed to the Apache Software Foundation (ASF) under one | ||
[//]: # or more contributor license agreements. See the NOTICE file | ||
[//]: # distributed with this work for additional information | ||
[//]: # regarding copyright ownership. The ASF licenses this file | ||
[//]: # to you under the Apache License, Version 2.0 (the | ||
[//]: # "License"); you may not use this file except in compliance | ||
[//]: # with the License. You may obtain a copy of the License at | ||
[//]: # | ||
[//]: # http://www.apache.org/licenses/LICENSE-2.0 | ||
[//]: # | ||
[//]: # Unless required by applicable law or agreed to in writing, | ||
[//]: # software distributed under the License is distributed on an | ||
[//]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
[//]: # KIND, either express or implied. See the License for the | ||
[//]: # specific language governing permissions and limitations | ||
[//]: # under the License. | ||
|
||
Android Camera Demo Sample App | ||
============================== | ||
|
||
The Android Camera Demo Sample App provides a basic implementation of an Android | ||
app that uses the tvm runtime to perform image classification in real time. | ||
|
||
Converting Models | ||
----------------- | ||
|
||
The `models/prepare_models.py` script provides a example flow for dumping model | ||
parameter files for use by the app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
apply plugin: 'com.android.application' | ||
|
||
task buildJni(type: Exec, description: 'Build JNI libs') { | ||
commandLine 'sh', 'src/main/jni/build.sh' | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
//compileTask -> compileTask.dependsOn buildJni | ||
} | ||
|
||
android { | ||
compileSdkVersion 29 | ||
defaultConfig { | ||
applicationId "ml.apache.tvm.android.androidcamerademo" | ||
minSdkVersion 24 | ||
targetSdkVersion 29 | ||
renderscriptTargetApi 18 | ||
renderscriptSupportModeEnabled true | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
sourceSets { | ||
main { | ||
jni.srcDirs = [] | ||
jniLibs.srcDirs = ['src/main/libs'] | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
buildToolsVersion = '29.0.3' | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', { | ||
exclude group: 'com.android.support', module: 'support-annotations' | ||
}) | ||
implementation 'androidx.appcompat:appcompat:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
implementation 'com.google.android.material:material:1.1.0' | ||
implementation 'org.apache.tvm:tvm4j-core:0.0.1-SNAPSHOT' | ||
testImplementation 'junit:junit:4.13' | ||
|
||
implementation("androidx.concurrent:concurrent-futures:1.0.0") | ||
implementation "androidx.camera:camera-core:1.0.0-beta01" | ||
implementation "androidx.camera:camera-camera2:1.0.0-beta01" | ||
// If you want to use the CameraX View class | ||
implementation "androidx.camera:camera-view:1.0.0-alpha08" | ||
// If you want to use the CameraX Extensions library | ||
implementation "androidx.camera:camera-extensions:1.0.0-alpha08" | ||
// If you want to use the CameraX Lifecycle library | ||
implementation "androidx.camera:camera-lifecycle:1.0.0-beta01" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="org.apache.tvm.android.androidcamerademo"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme" | ||
tools:ignore="AllowBackup,MissingApplicationIcon"> | ||
<activity | ||
android:name="org.apache.tvm.android.androidcamerademo.MainActivity" | ||
android:label="@string/app_name" | ||
android:screenOrientation="portrait" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
tools:ignore="LockedOrientationActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<provider | ||
android:name="androidx.core.content.FileProvider" | ||
android:authorities="${applicationId}.provider" | ||
android:exported="false" | ||
android:grantUriPermissions="true"> | ||
<meta-data | ||
android:name="android.support.FILE_PROVIDER_PATHS" | ||
android:resource="@xml/provider_paths" /> | ||
</provider> | ||
</application> | ||
</manifest> |
Oops, something went wrong.