diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1445b824c5b12d0537e0ef85805f4c56a7beb2a..f7fc43abb15afa22a20619011e4888464f30ea6f 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 ac95737adcbf270a12db04204ed2dac4d5075628..f9de86698d069ee2833657158c18177e726624f6 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 d90a664da7f4ef6da522f50c7c341706af5454a6..c0e59541bb4eaeb0c7ab1cb56707a436fca36b6e 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 62ec2e201b1b8a036fbe7d6127ee366d9fc1cf48..bac7e0e6823970853b533dcf4bb114247886cbfc 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 ff8baf8a3cce95321610a3b5a00d18621ed5f5a4..a92b8d66b793502fb658b6aa8b9ba6663f7876a8 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 263587176627cc118f2a38f2e9aee12de16662e0..8bc60a051119a3a6bf57828f384c465745fa1bba 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 43b9b87fed9c062f4102a265a9bcd732396563c9..f67e8f1cd81cd3d20b0288dbabcd4f1db822aab2 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 8d47f14ecb1a3fb846cf7bdb976545f2f8bc23ae..4636cc24ccb4402c6b663ca2a8b0fd446c183104 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 8a6df464477544d2385f8151d0941e904f511754..50e4aa727805cb60a0443c7e87c027a42effeaa4 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 0e4d086287496f1827cd1adde227d2f3c49c8476..493a1a57655ae172c91cea4e3d2ab3ab9c49dedc 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 a92ab3afc4c4e098205358fd8b5ea9da8edb92b5..936d45bd2267c093c5b71a19598c51fa3537a50a 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 b6dfd4edf9f8281f65b463539850156eb2a8fb9d..4354342f0edca8142e58aa8babf5231c4d17bd81 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 92a05732f88f8a008801676b9447213d16af2852..a7a182038c85f8d12238070fa2473b3ca4a60578 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 91c40f86ecd195c12fa192faca7d4c7fde6247f8..3d1e94cfbc97c0740e84bc69addad80b2c7e7e3e 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 ce3661d7eb21eddee24c82bc3b61cb5b52f7b533..50fb91a485cd2b6676062064bf0788b811ac4dc1 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 2516f9c9441fee6d7340b4400529e663a5da71d5..25f53216249d87b0382f8b2a24391db32d0f9967 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 cf6057fdf60679f77e39ca82e60f6d7ba285f2c6..1fb695ec8e1ff149667bfc3d87b7d80671fa3d6b 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 1b406c8077fbf51794dd45b693423281e2cdb899..20d1598e0ba722536722236c7318e6626d3be9ee 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 cf4e9a9ea49bc4f21a21162228f87499c1794491..b1e0b450812484cfcf513a71608cb8846cec8aa2 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 ab31f0691ba462a1fdefe4e6b97e9a229cd27179..8905af01bf501f8448f7082d218dafcc29936039 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 c415f4c7e5cf795442adc42e1e506132f80918d6..108e4e033dec6bf4126d52926086960281c27173 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 91d44e319a311c3253747d5a35e1b3dca25e2e9a..d13069c93f647f026767f7a54ac371b3e8cbde14 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 d99d051f7ae193b623b54c10bf4702ef7eba10c0..e8e35bb8d2d1d67e4549e9029400f0cab211e393 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 caa2ffb3868250e1c841631af25af7c73a3bd057..35045d36e5c27e98ab144428be4e72edf57044c4 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 683f35a1bf721f20a656fa1f74ab267d3e58a9a0..b11c673fc8b1f101a8a61adfb5afaed7b4b87c7c 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 1e7b4ee3e4360190b9fdedd9f16827c02a655e75..2d35124c0c86d66b6ce26e8781da46770b013998 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 23e2573319457cd15c9fccc9e56025c4aa1d5b4e..747e52ee8c7829bc371b6a4865573d1fe1f6749c 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 e92391aeefbf06c08084f1730dd3eac5b81f7368..01b69872e45f3eea035ba1c7f14eb3b1cf1aa0f6 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 e3d8d539dbf2edd0bff59e7bc971963462e26506..4f7406bfedcf28a7731c59ef95822d88a053f2d3 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 595ce9bf050be5f281e1f0cbdef3b344cecbae74..52a0658eae34997ff8d9bf03bd447289f2b1637b 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 3480c71a07e7e3b1a46ec93ff7e4465abf15c2cd..8cc8799d3c104107e4eed4ff1b718b503d12da9e 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 028126d73979f63795bb7a21f72bde07c6e857f6..bd4c4aa175b53d44d94d8fa681103411abf470f8 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 b0f717eec19666b1c3b2ab1fd99dfd35759c2cff..812430e63ac2344eee503472cea341bca7d0ebcb 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 f8079cb2c8c4bde5c9505cb14e586feea29ed20e..cc8a95fa6e01d0854b3f30b8de99b269112e429e 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 bc9a701b169b2dfdf5ba873a59a8f0ca7ed214df..a626f88e3f1bb90270c703a7411538d7e3da27af 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 e9a3480fef62e8ca5f4721a66755e21fc9b7a46a..c4c788d2399ad7790d4bfbd8e666fb647c4fb9e6 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 37858002ecb536d7a8b6dc29d74f9cf8ddd912f0..a6ed13e7cd2d9ea2d7bd81728f9454598d62a7a2 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