Object3D Target Training
General information about Object 3D Target tracking can be found here.
Preparation
Before training Object3D targets, prepare an object file consisting of the target's geometry and its texture in one of the following formats:
- .gltf (GLTF2 format)
- .glb (GLB2 format)
- .obj (Wavefront OBJ format)
Note
Some formats reference the object´s texture as a separate file. In that case, only the geometry file needs to be specified as an argument, since the texture is referenced internally.
Warning
Object3D target training supports a single mesh with one texture. If your 3D file has multiple meshes and textures it is recommended to bake the geometry and the textures accordingly.
Object3D target training
TRACK-Trainer-Native.exe object3d --help
Usage: object3d [-h] --name VAR [--output VAR] --path VAR --physicalSize VAR [--views VAR] [--upVector VAR...] [--exportModel]
performs object3d target training
Optional arguments:
-h, --help shows help message and exits
-v, --version prints version information and exits
--name name of the trained target [required]
--output path where to save the trained target [default: "./"]
--path path to the object file [required]
--physicalSize physical height of the object (in meter) [required]
--views whether to generate views from all directions ('sphere') or only from the upper hemisphere ('hemisphere') [default: "hemisphere"]
--upVector up vector of the object model [nargs: 3] [default: {0 0 1}]
--forwardVector forward vector of the object model [nargs: 3] [default: {0 1 0}]
--exportModel generates an .obj file of the model for visualization next to the .track file
TRACK-Trainer-Native.exe object3d --name ObjectTarget --path .\Object.obj --physicalSize 1.0 --output .\ObjectTarget
--views hemisphere
--upVector 0 0 1
--forwardVector 0 1 0
Copyright (C) 2023 VIRNECT CO., LTD.
All rights reserved.
The following parameters can be set for Object3D target training:
name
Name of the target following the naming convention mentioned here.path
Path to the object file, e.g. ".\Object.obj" if the file is in the same folder as the Trainer CLIphysicalSize
Physical height of the object in meters, used to compute the conversion factor between the abstract units of the 3D object file and the physical sizes of the real object. The size is needed so that depth estimation can be accurate. If the physical size specified during training differs from the actual physical size of the target, the virtual distance to the target will not match the real distance.output
Optional output path, must be a directory, e.g. ".\Targets\"views
Influences the directions from which the target will be detectable/trackable: either "hemisphere" (for standing objects that are only looked at from the side and above) or "sphere" (for objects looked at from all directions)upVector
The unit vector in the object's abstract coordinates that will be used to determine which side of the object is its topforwardVector
The unit vector in the object's abstract coordinates that will be used to determine which side of the object is its frontexportModel
Exports the model of the object as an .obj file that's placed in the output path next to the .track file. This can be used to improve the visualization during tracking, as described below.
Visualization
Info
By default, Object3D targets are visualized with their axis-aligned bounding boxes:
Tip
If the target file was trained with the --exportModel
option, an .obj file with the name of the target will be exported as well.
If this .obj file is present next to the .track file, the original model is used for visualization instead: