Model Target Test App User Guide

Vuforia Image

Vuforia Engine provides two test applications to assist in evaluating Model Targets. The applications are distributed as precompiled Android APK packages 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; and
  • to enable developers to test if their custom Model Targets can be tracked and detected with good performance.

It comes with a built-in Model Target dataset representing the NASA Viking Lander. It also allows you to load your own Model Target dataset 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.

Model Target Advanced Recognition Test App

The Model Target Advanced Recognition Test App (vuforia-unity-android-modeltargetsadrecotest-X-Y-Z.apk) is intended:

  • to allow developers to quickly evaluate the functionality of Model Targets with multiple objects and/or multiple Guide Views in Vuforia Engine; 
  • 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 apps

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 with 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

Both of the test apps include a pre-installed Model Target dataset that 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 you run the Model Target Test App it will draw a Guide View to help you align your device with the object:

Vuforia Image

The Model Targets with Advanced Recognition Test App 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.

Screenshot from the Model Target Test App showing the guide view perfectly overlapping the physical object

An outline rendering of the object indicates that it is being detected and tracked correctly. If you are using the Model Targets with Advanced Recognition Test App, 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

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

/sdcard/Android/data/com.vuforia.unity.ModelTargetsTest/files/ModelTargetData/<YourDatasetName>/

or the following directory for the Model Target Advanced Recognition Test App:

/sdcard/Android/data/com.vuforia.samples.ModelTargetsAdRecoTest/files/ModelTargetData/<YourDatasetName>/

Example

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

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

/sdcard/Android/data/com.vuforia.unity.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.unity.ModelTargetsTest/files/ModelTargetData/

The following diagram shows the resulting folder hierarchy:

  • /sdcard/Android/data/com.vuforia.unity.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.

Screenshot of the Model Targets Test App showing an interface that allows the user to select a Target Database from files on the Android device's SD card

Once you click on a dataset, a loading progress dialog will appear. On completion, the new Guide View will be displayed if you are running the Model Targets Test App; or the app will start searching for recognizable objects if you are running the Model Targets with Advanced Recognition Test App and you have loaded a trained dataset with multiple objects and/or multiple Guide Views.

Vuforia Image

Learn More