Advanced Model Target Databases

Vuforia Image

Advanced Model Targets support recognition and tracking of one or more objects from all sides, all contained in a single Advanced Model Target Database. Recognition ranges can be defined up to a full 360-degrees around every object, without requiring the user to align an outline of the model with the physical object to start tracking.

All that is required is training one or more Model Targets in the Model Target Generator. In contrast to Model Targets without training the MTG uploads your 3D-model to the Vuforia Cloud for the deep learning training process.

The Vuforia sample package presents the NASA Viking lander, which can be 3D printed and tested with the 360-degree detection range. The model and printing instructions can be found on the 3D Printing Instructions for the Viking Mars Lander page. It demonstrates the Advanced Model Targets Databases and is a resource to help you get started. The sample package is available on Vuforia’s website in the Downloads section under the Samples tab.
In addition, the Vuforia Engine samples for Unity contain an Advanced Model Target of a 1:18 toy model of the Polaris RZR XP 1000, which can be easily acquired for testing, e.g. on Amazon.
 

The Model Target Generator (MTG)

Use the Model Target Generator developed by Vuforia to create Advanced Model Target Databases. It is available for Windows and macOS. It takes a CAD model as input and outputs a Vuforia Device Database. See the Model Target Generator User Guide for more information regarding installation and general information on Model Targets and Guide Views.

Multiple Objects, Multiple Guide Views for Advanced Recognition

When you use an Advanced Model Target Database containing multiple Model Targets and/or multiple Guide Views with up to 360-degree detection range, Vuforia Engine distinguishes between objects purely by their visual appearance, which means that the following additional considerations should be taken into account when selecting different objects and/or different Guide Views.

Essentially, each Guide View must look different - that is, each Guide View must be distinguishable based on appearance alone. There should be no ambiguity about which object the user is looking at, nor which Guide View corresponds to the current viewing angle and distance.

Objects should look different

All your objects must look different from each other. If you have multiple objects that have a similar shape (for example two cars) you will need to make sure that each one can be well distinguished from the other (in the car example the sedan and convertible versions would be likely distinctive enough).

NOTE: The CAD model and object should match in scale. Using an incorrect scale and measurements can result in poorer recognition and tracking . See How to Create a Model Target for more information on this topic.

Guide Views should look different and Recognition Ranges should not overlap

When setting up guide views for Advanced Model Targets, make sure to create them using the “Create Advanced View” button in the Model Target generator. This will allow you to define the recognition ranges for the view. Select a range that makes sense for your model. For objects like toys or cars a full 360-degree recognition range may be the right choice.
If your object can only be approached from specific sides (e.g. a large piece of machinery), then it makes more sense to create e.g. two Guide Views with a 90-degree recognition range for those sides.
Please see the article on Guide Views for more information.

If you create a Guide View without recognition ranges, you can always go back and add recognition ranges to each guide view before training an Advanced Model Target.

Vuforia Image

NOTE: Advanced Guide Views work best if they are created to include at least part of the silhouette of the object. Also, please note that the closer you move to the physical object, the more crucial it is that the CAD model of the object is accurate with respect to the physical object.
E.g. if you create a view focused on the motor block of a machine, but the CAD model contains a different motor, recognition will not work.

If you have multiple Guide Views, the object should look different from every viewpoint representing a Guide View. This includes the entire Recognition Range of each Guide View. There should never be any ambiguity about which Guide View corresponds to a particular viewing angle and positions. 

  • If your object is asymmetric (i.e. it looks different from all sides), you just need to make sure the Guide View angle and distance ranges do not overlap.
  • If your object is symmetric (i.e. it has some parts that appear similar to each other) you need to make sure that only one Guide View covers the symmetric part, and that every other Guide View you make looks different to the symmetric part.

In addition, if you have multiple objects in a single Advanced Model Target Database, each of the Guide Views for each object should be visually distinct.

  • Having a database where one object is a simple cube, and another object is a machine that has a large, dominant cube-shaped part should be avoided. Both objects might be confused. If you cannot avoid such situations, then you need to make sure that one of the objects has at least a distinctive appearance (logo or pattern) covering ideally most of its surface. When doing so you need to use the realistic option during training. Alternatively, you could set up the Guide Views for the machine so that they do not include its cube-shaped component (e.g. by setting the Target Extents to exclude it).

