Commit e7e435a4 authored by André Anjos's avatar André Anjos

Merge branch 'issue-16' into 'master'

Port to new CI (closes #16)

Closes #16

See merge request !40
parents 91189df8 e6c2e2d3
Pipeline #16978 passed with stages
in 24 minutes and 12 seconds
# This build file heavily uses template features from YAML so it is generic # This build file uses template features from YAML so it is generic enough for
# enough for any Bob project. Don't modify it unless you know what you're # any Bob project. Don't modify it unless you know what you're doing.
# doing.
# Definition of global variables (all stages)
variables:
CONDA_ROOT: "${CI_PROJECT_DIR}/miniconda"
# Definition of our build pipeline
# Definition of our build pipeline order
stages: stages:
- build - build
- test
- docs
- wheels
- deploy - deploy
- pypi
# --------- # Build targets
# Templates
# ---------
# Template for the build stage
# Needs to run on all supported architectures, platforms and python versions
.build_template: &build_job .build_template: &build_job
stage: build stage: build
before_script: before_script:
- git clean -ffdx
- mkdir _ci - mkdir _ci
- curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh - curl --silent "https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/install.sh" > _ci/install.sh
- chmod 755 _ci/install.sh - chmod 755 _ci/install.sh
- ./_ci/install.sh _ci #updates - ./_ci/install.sh _ci master #installs ci support scripts
- ./_ci/before_build.sh - ./_ci/before_build.sh
script: script:
- ./_ci/build.sh - ./_ci/build.sh
after_script: after_script:
- ./_ci/after_build.sh - ./_ci/after_build.sh
artifacts: cache: &build_caches
expire_in: 1 week
paths: paths:
- _ci/ - miniconda.sh
- dist/ - ${CONDA_ROOT}/pkgs/*.tar.bz2
- sphinx/ - ${CONDA_ROOT}/pkgs/urls.txt
# Template for the test stage - re-installs from uploaded wheels
# Needs to run on all supported architectures, platforms and python versions
.test_template: &test_job
stage: test
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_test.sh
script:
- ./_ci/test.sh
after_script:
- ./_ci/after_test.sh
# Template for the wheel uploading stage
# Needs to run against one supported architecture, platform and python version
.wheels_template: &wheels_job
stage: wheels
environment: intranet
only:
- master
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_wheels.sh
script:
- ./_ci/wheels.sh
after_script:
- ./_ci/after_wheels.sh
# Template for (latest) documentation upload stage
# Only one real job needs to do this
.docs_template: &docs_job
stage: docs
environment: intranet
only:
- master
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_docs.sh
script:
- ./_ci/docs.sh
after_script:
- ./_ci/after_docs.sh
# Template for the deployment stage - re-installs from uploaded wheels
# Needs to run on a single architecture only
# Will deploy your package to PyPI and other required services
# Only runs for tags
.deploy_template: &deploy_job
stage: deploy
environment: internet
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
before_script:
- ./_ci/install.sh _ci #updates
- ./_ci/before_deploy.sh
script:
- ./_ci/deploy.sh
after_script:
- ./_ci/after_deploy.sh
# -------------
# Build Targets
# -------------
# Linux + Python 2.7: Builds, tests, uploads wheel and deploys (if needed) .build_linux_template: &linux_build_job
build_linux_27:
<<: *build_job <<: *build_job
variables: &linux_27_build_variables
PYTHON_VERSION: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-linux
test_linux_27:
<<: *test_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags:
- conda-linux
wheels_linux_27:
<<: *wheels_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags:
- conda-linux
deploy_linux_27:
<<: *deploy_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags: tags:
- conda-linux - docker
image: continuumio/conda-concourse-ci
artifacts:
expire_in: 1 week
paths:
- _ci/
- ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
cache:
<<: *build_caches
key: "linux-cache"
# Linux + Python 3.5: Builds, tests and uploads wheel .build_macosx_template: &macosx_build_job
build_linux_35:
<<: *build_job <<: *build_job
variables: &linux_35_build_variables
PYTHON_VERSION: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_35:
<<: *test_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags: tags:
- conda-linux - macosx
artifacts:
expire_in: 1 week
paths:
- _ci/
- ${CONDA_ROOT}/conda-bld/osx-64/*.tar.bz2
cache:
<<: *build_caches
key: "macosx-cache"
wheels_linux_35:
<<: *wheels_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
docs_linux_35: build_linux_27:
<<: *docs_job <<: *linux_build_job
variables: *linux_35_build_variables variables:
dependencies: PYTHON_VERSION: "2.7"
- build_linux_35
tags:
- conda-linux
# Linux + Python 3.6: Builds and tests
build_linux_36: build_linux_36:
<<: *build_job <<: *linux_build_job
variables: &linux_36_build_variables variables:
PYTHON_VERSION: "3.6" PYTHON_VERSION: "3.6"
WHEEL_TAG: "py3" BUILD_EGG: "true"
tags: artifacts:
- conda-linux expire_in: 1 week
paths:
test_linux_36: - _ci/
<<: *test_job - dist/*.zip
variables: *linux_36_build_variables - sphinx
dependencies: - ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2
- build_linux_36
tags:
- conda-linux
# Mac OSX + Python 2.7: Builds and tests
build_macosx_27: build_macosx_27:
<<: *build_job <<: *macosx_build_job
variables: &macosx_27_build_variables variables:
PYTHON_VERSION: "2.7" PYTHON_VERSION: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-macosx
test_macosx_27:
<<: *test_job build_macosx_36:
variables: *macosx_27_build_variables <<: *macosx_build_job
variables:
PYTHON_VERSION: "3.6"
# Deploy targets
.deploy_template: &deploy_job
stage: deploy
before_script:
- ./_ci/install.sh _ci master #updates ci support scripts
script:
- ./_ci/deploy.sh
dependencies: dependencies:
- build_linux_27
- build_linux_36
- build_macosx_27 - build_macosx_27
- build_macosx_36
tags: tags:
- conda-macosx - deployer
# Mac OSX + Python 3.5: Builds and tests deploy_beta:
build_macosx_35: <<: *deploy_job
<<: *build_job environment: beta
variables: &macosx_35_build_variables only:
PYTHON_VERSION: "3.5" - master
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_35:
<<: *test_job
variables: *macosx_35_build_variables
dependencies:
- build_macosx_35
tags:
- conda-macosx
deploy_stable:
<<: *deploy_job
environment: stable
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
# Mac OSX + Python 3.6: Builds and tests
build_macosx_36:
<<: *build_job
variables: &macosx_36_build_variables
PYTHON_VERSION: "3.6"
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_36: pypi:
<<: *test_job stage: pypi
variables: *macosx_36_build_variables environment: pypi
only:
- /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant version (tags)
except:
- branches
before_script:
- ./_ci/install.sh _ci master #updates ci support scripts
script:
- ./_ci/pypi.sh
dependencies: dependencies:
- build_macosx_36 - build_linux_36
tags: tags:
- conda-macosx - deployer
#!/usr/bin/env python #!/usr/bin/env python
# vim: set fileencoding=utf-8 : # vim: set fileencoding=utf-8 :
# Fri 04 Nov 2016 14:46:53 CET # Tue 27 Sep 2016 16:48:57 CEST
from bob.bio.base.database import BioFile, BioDatabase from bob.bio.base.database import BioFile, BioDatabase
from . import AnnotatedArray
from ..preprocessor.utils import poly_to_mask
class File(BioFile): class File(BioFile):
""" """
Implements extra properties of vein files for the UTFVP Fingervein database Implements extra properties of vein files for the UTFVP database
Parameters: Parameters:
f (object): Low-level file (or sample) object that is kept inside f (object): Low-level file (or sample) object that is kept inside
""" """
def __init__(self, f): def __init__(self, f):
super(File, self).__init__(client_id=f.client_id, path=f.path, super(File, self).__init__(client_id=f.unique_finger_name, path=f.path,
file_id=f.id) file_id=f.id)
self.__f = f self.__f = f
def load(self, *args, **kwargs):
"""(Overrides base method) Loads both image and mask"""
image = super(File, self).load(*args, **kwargs)
roi = self.__f.roi()
return AnnotatedArray(image, metadata=dict(roi=roi))
class Database(BioDatabase): class Database(BioDatabase):
""" """
Implements verification API for querying UTFVP Fingervein database. Implements verification API for querying UTFVP database.
""" """
def __init__(self, **kwargs): def __init__(self, **kwargs):
...@@ -34,22 +46,38 @@ class Database(BioDatabase): ...@@ -34,22 +46,38 @@ class Database(BioDatabase):
from bob.db.utfvp.query import Database as LowLevelDatabase from bob.db.utfvp.query import Database as LowLevelDatabase
self._db = LowLevelDatabase() self._db = LowLevelDatabase()
self.low_level_group_names = ('train', 'dev')
self.high_level_group_names = ('world', 'dev')
def groups(self):
return self.convert_names_to_highlevel(self._db.groups(),
self.low_level_group_names, self.high_level_group_names)
def client_id_from_model_id(self, model_id, group='dev'):
"""Required as ``model_id != client_id`` on this database"""
return self._db.finger_name_from_model_id(model_id)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs): def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
protocol = protocol if protocol is not None else self.protocol
groups = self.convert_names_to_lowlevel(groups,
self.low_level_group_names, self.high_level_group_names)
return self._db.model_ids(groups=groups, protocol=protocol) return self._db.model_ids(groups=groups, protocol=protocol)
def objects(self, groups=None, protocol=None, purposes=None, def objects(self, groups=None, protocol=None, purposes=None,
model_ids=None, **kwargs): model_ids=None, **kwargs):
groups = self.convert_names_to_lowlevel(groups,
self.low_level_group_names, self.high_level_group_names)
retval = self._db.objects(groups=groups, protocol=protocol, retval = self._db.objects(groups=groups, protocol=protocol,
purposes=purposes, model_ids=model_ids, **kwargs) purposes=purposes, model_ids=model_ids,
**kwargs)
return [File(f) for f in retval] return [File(f) for f in retval]
def annotations(self, file): def annotations(self, file):
return None return None
def client_id_from_model_id(self, model_id, group='dev'):
"""Required as ``model_id != client_id`` on this database"""
return self._db.get_client_id_from_model_id(model_id)
...@@ -14,8 +14,8 @@ def test_utfvp(): ...@@ -14,8 +14,8 @@ def test_utfvp():
module = bob.bio.base.load_resource('utfvp', 'config', module = bob.bio.base.load_resource('utfvp', 'config',
preferred_package='bob.bio.vein') preferred_package='bob.bio.vein')
try: try:
check_database(module.database, protocol=module.protocol, check_database(module.database, protocol='nomLeftIndex', groups=('dev',
groups=('dev', 'eval')) 'eval'))
except IOError as e: except IOError as e:
raise SkipTest( raise SkipTest(
"The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e) "The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e)
...@@ -52,4 +52,4 @@ def test_putvein(): ...@@ -52,4 +52,4 @@ def test_putvein():
check_database(module.database, protocol='wrist-LR_1', groups=('dev',)) check_database(module.database, protocol='wrist-LR_1', groups=('dev',))
except IOError as e: except IOError as e:
raise SkipTest( raise SkipTest(
"The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e) "The database could not queried; probably the db.sql3 file is missing. Here is the error: '%s'" % e)
\ No newline at end of file
{% set name = 'bob.bio.vein' %}
{% set project_dir = environ.get('RECIPE_DIR') + '/..' %}
package:
name: {{ name }}
version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }}
build:
entry_points:
- compare_rois.py = bob.bio.vein.script.compare_rois:main
- view_sample.py = bob.bio.vein.script.view_sample:main
- blame.py = bob.bio.vein.script.blame:main
- markdet.py = bob.bio.vein.script.markdet:main
- watershed_mask.py = bob.bio.vein.script.watershed_mask:main
number: {{ environ.get('BOB_BUILD_NUMBER', 0) }}
run_exports:
- {{ pin_subpackage(name) }}
script:
- cd {{ project_dir }}
{% if environ.get('BUILD_EGG') %}
- python setup.py sdist --formats=zip
{% endif %}
- python setup.py install --single-version-externally-managed --record record.txt
requirements:
host:
- python {{ python }}
- setuptools {{ setuptools }}
- numpy {{ numpy }}
- scipy {{ scipy }}
- pillow {{ pillow }}
- schema {{ schema }}
- docopt {{ docopt }}
- scikit-image {{ scikit_image }}
- matplotlib {{ matplotlib }}
- bob.extension
- bob.core
- bob.io.base
- bob.io.matlab
- bob.io.image
- bob.ip.base
- bob.ip.color
- bob.bio.base
- bob.learn.linear
- bob.learn.activation
- bob.learn.mlp
run:
- python
- setuptools
- {{ pin_compatible('numpy') }}
- {{ pin_compatible('scipy') }}
- {{ pin_compatible('pillow') }}
- {{ pin_compatible('schema') }}
- {{ pin_compatible('docopt') }}
- {{ pin_compatible('scikit-image') }}
- {{ pin_compatible('matplotlib') }}
test:
imports:
- {{ name }}
commands:
- compare_rois.py --help
- view_sample.py --help
- blame.py --help
- markdet.py --help
- watershed_mask.py --help
- nosetests --with-coverage --cover-package={{ name }} -sv {{ name }}
- sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx
- sphinx-build -aEb doctest {{ project_dir }}/doc sphinx
- conda inspect linkages -p $PREFIX {{ name }} # [not win]
- conda inspect objects -p $PREFIX {{ name }} # [osx]
requires:
- bob-devel {{ bob_devel }}.*
- nose
- coverage
- sphinx
- sphinx_rtd_theme
- bob.db.utfvp
- bob.db.verafinger
- bob.db.fv3d
- bob.db.putvein
about:
home: https://www.idiap.ch/software/bob/
license: GNU General Public License v3 (GPLv3)
summary: Vein Recognition Library
license_family: GPL
...@@ -25,15 +25,9 @@ extensions = [ ...@@ -25,15 +25,9 @@ extensions = [
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
'sphinx.ext.napoleon', 'sphinx.ext.napoleon',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode',
'sphinx.ext.mathjax',
] ]
import sphinx
if sphinx.__version__ >= "1.4.1":
extensions.append('sphinx.ext.imgmath')
imgmath_image_format = 'svg'
else:
extensions.append('sphinx.ext.pngmath')
# Be picky about warnings # Be picky about warnings
nitpicky = True nitpicky = True
......
.. vim: set fileencoding=utf-8 : .. vim: set fileencoding=utf-8 :
.. date: Wed Jan 14 11:58:57 CEST 2015
.. _bob.bio.vein:
==================================== ====================================
Biometric Vein Recognition Library Biometric Vein Recognition Library
......
...@@ -5,21 +5,21 @@ ...@@ -5,21 +5,21 @@
References References
============ ============
.. [KUU02] *M. Kono, H. Ueki and S. Umemura*, **Near-infrared finger vein patterns for personal identification**, Applied Optics, Vol. 41, Issue 35, pp. 7429-7436 (2002). .. #not used [KUU02] *M. Kono, H. Ueki and S. Umemura*, **Near-infrared finger vein patterns for personal identification**, Applied Optics, Vol. 41, Issue 35, pp. 7429-7436 (2002).
.. [MNM04] *N. Miura, A. Nagasaka, and T. Miyatake*, **Feature extraction of finger vein patterns based on repeated line tracking and its application to personal identification. Machine Vision and Applications**, Vol. 15, Num. 4, pp. 194--203, 2004. .. [MNM04] *N. Miura, A. Nagasaka, and T. Miyatake*, **Feature extraction of finger vein patterns based on repeated line tracking and its application to personal identification. Machine Vision and Applications**, Vol. 15, Num. 4, pp. 194--203, 2004.
.. [MNM05] *N. Miura, A. Nagasaka, and T. Miyatake*, **Extraction of Finger-Vein Pattern Using Maximum Curvature Points in Image Profiles**, Proceedings on IAPR conference on machine vision applications, Vol. 9 , pp. 347--350, 2005. .. [MNM05] *N. Miura, A. Nagasaka, and T. Miyatake*, **Extraction of Finger-Vein Pattern Using Maximum Curvature Points in Image Profiles**, Proceedings on IAPR conference on machine vision applications, Vol. 9 , pp. 347--350, 2005.
.. [LLP09] *E.C. Lee, H.C. Lee and K.R. Park*, **Finger vein recognition using minutia-based alignment and local binary pattern-based feature extraction**, International Journal of Imaging Systems and Technology. Vol. 19, No. 3, pp. 175-178, September 2009. .. #not used [LLP09] *E.C. Lee, H.C. Lee and K.R. Park*, **Finger vein recognition using minutia-based alignment and local binary pattern-based feature extraction**, International Journal of Imaging Systems and Technology. Vol. 19, No. 3, pp. 175-178, September 2009.
.. [ZY09] *J. Zhang and J. Yang*, **Finger-vein image enhancement based on combination of gray-level grouping and circular gabor filter** In International Conference on Information Engineering and Computer Science (ICIECS), pp. 1-4, Dec 2009. .. #not used [ZY09] *J. Zhang and J. Yang*, **Finger-vein image enhancement based on combination of gray-level grouping and circular gabor filter** In International Conference on Information Engineering and Computer Science (ICIECS), pp. 1-4, Dec 2009.
.. [ZTXL09] *Jianjun Zhao, Hogliang Tian, Weixing Xu, and Xin Li*, **A New Approach to Hand Vein Image Enhancement**. In IEEE Second International Conference on Intelligent Computation Technology and Automation, ICICTA. Vol. 1, pp. 499-501. 2009. .. #not used [ZTXL09] *Jianjun Zhao, Hogliang Tian, Weixing Xu, and Xin Li*, **A New Approach to Hand Vein Image Enhancement**. In IEEE Second International Conference on Intelligent Computation Technology and Automation, ICICTA. Vol. 1, pp. 499-501. 2009.
.. [HDLTL10] *B. Huang, Y. Dai, R. Li, D. Tang and W. Li*, **Finger-vein authentication based on wide line detector and pattern normalization**, Proceedings on 20th International Conference on Pattern Recognition (ICPR), 2010. .. [HDLTL10] *B. Huang, Y. Dai, R. Li, D. Tang and W. Li*, **Finger-vein authentication based on wide line detector and pattern normalization**, Proceedings on 20th International Conference on Pattern Recognition (ICPR), 2010.
.. [MD13] *L. Mirmohamadsadeghi and A. Drygajlo*, **Palm vein recognition using local texture patterns**, IET Biometrics, pp. 1-9, 2013. .. #not used [MD13] *L. Mirmohamadsadeghi and A. Drygajlo*, **Palm vein recognition using local texture patterns**, IET Biometrics, pp. 1-9, 2013.
.. [TVM14] *Pedro Tome, Matthias Vanoni and Sébastien Marcel*, **On the Vulnerability of Finger Vein Recognition to Spoofing**, in: IEEE International Conference of the Biometrics Special Interest Group (BIOSIG), Darmstadt, Germay, pages 1 - 10, IEEE, 2014 .. [TVM14] *Pedro Tome, Matthias Vanoni and Sébastien Marcel*, **On the Vulnerability of Finger Vein Recognition to Spoofing**, in: IEEE International Conference of the Biometrics Special Interest Group (BIOSIG), Darmstadt, Germay, pages 1 - 10, IEEE, 2014
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment