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.
Get an Advanced Model Target by training one or more Model Targets in the Model Target Generator (MTG). In contrast to standard Model Targets, training Model Targets uploads your 3D models to the Vuforia Cloud for the deep learning training process. See Data Processing for details.
The Vuforia Unity Model Target sample presents the NASA Viking lander and a scaled 1:18 toy model of the Polaris RZR XP 1000, which can be acquired for testing, e.g. on Amazon. The lander can be 3D printed by following the printing instructions in the 3D Printing Instructions for the Viking Mars Lander page. The sample package is available on Vuforia’s website in the Downloads section under the Samples tab or from Unity's Asset Store.
The Model Target Generator (MTG)
Use the Model Target Generator to create a Model Target with an Advanced View and then submit it as a training set and export the Advanced Model Target Database. See the Model Target Generator User Guide to set up a Model Target.
Multiple Objects and Multiple Advanced Views - One Database
An Advanced Model Target Database can accommodate many use cases of which, perhaps the most common, is a single Model Target with an Advanced View.
But the database could also look like this:
- Single Model Target with multiple configured Advanced Views.
- Multiple Model Targets, each with one or more Advanced Views.
NOTE: Simultaneous tracking of multiple Model Target is not supported. An Advanced Model Target Database with multiple Model Targets will automatically switch tracking between targets depending on which Model Target is the most visible in the camera view.
Objects should look different
When you use an Advanced Model Target Database with multiple Model Targets, Vuforia Engine automatically distinguishes and tracks between the real-life objects purely by their visual appearance. All your Model Targets in the database must therefore look different from each other. If you have multiple targets that have a similar shape (for example two cars) you will need to make sure that each can be well distinguished from the other (a car and a convertible version of that car would likely be distinctive enough).
An advanced database with multiple Model Targets made from a single 3D model should be avoided. This also applies if one Model Target is the whole object, and another is a part of that same object. Consider a motor block that is a Model Target by itself, but also present in a Model Target of the car model with the hood open. Both targets 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. Alternatively, you could set up the Advanced Views for the car so that they do not include the motor block (e.g. by setting the Target Extent to exclude it).
NOTE: The 3D 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.
Advanced Views
Only Model Targets with at least one Advanced View can be a part of an advanced database. Therefore, make sure to create them using the Create Advanced View in the Model Target Generator. Four different Advanced View options are available. See Configuring Advanced Views for details.
An Advanced View is defined as a recognition range, a Target Extent, and in some cases a User Volume. Depending on your use case and size of the object, one or more Advanced Views can be created to track a single Model Target. See Combining Advanced Views for more information.
TIP: You can always go back and replace an already created Guide View with an Advanced View and then submit it as an Advanced Model Target.
Please see the article on Guide Views for general information on Guide Views
Creating an Advanced Model Target Database
- Start the Model Target Generator. Create or open a Model Target project.
- Go to the tab Guide View and select Create Advanced View. If you created a Model Target with a normal Guide View, you can delete it and add an Advanced View from with one of the presented options.
- After an Advanced View is added, click Generate Advanced Model Target to create a new training session with one or more Model Targets. Alternatively, the Advanced Model Target Database from the Create button can also be used to create a training session.
- Fill out the Training Session Name, and optionally enter a Description. The database is then created in the Training Sets column in the Home Screen.
- In the new window, a list will show of your Model Targets projects that can be trained.
- Add the Model Targets you wish to have in the database by checking its checkbox, 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 or set up correctly. In that case, go back to the Model Targets tab, double-click on the Model Target, review it, and then click the Generate Advanced 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 afterwards, any databases that contain it will not be automatically updated.
In this case, go back to the model and configure recognition ranges for all Guide Views. - We recommend adding no more than 10-20 objects to a single database, depending on the number of Advanced Views you have defined for each object. If you have a large number of Advanced Views per object, you should try and keep the number of objects per database smaller, to get better results.
- 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 afterwards, any databases that contain it will not be automatically updated.
- Click Add Model Targets. You will return to the Home Screen where the training set is listed on the right-side panel.
Realistic and Non-Realistic shouldn’t be trained together
There is one more aspect to consider while adding Model Targets to your database; the Appearance Mode. Model Targets should only be put together when their Coloring is either Realistic or Non-realistic. If Model Targets with mixed appearances are in the training set a warning will show if the MTG detects inconsistencies.
We recommend assigning Model Targets into separate databases if some of them originate from a scan and others don‘t.
- From the Home Screen, press Train found next to the database you have created.
To help improve our software products, you can allow PTC to securely store and test your CAD models used for Model Target training by checking the Allow PTC to test CAD data checkbox.
Please see Model Target Generator Data Processing for more information.
- Conclude the setup and start the training process by pressing Train. It may take a few minutes until a status or time remaining indicator appear. The entire training process may take a while (2+ hours, depending on how many models are in your database). You may quit the MTG without affecting the training session.
Exporting the Trained Database
Review your training set both during and after the training process by double-clicking on the database name. The training quota only gets affected upon the successful export of the training result.
- Once training is complete, an Export button appears next to the database on the Home Screen. Click Export to save the Advanced Model Target Database to the local hard drive.
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 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.:
Usually, training fails for one of the following reasons:
- The 3D 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. Or see the Simplification tool.
- 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 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.
- A 3D model and its Advanced View does not have enough features or edges to reliably allow robust recognition and tracking.
- An object with rotational symmetry can cause the training to fail for Advanced Model Targets with 360-degree detection range.
If you encounter a different problem, or if you have any other questions or issues, you can make a support request via the MTG by clicking the Support button found in your user account icon.
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 your environment and create from the dataset a Model Target Observer. For further information, refer to the Model Targets API Overview.
Testing with the Test Application
Test your advanced database on the Android Model Target Test App. Simply load the two dataset 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 dataset files are 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.