From 0578bf497e0bd864d79ba522e045f771efc97e1d Mon Sep 17 00:00:00 2001 From: Yannick DAYER <yannick.dayer@idiap.ch> Date: Wed, 21 Oct 2020 18:21:07 +0200 Subject: [PATCH] [py] Create main protocols config files, fix setup Remove some protocols in verafinger, Add some protocols in putvein and utfvp Adapt setup.py to follow new structure Fix some relative paths imports --- .../vein/config/database/protocol/__init__.py | 0 bob/bio/vein/config/database/protocol/b.py | 17 ----- .../config/database/protocol/cropped_b.py | 17 ----- .../config/database/protocol/cropped_fifty.py | 17 ----- .../vein/config/database/protocol/fifty.py | 17 ----- .../{protocol => protocol_fv3d}/central.py | 6 +- .../{protocol => protocol_fv3d}/left.py | 6 +- .../{protocol => protocol_fv3d}/right.py | 6 +- .../{protocol => protocol_fv3d}/stitched.py | 6 +- .../database/protocol_putvein/palm_lr_1.py | 26 ++++++++ .../database/protocol_putvein/palm_lr_4.py | 26 ++++++++ .../database/protocol_putvein/wrist_lr_1.py | 28 ++++++++ .../database/protocol_putvein/wrist_lr_4.py | 26 ++++++++ .../config/database/protocol_utfvp/full.py | 26 ++++++++ .../config/database/protocol_utfvp/nom.py | 28 ++++++++ .../database/protocol_utfvp/one_vs_all.py | 26 ++++++++ .../cropped_full.py | 9 ++- .../cropped_nom.py} | 9 ++- .../{protocol => protocol_verafinger}/full.py | 7 +- .../Nom.py => protocol_verafinger/nom.py} | 7 +- bob/bio/vein/script/markdet.py | 4 +- bob/bio/vein/script/view_sample.py | 4 +- bob/bio/vein/script/watershed_mask.py | 4 +- setup.py | 66 +++++++++---------- 24 files changed, 271 insertions(+), 117 deletions(-) delete mode 100644 bob/bio/vein/config/database/protocol/__init__.py delete mode 100644 bob/bio/vein/config/database/protocol/b.py delete mode 100644 bob/bio/vein/config/database/protocol/cropped_b.py delete mode 100644 bob/bio/vein/config/database/protocol/cropped_fifty.py delete mode 100644 bob/bio/vein/config/database/protocol/fifty.py rename bob/bio/vein/config/database/{protocol => protocol_fv3d}/central.py (82%) rename bob/bio/vein/config/database/{protocol => protocol_fv3d}/left.py (80%) rename bob/bio/vein/config/database/{protocol => protocol_fv3d}/right.py (80%) rename bob/bio/vein/config/database/{protocol => protocol_fv3d}/stitched.py (81%) create mode 100644 bob/bio/vein/config/database/protocol_putvein/palm_lr_1.py create mode 100644 bob/bio/vein/config/database/protocol_putvein/palm_lr_4.py create mode 100644 bob/bio/vein/config/database/protocol_putvein/wrist_lr_1.py create mode 100644 bob/bio/vein/config/database/protocol_putvein/wrist_lr_4.py create mode 100644 bob/bio/vein/config/database/protocol_utfvp/full.py create mode 100644 bob/bio/vein/config/database/protocol_utfvp/nom.py create mode 100644 bob/bio/vein/config/database/protocol_utfvp/one_vs_all.py rename bob/bio/vein/config/database/{protocol => protocol_verafinger}/cropped_full.py (67%) rename bob/bio/vein/config/database/{protocol/cropped_Nom.py => protocol_verafinger/cropped_nom.py} (67%) rename bob/bio/vein/config/database/{protocol => protocol_verafinger}/full.py (69%) rename bob/bio/vein/config/database/{protocol/Nom.py => protocol_verafinger/nom.py} (71%) diff --git a/bob/bio/vein/config/database/protocol/__init__.py b/bob/bio/vein/config/database/protocol/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bob/bio/vein/config/database/protocol/b.py b/bob/bio/vein/config/database/protocol/b.py deleted file mode 100644 index d15cdd3..0000000 --- a/bob/bio/vein/config/database/protocol/b.py +++ /dev/null @@ -1,17 +0,0 @@ -# author: Yannick Dayer <yannick.dayer@idiap.ch> -# Fri 16 Oct 2020 14:50:47 UTC+02 - -# This is a config file for bob.bio.vein -# It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. - -# It is defined as a resource in the setup file of this package. - -# Usage: -# $ bob bio pipelines vanilla-biometrics <pipeline> B verafinger -# or: -# $ bob bio pipelines vanilla-biometrics -p <pipeline> B verafinger - -# The protocol resource must be specified before the database resource. - -protocol = 'B' diff --git a/bob/bio/vein/config/database/protocol/cropped_b.py b/bob/bio/vein/config/database/protocol/cropped_b.py deleted file mode 100644 index c8ff2bd..0000000 --- a/bob/bio/vein/config/database/protocol/cropped_b.py +++ /dev/null @@ -1,17 +0,0 @@ -# author: Yannick Dayer <yannick.dayer@idiap.ch> -# Fri 16 Oct 2020 14:50:51 UTC+02 - -# This is a config file for bob.bio.vein -# It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. - -# It is defined as a resource in the setup file of this package. - -# Usage: -# $ bob bio pipelines vanilla-biometrics <pipeline> Cropped-B verafinger -# or: -# $ bob bio pipelines vanilla-biometrics -p <pipeline> Cropped-B verafinger - -# The protocol resource must be specified before the database resource. - -protocol = 'Cropped-B' diff --git a/bob/bio/vein/config/database/protocol/cropped_fifty.py b/bob/bio/vein/config/database/protocol/cropped_fifty.py deleted file mode 100644 index 7b8a4d1..0000000 --- a/bob/bio/vein/config/database/protocol/cropped_fifty.py +++ /dev/null @@ -1,17 +0,0 @@ -# author: Yannick Dayer <yannick.dayer@idiap.ch> -# Fri 16 Oct 2020 14:50:54 UTC+02 - -# This is a config file for bob.bio.vein -# It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. - -# It is defined as a resource in the setup file of this package. - -# Usage: -# $ bob bio pipelines vanilla-biometrics <pipeline> Cropped-Fifty verafinger -# or: -# $ bob bio pipelines vanilla-biometrics -p <pipeline> Cropped-Fifty verafinger - -# The protocol resource must be specified before the database resource. - -protocol = 'Cropped-Fifty' diff --git a/bob/bio/vein/config/database/protocol/fifty.py b/bob/bio/vein/config/database/protocol/fifty.py deleted file mode 100644 index fda157a..0000000 --- a/bob/bio/vein/config/database/protocol/fifty.py +++ /dev/null @@ -1,17 +0,0 @@ -# author: Yannick Dayer <yannick.dayer@idiap.ch> -# Fri 16 Oct 2020 14:51:06 UTC+02 - -# This is a config file for bob.bio.vein -# It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. - -# It is defined as a resource in the setup file of this package. - -# Usage: -# $ bob bio pipelines vanilla-biometrics <pipeline> Fifty verafinger -# or: -# $ bob bio pipelines vanilla-biometrics -p <pipeline> Fifty verafinger - -# The protocol resource must be specified before the database resource. - -protocol = 'Fifty' diff --git a/bob/bio/vein/config/database/protocol/central.py b/bob/bio/vein/config/database/protocol_fv3d/central.py similarity index 82% rename from bob/bio/vein/config/database/protocol/central.py rename to bob/bio/vein/config/database/protocol_fv3d/central.py index 4196fab..4ad9276 100644 --- a/bob/bio/vein/config/database/protocol/central.py +++ b/bob/bio/vein/config/database/protocol_fv3d/central.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# 3D Fingervein dataset, defined ar bob.db.fv3d. +# 3D Fingervein dataset, defined at bob.db.fv3d. # It is defined as a resource in the setup file of this package. @@ -14,6 +14,10 @@ # The protocol resource must be specified before the database resource. + +# Available protocols are: +# 'central', 'left', 'right', 'stitched' + # This will be the default protocol if none is specified. protocol = 'central' diff --git a/bob/bio/vein/config/database/protocol/left.py b/bob/bio/vein/config/database/protocol_fv3d/left.py similarity index 80% rename from bob/bio/vein/config/database/protocol/left.py rename to bob/bio/vein/config/database/protocol_fv3d/left.py index e34f0d5..a4364f5 100644 --- a/bob/bio/vein/config/database/protocol/left.py +++ b/bob/bio/vein/config/database/protocol_fv3d/left.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# 3D Fingervein dataset, defined ar bob.db.fv3d. +# 3D Fingervein dataset, defined at bob.db.fv3d. # It is defined as a resource in the setup file of this package. @@ -14,4 +14,8 @@ # The protocol resource must be specified before the database resource. + +# Available protocols are: +# 'central', 'left', 'right', 'stitched' + protocol = 'left' diff --git a/bob/bio/vein/config/database/protocol/right.py b/bob/bio/vein/config/database/protocol_fv3d/right.py similarity index 80% rename from bob/bio/vein/config/database/protocol/right.py rename to bob/bio/vein/config/database/protocol_fv3d/right.py index d26cb9c..e33db7f 100644 --- a/bob/bio/vein/config/database/protocol/right.py +++ b/bob/bio/vein/config/database/protocol_fv3d/right.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# 3D Fingervein dataset, defined ar bob.db.fv3d. +# 3D Fingervein dataset, defined at bob.db.fv3d. # It is defined as a resource in the setup file of this package. @@ -14,4 +14,8 @@ # The protocol resource must be specified before the database resource. + +# Available protocols are: +# 'central', 'left', 'right', 'stitched' + protocol = 'right' diff --git a/bob/bio/vein/config/database/protocol/stitched.py b/bob/bio/vein/config/database/protocol_fv3d/stitched.py similarity index 81% rename from bob/bio/vein/config/database/protocol/stitched.py rename to bob/bio/vein/config/database/protocol_fv3d/stitched.py index 4a0814d..faf2b1e 100644 --- a/bob/bio/vein/config/database/protocol/stitched.py +++ b/bob/bio/vein/config/database/protocol_fv3d/stitched.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# 3D Fingervein dataset, defined ar bob.db.fv3d. +# 3D Fingervein dataset, defined at bob.db.fv3d. # It is defined as a resource in the setup file of this package. @@ -14,4 +14,8 @@ # The protocol resource must be specified before the database resource. + +# Available protocols are: +# 'central', 'left', 'right', 'stitched' + protocol = 'stitched' diff --git a/bob/bio/vein/config/database/protocol_putvein/palm_lr_1.py b/bob/bio/vein/config/database/protocol_putvein/palm_lr_1.py new file mode 100644 index 0000000..3a3b9d4 --- /dev/null +++ b/bob/bio/vein/config/database/protocol_putvein/palm_lr_1.py @@ -0,0 +1,26 @@ +# author: Yannick Dayer <yannick.dayer@idiap.ch> +# Wed 21 Oct 2020 11:27:19 UTC+02 + +# This is a config file for bob.bio.vein +# It defines the database protocol to use with the Database Interface for the +# Put Vein dataset, defined at bob.db.putvein. + +# It is defined as a resource in the setup file of this package. + +# Usage: +# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein +# or: +# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein + +# The protocol resource must be specified before the database resource. + + +# Available protocols are (some require the creation of your own config file): +# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1', +# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4', +# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1', +# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4' + + +protocol = 'palm-LR_1' + diff --git a/bob/bio/vein/config/database/protocol_putvein/palm_lr_4.py b/bob/bio/vein/config/database/protocol_putvein/palm_lr_4.py new file mode 100644 index 0000000..0bab756 --- /dev/null +++ b/bob/bio/vein/config/database/protocol_putvein/palm_lr_4.py @@ -0,0 +1,26 @@ +# author: Yannick Dayer <yannick.dayer@idiap.ch> +# Wed 21 Oct 2020 11:27:19 UTC+02 + +# This is a config file for bob.bio.vein +# It defines the database protocol to use with the Database Interface for the +# Put Vein dataset, defined at bob.db.putvein. + +# It is defined as a resource in the setup file of this package. + +# Usage: +# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein +# or: +# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein + +# The protocol resource must be specified before the database resource. + + +# Available protocols are (some require the creation of your own config file): +# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1', +# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4', +# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1', +# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4' + + +protocol = 'palm-LR_4' + diff --git a/bob/bio/vein/config/database/protocol_putvein/wrist_lr_1.py b/bob/bio/vein/config/database/protocol_putvein/wrist_lr_1.py new file mode 100644 index 0000000..d861f46 --- /dev/null +++ b/bob/bio/vein/config/database/protocol_putvein/wrist_lr_1.py @@ -0,0 +1,28 @@ +# author: Yannick Dayer <yannick.dayer@idiap.ch> +# Wed 21 Oct 2020 11:27:08 UTC+02 + +# This is a config file for bob.bio.vein +# It defines the database protocol to use with the Database Interface for the +# Put Vein dataset, defined at bob.db.putvein. + +# It is defined as a resource in the setup file of this package. + +# Usage: +# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein +# or: +# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein + +# The protocol resource must be specified before the database resource. + + +# Available protocols are (some require the creation of your own config file): +# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1', +# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4', +# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1', +# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4' + + +# This will be the default protocol if none is specified. + +protocol = 'wrist-LR_1' + diff --git a/bob/bio/vein/config/database/protocol_putvein/wrist_lr_4.py b/bob/bio/vein/config/database/protocol_putvein/wrist_lr_4.py new file mode 100644 index 0000000..03580a5 --- /dev/null +++ b/bob/bio/vein/config/database/protocol_putvein/wrist_lr_4.py @@ -0,0 +1,26 @@ +# author: Yannick Dayer <yannick.dayer@idiap.ch> +# Wed 21 Oct 2020 11:27:00 UTC+02 + +# This is a config file for bob.bio.vein +# It defines the database protocol to use with the Database Interface for the +# Put Vein dataset, defined at bob.db.putvein. + +# It is defined as a resource in the setup file of this package. + +# Usage: +# $ bob bio pipelines vanilla-biometrics <pipeline> wrist-LR-1 putvein +# or: +# $ bob bio pipelines vanilla-biometrics -p <pipeline> wrist-LR-1 putvein + +# The protocol resource must be specified before the database resource. + + +# Available protocols are (some require the creation of your own config file): +# 'palm-L_1', 'palm-LR_1', 'palm-R_1', 'palm-RL_1', 'palm-R_BEAT_1', +# 'palm-L_4', 'palm-LR_4', 'palm-R_4', 'palm-RL_4', 'palm-R_BEAT_4', +# 'wrist-L_1', 'wrist-LR_1', 'wrist-R_1', 'wrist-RL_1', 'wrist-R_BEAT_1', +# 'wrist-L_4', 'wrist-LR_4', 'wrist-R_4', 'wrist-RL_4', 'wrist-R_BEAT_4' + + +protocol = 'wrist-LR_4' + diff --git a/bob/bio/vein/config/database/protocol_utfvp/full.py b/bob/bio/vein/config/database/protocol_utfvp/full.py new file mode 100644 index 0000000..5a94135 --- /dev/null +++ b/bob/bio/vein/config/database/protocol_utfvp/full.py @@ -0,0 +1,26 @@ +# author: Yannick Dayer <yannick.dayer@idiap.ch> +# Wed 21 Oct 2020 10:32:56 UTC+02 + +# This is a config file for bob.bio.vein +# It defines the database protocol to use with the Database Interface for the +# utfvp dataset, defined at bob.db.utfvp. + +# It is defined as a resource in the setup file of this package. + +# Usage: +# $ bob bio pipelines vanilla-biometrics <pipeline> full utfvp +# or: +# $ bob bio pipelines vanilla-biometrics -p <pipeline> full utfvp + +# The protocol resource must be specified before the database resource. + + +# Available protocols are (some require the creation of your own config file): +# '1vsall', 'full', 'fullLeftIndex', 'fullLeftMiddle', 'fullLeftRing', +# 'fullRightIndex', 'fullRightMiddle', 'fullRightRing', 'nom', 'nomLeftIndex', +# 'nomLeftMiddle', 'nomLeftRing', 'nomRightIndex', 'nomRightMiddle', +# 'nomRightRing' + + +protocol = 'full' + diff --git a/bob/bio/vein/config/database/protocol_utfvp/nom.py b/bob/bio/vein/config/database/protocol_utfvp/nom.py new file mode 100644 index 0000000..4153793 --- /dev/null +++ b/bob/bio/vein/config/database/protocol_utfvp/nom.py @@ -0,0 +1,28 @@ +# author: Yannick Dayer <yannick.dayer@idiap.ch> +# Wed 21 Oct 2020 10:30:22 UTC+02 + +# This is a config file for bob.bio.vein +# It defines the database protocol to use with the Database Interface for the +# utfvp dataset, defined at bob.db.utfvp. + +# It is defined as a resource in the setup file of this package. + +# Usage: +# $ bob bio pipelines vanilla-biometrics <pipeline> nom utfvp +# or: +# $ bob bio pipelines vanilla-biometrics -p <pipeline> nom utfvp + +# The protocol resource must be specified before the database resource. + + +# Available protocols are (some require the creation of your own config file): +# '1vsall', 'full', 'fullLeftIndex', 'fullLeftMiddle', 'fullLeftRing', +# 'fullRightIndex', 'fullRightMiddle', 'fullRightRing', 'nom', 'nomLeftIndex', +# 'nomLeftMiddle', 'nomLeftRing', 'nomRightIndex', 'nomRightMiddle', +# 'nomRightRing' + + +# This will be the default protocol if none is specified. + +protocol = 'nom' + diff --git a/bob/bio/vein/config/database/protocol_utfvp/one_vs_all.py b/bob/bio/vein/config/database/protocol_utfvp/one_vs_all.py new file mode 100644 index 0000000..d5cc708 --- /dev/null +++ b/bob/bio/vein/config/database/protocol_utfvp/one_vs_all.py @@ -0,0 +1,26 @@ +# author: Yannick Dayer <yannick.dayer@idiap.ch> +# Wed 21 Oct 2020 10:34:41 UTC+02 + +# This is a config file for bob.bio.vein +# It defines the database protocol to use with the Database Interface for the +# utfvp dataset, defined at bob.db.utfvp. + +# It is defined as a resource in the setup file of this package. + +# Usage: +# $ bob bio pipelines vanilla-biometrics <pipeline> 1vsall utfvp +# or: +# $ bob bio pipelines vanilla-biometrics -p <pipeline> 1vsall utfvp + +# The protocol resource must be specified before the database resource. + + +# Available protocols are (some require the creation of your own config file): +# '1vsall', 'full', 'fullLeftIndex', 'fullLeftMiddle', 'fullLeftRing', +# 'fullRightIndex', 'fullRightMiddle', 'fullRightRing', 'nom', 'nomLeftIndex', +# 'nomLeftMiddle', 'nomLeftRing', 'nomRightIndex', 'nomRightMiddle', +# 'nomRightRing' + + +protocol = 'full' + diff --git a/bob/bio/vein/config/database/protocol/cropped_full.py b/bob/bio/vein/config/database/protocol_verafinger/cropped_full.py similarity index 67% rename from bob/bio/vein/config/database/protocol/cropped_full.py rename to bob/bio/vein/config/database/protocol_verafinger/cropped_full.py index 71858b4..2001253 100644 --- a/bob/bio/vein/config/database/protocol/cropped_full.py +++ b/bob/bio/vein/config/database/protocol_verafinger/cropped_full.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. +# VeraFinger dataset, defined at bob.db.verafinger. # It is defined as a resource in the setup file of this package. @@ -14,4 +14,9 @@ # The protocol resource must be specified before the database resource. -protocol = 'Cropped-Fifty' + +# Available protocols are (some require the creation of your own config file): +# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty', +# 'Full', 'Nom' + +protocol = 'Cropped-Full' diff --git a/bob/bio/vein/config/database/protocol/cropped_Nom.py b/bob/bio/vein/config/database/protocol_verafinger/cropped_nom.py similarity index 67% rename from bob/bio/vein/config/database/protocol/cropped_Nom.py rename to bob/bio/vein/config/database/protocol_verafinger/cropped_nom.py index 65ab993..2f5b861 100644 --- a/bob/bio/vein/config/database/protocol/cropped_Nom.py +++ b/bob/bio/vein/config/database/protocol_verafinger/cropped_nom.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. +# VeraFinger dataset, defined at bob.db.verafinger. # It is defined as a resource in the setup file of this package. @@ -14,4 +14,9 @@ # The protocol resource must be specified before the database resource. -protocol = 'cropped-Nom' + +# Available protocols are (some require the creation of your own config file): +# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty', +# 'Full', 'Nom' + +protocol = 'Cropped-Nom' diff --git a/bob/bio/vein/config/database/protocol/full.py b/bob/bio/vein/config/database/protocol_verafinger/full.py similarity index 69% rename from bob/bio/vein/config/database/protocol/full.py rename to bob/bio/vein/config/database/protocol_verafinger/full.py index f45f15e..25b72d7 100644 --- a/bob/bio/vein/config/database/protocol/full.py +++ b/bob/bio/vein/config/database/protocol_verafinger/full.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. +# VeraFinger dataset, defined at bob.db.verafinger. # It is defined as a resource in the setup file of this package. @@ -14,4 +14,9 @@ # The protocol resource must be specified before the database resource. + +# Available protocols are (some require the creation of your own config file): +# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty', +# 'Full', 'Nom' + protocol = 'Full' diff --git a/bob/bio/vein/config/database/protocol/Nom.py b/bob/bio/vein/config/database/protocol_verafinger/nom.py similarity index 71% rename from bob/bio/vein/config/database/protocol/Nom.py rename to bob/bio/vein/config/database/protocol_verafinger/nom.py index eb47987..c76cdad 100644 --- a/bob/bio/vein/config/database/protocol/Nom.py +++ b/bob/bio/vein/config/database/protocol_verafinger/nom.py @@ -3,7 +3,7 @@ # This is a config file for bob.bio.vein # It defines the database protocol to use with the Database Interface for the -# VeraFinger dataset, defined ar bob.db.verafinger. +# VeraFinger dataset, defined at bob.db.verafinger. # It is defined as a resource in the setup file of this package. @@ -14,6 +14,11 @@ # The protocol resource must be specified before the database resource. + +# Available protocols are (some require the creation of your own config file): +# 'B', 'Cropped-B', 'Cropped-Fifty', 'Cropped-Full', 'Cropped-Nom', 'Fifty', +# 'Full', 'Nom' + # This will be the default protocol if none is specified. protocol = 'Nom' diff --git a/bob/bio/vein/script/markdet.py b/bob/bio/vein/script/markdet.py index 824e3ca..687eb56 100644 --- a/bob/bio/vein/script/markdet.py +++ b/bob/bio/vein/script/markdet.py @@ -136,9 +136,9 @@ def main(user_input=None): sys.exit(e) if args['<database>'] == 'fv3d': - from ..configurations.fv3d import database as db + from bob.bio.vein.config.fv3d import database as db elif args['<database>'] == 'verafinger': - from ..configurations.verafinger import database as db + from bob.bio.vein.config.verafinger import database as db else: raise schema.SchemaError('Database %s is not supported' % \ args['<database>']) diff --git a/bob/bio/vein/script/view_sample.py b/bob/bio/vein/script/view_sample.py index 57750ca..9216b0e 100644 --- a/bob/bio/vein/script/view_sample.py +++ b/bob/bio/vein/script/view_sample.py @@ -219,9 +219,9 @@ def main(user_input=None): sys.exit(e) if args['<database>'] == 'fv3d': - from ..configurations.fv3d import database as db + from bob.bio.vein.config.fv3d import database as db elif args['<database>'] == 'verafinger': - from ..configurations.verafinger import database as db + from bob.bio.vein.config.verafinger import database as db database_replacement = "%s/.bob_bio_databases.txt" % os.environ["HOME"] db.replace_directories(database_replacement) diff --git a/bob/bio/vein/script/watershed_mask.py b/bob/bio/vein/script/watershed_mask.py index 269951d..924cd69 100644 --- a/bob/bio/vein/script/watershed_mask.py +++ b/bob/bio/vein/script/watershed_mask.py @@ -270,9 +270,9 @@ def main(user_input=None): sys.exit(e) if args['<database>'] == 'fv3d': - from ..configurations.fv3d import database as db + from bob.bio.vein.config.fv3d import database as db elif args['<database>'] == 'verafinger': - from ..configurations.verafinger import database as db + from bob.bio.vein.config.verafinger import database as db database_replacement = "%s/.bob_bio_databases.txt" % os.environ["HOME"] db.replace_directories(database_replacement) diff --git a/setup.py b/setup.py index 38ae312..7e146a7 100644 --- a/setup.py +++ b/setup.py @@ -32,55 +32,55 @@ setup( entry_points={ 'bob.bio.config': [ - # protocols TODO: add all protocols + # protocols (must be specified before the database in the cmd) # verafinger - 'Nom = bob.bio.vein.configurations.database.protocol.Nom', - 'Cropped-Nom = bob.bio.vein.configurations.database.protocol.cropped_Nom', - 'B = bob.bio.vein.configurations.database.protocol.b', - 'Cropped-B = bob.bio.vein.configurations.database.protocol.cropped_b', - 'Full = bob.bio.vein.configurations.database.protocol.full', - 'Cropped-Full = bob.bio.vein.configurations.database.protocol.cropped_full', - 'Fifty = bob.bio.vein.configurations.database.protocol.fifty', - 'Cropped-Fifty = bob.bio.vein.configurations.database.protocol.cropped_fifty', + 'Nom = bob.bio.vein.config.database.protocol_verafinger.nom', + 'Cropped-Nom = bob.bio.vein.config.database.protocol_verafinger.cropped_nom', + 'Full = bob.bio.vein.config.database.protocol_verafinger.full', + 'Cropped-Full = bob.bio.vein.config.database.protocol_verafinger.cropped_full', # utfvp - # 'nom = bob.bio.vein.configurations.database.protocol.nom', + 'nom = bob.bio.vein.config.database.protocol_utfvp.nom', + 'full = bob.bio.vein.config.database.protocol_utfvp.full', + '1vsall = bob.bio.vein.config.database.protocol_utfvp.one_vs_all', # fv3d - 'central = bob.bio.vein.configurations.database.protocol.central', - 'left = bob.bio.vein.configurations.database.protocol.left', - 'right = bob.bio.vein.configurations.database.protocol.right', - 'stitched = bob.bio.vein.configurations.database.protocol.stitched', + 'central = bob.bio.vein.config.database.protocol_fv3d.central', + 'left = bob.bio.vein.config.database.protocol_fv3d.left', + 'right = bob.bio.vein.config.database.protocol_fv3d.right', + 'stitched = bob.bio.vein.config.database.protocol_fv3d.stitched', # putvein - # 'wrist-LR_1 = bob.bio.vein.configurations.database.protocol.wristLR_1', - # TODO That will be a LOT of protocols, for putvein... + 'wrist-LR-1 = bob.bio.vein.config.database.protocol_putvein.wrist_lr_1', + 'wrist-LR-4 = bob.bio.vein.config.database.protocol_putvein.wrist_lr_4', + 'palm-LR-1 = bob.bio.vein.config.database.protocol_putvein.palm_lr_1', + 'palm-LR-4 = bob.bio.vein.config.database.protocol_putvein.palm_lr_4', # legacy databases - 'verafinger = bob.bio.vein.configurations.database.verafinger', - 'utfvp = bob.bio.vein.configurations.database.utfvp', - 'fv3d = bob.bio.vein.configurations.database.fv3d', - 'putvein = bob.bio.vein.configurations.database.putvein', + 'verafinger = bob.bio.vein.config.database.verafinger', + 'utfvp = bob.bio.vein.config.database.utfvp', + 'fv3d = bob.bio.vein.config.database.fv3d', + 'putvein = bob.bio.vein.config.database.putvein', # legacy baselines - 'mc = bob.bio.vein.configurations.maximum_curvature', - 'rlt = bob.bio.vein.configurations.repeated_line_tracking', - 'wld = bob.bio.vein.configurations.wide_line_detector', + 'mc = bob.bio.vein.config.maximum_curvature', + 'rlt = bob.bio.vein.config.repeated_line_tracking', + 'wld = bob.bio.vein.config.wide_line_detector', # other (legacy) - 'parallel = bob.bio.vein.configurations.parallel', - 'gridio4g48 = bob.bio.vein.configurations.gridio4g48', - 'grid = bob.bio.vein.configurations.gridio4g48', + 'parallel = bob.bio.vein.config.parallel', + 'gridio4g48 = bob.bio.vein.config.gridio4g48', + 'grid = bob.bio.vein.config.gridio4g48', ], 'bob.bio.database': [ - 'verafinger = bob.bio.vein.configurations.database.verafinger:database', - 'utfvp = bob.bio.vein.configurations.database.utfvp:database', - 'fv3d = bob.bio.vein.configurations.database.fv3d:database', - 'putvein = bob.bio.vein.configurations.database.putvein:database', + 'verafinger = bob.bio.vein.config.database.verafinger:database', + 'utfvp = bob.bio.vein.config.database.utfvp:database', + 'fv3d = bob.bio.vein.config.database.fv3d:database', + 'putvein = bob.bio.vein.config.database.putvein:database', ], 'bob.bio.pipeline': [ - 'wld = bob.bio.vein.configurations.wide_line_detector:pipeline', - 'mc = bob.bio.vein.configurations.maximum_curvature:pipeline', - 'rlt = bob.bio.vein.configurations.repeated_line_tracking:pipeline', + 'wld = bob.bio.vein.config.wide_line_detector:pipeline', + 'mc = bob.bio.vein.config.maximum_curvature:pipeline', + 'rlt = bob.bio.vein.config.repeated_line_tracking:pipeline', ], 'console_scripts': [ -- GitLab