Advanced Model Target Databases

Vuforia Image

With Advanced Model Target Databases in Vuforia Engine 8.3 you can enable your app to detect an object from a full 360-degree view around the physical object. As an alternative you can automatically switch between different objects and/or different Guide Views in one Advanced Model Target Database.

In order to do this, you need to train an Advanced Model Target Database 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.

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, 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 still can be well distinguished from the other (in the car example the sedan and convertible versions would be likely distinct enough).

Guide Views should look different and Recognition Ranges should not overlap

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 dataset, 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, if it is not already running. 
    • To create a training session, at minimum a database with a single object with one or more Guide Views is required. Refer to How to Create a Model Target article for this step.
  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. There are two options available:
    • Advanced allows you to train a database containing multiple Model Targets each with one or more Guide Views.
    • Advanced 360 allows you to train a single Model Target with the 360 Guide View.

    Select the Advanced option and choose a Name for the database, 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.) 
    • 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 reduced upon succesful 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, as in the following screenshot (note red text on the bottom right of the window):

Vuforia Image
Vuforia Image

Usually, training fails for one of the following reasons:

  • The CAD models are too large. Please read the section about Model Preparation and the Model Targets Supported Objects & CAD Model Best Practices, and/or reduce the number of objects in the database.
  • Some or all of the objects are visually similar, and/or they have Guide Views that make them appear visually similar, which means they cannot be visually distinguished. Refer to the guidelines above, as well as Model Targets Supported Objects & CAD Model Best Practices. You may need to edit one or more of the Guide Views' Target Recognition Range so that the visual overlap is eliminated, or remove unneeded Guide Views.
  • An object that has a rotation symmetry can cause the Advanced Model Target 360 training to fail.
  • Invalid distance ranges: For Advanced Model Target training the distance ranges can be specified manually. Make sure that they are defined in a way that the object never appears too large or too small in the image. If needed you can verify this with a mobile phone camera. For example, if an object is about 1m wide or high, it usually does not make sense to go closer than say 1m with the camera. In particular if a distance of 0m is included in the defined distance range, training will always fail. Similarly for the mentioned object, it doesn't make sense to go further away from the object than a few meters, since the object would appear too small to be recognised. In case of doubt the defaults are usually a good choice.

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 database to your disk as .unitypackage files and .dat/.xml file pairs. See Introduction to Model Targets in Unity for a step by step guide.

If you are working with Unity, import the .unitypackage into your project, then add and 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.

Learn More

Model Targets Overview

Model Targets Supported Objects & CAD Model Best Practices

Model Target Guide View

Model Targets API Overview

Getting Started with Advanced Model Target 360