@@ -0,0 +1,2884 @@
+# PyVision License%0A#%0A# Copyright (c) 2006-2008 David S. Bolme%0A# All rights reserved.%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modification, are permitted provided that the following conditions%0A# are met:%0A# %0A# 1. Redistributions of source code must retain the above copyright%0A# notice, this list of conditions and the following disclaimer.%0A# %0A# 2. Redistributions in binary form must reproduce the above copyright%0A# notice, this list of conditions and the following disclaimer in the%0A# documentation and/or other materials provided with the distribution.%0A# %0A# 3. Neither name of copyright holders nor the names of its contributors%0A# may be used to endorse or promote products derived from this software%0A# without specific prior written permission.%0A# %0A# %0A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A# %60%60AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A# A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR%0A# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,%0A# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,%0A# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR%0A# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF%0A# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING%0A# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS%0A# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A'''%0ACreated on Jan 14, 2011%0A%0A@author: bolme%0A%0AConvert a simple sigset into a comma sep value file.  Does not currently support complex sigests.%0A'''%0A#import pyvision as pv%0Aimport pyvision.analysis.FaceAnalysis.BEE as bee%0Aimport optparse%0Aimport csv%0A%0A%0A%0Adef parseOptions():%0A    usage = %22usage: %25prog %5Boptions%5D %3Cinput.xml%3E %3Coutput.csv%3E%22%0A    parser = optparse.OptionParser(usage)%0A    #parser.add_option(%22-v%22, %22--verbose%22,%0A    #                  action=%22store_true%22, dest=%22verbose%22,%0A    #                  help=%22Turn on more verbose output.%22)%0A    (options, args) = parser.parse_args()%0A    %0A    if len(args) != 2:%0A        parser.error(%22This program requires two arguments: an input sigest and an output csv file.%22)%0A%0A    return options, args%0A%0A%0A%0Aif __name__ == '__main__':%0A    options,args = parseOptions()%0A%0A    sigset = bee.parseSigSet(args%5B0%5D)%0A    %0A    rows = %5B%5D%0A    header = %5B%22sub_id%22,%22rec_id%22,%22filename%22,%22modality%22,%22file_format%22%5D%0A    rows.append(header)%0A    for each in sigset:%0A        sub_id = each%5B0%5D%0A        rec_id = each%5B1%5D%5B0%5D%5B'name'%5D%0A        filename = each%5B1%5D%5B0%5D%5B'file-name'%5D%0A        modality = each%5B1%5D%5B0%5D%5B'modality'%5D%0A        file_format = each%5B1%5D%5B0%5D%5B'file-format'%5D%0A        row = %5Bsub_id,rec_id,filename,modality,file_format%5D%0A        rows.append(row)%0A%0A    f = csv.writer(open(args%5B1%5D,'wb'))%0A    f.writerows(rows)%0A    %0A    %0A    %0A

Adding a utility that converts a BEE sigset to CSV file.