Skip to content
Snippets Groups Projects
Commit 1024d805 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[refactoring_2016] Removed references to bob.db.verification.utils

parent 0b77c0fc
Branches
Tags
No related merge requests found
Pipeline #
...@@ -31,7 +31,7 @@ def command_line_arguments(command_line_parameters): ...@@ -31,7 +31,7 @@ def command_line_arguments(command_line_parameters):
parser.add_argument('-f', '--file-ids', nargs = '+', help = 'If given, only the images of the --database with the given file id are shown (non-existing IDs will be silently skipped).') parser.add_argument('-f', '--file-ids', nargs = '+', help = 'If given, only the images of the --database with the given file id are shown (non-existing IDs will be silently skipped).')
parser.add_argument('-a', '--annotation-directory', help = 'If given, use the annotations stored in the given annotation directory (this might be required for some databases).') parser.add_argument('-a', '--annotation-directory', help = 'If given, use the annotations stored in the given annotation directory (this might be required for some databases).')
parser.add_argument('-x', '--annotation-file-extension', default = '.pos', help = 'Annotation files have the given filename extension.') parser.add_argument('-x', '--annotation-file-extension', default = '.pos', help = 'Annotation files have the given filename extension.')
parser.add_argument('-t', '--annotation-file-type', default = 'named', help = 'Select the annotation file style, see bob.db.verification.utils documentation for valid types.') parser.add_argument('-t', '--annotation-file-type', default = 'named', help = 'Select the annotation file style, see bob.db.base documentation for valid types.')
parser.add_argument('-n', '--annotate-names', action = 'store_true', help = 'Plot the names of the annotations, too.') parser.add_argument('-n', '--annotate-names', action = 'store_true', help = 'Plot the names of the annotations, too.')
parser.add_argument('-m', '--marker-style', default='rx', help = 'Select the marker style') parser.add_argument('-m', '--marker-style', default='rx', help = 'Select the marker style')
parser.add_argument('-M', '--marker-size', type=float, default=10., help = 'Select the marker size') parser.add_argument('-M', '--marker-size', type=float, default=10., help = 'Select the marker size')
...@@ -84,7 +84,7 @@ def main(command_line_parameters=None): ...@@ -84,7 +84,7 @@ def main(command_line_parameters=None):
annotation_file = f.make_path(args.annotation_directory, args.annotation_file_extension) annotation_file = f.make_path(args.annotation_directory, args.annotation_file_extension)
if os.path.exists(annotation_file): if os.path.exists(annotation_file):
logger.info("Loading annotations from file %s", annotation_file) logger.info("Loading annotations from file %s", annotation_file)
annotations = bob.db.verification.utils.read_annotation_file(annotation_file, args.annotation_file_type) annotations = bob.db.base.read_annotation_file(annotation_file, args.annotation_file_type)
else: else:
logger.warn("Could not find annotation file %s", annotation_file) logger.warn("Could not find annotation file %s", annotation_file)
else: else:
......
...@@ -19,18 +19,15 @@ ...@@ -19,18 +19,15 @@
import unittest import unittest
import os
import numpy import numpy
from nose.plugins.skip import SkipTest
import pkg_resources import pkg_resources
regenerate_refs = False regenerate_refs = False
import bob.bio.base import bob.bio.base
import bob.bio.face import bob.bio.face
import bob.db.verification.utils import bob.db.base
def _compare(data, reference, write_function = bob.bio.base.save, read_function = bob.bio.base.load, atol = 1e-5, rtol = 1e-8): def _compare(data, reference, write_function = bob.bio.base.save, read_function = bob.bio.base.load, atol = 1e-5, rtol = 1e-8):
...@@ -48,7 +45,7 @@ def _image(): ...@@ -48,7 +45,7 @@ def _image():
return bob.io.base.load(pkg_resources.resource_filename('bob.bio.face.test', 'data/testimage.jpg')) return bob.io.base.load(pkg_resources.resource_filename('bob.bio.face.test', 'data/testimage.jpg'))
def _annotation(): def _annotation():
return bob.db.verification.utils.read_annotation_file(pkg_resources.resource_filename('bob.bio.face.test', 'data/testimage.pos'), 'named') return bob.db.base.read_annotation_file(pkg_resources.resource_filename('bob.bio.face.test', 'data/testimage.pos'), 'named')
def test_base(): def test_base():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment