biometrics/openbr — pull request #37 by sklum (2013-03-29 18:21:07+00:00)
Title: Cross validation and comparison splits

This update adds a few useful functionalities and improves performance of cross validation.

1. If you have an algorithm with multiple distinct feature representations and you'd like to see their performance individually without enrolling images multiple times, you can now add a split parameter to the simmat in the form of "test%1.mtx[split=[44, 266]]". In this example, templates are split into multiple templates containing 44 matrices per template in the first partition and 266 matrices in the second partition. The output of an operation like br -algorithm models/templatetest -path img/ -compare sigset/forensic_photos_test_0.xml sigset/forensic_sketches_test_0.xml "test%1.mtx[split=[44, 266]]" will be two simmat files: test0.mtx and test1.mtx. For those who are curious, this is useful for testing the component based face representations.

2. To facilitate 1, the File::set function has been updated to accept lists of strings, floats/ints, points of the form (x,y), or rects of the form (w,x,y,z). If you need to convert a string of this format to a point or a rect, relevant code has been added in QtUtils (also you can convert a variant that is either a point or a rect to a string of this format). Furthermore, there is now a File::getList to retrieve this form of file metadata.

3. Cross validation now supports enrolling an extended gallery across all partitions. To do this, simply set a parameter "allPartitions=true" in the relavant sigset. This will cause multiple masks to be created of the form 0.mask 1.mask etc. to be created.

4. Already committed but worth noting is that there is a new distance called Metadata, that will filter the gallery based on values of keys specified. For example, if you had sigsets with parameters Age, GENDER, and RACE, you can filter the gallery using these fields by saying Metadata[Age,GENDER,RACE].