Create an AI app to classify photos in mit app inventor


Image Classification in app inventor

Previously, we saw how to use the capabilities of the App Inventor to take advantage of the features and capabilities of modern devices such as text to speech and GPS.

Today we are going to learn about a new way we can create AI applications and Image Classification.

LookExtension is an extension for mit app inventor that enables the creation of artificial intelligence programs that use machine learning to enable smart and mobile devices to classify images on the app.



Create an Artificial intelligence Image Classification app

The extension in mit app inventor is a set of rules and blocks that are not part of the main program but can be imported from an external source to enable us to create applications with Image Classification capability.


mit app inventor App Objectives

  • Using the mit app inventor LookExtension extension and using it to build an Android application to identify and classify images through machine learning.


App Tools


Tool #1: Button

PaletteUser Interface

NameButton1

Use: Pressed to take pictures by the phone's camera or smart device to identify and classify them.


 

Tool #2: Label

PaletteUser Interface

NameLabel1

Use: Show the rating information of the captured image after it has been recognized.


Tool #3: Label

PaletteUser Interface

NameLabel1

Use: Show program status.


Tool #4: HorizontalArrangement

PaletteLayout

NameHorizontalArrangement1

Use: Arrange the components on the screen horizontally.


Tool #5: WebViewer

PaletteInterface User

NameWebViewer1

Use: It has the LookExtension extension and provides an internet connection.


Tool #6: LookExtension 

PaletteExtension

NameLook1

Use: The external extension is responsible for image recognition and classification.


Adjust mit app inventor tool properties

Tool: Button1

Action: Deactivate the Enabled property of the button from the Properties panel.


Tool: Look1

Action: 

  • Download the LookExtension extension from this link.
  • Then upload it within the application via the Import Extension command in the Extension panel.
  • Setting: Link the Look1 extension to the tool (WebViewer1) via the Properties panel.


Steps

start app inventor with a new project,  use add screen button on designer view to insert multiple screens in the project.


image-classification-screen

App Blocks


image-classification-blocks


App Preview

  1. Choose Al companion command from the Connect menu.
  2. Point the phone's camera at the code that will appear on the screen and press the (Scan QR code) button to launch the app on the phone.
  3. Point the camera of the phone or smart device towards the thing you want to identify and then press the Scan button in the app so that the name of the thing appears in the result title and its degree of recognition, try that with many items.


App Video




Comments