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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Now run the Mobilenet V2 computer vision model, using [executorch/examples/arm/r

Observe that the FVP loads the model file, compiles the PyTorch model to ExecuTorch `.pte` format and then shows an instruction count in the top right of the GUI:

![Terminal and FVP output#center](./Terminal%20and%20FVP%20Output.jpg "Terminal and FVP output")
![Terminal and FVP output#center](./terminal_and_fvp_output.jpg "Terminal and FVP output")

{{% notice Note %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ Before you start coding, here are some useful tips:
1. Navigate to **File** > **New** > **New Project**.

2. Select **Empty Views Activity** in the **Phone and Tablet** gallery as Figure 1 shows, then select **Next**.
![Empty Views Activity.png alt-text#center](images/2/empty%20project.png "Figure 1: Select Empty Views Activity.")
![Empty Views Activity.png alt-text#center](images/2/empty_project.png "Figure 1: Select Empty Views Activity.")

3. Choose a project name, and select the default configurations as Figure 2 shows.

Make sure that the **Language** field is set to **Kotlin**, and the **Build configuration language** field is set to **Kotlin DSL**.
![Project configuration.png alt-text#center](images/2/project%20config.png "Figure 2: Project Configuration.")
![Project configuration.png alt-text#center](images/2/project_config.png "Figure 2: Project Configuration.")

## Add CameraX dependencies

Expand All @@ -45,7 +45,7 @@ Before you start coding, here are some useful tips:

2. Once the project is synced, navigate to `libs.versions.toml` in your project's root directory. See Figure 3. This file serves as the version catalog for all dependencies that the project uses.

![Version Catalog.png alt-text#center](images/2/dependency%20version%20catalog.png "Figure 3: Version Catalog.")
![Version Catalog.png alt-text#center](./images/2/dependency_version_catalog.png "Figure 3: Version Catalog.")

{{% notice Info %}}

Expand Down Expand Up @@ -88,20 +88,20 @@ camera-view = { group = "androidx.camera", name = "camera-view", version.ref = "

2. You should see that a notification appears. See Figure 4. Click **Sync Now** to sync your project.

![Gradle sync.png alt-text#center](images/2/gradle%20sync.png "Figure 4: Gradle Sync.")
![Gradle sync.png alt-text#center](images/2/gradle_sync.png "Figure 4: Gradle Sync.")

{{% notice Tip %}}

You can also click the **Sync Project with Gradle Files** button in the toolbar, or enter the corresponding shortcut to start a sync.

![Sync Project with Gradle Files](images/2/sync%20project%20with%20gradle%20files.png)
![Sync Project with Gradle Files](images/2/sync_project_with_gradle_files.png)
{{% /notice %}}

3. Navigate to the `MainActivity.kt` source file and make the changes that Figure 5 shows in the View Binding screenshot.

This inflates the layout file into a view binding object, and stores it in a member variable within the view controller for easier access later.

![view binding alt-text#center](images/2/view%20binding.png "Figure 5: View Binding.")
![view binding alt-text#center](images/2/view_binding.png "Figure 5: View Binding.")

## Configure CameraX preview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ See the previous section [Set up the Development Environment](../2-app-scaffoldi

2. Now you should see both model asset bundles in your `assets` directory, as shown below:

![model asset bundles](images/4/model%20asset%20bundles.png)
![model asset bundles](images/4/model_asset_bundles.png)

3. You are ready to import MediaPipe's Face Landmark Detection and Gesture Recognizer into the project.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,5 +366,5 @@ class GestureOverlayView(context: Context?, attrs: AttributeSet?) :

4. Build and run the app again. Now you should see face and gesture overlays on top of the camera preview as shown below. Good job!

![overlay views alt-text#center](images/6/overlay%20views.png "Figure 7: Face and Gesture Overlays.")
![overlay views alt-text#center](images/6/overlay_views.png "Figure 7: Face and Gesture Overlays.")

Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ This makes sure each of the three parallel `launch` code sections run in its own
5. Build and run the app again.
Now you should see two switches on the bottom of the screen as shown below, which turn on and off while you smile and show thumb-up gestures. Good job!

![indicator UI alt-text#center](images/7/indicator%20ui.png "Figure 8: Indicator UI.")
![indicator UI alt-text#center](images/7/indicator_ui.png "Figure 8: Indicator UI.")

## Recap on SharedFlow vs StateFlow

Expand Down
Binary file added content/migration/arm-migration-overview.png
Binary file added content/migration/bottom-up.png
Binary file added content/migration/top-down.png
Loading