Model Target Test App User Guide

Vuforia Image

Vuforia Engine provides the Model Targets Test app to assist in evaluating Model Targets. This application is distributed as a precompiled Android APK package that you can install on your own device.

Model Targets Test App

The Model Targets Test App (vuforia-unity-android-modeltargetstest-X-Y-Z.apk) is intended:

  • to allow developers to quickly evaluate the capabilities of the Model Target detection and tracking feature of Vuforia Engine, 
  • to enable developers to test if their custom Model Targets can be tracked and detected with good performance,
  • to allow developers to quickly evaluate the functionality of Model Targets with multiple objects and/or multiple Guide Views in Vuforia Engine, and 
  • to enable developers to test if their custom Model Targets with multiple objects and/or multiple Guide Views can be recognized, tracked, and detected with good performance.

It comes with a built-in Model Target dataset containing multiple objects (NASA Viking Lander and KTM Duke motorbike), each with multiple Guide Views. It also allows you to load your own trained Model Target dataset containing multiple objects and/or multiple Guide Views from the device's SD card.

A 3D model of the Viking Lander that is suitable for 3D printing is distributed along with the Model Target Native Sample. See Printing and Assembling the Viking Lander for more information. You can purchase a scale model of the KTM Duke motorbike online (search for "1:12 Scale KTM 1190 RC8 Diecast Model Motorcycle").

Installing the app

You can install the app *.apk on a device by connecting the device to a PC with a USB cable, and then using the Android Debug Bridge (ADB).

  1. Connect the device to the developer desktop environment using a USB cable.

  2. Open a Cygwin bash shell or Windows Command Line and execute:
    adb devices
    you will see:

    List of devices attached
    [ID] device

    If the device list is empty, or a given device is not listed, kill the ADB server by executing:
    adb kill-server

  3. To install the application, navigate to the folder containing the downloaded APK (in our example, C:\Temp) and install APK using adb:
    $ cd /cygdrive/c/temp
    $ adb install thisIsTheAPKName.apk

As an alternative approach, you can copy the APK to your device's Download folder and install it from a File Manager application directly on the device.

Testing the example CAD object

The test app includes a preinstalled Model Target dataset. This dataset includes the NASA Viking Lander, which is available as a free download from NASA's website. You will need to make a 3D print of this model if you want to try it yourself. For more information, see Printing and Assembling the Viking Lander.

Note that it is important that the scale of the 3D-printed object matches the scale of the Model Target. Please do not change the size of the 3D object when 3D printing!

Vuforia Image

When running the Model Targets Test App, it does not immediately draw a Guide View. Instead, it prompts you to move your device around so that it can find an object in its trained dataset:

Screenshot of the Model Targets with Advanced Recognition Test App showing no guide view but a prompt that reads

Once it recognizes such an object, it will draw the corresponding Guide View. As you continue to move your device around, the Guide View may change - this will happen if another object comes into view, or if you point your device at the same object but from a different side (to activate a different Guide View on the same object).

Vuforia Image

In all cases, the Guide View shows how the object needs to appear in the camera frame if you want to start tracking it. Move your device until the Guide View overlaps the object as closely as possible and tracking will begin.

An outline rendering of the object indicates that it is being detected and tracked correctly. You can adjust the width of the rendered outline using the slider:

Screenshot of the Model Targets Test App showing an outline being drawn over the tracked object, and a slider labelled

Loading your own datasets onto the device

If you have a custom Model Target dataset (created using the Model Target Generator) that you would like to test, you can transfer it onto your device's storage and then load it at runtime from inside one the test apps.

A Model Target dataset consists of two files:

  • <YourDatasetName>.xml
  • <YourDatasetName>.dat

If the Model Targets Test app has not yet been started, you will need to create the parent directory manually:

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData

To make a dataset visible to the apps, upload the two dataset files onto the device storage by copying them into the following directory, as you created, for the Model Targets Test App:

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/YourDatasetName/

For best results, create this directory before starting the test app.

Example

If you want to test “SomeDataSet” with the Model Targets Test App, copy the .xml and .dat files to the following locations:

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/SomeDataSet/SomeDataSet.dat

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/SomeDataSet/SomeDataSet.xml

If your Android device is connected via USB, you can copy the files using adb push. Assuming SomeDataSet.xml and SomeDataSet.dat are in a subfolder of the current directory called SomeDataSet, you would use the following command:

adb push SomeDataSet

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/

The following diagram shows the resulting folder hierarchy:

  • /sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/
    • ModelTargetData/
      • SomeDataSet/
        • SomeDataSet.dat
        • SomeDataSet.xml
      • AnotherDataSet/
        • AnotherDataSet.dat
        • AnotherDataSet.xml

Selecting and loading a dataset

At runtime, you can double-tap the screen to open the Options menu. Select a dataset from the list to load it for tracking.

Vuforia Image

Once you click a dataset, a loading progress dialog will appear. On completion, the new Guide View will be displayed if you have loaded a single-model dataset; or the app will start searching for recognizable objects if you have loaded a trained dataset with multiple objects and/or multiple Guide Views.

Vuforia Image

For single-model datasets with multiple Guide Views, you can change the Guide View being displayed by tapping the "Cycle Guide View" option in the menu.

Learn More