Skip to content

CLI Trainer Application

Preparation

Before training the Image Targets, you must prepare the images in digital format. The available formats are

  • .jpg/jpeg
  • .png
  • .bmp

A good Image Target will have certain visual features that enables accurate pose estimation and stable tracking :

Properties Explanation
Distinctive pattern Texture with many distinctive visual features (e.g. corners, blobs)
Rich texture Texture with rich visual features all over the image without empty regions
No repetitive pattern Textures with no similar patterns repeating in space
High contrast Image with high contrast
Non-reflective Print on a matte surface that will not reflect light when printed

Single Image target training

Single image target training requires 3 arguments:

  • Output directory
  • Input configuration (e.g. ImageTargetTrainingConfig.json)
  • Input image file

ImageTargetTrainingConfig.json

{
  "Config.Target.Name": "VARIMG_000",
  "Config.Target.Type": "Image",
  "Object.Physical.Width": 0.297,
  "Object.Physical.Height": 0.198
}
The physical size of the image needs to be defined in meters

Batch image target training

Batch image target training requires 3 arguments:

  • -B to enable batch training
  • Output directory
  • Input batch configuration (e.g. BatchImageTargetTrainingConfig.json)

BatchImageTargetTrainingConfig.json

{
  "Batch.Target.Name" : "BatchImage",
  "Batch.Image.Path": "../images/",
  "Batch.Image.Files" : ["IMG_000.png", "second_image.png", "third.jpeg"],
  "Batch.Config.File" : "../TrainingConfig_Batch.json"
}
This sample configuration will generate 3 image targets with the names BatchImage_00000, BatchImage_00001 and BatchImage_00002

TrainingConfig_Batch.json

{
  "Config.Target.Type": "Image",
  "Object.Physical.Width": 0.297,
  "Object.Physical.Height": 0.198
}
The physical size of the image needs to be defined in meters

Back to top