Search by Tags

Partner Demo Container - XNOR.ai AI2GO Object Detector Demo

 
Article updated at 04 Oct 2019
Subscribe for this article updates

XNOR.ai

XNOR.ai develop state-of-the-art on-device AI solutions that enable business to real-time decisions, deliver more efficient experiences to customers.

XNOR.ai AI2GO Object Detector Demo

torizonextras/arm64v8-ai2go Partner Demo Image comes with the Object Detector demo that use the AI2GO Detection models.

Supported Modules

The following Computer on Modules are supported:

Supported Cameras

Supported Displays

  • HDMI (1920x1080)

While you can use a wide variety of displays and monitors, additional configuration may be required for a specific setup.

A section in the end of this guide provide instructions about display and touch screen configuration.

How to Get Started

This section provides instructions for you to quickly get started with torizonextras/arm64v8-ai2go.

For this demo you will need a camera for image capture and an HDMI screen.

Demo Architecture

This demonstration requires two containers for its operation. The container with the AI2GO object detection application and the container with a graphic composer, as the AI2GO application will display the captured video with bound boxes to highlight the detected objects:


  • Torizon AI2GO Container Demo Architecture

    Torizon AI2GO Container Demo Architecture

Another important note is that in order to facilitate the detection model change, AI2GO has several models that can be downloaded, libxnornet.so, detection model file, will have to be stored on the Torizon Core host outside the container. The AI2GO application container will have the model file path shared between the host.

Docker Compose

For organization and correct start order of the containers we recommend using Docker Compose:

version: '3'
services:
  weston:
    image: torizonextras/arm64v8-weston-kiosk
    volumes: 
      - /dev:/dev
      - /tmp:/tmp
    privileged: true
  ai2go:
    depends_on: 
      - weston
    image: torizonextras/arm64v8-ai2go
    command: /dev/video0
    volumes:
      - /dev:/dev
      - /tmp:/tmp
      - /home/torizon/:/xnor
    privileged: true
    restart: on-failure

Create or copy the file above with the same content and the name "docker-compose.yaml" on the board running Torizon.

Using The torizonextras/arm64v8-ai2go XNOR.ai AI2GO Object Detector Demo

Pull

To pull the container images use the below command on the root folder where the docker-compose.yml file is located on the board:

# docker-compose pull

Shared Model Library

Download any detection model from the AI2GO for Toradex Boards and copy to the your board:

$ scp libxnornet.so torizon@your_ip:/home/torizon

Warning: make sure you copy the model libxnornet.so file to the /home/torizon folder.

Warning: change the "your_ip" on the command above for the IP address from your Apalis iMX8 board.

Run the Demo

To run the demo use the below command on the root folder where the docker-compose.yml file is located on the board:

# docker-compose up

You should see the following screen with real-time video captured from the camera with the bound boxes:


  • XNOR.ai AI2GO Demo running

    XNOR.ai AI2GO Demo running

In the screenshot above we are using the face detection model.

Next Steps

For more information about the Docker image, Dockerfile, and the source code for this demo see our repo: https://gitlab.int.toradex.com/ma/demos/ai2go-imx8

Display and Touchscreen Configuration

Displays and Monitors used in Embedded Systems are available in a myriad of configuration possibilities - resistive, capacitive or without touch, single or multi touch, different resolution, density of pixels, pin-out and clock frequency are some examples.

To make things easy for you, Toradex provides specific instructions on how to use its display offerings as well as comprehensive information about how to interface your custom display or monitor to Toradex modules.

You can configure a specific display using the easy to use Torizon device tree overlays container:

Release Notes

This release notes are strictly related to the test of the torizonextras/arm64v8-ai2go in Toradex hardware. They are not related to the XNOR.ai releases.

0.0.1

  • Initial release
  • Using arm32v7 lib and container