Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions android/example_app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
NNFW_EXT_LIBRARY_PATH=src/main/jni/nnfw/ext
SNPE_EXT_LIBRARY_PATH=src/main/jni/snpe/lib/ext

org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4000m
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,29 @@
## Prequisite

- To run this sample, copy nnstreamer-api library file (nnstreamer-YYYY-MM-DD.aar) into 'libs' directory.
- For image classification, user should turn on MXNet option.
<img src="https://user-images.githubusercontent.com/81565280/173046787-ded3aa1e-6815-41d2-b61b-b9616371a5a7.png" width="200" height="400"/>
- [How to build NNStreamer for Android](https://github.com/nnstreamer/nnstreamer/tree/master/api/android)

## Introduction

This is a simple example to show how to use NNStreamer APIs and Android Camera API to utilize the style transfer model.
1. This is a simple example to show how to use NNStreamer APIs and Android Camera API to utilize the style transfer model. (tflite model)

- The topmost view is the preview image of the camera.
- The bottom view shows style transferred image of the camera input.
- The applied style changes after several seconds.

2. This is a simple example to show how to use NNStreamer APIs and Android Camera API to utilize the image classification model. (MXNet model)

- The topmost view is the preview image of the camera.
- The bottom view shows the camera input and its classification result on the screen together.
- The applied classification results change directly as the camera screen changes.

## Screenshot

1.
![styletransfer_nnstreamer_screenshot](./styletransfer_nnstreamer_screenshot.webp)

2.
<img src="https://user-images.githubusercontent.com/81565280/173046757-ff4c989a-bf12-4212-87a6-e583ab79506c.png" width="200" height="400"/>

Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:extractNativeLibs="true"
android:allowBackup="true"
android:extractNativeLibs="true"
android:icon="@drawable/nnsuite_logo"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".TFLiteActivity"
android:exported="false" />
<activity
android:name=".MXNetActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
Loading