Training Base Creation

Description: A guide to creating a training base suitable for textured object recognition from a prerecorded bag.

Tutorial Level:

Assumptions

You should have bags with at least the following messages, synchronized.

  • camera_info
  • image
  • points2

It is also assumed that you have a fiducial marker that is rigidly attached to your training objects.

Get Data

You may find bags that are well suited to this tutorial here: http://vault.willowgarage.com/wgdata1/vol1/tod_kinect_bags/training

For the tutorial you should download bags to $WORK/bags.

WORK=/tmp
mkdir -p $WORK/bags
cd $WORK/bags

The following lines will download these bags to your /tmp directory. Beware that they are on the order of 1 gigabyte in size each.

BAG_URL=http://vault.willowgarage.com/wgdata1/vol1/tod_kinect_bags/training
wget $BAG_URL/fiducial.yml
wget $BAG_URL/config.yaml
wget $BAG_URL/config.txt
wget $BAG_URL/features.config.yaml
wget $BAG_URL/README
wget $BAG_URL/campbells_chicken_noodle.bag
wget $BAG_URL/campbells_chicken_noodle.tf.bag
wget $BAG_URL/downy.bag
wget $BAG_URL/downy.tf.bag
wget $BAG_URL/fluorescent_paint.bag
wget $BAG_URL/fluorescent_paint.tf.bag
wget $BAG_URL/odwalla_lime.bag
wget $BAG_URL/odwalla_lime.tf.bag
wget $BAG_URL/silk.bag
wget $BAG_URL/silk.tf.bag
wget $BAG_URL/teas_tea.bag
wget $BAG_URL/teas_tea.tf.bag
wget $BAG_URL/tide.bag
wget $BAG_URL/tide.tf.bag
wget $BAG_URL/tilex.bag
wget $BAG_URL/tilex.tf.bag

dump_all

After those have downloaded you will want to dump them all to disk.

Create a directory for the base to live in.

mkdir $WORK/base

Now run the the dump all script, this will take some time to complete:

rosrun tod_training dump_all.py $WORK/bags $WORK/base

config files

These configurations files are needed for training. The fiducial.yml describes the fiducial marker that is seen in the training data. features.config.yaml describes the feature detection parameters used for training. THe config.yaml, and config.txt are necessary for detection.

cp $WORK/bags/fiducial.yml $WORK/base
cp $WORK/bags/features.config.yaml $WORK/base
cp $WORK/bags/config.* $WORK/base

Tod works well when the features.config.yaml contains:

%YAML:1.0
# FeatureExtractionParams
feature_extraction_params:
   detector_type: ORB
   extractor_type: ORB
   descriptor_type: ORB
   detector_params:
      max_features: 5000.
      min_features: 5000.
      threshold: 200.
   extractor_params:
      octaves: 3.

Make sure to complete the list of objects in config.txt you want to include in your training base.

train_all.sh

cd $WORK/base
rosrun tod_training train_all.sh

Wiki: tod_training/Tutorials/BaseCreation (last edited 2011-06-17 22:24:45 by VincentRabaud)