File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
dl3/android/DeepLabV3Demo Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -6,23 +6,34 @@ This guide explains how to setup ExecuTorch for Android using a demo app. The ap
66* Download and install [ Android Studio and SDK 34] ( https://developer.android.com/studio ) .
77* (For exporting the DL3 model) Python 3.10+ with ` executorch ` package installed.
88
9- ## Exporting the model
9+ ## Step 1: Export the model
1010Run the script in ` dl3/python/export.py ` to export the model.
1111
12- ## Push the model to the phone
12+ ## Step 2: Push the model to the phone
1313The app loads a hardcoded model path (` /data/local/tmp/dl3_xnnpack_fp32.pte ` ) on the phone.
1414Run the following adb command to push the model.
1515```
1616adb push dl3_xnnpack_fp32.pte /data/local/tmp/dl3_xnnpack_fp32.pte
1717```
1818
19- ## Build and install to your phone
20- (` cd dl3/android/DeepLanV3Demo ` first)
19+ ## Step 3: Build, install, and run the app on your phone
20+ ### On your terminal
21+ (` cd dl3/android/DeepLabV3Demo ` first)
2122```
2223./gradlew installDebug
24+ adb shell am start -W -S -n org.pytorch.executorchexamples.dl3/.MainActivity
2325```
2426
25- ## Run unit test
27+ ### On Android Studio
28+ Open Android Studio and open the project path ` dl3/android/DeepLanV3Demo ` . Wait for gradle sync to complete.
29+ Then simply press "Run app" button (Control + r).
30+
31+ ## Step 4: Run unit test
32+ ### On your terminal
2633```
2734./gradlew connectedAndroidTest
2835```
36+
37+ ### On Android Studio
38+ In Android Studio project, open file ` app/src/androidTest/java/org/pytorch/executorchexamples/dl3/SanityCheck.java ` ,
39+ and click the "Play" button for ` public class SanityCheck ` (Control + Shift + r).
You can’t perform that action at this time.
0 commit comments