From ac00b9063955f578bc14b74fd359b71b24204f84 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Fri, 6 Mar 2020 11:21:52 +0100 Subject: [PATCH] Add license header --- .gitlab-ci.yml | 26 +++++++++++++++++ .../Protocol_1.py | 26 +++++++++++++++++ .../icassp2020_domain_guided_pruning/batl.py | 25 +++++++++++++++++ .../deep_pix_bis.py | 26 +++++++++++++++++ .../deep_pix_bis_features.py | 26 +++++++++++++++++ .../icassp2020_domain_guided_pruning/dev.py | 26 +++++++++++++++++ .../estimator.py | 26 +++++++++++++++++ .../icassp2020_domain_guided_pruning/eval.py | 26 +++++++++++++++++ .../face_normalizer_drop_120.py | 26 +++++++++++++++++ .../face_video_224.py | 26 +++++++++++++++++ .../feature_divergence.py | 26 +++++++++++++++++ .../filters_multiply_batl.py | 26 +++++++++++++++++ .../filters_multiply_ijbc.py | 26 +++++++++++++++++ .../filters_multiply_replaymobile.py | 26 +++++++++++++++++ .../filters_multiply_swan.py | 26 +++++++++++++++++ .../find_filters.py | 26 +++++++++++++++++ .../grandtest.py | 26 +++++++++++++++++ .../grandtest_color_50_PrintReplay.py | 26 +++++++++++++++++ .../icassp2020_domain_guided_pruning/ijbc.py | 26 +++++++++++++++++ .../input_fn.py | 27 +++++++++++++++++- .../load_data_with_normalizer.py | 26 +++++++++++++++++ .../load_data_without_normalizer.py | 26 +++++++++++++++++ .../oulunpu.py | 26 +++++++++++++++++ .../pad_p2_face_f1.py | 26 +++++++++++++++++ .../pad_video_predictions.py | 26 +++++++++++++++++ .../prepare_ijbc_images.py | 26 +++++++++++++++++ .../replaymobile.py | 26 +++++++++++++++++ .../icassp2020_domain_guided_pruning/swan.py | 26 +++++++++++++++++ .../icassp2020_domain_guided_pruning/train.py | 26 +++++++++++++++++ .../train_dev_eval.py | 26 +++++++++++++++++ .../transforms.py | 26 +++++++++++++++++ download_all.py | 26 +++++++++++++++++ evaluate.sh | 26 +++++++++++++++++ run_part1.sh | 26 +++++++++++++++++ run_part2.sh | 26 +++++++++++++++++ run_part3.sh | 27 ++++++++++++++++++ setup.py | 28 ++++++++++++++++++- 37 files changed, 963 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1445b8..f7fc43a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + test: variables: CONDA_ENVS_PATH: "conda-env" diff --git a/bob/paper/icassp2020_domain_guided_pruning/Protocol_1.py b/bob/paper/icassp2020_domain_guided_pruning/Protocol_1.py index ac95737..f9de866 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/Protocol_1.py +++ b/bob/paper/icassp2020_domain_guided_pruning/Protocol_1.py @@ -1,2 +1,28 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + protocol = "Protocol_1" database.protocol = protocol diff --git a/bob/paper/icassp2020_domain_guided_pruning/batl.py b/bob/paper/icassp2020_domain_guided_pruning/batl.py index d90a664..c0e5954 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/batl.py +++ b/bob/paper/icassp2020_domain_guided_pruning/batl.py @@ -1,3 +1,28 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. """ BATL Db is a database for face PAD experiments. """ diff --git a/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis.py b/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis.py index 62ec2e2..bac7e0e 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis.py +++ b/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.extension import rc model_dir = "results/deep_pix_bis" diff --git a/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis_features.py b/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis_features.py index ff8baf8..a92b8d6 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis_features.py +++ b/bob/paper/icassp2020_domain_guided_pruning/deep_pix_bis_features.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import tensorflow as tf from bob.learn.tensorflow.models.densenet import DeepPixBiS diff --git a/bob/paper/icassp2020_domain_guided_pruning/dev.py b/bob/paper/icassp2020_domain_guided_pruning/dev.py index 2635871..8bc60a0 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/dev.py +++ b/bob/paper/icassp2020_domain_guided_pruning/dev.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + try: groups except NameError: diff --git a/bob/paper/icassp2020_domain_guided_pruning/estimator.py b/bob/paper/icassp2020_domain_guided_pruning/estimator.py index 43b9b87..f67e8f1 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/estimator.py +++ b/bob/paper/icassp2020_domain_guided_pruning/estimator.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.extension import rc from bob.learn.tensorflow.models.densenet import DeepPixBiS from bob.learn.tensorflow.utils.reproducible import set_seed diff --git a/bob/paper/icassp2020_domain_guided_pruning/eval.py b/bob/paper/icassp2020_domain_guided_pruning/eval.py index 8d47f14..4636cc2 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/eval.py +++ b/bob/paper/icassp2020_domain_guided_pruning/eval.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + try: groups except NameError: diff --git a/bob/paper/icassp2020_domain_guided_pruning/face_normalizer_drop_120.py b/bob/paper/icassp2020_domain_guided_pruning/face_normalizer_drop_120.py index 8a6df46..50e4aa7 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/face_normalizer_drop_120.py +++ b/bob/paper/icassp2020_domain_guided_pruning/face_normalizer_drop_120.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.pad.face.utils import min_face_size_normalizer from functools import partial diff --git a/bob/paper/icassp2020_domain_guided_pruning/face_video_224.py b/bob/paper/icassp2020_domain_guided_pruning/face_video_224.py index 0e4d086..493a1a5 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/face_video_224.py +++ b/bob/paper/icassp2020_domain_guided_pruning/face_video_224.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.bio.face.preprocessor import FaceCrop from bob.bio.video.preprocessor import Wrapper from bob.bio.video import FrameSelector diff --git a/bob/paper/icassp2020_domain_guided_pruning/feature_divergence.py b/bob/paper/icassp2020_domain_guided_pruning/feature_divergence.py index a92ab3a..936d45b 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/feature_divergence.py +++ b/bob/paper/icassp2020_domain_guided_pruning/feature_divergence.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import tensorflow as tf import numpy as np import os diff --git a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_batl.py b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_batl.py index b6dfd4e..4354342 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_batl.py +++ b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_batl.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import numpy as np filters_multiply = np.load("results/filters/oulunpu_vs_batl.npy") model_dir = "results/deep_pix_bis_pruned_by_batl" diff --git a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_ijbc.py b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_ijbc.py index 92a0573..a7a1820 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_ijbc.py +++ b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_ijbc.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import numpy as np filters_multiply = np.load("results/filters/oulunpu_vs_ijbc.npy") model_dir = "results/deep_pix_bis_pruned_by_ijbc" diff --git a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_replaymobile.py b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_replaymobile.py index 91c40f8..3d1e94c 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_replaymobile.py +++ b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_replaymobile.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import numpy as np filters_multiply = np.load("results/filters/oulunpu_vs_replaymobile.npy") model_dir = "results/deep_pix_bis_pruned_by_replaymobile" diff --git a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_swan.py b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_swan.py index ce3661d..50fb91a 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_swan.py +++ b/bob/paper/icassp2020_domain_guided_pruning/filters_multiply_swan.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import numpy as np filters_multiply = np.load("results/filters/oulunpu_vs_swan.npy") model_dir = "results/deep_pix_bis_pruned_by_swan" diff --git a/bob/paper/icassp2020_domain_guided_pruning/find_filters.py b/bob/paper/icassp2020_domain_guided_pruning/find_filters.py index 2516f9c..25f5321 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/find_filters.py +++ b/bob/paper/icassp2020_domain_guided_pruning/find_filters.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import numpy as np import os import click diff --git a/bob/paper/icassp2020_domain_guided_pruning/grandtest.py b/bob/paper/icassp2020_domain_guided_pruning/grandtest.py index cf6057f..1fb695e 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/grandtest.py +++ b/bob/paper/icassp2020_domain_guided_pruning/grandtest.py @@ -1,2 +1,28 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + protocol = "grandtest" database.protocol = protocol diff --git a/bob/paper/icassp2020_domain_guided_pruning/grandtest_color_50_PrintReplay.py b/bob/paper/icassp2020_domain_guided_pruning/grandtest_color_50_PrintReplay.py index 1b406c8..20d1598 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/grandtest_color_50_PrintReplay.py +++ b/bob/paper/icassp2020_domain_guided_pruning/grandtest_color_50_PrintReplay.py @@ -1,2 +1,28 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + protocol = "grandtest-color-50-PrintReplay" database.protocol = protocol diff --git a/bob/paper/icassp2020_domain_guided_pruning/ijbc.py b/bob/paper/icassp2020_domain_guided_pruning/ijbc.py index cf4e9a9..b1e0b45 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/ijbc.py +++ b/bob/paper/icassp2020_domain_guided_pruning/ijbc.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.extension import rc from bob.pad.base.database import PadDatabase, PadFile from glob import glob diff --git a/bob/paper/icassp2020_domain_guided_pruning/input_fn.py b/bob/paper/icassp2020_domain_guided_pruning/input_fn.py index ab31f06..8905af0 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/input_fn.py +++ b/bob/paper/icassp2020_domain_guided_pruning/input_fn.py @@ -1,4 +1,29 @@ -# coding: utf-8 +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from .transforms import ( deep_pix_pre_transform, deep_pix_train_transform, diff --git a/bob/paper/icassp2020_domain_guided_pruning/load_data_with_normalizer.py b/bob/paper/icassp2020_domain_guided_pruning/load_data_with_normalizer.py index c415f4c..108e4e0 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/load_data_with_normalizer.py +++ b/bob/paper/icassp2020_domain_guided_pruning/load_data_with_normalizer.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.pad.face.utils import the_giant_video_loader from functools import partial from .face_video_224 import cropper diff --git a/bob/paper/icassp2020_domain_guided_pruning/load_data_without_normalizer.py b/bob/paper/icassp2020_domain_guided_pruning/load_data_without_normalizer.py index 91d44e3..d13069c 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/load_data_without_normalizer.py +++ b/bob/paper/icassp2020_domain_guided_pruning/load_data_without_normalizer.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.pad.face.utils import the_giant_video_loader from functools import partial from .face_video_224 import cropper diff --git a/bob/paper/icassp2020_domain_guided_pruning/oulunpu.py b/bob/paper/icassp2020_domain_guided_pruning/oulunpu.py index d99d051..e8e35bb 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/oulunpu.py +++ b/bob/paper/icassp2020_domain_guided_pruning/oulunpu.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.db.oulunpu.config import database from bob.extension import rc diff --git a/bob/paper/icassp2020_domain_guided_pruning/pad_p2_face_f1.py b/bob/paper/icassp2020_domain_guided_pruning/pad_p2_face_f1.py index caa2ffb..35045d3 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/pad_p2_face_f1.py +++ b/bob/paper/icassp2020_domain_guided_pruning/pad_p2_face_f1.py @@ -1,2 +1,28 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + protocol = "pad_p2_face_f1" database.protocol = protocol diff --git a/bob/paper/icassp2020_domain_guided_pruning/pad_video_predictions.py b/bob/paper/icassp2020_domain_guided_pruning/pad_video_predictions.py index 683f35a..b11c673 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/pad_video_predictions.py +++ b/bob/paper/icassp2020_domain_guided_pruning/pad_video_predictions.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.pad.base.algorithm import VideoPredictions from bob.bio.base.preprocessor import CallablePreprocessor from bob.bio.base.extractor import CallableExtractor diff --git a/bob/paper/icassp2020_domain_guided_pruning/prepare_ijbc_images.py b/bob/paper/icassp2020_domain_guided_pruning/prepare_ijbc_images.py index 1e7b4ee..2d35124 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/prepare_ijbc_images.py +++ b/bob/paper/icassp2020_domain_guided_pruning/prepare_ijbc_images.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import click diff --git a/bob/paper/icassp2020_domain_guided_pruning/replaymobile.py b/bob/paper/icassp2020_domain_guided_pruning/replaymobile.py index 23e2573..747e52e 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/replaymobile.py +++ b/bob/paper/icassp2020_domain_guided_pruning/replaymobile.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.pad.face.config.replay_mobile import database from bob.extension import rc diff --git a/bob/paper/icassp2020_domain_guided_pruning/swan.py b/bob/paper/icassp2020_domain_guided_pruning/swan.py index e92391a..01b6987 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/swan.py +++ b/bob/paper/icassp2020_domain_guided_pruning/swan.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.db.swan.config_pad_video import database diff --git a/bob/paper/icassp2020_domain_guided_pruning/train.py b/bob/paper/icassp2020_domain_guided_pruning/train.py index e3d8d53..4f7406b 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/train.py +++ b/bob/paper/icassp2020_domain_guided_pruning/train.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + try: groups except NameError: diff --git a/bob/paper/icassp2020_domain_guided_pruning/train_dev_eval.py b/bob/paper/icassp2020_domain_guided_pruning/train_dev_eval.py index 595ce9b..52a0658 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/train_dev_eval.py +++ b/bob/paper/icassp2020_domain_guided_pruning/train_dev_eval.py @@ -1 +1,27 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + groups = ["train", "dev", "eval"] diff --git a/bob/paper/icassp2020_domain_guided_pruning/transforms.py b/bob/paper/icassp2020_domain_guided_pruning/transforms.py index 3480c71..8cc8799 100644 --- a/bob/paper/icassp2020_domain_guided_pruning/transforms.py +++ b/bob/paper/icassp2020_domain_guided_pruning/transforms.py @@ -1,3 +1,29 @@ +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + import tensorflow as tf from bob.learn.tensorflow.utils import to_channels_last diff --git a/download_all.py b/download_all.py index 028126d..bd4c4aa 100755 --- a/download_all.py +++ b/download_all.py @@ -1,5 +1,31 @@ #!/usr/bin/env python +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from bob.extension.download import download_and_unzip import os diff --git a/evaluate.sh b/evaluate.sh index b0f717e..812430e 100755 --- a/evaluate.sh +++ b/evaluate.sh @@ -1,5 +1,31 @@ #!/bin/bash +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + set -ex databases=(oulunpu replaymobile swan batl) diff --git a/run_part1.sh b/run_part1.sh index f8079cb..cc8a95f 100755 --- a/run_part1.sh +++ b/run_part1.sh @@ -1,5 +1,31 @@ #!/bin/bash +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + # The experiments are done in 3 stages: # 1. Caching where all the face PAD datasets are cached for faster training and evaluation in future. # 2. Training deep_pix_bis on oulunpu diff --git a/run_part2.sh b/run_part2.sh index bc9a701..a626f88 100755 --- a/run_part2.sh +++ b/run_part2.sh @@ -1,5 +1,31 @@ #!/bin/bash +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + # The experiments are done in 3 stages: # 1. Caching where all the face PAD datasets are cached for faster training and evaluation in future. # 2. Training deep_pix_bis on oulunpu diff --git a/run_part3.sh b/run_part3.sh index e9a3480..c4c788d 100755 --- a/run_part3.sh +++ b/run_part3.sh @@ -1,5 +1,32 @@ #!/bin/bash +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + + # The experiments are done in 3 stages: # 1. Caching where all the face PAD datasets are cached for faster training and evaluation in future. # 2. Training deep_pix_bis on oulunpu diff --git a/setup.py b/setup.py index 3785800..a6ed13e 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,31 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- + +# bob.paper.icassp2020_domain_guided_pruning is part of the signal-processing +# and machine learning toolbox Bob_. It contains the instruction to reproduce +# the following paper: +# +# A. Mohammadi, S. Bhattacharjee, and S. Marcel, +# “Domain Adaptation For Generalization Of Face Presentation Attack Detection +# In Mobile Settings With Minimal Information,†presented at ICASSP 2020. +# +# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/ +# Written by Amir Mohammadi <amir.mohammadi@idiap.ch> +# +# This file is part of bob.paper.icassp2020_domain_guided_pruning. +# +# bob.paper.icassp2020_domain_guided_pruning is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License version 3 as published by the Free Software Foundation. +# +# bob.paper.icassp2020_domain_guided_pruning 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 +# bob.paper.icassp2020_domain_guided_pruning. If not, see +# <http://www.gnu.org/licenses/>. + from setuptools import setup, dist -- GitLab