diff --git a/.gitignore b/.gitignore index 262ae6b8cba167fb5298fe31000440c177728bef..9ad21f1b872740002de4ebc6bf7b6e9a2fd3aa3a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,6 @@ eggs html/ parts sphinx -src/ submitted.sql3 *.DS_Store +.gitlab-ci-local* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 845b719f2378d396a8b75296a68d1e32c840e7c7..9a479703105d5241942420e9cfdf0867cc3183e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1 +1,4 @@ -include: 'https://gitlab.idiap.ch/bob/bob.devtools/raw/master/bob/devtools/data/gitlab-ci/single-package.yaml' +include: + - project: bob/dev-profile + ref: main + file: gitlab/python.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4d1d1ca583eb211cc4b0a5ab9b2243c715bb45e..49337196592599a11942ecd8fc24a4230c5a196d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,20 +2,20 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/timothycrosley/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort args: [--settings-path, "pyproject.toml"] - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.1.0 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 6.0.0 hooks: - id: flake8 - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.4.0 hooks: - id: check-ast - id: check-case-conflict diff --git a/MANIFEST.in b/MANIFEST.in index 082c42f1bfebeb796d77083d66bdd398664f2070..9d478e091f8ef57d74618c263e475a20010f9744 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ -include README.rst buildout.cfg develop.cfg COPYING version.txt requirements.txt test-requirements.txt +include README.rst COPYING recursive-include doc *.py *.rst recursive-include bob/bio/vein/tests *.png *.txt *.hdf5 diff --git a/README.rst b/README.rst index 4a86bb06f541c3cb58ba94ae2b292091807f77af..72fcb4e9bb7e73ecb478d9b19750c90cd3b605c7 100644 --- a/README.rst +++ b/README.rst @@ -2,11 +2,11 @@ .. Fri 19 Aug 2016 13:32:51 CEST .. image:: https://img.shields.io/badge/docs-latest-orange.svg - :target: https://www.idiap.ch/software/bob/docs/bob/bob.bio.vein/master/index.html + :target: https://www.idiap.ch/software/bob/docs/bob/bob.bio.vein/master/sphinx/index.html .. image:: https://gitlab.idiap.ch/bob/bob.bio.vein/badges/master/pipeline.svg :target: https://gitlab.idiap.ch/bob/bob.bio.vein/commits/master .. image:: https://gitlab.idiap.ch/bob/bob.bio.vein/badges/master/coverage.svg - :target: https://gitlab.idiap.ch/bob/bob.bio.vein/commits/master + :target: https://www.idiap.ch/software/bob/docs/bob/bob.bio.vein/master/coverage/ .. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg :target: https://gitlab.idiap.ch/bob/bob.bio.vein diff --git a/buildout.cfg b/buildout.cfg deleted file mode 100644 index e521a2b53e80dad5b472b68ab67a481d73c6cbac..0000000000000000000000000000000000000000 --- a/buildout.cfg +++ /dev/null @@ -1,16 +0,0 @@ -; vim: set fileencoding=utf-8 : -; Fri 19 Aug 2016 13:22:13 CEST - -[buildout] -parts = scripts -eggs = bob.bio.vein - -extensions = bob.buildout -develop = . - -newest = false -verbose = true - -[scripts] -recipe = bob.buildout:scripts -dependent-scripts = true diff --git a/conda/meta.yaml b/conda/meta.yaml index f5d44b2f7d8a933d955091b658b891923441b331..5dd6d09de2c989ff4485c83f80fa4215128f3a40 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,24 +1,20 @@ -{% set name = 'bob.bio.vein' %} -{% set project_dir = environ.get('RECIPE_DIR') + '/..' %} +{% set data = load_file_data(RECIPE_DIR + '/../pyproject.toml') %} +{% set name = data['project']['name'] %} package: name: {{ name }} - version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }} + version: {{ data['project']['version'] }} + +source: + path: .. 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 + noarch: python 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 }} -m pip install . -vv" + - "{{ PYTHON }} -m pip install {{ SRC_DIR }} -vv" requirements: host: @@ -32,6 +28,7 @@ requirements: - docopt {{ docopt }} - scikit-image {{ scikit_image }} - matplotlib {{ matplotlib }} + - clapp - bob.extension - bob.io.base - bob.bio.base @@ -39,6 +36,10 @@ requirements: run: - python - setuptools + - clapp + - bob.extension + - bob.io.base + - bob.bio.base - {{ pin_compatible('numpy') }} - {{ pin_compatible('scipy') }} - {{ pin_compatible('pillow') }} @@ -49,14 +50,8 @@ requirements: test: imports: - - {{ name }} + - {{ name.replace('-','_') }} commands: - - compare_rois.py --help - - view_sample.py --help - - blame.py --help - - pytest --verbose --cov {{ name }} --cov-report term-missing --cov-report html:{{ project_dir }}/sphinx/coverage --cov-report xml:{{ project_dir }}/coverage.xml --pyargs {{ 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: @@ -67,7 +62,7 @@ test: - sphinx_rtd_theme {{ sphinx_rtd_theme }} about: - home: https://www.idiap.ch/software/bob/ - license: GNU General Public License v3 (GPLv3) - summary: Vein Recognition Library + home: {{ data['project']['urls']['homepage'] }} + summary: {{ data['project']['description'] }} + license: {{ data['project']['license']['text'] }} license_family: GPL diff --git a/doc/conf.py b/doc/conf.py index 755aff1c6ef86a0ec4c156634d6014630547b395..1faa7b5c308abbb9e27bdc4c08bbac7c084024b1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -24,6 +24,7 @@ extensions = [ "sphinx.ext.napoleon", "sphinx.ext.viewcode", "sphinx.ext.mathjax", + "auto_intersphinx", ] # Be picky about warnings @@ -231,23 +232,8 @@ autodoc_default_options = { "show-inheritance": True, } -# For inter-documentation mapping: -from bob.extension.utils import link_documentation, load_requirements - -sphinx_requirements = "extra-intersphinx.txt" -if os.path.exists(sphinx_requirements): - intersphinx_mapping = link_documentation( - additional_packages=load_requirements(sphinx_requirements) - ) -else: - intersphinx_mapping = link_documentation() - -# Add scikit-image link -skimage_version = pkg_resources.require("scikit-image")[0].version -skimage_version = ".".join(skimage_version.split(".")[:2]) -intersphinx_mapping[ - "http://scikit-image.org/docs/%s.x" % skimage_version -] = None - -# Add PIL link -intersphinx_mapping["http://pillow.readthedocs.io/en/stable"] = None +auto_intersphinx_packages = [ + ("python", "3"), + "numpy", + "bob.bio.base", +] diff --git a/pyproject.toml b/pyproject.toml index b738dc847ff9705c5769673db7415f2eb9a75f4d..49d3a4113c0de450df785f0f2143449ed525e9b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,105 @@ [build-system] - requires = ["setuptools", "wheel", "bob.extension"] + requires = ["setuptools>=61.0.0", "wheel"] build-backend = "setuptools.build_meta" +[project] + name = "bob.bio.vein" + version = "4.0.4b0" + requires-python = ">=3.9" + description = "Vein Recognition Library" + dynamic = ["readme"] + license = {text = "GPLv3 License"} + authors = [ + {name = "Andre Anjos", email = "andre.anjos@idiap.ch"}, + {name = "Pedro Tome", email = "pedro.tome@idiap.ch"}, + ] + keywords = ["bob", "biometric recognition", "evaluation", "vein"] + + classifiers=[ + "Framework :: Bob", + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Natural Language :: English", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development :: Libraries :: Python Modules", + ] + dependencies = [ + "setuptools", + "numpy", + "scipy", + "pillow", + "schema", + "docopt", + "scikit-image", + "matplotlib", + "clapp", + "bob.extension", + "bob.io.base", + "bob.bio.base", + ] + +[project.urls] + documentation = "https://www.idiap.ch/software/bob/docs/bob/bob.bio.vein/stable/" + homepage = "https://pypi.org/project/bob.bio.vein/" + repository = "https://gitlab.idiap.ch/bob/bob.bio.vein" + changelog = "https://gitlab.idiap.ch/bob/bob.bio.vein/-/releases" + +[project.optional-dependencies] + qa = ["pre-commit"] + doc = [ + "sphinx", + "sphinx_rtd_theme", + "sphinx-autodoc-typehints", + "auto-intersphinx", + "sphinxcontrib-programoutput", + ] + test = [ + "pytest", + "pytest-cov", + "coverage", + ] + +[tool.setuptools] + zip-safe = false + package-dir = {"" = "src"} + +[tool.setuptools.dynamic] + readme = {file = "README.rst"} + +[project.entry-points."bob.bio.config"] + # protocols (must be specified before the database in the cmd) + # utfvp + nom = "bob.bio.vein.config.database.utfvp_nom" + full = "bob.bio.vein.config.database.utfvp_full" + 1vsall = "bob.bio.vein.config.database.utfvp_1vsall" + # legacy baselines + mc = "bob.bio.vein.config.maximum_curvature" + rlt = "bob.bio.vein.config.repeated_line_tracking" + wld = "bob.bio.vein.config.wide_line_detector" + # verafinger contactless + vera_nom = "bob.bio.vein.config.database.verafinger_contactless_nom" + +[project.entry-points."bob.bio.database"] + utfvp = "bob.bio.vein.config.database.utfvp_nom:database" + verafinger_contactless = "bob.bio.vein.config.database.verafinger_contactless_nom:database" + +[project.entry-points."bob.bio.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" + +[project.scripts] + bob_bio_vein_compare_rois = "bob.bio.vein.script.compare_rois:main" + bob_bio_vein_view_sample = "bob.bio.vein.script.view_sample:main" + bob_bio_vein_blame = "bob.bio.vein.script.blame:main" + + +[tool.distutils.bdist_wheel] + universal = true + [tool.isort] profile = "black" line_length = 80 @@ -10,3 +108,15 @@ [tool.black] line-length = 80 + +[tool.coverage.run] + relative_files = true + +[tool.pytest.ini_options] + addopts = [ + "--import-mode=append", + "--cov-report=term-missing", + "--cov=bob.bio.vein", + ] + junit_logging = "all" + junit_log_passing_tests = false diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index adbae3723a882edfb08d541019618ea16484920b..0000000000000000000000000000000000000000 --- a/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -setuptools -numpy -scipy -pillow -schema -docopt -scikit-image -matplotlib -bob.extension -bob.io.base -bob.bio.base diff --git a/setup.py b/setup.py index e2a0e0da8465ea11bab98be6f7c8974ba7329259..3a3aaadbd1b7a7371f5208fe978855323b3c5291 100644 --- a/setup.py +++ b/setup.py @@ -1,66 +1,6 @@ #!/usr/bin/env python # vim: set fileencoding=utf-8 : -from setuptools import dist, setup +from setuptools import setup -dist.Distribution(dict(setup_requires=["bob.extension"])) - -from bob.extension.utils import find_packages, load_requirements - -install_requires = load_requirements() - -setup( - name="bob.bio.vein", - version=open("version.txt").read().rstrip(), - description="Vein Recognition Library", - url="https://gitlab.idiap.ch/bob/bob.bio.vein", - license="GPLv3", - author="Andre Anjos,Pedro Tome", - author_email="andre.anjos@idiap.ch,pedro.tome@idiap.ch", - keywords="bob, biometric recognition, evaluation, vein", - long_description=open("README.rst").read(), - packages=find_packages(), - include_package_data=True, - zip_safe=False, - install_requires=install_requires, - entry_points={ - "bob.bio.config": [ - # protocols (must be specified before the database in the cmd) - # utfvp - "nom = bob.bio.vein.config.database.utfvp_nom", - "full = bob.bio.vein.config.database.utfvp_full", - "1vsall = bob.bio.vein.config.database.utfvp_1vsall", - # legacy baselines - "mc = bob.bio.vein.config.maximum_curvature", - "rlt = bob.bio.vein.config.repeated_line_tracking", - "wld = bob.bio.vein.config.wide_line_detector", - # verafinger contactless - "vera_nom = bob.bio.vein.config.database.verafinger_contactless_nom", - ], - "bob.bio.database": [ - "utfvp = bob.bio.vein.config.database.utfvp_nom:database", - "verafinger_contactless = bob.bio.vein.config.database.verafinger_contactless_nom:database", - ], - "bob.bio.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": [ - "bob_bio_vein_compare_rois.py = bob.bio.vein.script.compare_rois:main", - "bob_bio_vein_view_sample.py = bob.bio.vein.script.view_sample:main", - "bob_bio_vein_blame.py = bob.bio.vein.script.blame:main", - ], - }, - classifiers=[ - "Framework :: Bob", - "Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Natural Language :: English", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Software Development :: Libraries :: Python Modules", - ], -) +setup() diff --git a/bob/__init__.py b/src/bob/__init__.py similarity index 100% rename from bob/__init__.py rename to src/bob/__init__.py diff --git a/bob/bio/__init__.py b/src/bob/bio/__init__.py similarity index 100% rename from bob/bio/__init__.py rename to src/bob/bio/__init__.py diff --git a/bob/bio/vein/__init__.py b/src/bob/bio/vein/__init__.py similarity index 52% rename from bob/bio/vein/__init__.py rename to src/bob/bio/vein/__init__.py index 4163a15ccd4b2c984a8a05a9fa760b9826d6c7c3..010965abd1aaf385776f4d48d87a73a3c8f79b64 100644 --- a/bob/bio/vein/__init__.py +++ b/src/bob/bio/vein/__init__.py @@ -1,15 +1,5 @@ #!/usr/bin/env python # vim: set fileencoding=utf-8 : # isort: skip_file - - -def get_config(): - """Returns a string containing the configuration information.""" - - import bob.extension - - return bob.extension.get_config(__name__) - - # gets sphinx autodoc done right - don't remove it __all__ = [_ for _ in dir() if not _.startswith("_")] diff --git a/bob/bio/vein/algorithm/Correlate.py b/src/bob/bio/vein/algorithm/Correlate.py similarity index 100% rename from bob/bio/vein/algorithm/Correlate.py rename to src/bob/bio/vein/algorithm/Correlate.py diff --git a/bob/bio/vein/algorithm/HammingDistance.py b/src/bob/bio/vein/algorithm/HammingDistance.py similarity index 100% rename from bob/bio/vein/algorithm/HammingDistance.py rename to src/bob/bio/vein/algorithm/HammingDistance.py diff --git a/bob/bio/vein/algorithm/MiuraMatch.py b/src/bob/bio/vein/algorithm/MiuraMatch.py similarity index 100% rename from bob/bio/vein/algorithm/MiuraMatch.py rename to src/bob/bio/vein/algorithm/MiuraMatch.py diff --git a/bob/bio/vein/algorithm/__init__.py b/src/bob/bio/vein/algorithm/__init__.py similarity index 99% rename from bob/bio/vein/algorithm/__init__.py rename to src/bob/bio/vein/algorithm/__init__.py index 07c12d726e46f970662aa5ccd8976611d2315b55..603b850a9ecc49d01083715739e7aae73950de31 100644 --- a/bob/bio/vein/algorithm/__init__.py +++ b/src/bob/bio/vein/algorithm/__init__.py @@ -3,6 +3,7 @@ from .MiuraMatch import MiuraMatch from .Correlate import Correlate from .HammingDistance import HammingDistance + # gets sphinx autodoc done right - don't remove it def __appropriate__(*args): """Says object was actually declared here, an not on the import module. diff --git a/bob/bio/vein/config/__init__.py b/src/bob/bio/vein/config/__init__.py similarity index 100% rename from bob/bio/vein/config/__init__.py rename to src/bob/bio/vein/config/__init__.py diff --git a/bob/bio/vein/config/database/__init__.py b/src/bob/bio/vein/config/database/__init__.py similarity index 100% rename from bob/bio/vein/config/database/__init__.py rename to src/bob/bio/vein/config/database/__init__.py diff --git a/bob/bio/vein/config/database/utfvp_1vsall.py b/src/bob/bio/vein/config/database/utfvp_1vsall.py similarity index 100% rename from bob/bio/vein/config/database/utfvp_1vsall.py rename to src/bob/bio/vein/config/database/utfvp_1vsall.py diff --git a/bob/bio/vein/config/database/utfvp_full.py b/src/bob/bio/vein/config/database/utfvp_full.py similarity index 100% rename from bob/bio/vein/config/database/utfvp_full.py rename to src/bob/bio/vein/config/database/utfvp_full.py diff --git a/bob/bio/vein/config/database/utfvp_nom.py b/src/bob/bio/vein/config/database/utfvp_nom.py similarity index 100% rename from bob/bio/vein/config/database/utfvp_nom.py rename to src/bob/bio/vein/config/database/utfvp_nom.py diff --git a/bob/bio/vein/config/database/verafinger_contactless_nom.py b/src/bob/bio/vein/config/database/verafinger_contactless_nom.py similarity index 100% rename from bob/bio/vein/config/database/verafinger_contactless_nom.py rename to src/bob/bio/vein/config/database/verafinger_contactless_nom.py diff --git a/bob/bio/vein/config/maximum_curvature.py b/src/bob/bio/vein/config/maximum_curvature.py similarity index 100% rename from bob/bio/vein/config/maximum_curvature.py rename to src/bob/bio/vein/config/maximum_curvature.py diff --git a/bob/bio/vein/config/principal_curvature.py b/src/bob/bio/vein/config/principal_curvature.py similarity index 100% rename from bob/bio/vein/config/principal_curvature.py rename to src/bob/bio/vein/config/principal_curvature.py diff --git a/bob/bio/vein/config/repeated_line_tracking.py b/src/bob/bio/vein/config/repeated_line_tracking.py similarity index 100% rename from bob/bio/vein/config/repeated_line_tracking.py rename to src/bob/bio/vein/config/repeated_line_tracking.py diff --git a/bob/bio/vein/config/wide_line_detector.py b/src/bob/bio/vein/config/wide_line_detector.py similarity index 100% rename from bob/bio/vein/config/wide_line_detector.py rename to src/bob/bio/vein/config/wide_line_detector.py diff --git a/bob/bio/vein/database/__init__.py b/src/bob/bio/vein/database/__init__.py similarity index 100% rename from bob/bio/vein/database/__init__.py rename to src/bob/bio/vein/database/__init__.py diff --git a/bob/bio/vein/database/database.py b/src/bob/bio/vein/database/database.py similarity index 100% rename from bob/bio/vein/database/database.py rename to src/bob/bio/vein/database/database.py diff --git a/bob/bio/vein/database/roi_annotation.py b/src/bob/bio/vein/database/roi_annotation.py similarity index 100% rename from bob/bio/vein/database/roi_annotation.py rename to src/bob/bio/vein/database/roi_annotation.py diff --git a/bob/bio/vein/database/utfvp.py b/src/bob/bio/vein/database/utfvp.py similarity index 99% rename from bob/bio/vein/database/utfvp.py rename to src/bob/bio/vein/database/utfvp.py index aab0982ee3be82f56d2f2e04c6957db4b3ac1801..079e4188e11804cdbfd62d63982153ae89d21238 100644 --- a/bob/bio/vein/database/utfvp.py +++ b/src/bob/bio/vein/database/utfvp.py @@ -6,13 +6,15 @@ Utfvp database implementation """ +from clapp.rc import UserDefaults from sklearn.pipeline import make_pipeline import bob.io.base from bob.bio.base.database import CSVDatabase, FileSampleLoader from bob.bio.vein.database.roi_annotation import ROIAnnotation -from bob.extension import rc + +rc = UserDefaults("~/.bobrc") class UtfvpDatabase(CSVDatabase): @@ -164,7 +166,6 @@ class UtfvpDatabase(CSVDatabase): dataset_protocols_hash = "fe51ba85" def __init__(self, protocol): - super().__init__( name=self.name, protocol=protocol, diff --git a/bob/bio/vein/database/verafinger_contactless.py b/src/bob/bio/vein/database/verafinger_contactless.py similarity index 97% rename from bob/bio/vein/database/verafinger_contactless.py rename to src/bob/bio/vein/database/verafinger_contactless.py index 4c71ff66cda9e05af6738f97c26d411990f64bfc..54af332a20e722b94b8a8186cd27e76561b37d69 100644 --- a/bob/bio/vein/database/verafinger_contactless.py +++ b/src/bob/bio/vein/database/verafinger_contactless.py @@ -6,10 +6,13 @@ VERA-Fingervein-Contactless database implementation """ +from clapp.rc import UserDefaults + import bob.io.base from bob.bio.base.database import CSVDatabase, FileSampleLoader -from bob.extension import rc + +rc = UserDefaults("~/.bobrc") class VerafingerContactless(CSVDatabase): @@ -60,7 +63,6 @@ class VerafingerContactless(CSVDatabase): dataset_protocols_hash = "656ef935" def __init__(self, protocol): - super().__init__( name=self.name, protocol=protocol, diff --git a/bob/bio/vein/extractor/MaximumCurvature.py b/src/bob/bio/vein/extractor/MaximumCurvature.py similarity index 99% rename from bob/bio/vein/extractor/MaximumCurvature.py rename to src/bob/bio/vein/extractor/MaximumCurvature.py index 518d5620f6102fc2bea09b79e528d56c72a30b0d..9119f7e0de0a233dd6241d0331d3fedb19e2c30d 100644 --- a/bob/bio/vein/extractor/MaximumCurvature.py +++ b/src/bob/bio/vein/extractor/MaximumCurvature.py @@ -472,7 +472,6 @@ class MaximumCurvature(Extractor): plt.show() def __call__(self, image): - finger_image = image[0].astype("float64") finger_mask = image[1] diff --git a/bob/bio/vein/extractor/NormalisedCrossCorrelation.py b/src/bob/bio/vein/extractor/NormalisedCrossCorrelation.py similarity index 100% rename from bob/bio/vein/extractor/NormalisedCrossCorrelation.py rename to src/bob/bio/vein/extractor/NormalisedCrossCorrelation.py diff --git a/bob/bio/vein/extractor/PrincipalCurvature.py b/src/bob/bio/vein/extractor/PrincipalCurvature.py similarity index 100% rename from bob/bio/vein/extractor/PrincipalCurvature.py rename to src/bob/bio/vein/extractor/PrincipalCurvature.py diff --git a/bob/bio/vein/extractor/RepeatedLineTracking.py b/src/bob/bio/vein/extractor/RepeatedLineTracking.py similarity index 99% rename from bob/bio/vein/extractor/RepeatedLineTracking.py rename to src/bob/bio/vein/extractor/RepeatedLineTracking.py index 6a9ec79752c833ba2586528ece614e4c9a841da5..dd62de036d065132124b73a6bcf57bace8a0a8e3 100644 --- a/bob/bio/vein/extractor/RepeatedLineTracking.py +++ b/src/bob/bio/vein/extractor/RepeatedLineTracking.py @@ -28,7 +28,6 @@ class RepeatedLineTracking(Extractor): rescale=True, seed=0, # Seed for the algorithm's random walk ): - # call base class constructor Extractor.__init__( self, diff --git a/bob/bio/vein/extractor/WideLineDetector.py b/src/bob/bio/vein/extractor/WideLineDetector.py similarity index 99% rename from bob/bio/vein/extractor/WideLineDetector.py rename to src/bob/bio/vein/extractor/WideLineDetector.py index d64899ffcc42a25a9cdc5695d173658a59beeefe..8eace9a6ae0f28e72da5534c5fe6be054ec05beb 100644 --- a/bob/bio/vein/extractor/WideLineDetector.py +++ b/src/bob/bio/vein/extractor/WideLineDetector.py @@ -22,7 +22,6 @@ class WideLineDetector(Extractor): g=41, # Sum of neigbourhood threshold rescale=True, ): - # call base class constructor Extractor.__init__( self, diff --git a/bob/bio/vein/extractor/__init__.py b/src/bob/bio/vein/extractor/__init__.py similarity index 100% rename from bob/bio/vein/extractor/__init__.py rename to src/bob/bio/vein/extractor/__init__.py diff --git a/bob/bio/vein/img_test/Vt.mat b/src/bob/bio/vein/img_test/Vt.mat similarity index 100% rename from bob/bio/vein/img_test/Vt.mat rename to src/bob/bio/vein/img_test/Vt.mat diff --git a/bob/bio/vein/img_test/Vt.mat.hdf5 b/src/bob/bio/vein/img_test/Vt.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/Vt.mat.hdf5 rename to src/bob/bio/vein/img_test/Vt.mat.hdf5 diff --git a/bob/bio/vein/img_test/bla.mat b/src/bob/bio/vein/img_test/bla.mat similarity index 100% rename from bob/bio/vein/img_test/bla.mat rename to src/bob/bio/vein/img_test/bla.mat diff --git a/bob/bio/vein/img_test/bla.mat.hdf5 b/src/bob/bio/vein/img_test/bla.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/bla.mat.hdf5 rename to src/bob/bio/vein/img_test/bla.mat.hdf5 diff --git a/bob/bio/vein/img_test/bla3.mat b/src/bob/bio/vein/img_test/bla3.mat similarity index 100% rename from bob/bio/vein/img_test/bla3.mat rename to src/bob/bio/vein/img_test/bla3.mat diff --git a/bob/bio/vein/img_test/bla3.mat.hdf5 b/src/bob/bio/vein/img_test/bla3.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/bla3.mat.hdf5 rename to src/bob/bio/vein/img_test/bla3.mat.hdf5 diff --git a/bob/bio/vein/img_test/fvr255.mat b/src/bob/bio/vein/img_test/fvr255.mat similarity index 100% rename from bob/bio/vein/img_test/fvr255.mat rename to src/bob/bio/vein/img_test/fvr255.mat diff --git a/bob/bio/vein/img_test/fvr255.mat.hdf5 b/src/bob/bio/vein/img_test/fvr255.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/fvr255.mat.hdf5 rename to src/bob/bio/vein/img_test/fvr255.mat.hdf5 diff --git a/bob/bio/vein/img_test/fvr_huang.mat b/src/bob/bio/vein/img_test/fvr_huang.mat similarity index 100% rename from bob/bio/vein/img_test/fvr_huang.mat rename to src/bob/bio/vein/img_test/fvr_huang.mat diff --git a/bob/bio/vein/img_test/fvr_huang.mat.hdf5 b/src/bob/bio/vein/img_test/fvr_huang.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/fvr_huang.mat.hdf5 rename to src/bob/bio/vein/img_test/fvr_huang.mat.hdf5 diff --git a/bob/bio/vein/img_test/fvr_mask.mat b/src/bob/bio/vein/img_test/fvr_mask.mat similarity index 100% rename from bob/bio/vein/img_test/fvr_mask.mat rename to src/bob/bio/vein/img_test/fvr_mask.mat diff --git a/bob/bio/vein/img_test/fvr_mask.mat.hdf5 b/src/bob/bio/vein/img_test/fvr_mask.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/fvr_mask.mat.hdf5 rename to src/bob/bio/vein/img_test/fvr_mask.mat.hdf5 diff --git a/bob/bio/vein/img_test/fvr_matlab.mat b/src/bob/bio/vein/img_test/fvr_matlab.mat similarity index 100% rename from bob/bio/vein/img_test/fvr_matlab.mat rename to src/bob/bio/vein/img_test/fvr_matlab.mat diff --git a/bob/bio/vein/img_test/fvr_matlab.mat.hdf5 b/src/bob/bio/vein/img_test/fvr_matlab.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/fvr_matlab.mat.hdf5 rename to src/bob/bio/vein/img_test/fvr_matlab.mat.hdf5 diff --git a/bob/bio/vein/img_test/fvr_matlab_double_align.mat b/src/bob/bio/vein/img_test/fvr_matlab_double_align.mat similarity index 100% rename from bob/bio/vein/img_test/fvr_matlab_double_align.mat rename to src/bob/bio/vein/img_test/fvr_matlab_double_align.mat diff --git a/bob/bio/vein/img_test/fvr_matlab_double_align.mat.hdf5 b/src/bob/bio/vein/img_test/fvr_matlab_double_align.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/fvr_matlab_double_align.mat.hdf5 rename to src/bob/bio/vein/img_test/fvr_matlab_double_align.mat.hdf5 diff --git a/bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat b/src/bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat similarity index 100% rename from bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat rename to src/bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat diff --git a/bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat.hdf5 b/src/bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat.hdf5 rename to src/bob/bio/vein/img_test/fvr_matlab_double_align_reduced.mat.hdf5 diff --git a/bob/bio/vein/img_test/image.mat b/src/bob/bio/vein/img_test/image.mat similarity index 100% rename from bob/bio/vein/img_test/image.mat rename to src/bob/bio/vein/img_test/image.mat diff --git a/bob/bio/vein/img_test/image.mat.hdf5 b/src/bob/bio/vein/img_test/image.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/image.mat.hdf5 rename to src/bob/bio/vein/img_test/image.mat.hdf5 diff --git a/bob/bio/vein/img_test/img.mat b/src/bob/bio/vein/img_test/img.mat similarity index 100% rename from bob/bio/vein/img_test/img.mat rename to src/bob/bio/vein/img_test/img.mat diff --git a/bob/bio/vein/img_test/img.mat.hdf5 b/src/bob/bio/vein/img_test/img.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img.mat.hdf5 rename to src/bob/bio/vein/img_test/img.mat.hdf5 diff --git a/bob/bio/vein/img_test/imgUTFVP.mat b/src/bob/bio/vein/img_test/imgUTFVP.mat similarity index 100% rename from bob/bio/vein/img_test/imgUTFVP.mat rename to src/bob/bio/vein/img_test/imgUTFVP.mat diff --git a/bob/bio/vein/img_test/imgUTFVP.mat.hdf5 b/src/bob/bio/vein/img_test/imgUTFVP.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/imgUTFVP.mat.hdf5 rename to src/bob/bio/vein/img_test/imgUTFVP.mat.hdf5 diff --git a/bob/bio/vein/img_test/imgUTFVPdouble.mat b/src/bob/bio/vein/img_test/imgUTFVPdouble.mat similarity index 100% rename from bob/bio/vein/img_test/imgUTFVPdouble.mat rename to src/bob/bio/vein/img_test/imgUTFVPdouble.mat diff --git a/bob/bio/vein/img_test/imgUTFVPdouble.mat.hdf5 b/src/bob/bio/vein/img_test/imgUTFVPdouble.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/imgUTFVPdouble.mat.hdf5 rename to src/bob/bio/vein/img_test/imgUTFVPdouble.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_001_L_1.mat b/src/bob/bio/vein/img_test/img_001_L_1.mat similarity index 100% rename from bob/bio/vein/img_test/img_001_L_1.mat rename to src/bob/bio/vein/img_test/img_001_L_1.mat diff --git a/bob/bio/vein/img_test/img_001_L_1.mat.hdf5 b/src/bob/bio/vein/img_test/img_001_L_1.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_001_L_1.mat.hdf5 rename to src/bob/bio/vein/img_test/img_001_L_1.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_001_L_2.mat b/src/bob/bio/vein/img_test/img_001_L_2.mat similarity index 100% rename from bob/bio/vein/img_test/img_001_L_2.mat rename to src/bob/bio/vein/img_test/img_001_L_2.mat diff --git a/bob/bio/vein/img_test/img_001_L_2.mat.hdf5 b/src/bob/bio/vein/img_test/img_001_L_2.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_001_L_2.mat.hdf5 rename to src/bob/bio/vein/img_test/img_001_L_2.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_huang.mat b/src/bob/bio/vein/img_test/img_huang.mat similarity index 100% rename from bob/bio/vein/img_test/img_huang.mat rename to src/bob/bio/vein/img_test/img_huang.mat diff --git a/bob/bio/vein/img_test/img_huang.mat.hdf5 b/src/bob/bio/vein/img_test/img_huang.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_huang.mat.hdf5 rename to src/bob/bio/vein/img_test/img_huang.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_matlab.mat b/src/bob/bio/vein/img_test/img_matlab.mat similarity index 100% rename from bob/bio/vein/img_test/img_matlab.mat rename to src/bob/bio/vein/img_test/img_matlab.mat diff --git a/bob/bio/vein/img_test/img_matlab.mat.hdf5 b/src/bob/bio/vein/img_test/img_matlab.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_matlab.mat.hdf5 rename to src/bob/bio/vein/img_test/img_matlab.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_matlab_double_align.mat b/src/bob/bio/vein/img_test/img_matlab_double_align.mat similarity index 100% rename from bob/bio/vein/img_test/img_matlab_double_align.mat rename to src/bob/bio/vein/img_test/img_matlab_double_align.mat diff --git a/bob/bio/vein/img_test/img_matlab_double_align.mat.hdf5 b/src/bob/bio/vein/img_test/img_matlab_double_align.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_matlab_double_align.mat.hdf5 rename to src/bob/bio/vein/img_test/img_matlab_double_align.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_matlab_double_align_reduced.mat b/src/bob/bio/vein/img_test/img_matlab_double_align_reduced.mat similarity index 100% rename from bob/bio/vein/img_test/img_matlab_double_align_reduced.mat rename to src/bob/bio/vein/img_test/img_matlab_double_align_reduced.mat diff --git a/bob/bio/vein/img_test/img_matlab_double_align_reduced.mat.hdf5 b/src/bob/bio/vein/img_test/img_matlab_double_align_reduced.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_matlab_double_align_reduced.mat.hdf5 rename to src/bob/bio/vein/img_test/img_matlab_double_align_reduced.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_matlab_uint8.mat b/src/bob/bio/vein/img_test/img_matlab_uint8.mat similarity index 100% rename from bob/bio/vein/img_test/img_matlab_uint8.mat rename to src/bob/bio/vein/img_test/img_matlab_uint8.mat diff --git a/bob/bio/vein/img_test/img_matlab_uint8.mat.hdf5 b/src/bob/bio/vein/img_test/img_matlab_uint8.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_matlab_uint8.mat.hdf5 rename to src/bob/bio/vein/img_test/img_matlab_uint8.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_o.mat b/src/bob/bio/vein/img_test/img_o.mat similarity index 100% rename from bob/bio/vein/img_test/img_o.mat rename to src/bob/bio/vein/img_test/img_o.mat diff --git a/bob/bio/vein/img_test/img_o.mat.hdf5 b/src/bob/bio/vein/img_test/img_o.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_o.mat.hdf5 rename to src/bob/bio/vein/img_test/img_o.mat.hdf5 diff --git a/bob/bio/vein/img_test/img_ouint8.mat b/src/bob/bio/vein/img_test/img_ouint8.mat similarity index 100% rename from bob/bio/vein/img_test/img_ouint8.mat rename to src/bob/bio/vein/img_test/img_ouint8.mat diff --git a/bob/bio/vein/img_test/img_ouint8.mat.hdf5 b/src/bob/bio/vein/img_test/img_ouint8.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/img_ouint8.mat.hdf5 rename to src/bob/bio/vein/img_test/img_ouint8.mat.hdf5 diff --git a/bob/bio/vein/img_test/k.mat b/src/bob/bio/vein/img_test/k.mat similarity index 100% rename from bob/bio/vein/img_test/k.mat rename to src/bob/bio/vein/img_test/k.mat diff --git a/bob/bio/vein/img_test/k.mat.hdf5 b/src/bob/bio/vein/img_test/k.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/k.mat.hdf5 rename to src/bob/bio/vein/img_test/k.mat.hdf5 diff --git a/bob/bio/vein/img_test/k1.mat b/src/bob/bio/vein/img_test/k1.mat similarity index 100% rename from bob/bio/vein/img_test/k1.mat rename to src/bob/bio/vein/img_test/k1.mat diff --git a/bob/bio/vein/img_test/k1.mat.hdf5 b/src/bob/bio/vein/img_test/k1.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/k1.mat.hdf5 rename to src/bob/bio/vein/img_test/k1.mat.hdf5 diff --git a/bob/bio/vein/img_test/k2.mat b/src/bob/bio/vein/img_test/k2.mat similarity index 100% rename from bob/bio/vein/img_test/k2.mat rename to src/bob/bio/vein/img_test/k2.mat diff --git a/bob/bio/vein/img_test/k2.mat.hdf5 b/src/bob/bio/vein/img_test/k2.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/k2.mat.hdf5 rename to src/bob/bio/vein/img_test/k2.mat.hdf5 diff --git a/bob/bio/vein/img_test/mask_001_L_1.mat b/src/bob/bio/vein/img_test/mask_001_L_1.mat similarity index 100% rename from bob/bio/vein/img_test/mask_001_L_1.mat rename to src/bob/bio/vein/img_test/mask_001_L_1.mat diff --git a/bob/bio/vein/img_test/mask_001_L_1.mat.hdf5 b/src/bob/bio/vein/img_test/mask_001_L_1.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/mask_001_L_1.mat.hdf5 rename to src/bob/bio/vein/img_test/mask_001_L_1.mat.hdf5 diff --git a/bob/bio/vein/img_test/mask_001_L_2.mat b/src/bob/bio/vein/img_test/mask_001_L_2.mat similarity index 100% rename from bob/bio/vein/img_test/mask_001_L_2.mat rename to src/bob/bio/vein/img_test/mask_001_L_2.mat diff --git a/bob/bio/vein/img_test/mask_001_L_2.mat.hdf5 b/src/bob/bio/vein/img_test/mask_001_L_2.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/mask_001_L_2.mat.hdf5 rename to src/bob/bio/vein/img_test/mask_001_L_2.mat.hdf5 diff --git a/bob/bio/vein/img_test/template_001_L_1.mat b/src/bob/bio/vein/img_test/template_001_L_1.mat similarity index 100% rename from bob/bio/vein/img_test/template_001_L_1.mat rename to src/bob/bio/vein/img_test/template_001_L_1.mat diff --git a/bob/bio/vein/img_test/template_001_L_1.mat.hdf5 b/src/bob/bio/vein/img_test/template_001_L_1.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/template_001_L_1.mat.hdf5 rename to src/bob/bio/vein/img_test/template_001_L_1.mat.hdf5 diff --git a/bob/bio/vein/img_test/template_001_L_2.mat b/src/bob/bio/vein/img_test/template_001_L_2.mat similarity index 100% rename from bob/bio/vein/img_test/template_001_L_2.mat rename to src/bob/bio/vein/img_test/template_001_L_2.mat diff --git a/bob/bio/vein/img_test/template_001_L_2.mat.hdf5 b/src/bob/bio/vein/img_test/template_001_L_2.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/template_001_L_2.mat.hdf5 rename to src/bob/bio/vein/img_test/template_001_L_2.mat.hdf5 diff --git a/bob/bio/vein/img_test/test_fvr.mat b/src/bob/bio/vein/img_test/test_fvr.mat similarity index 100% rename from bob/bio/vein/img_test/test_fvr.mat rename to src/bob/bio/vein/img_test/test_fvr.mat diff --git a/bob/bio/vein/img_test/test_fvr.mat.hdf5 b/src/bob/bio/vein/img_test/test_fvr.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/test_fvr.mat.hdf5 rename to src/bob/bio/vein/img_test/test_fvr.mat.hdf5 diff --git a/bob/bio/vein/img_test/test_img.mat b/src/bob/bio/vein/img_test/test_img.mat similarity index 100% rename from bob/bio/vein/img_test/test_img.mat rename to src/bob/bio/vein/img_test/test_img.mat diff --git a/bob/bio/vein/img_test/test_img.mat.hdf5 b/src/bob/bio/vein/img_test/test_img.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/test_img.mat.hdf5 rename to src/bob/bio/vein/img_test/test_img.mat.hdf5 diff --git a/bob/bio/vein/img_test/veins.mat b/src/bob/bio/vein/img_test/veins.mat similarity index 100% rename from bob/bio/vein/img_test/veins.mat rename to src/bob/bio/vein/img_test/veins.mat diff --git a/bob/bio/vein/img_test/veins.mat.hdf5 b/src/bob/bio/vein/img_test/veins.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/veins.mat.hdf5 rename to src/bob/bio/vein/img_test/veins.mat.hdf5 diff --git a/bob/bio/vein/img_test/xs.mat b/src/bob/bio/vein/img_test/xs.mat similarity index 100% rename from bob/bio/vein/img_test/xs.mat rename to src/bob/bio/vein/img_test/xs.mat diff --git a/bob/bio/vein/img_test/xs.mat.hdf5 b/src/bob/bio/vein/img_test/xs.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/xs.mat.hdf5 rename to src/bob/bio/vein/img_test/xs.mat.hdf5 diff --git a/bob/bio/vein/img_test/ys.mat b/src/bob/bio/vein/img_test/ys.mat similarity index 100% rename from bob/bio/vein/img_test/ys.mat rename to src/bob/bio/vein/img_test/ys.mat diff --git a/bob/bio/vein/img_test/ys.mat.hdf5 b/src/bob/bio/vein/img_test/ys.mat.hdf5 similarity index 100% rename from bob/bio/vein/img_test/ys.mat.hdf5 rename to src/bob/bio/vein/img_test/ys.mat.hdf5 diff --git a/bob/bio/vein/preprocessor/__init__.py b/src/bob/bio/vein/preprocessor/__init__.py similarity index 99% rename from bob/bio/vein/preprocessor/__init__.py rename to src/bob/bio/vein/preprocessor/__init__.py index 51771f946176a8d461e9b5dde7f04eec846c3a81..c5e182e857c267b341f813302003490955f56321 100644 --- a/bob/bio/vein/preprocessor/__init__.py +++ b/src/bob/bio/vein/preprocessor/__init__.py @@ -6,6 +6,7 @@ from .normalize import Normalizer, NoNormalization, HuangNormalization from .filters import Filter, NoFilter, HistogramEqualization from .preprocessor import Preprocessor + # gets sphinx autodoc done right - don't remove it def __appropriate__(*args): """Says object was actually declared here, an not on the import module. diff --git a/bob/bio/vein/preprocessor/crop.py b/src/bob/bio/vein/preprocessor/crop.py similarity index 100% rename from bob/bio/vein/preprocessor/crop.py rename to src/bob/bio/vein/preprocessor/crop.py diff --git a/bob/bio/vein/preprocessor/filters.py b/src/bob/bio/vein/preprocessor/filters.py similarity index 100% rename from bob/bio/vein/preprocessor/filters.py rename to src/bob/bio/vein/preprocessor/filters.py diff --git a/bob/bio/vein/preprocessor/mask.py b/src/bob/bio/vein/preprocessor/mask.py similarity index 99% rename from bob/bio/vein/preprocessor/mask.py rename to src/bob/bio/vein/preprocessor/mask.py index 3e146fbd7f1487fc138075f337f152bef4b0e6e3..88e5ecd0b8eacef38d1447e5d9e28bec86c996ad 100644 --- a/bob/bio/vein/preprocessor/mask.py +++ b/src/bob/bio/vein/preprocessor/mask.py @@ -32,7 +32,6 @@ class Padder(object): """ def __init__(self, padding_width=5, padding_constant=51): - self.padding_width = padding_width self.padding_constant = padding_constant @@ -211,7 +210,6 @@ class KonoMask(Masker): """ def __init__(self, sigma=5, padder=Padder()): - self.sigma = sigma self.padder = padder diff --git a/bob/bio/vein/preprocessor/normalize.py b/src/bob/bio/vein/preprocessor/normalize.py similarity index 100% rename from bob/bio/vein/preprocessor/normalize.py rename to src/bob/bio/vein/preprocessor/normalize.py diff --git a/bob/bio/vein/preprocessor/preprocessor.py b/src/bob/bio/vein/preprocessor/preprocessor.py similarity index 99% rename from bob/bio/vein/preprocessor/preprocessor.py rename to src/bob/bio/vein/preprocessor/preprocessor.py index 724c6432c94b868df9ffe4aa6ff1ca431962b7f7..2b45b3dcd19aaa893b422e83b59402fafe0adb0f 100644 --- a/bob/bio/vein/preprocessor/preprocessor.py +++ b/src/bob/bio/vein/preprocessor/preprocessor.py @@ -40,14 +40,13 @@ class Preprocessor(BasePreprocessor): """ def __init__(self, crop, mask, normalize, filter, **kwargs): - BasePreprocessor.__init__( self, crop=crop, mask=mask, normalize=normalize, filter=filter, - **kwargs + **kwargs, ) self.crop = crop diff --git a/bob/bio/vein/preprocessor/utils.py b/src/bob/bio/vein/preprocessor/utils.py similarity index 100% rename from bob/bio/vein/preprocessor/utils.py rename to src/bob/bio/vein/preprocessor/utils.py diff --git a/bob/bio/vein/script/__init__.py b/src/bob/bio/vein/script/__init__.py similarity index 100% rename from bob/bio/vein/script/__init__.py rename to src/bob/bio/vein/script/__init__.py diff --git a/bob/bio/vein/script/blame.py b/src/bob/bio/vein/script/blame.py similarity index 96% rename from bob/bio/vein/script/blame.py rename to src/bob/bio/vein/script/blame.py index eb2cfde6dde14843797548538fb5f11e2234ddeb..bda0e923331dce1050ec2ad119374b8a6a0fa9a7 100644 --- a/bob/bio/vein/script/blame.py +++ b/src/bob/bio/vein/script/blame.py @@ -37,15 +37,13 @@ Examples: import os import sys +import clapp.logging import numpy -import bob.extension.log - -logger = bob.extension.log.setup("bob.bio.vein") +logger = clapp.logging.setup("bob.bio.vein") def main(user_input=None): - if user_input is not None: argv = user_input else: @@ -67,7 +65,7 @@ def main(user_input=None): # Sets-up logging verbosity = int(args["--verbose"]) - bob.extension.log.set_verbosity_level(logger, verbosity) + clapp.logging.set_verbosity_level(logger, verbosity) # validates number of cases cases = int(args["--cases"]) diff --git a/bob/bio/vein/script/compare_rois.py b/src/bob/bio/vein/script/compare_rois.py similarity index 97% rename from bob/bio/vein/script/compare_rois.py rename to src/bob/bio/vein/script/compare_rois.py index 7eb79816774ba10d9e6774221e5c4f75cb71e4aa..07f63e0bc293a178d81ef1e4610e3727cfdf8d0d 100644 --- a/bob/bio/vein/script/compare_rois.py +++ b/src/bob/bio/vein/script/compare_rois.py @@ -48,14 +48,11 @@ import operator import os import sys +import clapp.logging import h5py import numpy -import bob.extension.log - -logger = bob.extension.log.setup("bob.bio.vein") - -import bob.io.base +logger = clapp.logging.setup("bob.bio.vein") def make_catalog(d): @@ -139,7 +136,6 @@ def mean_std_for_column(table, column): def main(user_input=None): - if user_input is not None: argv = user_input else: @@ -161,7 +157,7 @@ def main(user_input=None): # Sets-up logging verbosity = int(args["--verbose"]) - bob.extension.log.set_verbosity_level(logger, verbosity) + clapp.logging.set_verbosity_level(logger, verbosity) # Catalogs gt = make_catalog(args["<ground-truth>"]) diff --git a/bob/bio/vein/script/validate.py b/src/bob/bio/vein/script/validate.py similarity index 95% rename from bob/bio/vein/script/validate.py rename to src/bob/bio/vein/script/validate.py index 655f4e98dbd94f59a986c2f2bd52e640813ea4cd..937418e90f9aec47fd48f51de55b1dc10fe9b7ed 100644 --- a/bob/bio/vein/script/validate.py +++ b/src/bob/bio/vein/script/validate.py @@ -36,9 +36,9 @@ def setup_logger(name, level): """ - import bob.extension.log + import clapp.logging - logger = bob.extension.log.setup(name) + logger = clapp.logging.setup(name) if not (0 <= level < 4): raise schema.SchemaError( @@ -46,7 +46,7 @@ def setup_logger(name, level): ) # Sets-up logging - bob.extension.log.set_verbosity_level(logger, level) + clapp.logging.set_verbosity_level(logger, level) return logger diff --git a/bob/bio/vein/script/view_sample.py b/src/bob/bio/vein/script/view_sample.py similarity index 98% rename from bob/bio/vein/script/view_sample.py rename to src/bob/bio/vein/script/view_sample.py index 24511e3ec1664624d51fa59a73c63b46bc94ef62..9bc5041161ed9d133184d0f0fd175462b14ed9e6 100644 --- a/bob/bio/vein/script/view_sample.py +++ b/src/bob/bio/vein/script/view_sample.py @@ -46,14 +46,13 @@ Examples: import os import sys +import clapp.logging import docopt import h5py import numpy import schema -import bob.extension.log - -logger = bob.extension.log.setup("bob.bio.vein") +logger = clapp.logging.setup("bob.bio.vein") import matplotlib.pyplot as mpl @@ -198,7 +197,6 @@ def validate(args): def main(user_input=None): - if user_input is not None: argv = user_input else: diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/bob/bio/vein/tests/__init__.py b/tests/__init__.py similarity index 100% rename from bob/bio/vein/tests/__init__.py rename to tests/__init__.py diff --git a/bob/bio/vein/tests/algorithms/0001_2_1_120509-135338.mat b/tests/algorithms/0001_2_1_120509-135338.mat similarity index 100% rename from bob/bio/vein/tests/algorithms/0001_2_1_120509-135338.mat rename to tests/algorithms/0001_2_1_120509-135338.mat diff --git a/bob/bio/vein/tests/algorithms/0001_2_1_120509-135338.mat.hdf5 b/tests/algorithms/0001_2_1_120509-135338.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/algorithms/0001_2_1_120509-135338.mat.hdf5 rename to tests/algorithms/0001_2_1_120509-135338.mat.hdf5 diff --git a/bob/bio/vein/tests/algorithms/0001_2_2_120509-135558.mat b/tests/algorithms/0001_2_2_120509-135558.mat similarity index 100% rename from bob/bio/vein/tests/algorithms/0001_2_2_120509-135558.mat rename to tests/algorithms/0001_2_2_120509-135558.mat diff --git a/bob/bio/vein/tests/algorithms/0001_2_2_120509-135558.mat.hdf5 b/tests/algorithms/0001_2_2_120509-135558.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/algorithms/0001_2_2_120509-135558.mat.hdf5 rename to tests/algorithms/0001_2_2_120509-135558.mat.hdf5 diff --git a/bob/bio/vein/tests/algorithms/0003_2_1_120509-141255.mat b/tests/algorithms/0003_2_1_120509-141255.mat similarity index 100% rename from bob/bio/vein/tests/algorithms/0003_2_1_120509-141255.mat rename to tests/algorithms/0003_2_1_120509-141255.mat diff --git a/bob/bio/vein/tests/algorithms/0003_2_1_120509-141255.mat.hdf5 b/tests/algorithms/0003_2_1_120509-141255.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/algorithms/0003_2_1_120509-141255.mat.hdf5 rename to tests/algorithms/0003_2_1_120509-141255.mat.hdf5 diff --git a/bob/bio/vein/tests/algorithms/001_L_1.mat b/tests/algorithms/001_L_1.mat similarity index 100% rename from bob/bio/vein/tests/algorithms/001_L_1.mat rename to tests/algorithms/001_L_1.mat diff --git a/bob/bio/vein/tests/algorithms/001_L_1.mat.hdf5 b/tests/algorithms/001_L_1.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/algorithms/001_L_1.mat.hdf5 rename to tests/algorithms/001_L_1.mat.hdf5 diff --git a/bob/bio/vein/tests/algorithms/001_L_1_h4w40.mat b/tests/algorithms/001_L_1_h4w40.mat similarity index 100% rename from bob/bio/vein/tests/algorithms/001_L_1_h4w40.mat rename to tests/algorithms/001_L_1_h4w40.mat diff --git a/bob/bio/vein/tests/algorithms/001_L_1_h4w40.mat.hdf5 b/tests/algorithms/001_L_1_h4w40.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/algorithms/001_L_1_h4w40.mat.hdf5 rename to tests/algorithms/001_L_1_h4w40.mat.hdf5 diff --git a/bob/bio/vein/tests/extractors/huangwl_input_fvr.mat b/tests/extractors/huangwl_input_fvr.mat similarity index 100% rename from bob/bio/vein/tests/extractors/huangwl_input_fvr.mat rename to tests/extractors/huangwl_input_fvr.mat diff --git a/bob/bio/vein/tests/extractors/huangwl_input_fvr.mat.hdf5 b/tests/extractors/huangwl_input_fvr.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/huangwl_input_fvr.mat.hdf5 rename to tests/extractors/huangwl_input_fvr.mat.hdf5 diff --git a/bob/bio/vein/tests/extractors/huangwl_input_img.mat b/tests/extractors/huangwl_input_img.mat similarity index 100% rename from bob/bio/vein/tests/extractors/huangwl_input_img.mat rename to tests/extractors/huangwl_input_img.mat diff --git a/bob/bio/vein/tests/extractors/huangwl_input_img.mat.hdf5 b/tests/extractors/huangwl_input_img.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/huangwl_input_img.mat.hdf5 rename to tests/extractors/huangwl_input_img.mat.hdf5 diff --git a/bob/bio/vein/tests/extractors/huangwl_output.mat b/tests/extractors/huangwl_output.mat similarity index 100% rename from bob/bio/vein/tests/extractors/huangwl_output.mat rename to tests/extractors/huangwl_output.mat diff --git a/bob/bio/vein/tests/extractors/huangwl_output.mat.hdf5 b/tests/extractors/huangwl_output.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/huangwl_output.mat.hdf5 rename to tests/extractors/huangwl_output.mat.hdf5 diff --git a/bob/bio/vein/tests/extractors/image.hdf5 b/tests/extractors/image.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/image.hdf5 rename to tests/extractors/image.hdf5 diff --git a/bob/bio/vein/tests/extractors/mask.hdf5 b/tests/extractors/mask.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/mask.hdf5 rename to tests/extractors/mask.hdf5 diff --git a/bob/bio/vein/tests/extractors/mc_bin_matlab.hdf5 b/tests/extractors/mc_bin_matlab.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/mc_bin_matlab.hdf5 rename to tests/extractors/mc_bin_matlab.hdf5 diff --git a/bob/bio/vein/tests/extractors/mc_g_matlab.hdf5 b/tests/extractors/mc_g_matlab.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/mc_g_matlab.hdf5 rename to tests/extractors/mc_g_matlab.hdf5 diff --git a/bob/bio/vein/tests/extractors/mc_vt_matlab.hdf5 b/tests/extractors/mc_vt_matlab.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/mc_vt_matlab.hdf5 rename to tests/extractors/mc_vt_matlab.hdf5 diff --git a/bob/bio/vein/tests/extractors/miurarlt_input_fvr.mat b/tests/extractors/miurarlt_input_fvr.mat similarity index 100% rename from bob/bio/vein/tests/extractors/miurarlt_input_fvr.mat rename to tests/extractors/miurarlt_input_fvr.mat diff --git a/bob/bio/vein/tests/extractors/miurarlt_input_fvr.mat.hdf5 b/tests/extractors/miurarlt_input_fvr.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/miurarlt_input_fvr.mat.hdf5 rename to tests/extractors/miurarlt_input_fvr.mat.hdf5 diff --git a/bob/bio/vein/tests/extractors/miurarlt_input_img.mat b/tests/extractors/miurarlt_input_img.mat similarity index 100% rename from bob/bio/vein/tests/extractors/miurarlt_input_img.mat rename to tests/extractors/miurarlt_input_img.mat diff --git a/bob/bio/vein/tests/extractors/miurarlt_input_img.mat.hdf5 b/tests/extractors/miurarlt_input_img.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/miurarlt_input_img.mat.hdf5 rename to tests/extractors/miurarlt_input_img.mat.hdf5 diff --git a/bob/bio/vein/tests/extractors/miurarlt_output.mat b/tests/extractors/miurarlt_output.mat similarity index 100% rename from bob/bio/vein/tests/extractors/miurarlt_output.mat rename to tests/extractors/miurarlt_output.mat diff --git a/bob/bio/vein/tests/extractors/miurarlt_output.mat.hdf5 b/tests/extractors/miurarlt_output.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/extractors/miurarlt_output.mat.hdf5 rename to tests/extractors/miurarlt_output.mat.hdf5 diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517.png b/tests/preprocessors/0019_3_1_120509-160517.png similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517.png rename to tests/preprocessors/0019_3_1_120509-160517.png diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517.txt b/tests/preprocessors/0019_3_1_120509-160517.txt similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517.txt rename to tests/preprocessors/0019_3_1_120509-160517.txt diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat b/tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat rename to tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat.hdf5 b/tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat.hdf5 rename to tests/preprocessors/0019_3_1_120509-160517_fvr_lee_huang.mat.hdf5 diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee.mat b/tests/preprocessors/0019_3_1_120509-160517_img_lee.mat similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee.mat rename to tests/preprocessors/0019_3_1_120509-160517_img_lee.mat diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee.mat.hdf5 b/tests/preprocessors/0019_3_1_120509-160517_img_lee.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee.mat.hdf5 rename to tests/preprocessors/0019_3_1_120509-160517_img_lee.mat.hdf5 diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat b/tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat rename to tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat diff --git a/bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat.hdf5 b/tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat.hdf5 similarity index 100% rename from bob/bio/vein/tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat.hdf5 rename to tests/preprocessors/0019_3_1_120509-160517_img_lee_huang.mat.hdf5 diff --git a/bob/bio/vein/tests/test_databases.py b/tests/test_databases.py similarity index 100% rename from bob/bio/vein/tests/test_databases.py rename to tests/test_databases.py diff --git a/bob/bio/vein/tests/test_tools.py b/tests/test_tools.py similarity index 94% rename from bob/bio/vein/tests/test_tools.py rename to tests/test_tools.py index c8e045e3a032314ca809f4281393bebb991c0ffa..9d5be0447ea63599df47ae47cc4c059dd025bc17 100644 --- a/bob/bio/vein/tests/test_tools.py +++ b/tests/test_tools.py @@ -20,7 +20,7 @@ import pkg_resources import bob.io.base -from ..preprocessor import utils as preprocessor_utils +from bob.bio.vein.preprocessor import utils as preprocessor_utils def F(parts): @@ -30,10 +30,9 @@ def F(parts): def test_cropping(): - # tests if the cropping stage at preprocessors works as planned - from ..preprocessor.crop import FixedCrop, NoCrop + from bob.bio.vein.preprocessor.crop import FixedCrop, NoCrop shape = (20, 17) test_image = numpy.random.randint(0, 1000, size=shape, dtype=int) @@ -56,7 +55,7 @@ def test_cropping(): assert (test_image[top:-bottom, left:-right] - cropped).sum() == 0 # tests metadata survives after cropping (and it is corrected) - from ..database import AnnotatedArray + from bob.bio.vein.database import AnnotatedArray annotations = [ (top - 2, left + 2), # slightly above and to the right @@ -80,11 +79,14 @@ def test_cropping(): def test_masking(): - # tests if the masking stage at preprocessors work as planned - from ..database import AnnotatedArray - from ..preprocessor.mask import AnnotatedRoIMask, FixedMask, NoMask + from bob.bio.vein.database import AnnotatedArray + from bob.bio.vein.preprocessor.mask import ( + AnnotatedRoIMask, + FixedMask, + NoMask, + ) shape = (17, 20) test_image = numpy.random.randint(0, 1000, size=shape, dtype=int) @@ -128,7 +130,6 @@ def test_masking(): def test_preprocessor(): - # tests the whole preprocessing mechanism, compares to matlab source input_filename = F(("preprocessors", "0019_3_1_120509-160517.png")) @@ -141,7 +142,7 @@ def test_preprocessor(): img = bob.io.base.load(input_filename) - from ..preprocessor import ( + from bob.bio.vein.preprocessor import ( HuangNormalization, LeeMask, NoCrop, @@ -171,7 +172,6 @@ def test_preprocessor(): def test_max_curvature(): - # Maximum Curvature method against Matlab reference image = bob.io.base.load(F(("extractors", "image.hdf5"))) @@ -194,7 +194,7 @@ def test_max_curvature(): bin_ref = bin_ref.T # Apply Python implementation - from ..extractor.MaximumCurvature import MaximumCurvature + from bob.bio.vein.extractor.MaximumCurvature import MaximumCurvature MC = MaximumCurvature(3) # value used to create references @@ -228,7 +228,7 @@ def test_max_curvature_HE(): input_img = bob.io.base.load(input_img_filename) # Preprocess the data and apply Histogram Equalization postprocessing (same parameters as in maximum_curvature.py configuration file + postprocessing) - from ..preprocessor import ( + from bob.bio.vein.preprocessor import ( HistogramEqualization, HuangNormalization, LeeMask, @@ -245,7 +245,7 @@ def test_max_curvature_HE(): preproc_data = processor(input_img) # Extract features from preprocessed and histogram equalized data using MC extractor (same parameters as in maximum_curvature.py configuration file) - from ..extractor.MaximumCurvature import MaximumCurvature + from bob.bio.vein.extractor.MaximumCurvature import MaximumCurvature MC = MaximumCurvature(sigma=5) MC(preproc_data) @@ -253,7 +253,6 @@ def test_max_curvature_HE(): def test_repeated_line_tracking(): - # Repeated Line Tracking method against Matlab reference input_img_filename = F(("extractors", "miurarlt_input_img.mat.hdf5")) @@ -265,7 +264,7 @@ def test_repeated_line_tracking(): input_fvr = bob.io.base.load(input_fvr_filename) # Apply Python implementation - from ..extractor.RepeatedLineTracking import RepeatedLineTracking + from bob.bio.vein.extractor.RepeatedLineTracking import RepeatedLineTracking RLT = RepeatedLineTracking(3000, 1, 21, False) output_img = RLT((input_img, input_fvr)) @@ -286,7 +285,7 @@ def test_repeated_line_tracking_HE(): input_img = bob.io.base.load(input_img_filename) # Preprocess the data and apply Histogram Equalization postprocessing (same parameters as in repeated_line_tracking.py configuration file + postprocessing) - from ..preprocessor import ( + from bob.bio.vein.preprocessor import ( HistogramEqualization, HuangNormalization, LeeMask, @@ -303,7 +302,7 @@ def test_repeated_line_tracking_HE(): preproc_data = processor(input_img) # Extract features from preprocessed and histogram equalized data using RLT extractor (same parameters as in repeated_line_tracking.py configuration file) - from ..extractor.RepeatedLineTracking import RepeatedLineTracking + from bob.bio.vein.extractor.RepeatedLineTracking import RepeatedLineTracking # Maximum number of iterations NUMBER_ITERATIONS = 3000 @@ -321,7 +320,6 @@ def test_repeated_line_tracking_HE(): def test_wide_line_detector(): - # Wide Line Detector method against Matlab reference input_img_filename = F(("extractors", "huangwl_input_img.mat.hdf5")) @@ -333,7 +331,7 @@ def test_wide_line_detector(): input_fvr = bob.io.base.load(input_fvr_filename) # Apply Python implementation - from ..extractor.WideLineDetector import WideLineDetector + from bob.bio.vein.extractor.WideLineDetector import WideLineDetector WL = WideLineDetector(5, 1, 41, False) output_img = WL((input_img, input_fvr)) @@ -353,7 +351,7 @@ def test_wide_line_detector_HE(): input_img = bob.io.base.load(input_img_filename) # Preprocess the data and apply Histogram Equalization postprocessing (same parameters as in wide_line_detector.py configuration file + postprocessing) - from ..preprocessor import ( + from bob.bio.vein.preprocessor import ( HistogramEqualization, HuangNormalization, LeeMask, @@ -370,7 +368,7 @@ def test_wide_line_detector_HE(): preproc_data = processor(input_img) # Extract features from preprocessed and histogram equalized data using WLD extractor (same parameters as in wide_line_detector.py configuration file) - from ..extractor.WideLineDetector import WideLineDetector + from bob.bio.vein.extractor.WideLineDetector import WideLineDetector # Radius of the circular neighbourhood region RADIUS_NEIGHBOURHOOD_REGION = 5 @@ -388,7 +386,6 @@ def test_wide_line_detector_HE(): def test_miura_match(): - # Match Ratio method against Matlab reference template_filename = F(("algorithms", "0001_2_1_120509-135338.mat.hdf5")) @@ -399,7 +396,7 @@ def test_miura_match(): probe_gen_vein = bob.io.base.load(probe_gen_filename) probe_imp_vein = bob.io.base.load(probe_imp_filename) - from ..algorithm.MiuraMatch import MiuraMatch + from bob.bio.vein.algorithm.MiuraMatch import MiuraMatch MM = MiuraMatch(ch=18, cw=28) score_gen = MM.score(template_vein, probe_gen_vein) @@ -411,7 +408,6 @@ def test_miura_match(): def test_correlate(): - # Match Ratio method against Matlab reference template_filename = F(("algorithms", "0001_2_1_120509-135338.mat.hdf5")) @@ -422,7 +418,7 @@ def test_correlate(): probe_gen_vein = bob.io.base.load(probe_gen_filename) # probe_imp_vein = bob.io.base.load(probe_imp_filename) - from ..algorithm.Correlate import Correlate + from bob.bio.vein.algorithm.Correlate import Correlate C = Correlate() C.score(template_vein, probe_gen_vein) @@ -431,7 +427,6 @@ def test_correlate(): def test_assert_points(): - # Tests that point assertion works as expected area = (10, 5) inside = [(0, 0), (3, 2), (9, 4)] @@ -454,7 +449,6 @@ def test_assert_points(): def test_fix_points(): - # Tests that point clipping works as expected area = (10, 5) inside = [(0, 0), (3, 2), (9, 4)] @@ -478,7 +472,6 @@ def test_fix_points(): def test_poly_to_mask(): - # Tests we can generate a mask out of a polygon correctly area = (10, 9) # 10 rows, 9 columns polygon = [(2, 2), (2, 7), (7, 7), (7, 2)] # square shape, (y, x) format @@ -525,7 +518,6 @@ def test_poly_to_mask(): def test_mask_to_image(): - # Tests we can correctly convert a boolean array into an image # that makes sense according to the data types sample = numpy.array([False, True]) @@ -560,7 +552,6 @@ def test_mask_to_image(): def test_jaccard_index(): - # Tests to verify the Jaccard index calculation is accurate a = numpy.array( [ @@ -598,7 +589,6 @@ def test_jaccard_index(): def test_intersection_ratio(): - # Tests to verify the intersection ratio calculation is accurate a = numpy.array( [ @@ -664,8 +654,7 @@ def test_intersection_ratio(): def test_hamming_distance(): - - from ..algorithm.HammingDistance import HammingDistance + from bob.bio.vein.algorithm.HammingDistance import HammingDistance HD = HammingDistance() diff --git a/version.txt b/version.txt deleted file mode 100644 index 8f342b8f8fe0ef389fad758f475989b716c252f4..0000000000000000000000000000000000000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -4.0.4b0