From 6c83367587088edc68a53f917fe1a4af4dbb8fac Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Tue, 16 Aug 2016 15:46:21 +0200 Subject: [PATCH] [many] Remove license headers --- bob/bio/base/algorithm/Algorithm.py | 14 ---------- bob/bio/base/extractor/Extractor.py | 14 ---------- bob/bio/base/extractor/Linearize.py | 14 ---------- bob/bio/base/grid.py | 14 ---------- bob/bio/base/preprocessor/Filename.py | 13 --------- bob/bio/base/preprocessor/Preprocessor.py | 14 ---------- bob/bio/base/script/collect_results.py | 15 +--------- bob/bio/base/script/evaluate.py | 34 +++++++---------------- bob/bio/base/script/fuse_scores.py | 14 ---------- bob/bio/base/script/grid_search.py | 1 + bob/bio/base/test/test_algorithms.py | 22 +++------------ bob/bio/base/test/utils.py | 14 ---------- bob/bio/base/utils/resources.py | 15 +--------- 13 files changed, 17 insertions(+), 181 deletions(-) diff --git a/bob/bio/base/algorithm/Algorithm.py b/bob/bio/base/algorithm/Algorithm.py index 6023d3df..8935d4d6 100644 --- a/bob/bio/base/algorithm/Algorithm.py +++ b/bob/bio/base/algorithm/Algorithm.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Tue Oct 2 12:12:39 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. import numpy import os diff --git a/bob/bio/base/extractor/Extractor.py b/bob/bio/base/extractor/Extractor.py index 6dd59a55..4a0dbcd8 100644 --- a/bob/bio/base/extractor/Extractor.py +++ b/bob/bio/base/extractor/Extractor.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Tue Oct 2 12:12:39 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. import os diff --git a/bob/bio/base/extractor/Linearize.py b/bob/bio/base/extractor/Linearize.py index d686bd70..be71e0fe 100644 --- a/bob/bio/base/extractor/Linearize.py +++ b/bob/bio/base/extractor/Linearize.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Fri Oct 26 17:05:40 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. from .Extractor import Extractor import numpy diff --git a/bob/bio/base/grid.py b/bob/bio/base/grid.py index a710bada..def7125b 100644 --- a/bob/bio/base/grid.py +++ b/bob/bio/base/grid.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Tue Oct 2 12:12:39 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. PREDEFINED_QUEUES = { diff --git a/bob/bio/base/preprocessor/Filename.py b/bob/bio/base/preprocessor/Filename.py index a1ab0f64..fc4c5912 100644 --- a/bob/bio/base/preprocessor/Filename.py +++ b/bob/bio/base/preprocessor/Filename.py @@ -1,18 +1,5 @@ # @date Wed May 11 12:39:37 MDT 2016 # @author Manuel Gunther <siebenkopf@googlemail.com> -# -# Copyright (c) 2016, Regents of the University of Colorado on behalf of the University of Colorado Colorado Springs. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import bob.io.base diff --git a/bob/bio/base/preprocessor/Preprocessor.py b/bob/bio/base/preprocessor/Preprocessor.py index 4203b518..268a7b7a 100644 --- a/bob/bio/base/preprocessor/Preprocessor.py +++ b/bob/bio/base/preprocessor/Preprocessor.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Tue Oct 2 12:12:39 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. import bob.io.base diff --git a/bob/bio/base/script/collect_results.py b/bob/bio/base/script/collect_results.py index b9438c0e..1aacf257 100644 --- a/bob/bio/base/script/collect_results.py +++ b/bob/bio/base/script/collect_results.py @@ -2,20 +2,7 @@ # vim: set fileencoding=utf-8 : # Manuel Guenther <manuel.guenther@idiap.ch> # Tue Jul 2 14:52:49 CEST 2013 -# -# Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. + from __future__ import print_function """ diff --git a/bob/bio/base/script/evaluate.py b/bob/bio/base/script/evaluate.py index 80f47778..a48eebf0 100644 --- a/bob/bio/base/script/evaluate.py +++ b/bob/bio/base/script/evaluate.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # Manuel Guenther <manuel.guenther@idiap.ch> # Tue Jul 2 14:52:49 CEST 2013 -# -# Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the ipyplotied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. from __future__ import print_function @@ -70,7 +56,7 @@ def command_line_arguments(command_line_parameters): parser.add_argument('-R', '--roc', help = "If given, ROC curves will be plotted into the given pdf file.") parser.add_argument('-D', '--det', help = "If given, DET curves will be plotted into the given pdf file.") parser.add_argument('-C', '--cmc', help = "If given, CMC curves will be plotted into the given pdf file.") - parser.add_argument('-E', '--epc', help = "If given, EPC curves will be plotted into the given pdf file. For this plot --eval-files is mandatory.") + parser.add_argument('-E', '--epc', help = "If given, EPC curves will be plotted into the given pdf file. For this plot --eval-files is mandatory.") parser.add_argument('--parser', default = '4column', choices = ('4column', '5column'), help="The style of the resulting score files. The default fits to the usual output of score files.") # add verbose option @@ -178,9 +164,9 @@ def _plot_cmc(cmcs, colors, labels, title, fontsize=18, position=None): pyplot.title(title) return figure - - - + + + def _plot_epc(scores_dev, scores_eval, colors, labels, title, fontsize=18, position=None): if position is None: position = 4 # open new page for current plot @@ -198,7 +184,7 @@ def _plot_epc(scores_dev, scores_eval, colors, labels, title, fontsize=18, posit pyplot.legend(loc=position, prop = {'size':fontsize}) pyplot.title(title) - return figure + return figure @@ -234,15 +220,15 @@ def main(command_line_parameters=None): # apply threshold to development set far, frr = bob.measure.farfrr(scores_dev[i][0], scores_dev[i][1], threshold) if args.criterion == 'FAR': - print("The FRR at FAR=%2.3f%% of the development set of '%s' is %2.3f%% (CAR: %2.3f%%)" % (args.far_value, args.legends[i], frr * 100., 100.*(1-frr))) - else: + print("The FRR at FAR=%2.3f%% of the development set of '%s' is %2.3f%% (CAR: %2.3f%%)" % (args.far_value, args.legends[i], frr * 100., 100.*(1-frr))) + else: print("The %s of the development set of '%s' is %2.3f%%" % (args.criterion, args.legends[i], (far + frr) * 50.)) # / 2 * 100% if args.eval_files: # apply threshold to evaluation set far, frr = bob.measure.farfrr(scores_eval[i][0], scores_eval[i][1], threshold) if args.criterion == 'FAR': print("The FRR of the evaluation set of '%s' is %2.3f%% (CAR: %2.3f%%)" % (args.legends[i], frr * 100., 100.*(1-frr))) # / 2 * 100% - else: + else: print("The HTER of the evaluation set of '%s' is %2.3f%%" % (args.legends[i], (far + frr) * 50.)) # / 2 * 100% @@ -318,10 +304,10 @@ def main(command_line_parameters=None): if args.epc: logger.info("Plotting EPC curves to file '%s'", args.epc) - + if not args.eval_files: raise ValueError("To plot the EPC curve the evaluation scores are necessary. Please, set it with the --eval-files option.") - + try: # create a multi-page PDF for the ROC curve pdf = PdfPages(args.epc) diff --git a/bob/bio/base/script/fuse_scores.py b/bob/bio/base/script/fuse_scores.py index f8b94d0a..693e6ec6 100755 --- a/bob/bio/base/script/fuse_scores.py +++ b/bob/bio/base/script/fuse_scores.py @@ -4,20 +4,6 @@ # Elie El Khoury <elie.khoury@idiap.ch> # Manuel Guenther <siebenkopf@googlemail.com> # Mon 13 Jul 11:55:34 CEST 2015 -# -# Copyright (C) 2011-2013 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. """This script fuses scores from various systems, from a score file in four or five column format. diff --git a/bob/bio/base/script/grid_search.py b/bob/bio/base/script/grid_search.py index 73287b17..ea2dc5e8 100755 --- a/bob/bio/base/script/grid_search.py +++ b/bob/bio/base/script/grid_search.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim: set fileencoding=utf-8 : # Manuel Guenther <Manuel.Guenther@idiap.ch> + from __future__ import print_function from . import verify diff --git a/bob/bio/base/test/test_algorithms.py b/bob/bio/base/test/test_algorithms.py index f479f737..1afbc7f9 100644 --- a/bob/bio/base/test/test_algorithms.py +++ b/bob/bio/base/test/test_algorithms.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Thu May 24 10:41:42 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. import os import shutil @@ -220,7 +206,7 @@ def test_lda(): def test_distance(): import scipy.spatial - + # assure that the configurations are loadable distance = bob.bio.base.load_resource("distance-cosine", "algorithm", preferred_package = 'bob.bio.base') assert isinstance(distance, bob.bio.base.algorithm.Distance) @@ -231,17 +217,17 @@ def test_distance(): assert distance.use_projected_features_for_enrollment == False assert distance.split_training_features_by_client == False assert distance.requires_enroller_training == False - + distance = bob.bio.base.algorithm.Distance( distance_function = scipy.spatial.distance.cosine, is_distance_function = True - ) + ) # compare model with probe enroll = utils.random_training_set(5, 5, 0., 255., seed=21); model = numpy.mean(distance.enroll(enroll),axis=0) probe = distance.read_probe(pkg_resources.resource_filename('bob.bio.base.test', 'data/lda_projected.hdf5')) - + reference_score = -0.1873371 assert abs(distance.score(model, probe) - reference_score) < 1e-5, "The scores differ: %3.8f, %3.8f" % (distance.score(model, probe), reference_score) diff --git a/bob/bio/base/test/utils.py b/bob/bio/base/test/utils.py index bd1a9ff1..7d757b03 100644 --- a/bob/bio/base/test/utils.py +++ b/bob/bio/base/test/utils.py @@ -2,20 +2,6 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Thu Jul 19 17:09:55 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. import numpy import os diff --git a/bob/bio/base/utils/resources.py b/bob/bio/base/utils/resources.py index 2789efe1..8be8e030 100644 --- a/bob/bio/base/utils/resources.py +++ b/bob/bio/base/utils/resources.py @@ -2,20 +2,7 @@ # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Thu Oct 25 10:05:55 CEST 2012 -# -# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. + from __future__ import print_function import imp -- GitLab