Train a superpixel CRF from validation images. If validation images are not available, uses training images.
BK = BLOCK_TRAIN_CRF() Initializes the block with the default options.
BK = BLOCK_TRAIN_CRF(BK) Executes the block with options and inputs BK.
Required inputs:
- db
The database.
- segloc
The unary potentials, in the form output by BLOCK_TEST_SEGLOC()
- histq
Superpixel histograms.
- qseg
Quick shift superpixels.
Options:
- bk.method
The training method. Valid methods are: static, gridsearch. Default 'gridsearch'.
- bk.goal
The training goal to optimize. Valid goals are: meanacc, intersection-union. Default 'intersection-union'.
- bk.luv
Should the color difference be in the LUV space? Default 1.
- bk.max_images
If there are more than max_images in the validation or training data, select max_images and use those. Default 1000.
Fetchable attributes:
- params
The learned parameters of the CRF.
- paramspace
A structure containing the parameters tried at each iteration.