Training¶
Contents
Once some observations are stored in the database, models can be built from them.
Config File¶
Training, just like recognition, requires a configuration file but it usually only contains one cell that defines a pipeline that reads data from the database and computes a model. Then again, nothing prevents you to train several models at the same time by executing several pipelines.
Use¶
Just run the training.py script in /apps
. It requires a configuration file through the -c
option. Some of the
options in there can be overriden through the command line for convenience. Change the following parameters to your needs:
- the
object_ids
should be the list of object ids you want to train on. If you want, you can also use object_names,that are more human readable. object_ids is of the form [“6b3de86feee4e840280b4caad90003fb”] but there are two special options: if it is “all”, then all models are recomputed; if it is “missing”, only the missing models are computed.
The training script can be run as follow:
rosrun object_recognition_core training \ -c `rospack find object_recognition_tod`/conf/training.ork \ --visualize
You can choose whatever configuration file; a few are provided in object_recognition_server/conf
.
A typical command line session might look like:
% apps/training -c config_training.txt --commit
Prepare G2O: processing image 65/65
Performing full BA:
iteration= 0 chi2= 168324165740673896546304.000000 time= 39.2803 cumTime= 39.2803 lambda= 154861.907021 edges= 64563 schur= 1
Persisted
Command Line Interface¶
No module named PySide.QtCore
usage: training [-h] [-c CONFIG_FILE] [--visualize] [--commit]
optional arguments:
-h, --help show this help message and exit
-c CONFIG_FILE, --config_file CONFIG_FILE
Config file
--visualize If set and the pipeline supports it, it will display
some windows with temporary results
--commit Commit the data to the database.