# This file illustrates how to train the AWGM
# model. Since no training data is supplied with this
# package, the example doesn't run as is, but illustrates
# how to set up the training files and how to call
# the train program.

# The file data/train_img_list contains
# a sample command-input file for the train program.
# The first line in train_img_list specifies
# the number of training images. 
# Then, each line below contains two entries. 
# The first entry is the
# filename of the training image which must be a
# matlab .mat file with the image in the variable 'img'.
# The second entry is the filename of the mask file
# corresponding to the training image. The mask file
# is also a .mat file containing a variable 'mask'
# that is 1 over the support of the object and zero else.

# given the training file, you might first want to
# back up the original training information:

     #    cd ..
     #    mv tree_dat tree_dat_org
     #    mkdir tree_dat

# NOTE: There must be a tree_dat subdirectory before
# calling train!

# Now run the training form the AWGM directory:
 
     #    bin/train EXAMPLE/data/train_img_list

# After completion, the new training info will be in 
# tree_dat/clust*. You can delete the files 
# tree_dat/train* tree_dat/prune*