Creating a trained Model Target dataset

  1. Start the Model Target Generator
    • To create a training session, at minimum a database with a single object with one or more Advanced Views with recognition ranges is required. Such Guide Views are necessary for training the Model Target.
      If you created a Guide View without recognition ranges, you can always go back and add recognition ranges to each Guide View before training an Advanced Model Target.
  2. Navigate to the Databases tab. (If you are currently editing a single Model Target, you may need to click the return arrow first to return to the Home Screen).
Vuforia Image
  1. Click Create Database and choose a Name for the training session, optionally enter a Description, and select a Model Appearance mode:
  • Use Realistic is preferred if the CAD Models look like the real physical objects in terms of textures and colors etc. If this setting is chosen, the resulting database will only work well for objects that have the same colors, patterns, or decals like the CAD model. This mode is e.g. typically used for toys or in cases when the shape is not distinctive enough between objects. In general, using textures typically helps with recognition, if available.
  • Non-realistic should be used for cases where the CAD Model does not have realistic colors or texture. The resulting database will not look at the actual colors of the real physical objects. This mode is typically used for CAD models of industrial objects where no information of appearance is available.
Vuforia Image
  1. For every object, you want to add to the database, select a Model Target project from the list that appears, or browse to an existing .vup project via the Browse button. (If you cannot see your Model Target in the list, it is likely because it has not yet been generated. Go back to the Model Targets tab, double-click on the Model Target, and click the Generate Model Target button.)  
    • If the Guide Views of a Model Target have been created without recognition ranges, you will not be able to select the Model for training.
      In this case, go back to the model and configure recognition ranges for all Guide Views.
    • When a Model Target is added to a database, a copy is made of it in its current state. If you make any further changes to the Model Target, any databases that contain it will not be automatically updated.
    • We recommend adding no more than 10-20 objects to a single database, depending on the number of Guide Views you have defined for each object. If you have a large number of Guide Views per object, you should try and keep the number of objects per database smaller, to get better results.
    • Each object added to a single database (and each of their Guide Views) must be visually distinguishable in order to be successfully recognized at runtime. If you have similar looking objects, or if you have set up Guide Views in such a way that different looking objects appear similar from some of their Guide Views, you may have trouble getting recognition to work reliably.
Vuforia Image
  1. Click Train on the selected database on the right to start training the selected models. We use the latest Deep Learning technology to train a neural network from the selected models. This typically takes a considerate amount of time (up to several hours). After a few minutes, an estimated ETA is displayed. The process may be cancelled at any time.
  2. Once training is complete, an Export button appears. Click the button to export the trained database as a Vuforia Engine native and Unity package. The training set can be accessed both during and after the training process by double-clicking on the database. The training quota only gets affected upon successful export of the training result.

What to do if Training Fails?

If training fails, the database status will change to Failed. In addition, there may be one or more status messages in the detailed database view (underneath the list of added Model Targets) with additional information about the cause of failure. Depending on the status messages, you may want to try again or to send a support request.

Even if training does not fail completely, the training process may issue warnings about the quality of the trained data, and suggest possible fixes, e.g:

Vuforia Image

Usually, training fails for one of the following reasons:

 

If you encounter a different problem, or if you have any other questions or issues, you can make a support request via email from the Model Target Generator by clicking the Send Feedback button.

Using an Advanced Model Target Database

The Model Target Generator saves the trained database to your hard drive as .unitypackage files and .dat/.xml file pairs. See Introduction to Model Targets in Unity for a step by step guide on importing the unity package to your Unity project and how to configure a ModelTarget GameObject. If you are building a native app, load the .dat/.xml file pair into a Dataset created from the ObjectTracker. For further information, refer to the Model Targets API Overview and Model Target Native Workflow.

Testing with the Test Application

Test your advanced database on the Android Model Target Test App. Simply load the two database files to the directory of the installed test application on your Android device and test your newly generated Advanced Model Targets. The directory on your device is usually found here:

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

Once the two database files have been copied to the directory, you can run the application. Find your Advanced Model Target Database by double-tapping on the screen. A menu will appear where you may select your database from a list. The object will be outlined once recognition and tracking have begun.

Learn More

Model Targets Overview

Model Targets Supported Objects & CAD Model Best Practices

Model Target Guide View

Model Targets API Overview