pdfcoffee

soumyasankar99
from soumyasankar99 More from this publisher
09.05.2023 Views

Chapter 13Then you need to install Android Studio from https://developer.android.com/studio/install and an appropriate distribution of Java. In my case, I selected theAndroid Studio MacOS distribution, and installed Java via brew with the followingcommand:brew tap adoptopenjdk/openjdkbrew cask install homebrew/cask-versions/adoptopenjdk8After that you can launch the sdkmanager and install the required packages. In mycase, I decided to use the internal emulator and deploy the application on a virtualdevice emulating a Google Pixel 3 XL. The required packages are reported in Figure 3:Figure 3: Required packages to use a Google Pixel 3 XL emulatorThen start Android Studio and select Open an existing Android Studio project asshown in Figure 4:Figure 4: Opening a new Android project[ 467 ]

TensorFlow for Mobile and IoT and TensorFlow.jsOpen the Adv Manager (under the Tool menu) and follow the instructions for howto create a virtual device, as the one shown in Figure 5:Figure 5: Creating a virtual devicePretrained models in TensorFlow LiteIn many interesting use cases, it is possible to use a pretrained model that is alreadysuitable for mobile computation. This is a field of active research with new proposalscoming pretty much every month. TensorFlow Lite comes with a set of prebuiltmodels that are ready to use (https://www.tensorflow.org/lite/models/). As ofOctober 2019, these include:• Image classification: Used to identify multiple classes of objects such asplaces, plants, animals, activities, and people.• Object detection: Used to detect multiple objects with bounding boxes.• Pose estimation: Used to estimate poses with single or multiple people.• Smart reply: Used to create reply suggestions for conversational chatmessages.• Segmentations: Identifies the shape of objects together with semantic labelsfor people, places, animals, and many additional classes.• Style transfers: Used to apply artistic styles to any given image.• Text classification: Used to assign different categories to textual content.• Question and answer: Used to provide answers to questions provided byusers.[ 468 ]

Chapter 13

Then you need to install Android Studio from https://developer.android.com/

studio/install and an appropriate distribution of Java. In my case, I selected the

Android Studio MacOS distribution, and installed Java via brew with the following

command:

brew tap adoptopenjdk/openjdk

brew cask install homebrew/cask-versions/adoptopenjdk8

After that you can launch the sdkmanager and install the required packages. In my

case, I decided to use the internal emulator and deploy the application on a virtual

device emulating a Google Pixel 3 XL. The required packages are reported in Figure 3:

Figure 3: Required packages to use a Google Pixel 3 XL emulator

Then start Android Studio and select Open an existing Android Studio project as

shown in Figure 4:

Figure 4: Opening a new Android project

[ 467 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!