diff --git a/bob/bio/base/preprocessor/Preprocessor.py b/bob/bio/base/preprocessor/Preprocessor.py index 6ac4e9fca289e03e6c02b79fa86a6c574417da0d..ba9e4fcd5be34e13e3565afb67c4df58b97fce4c 100644 --- a/bob/bio/base/preprocessor/Preprocessor.py +++ b/bob/bio/base/preprocessor/Preprocessor.py @@ -3,11 +3,6 @@ # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Tue Oct 2 12:12:39 CEST 2012 -import bob.io.base -import bob.bio.db - -import os - from .. import utils class Preprocessor: @@ -21,7 +16,7 @@ class Preprocessor: read_original_data: callable This function is used to read the original data from file. - It takes three inputs: A :py:class:`bob.bio.db.BioFile` (or one of its derivatives), the original directory (as ``str``) and the original extension (as ``str``). + It takes three inputs: A :py:class:`bob.bio.base.database.BioFile` (or one of its derivatives), the original directory (as ``str``) and the original extension (as ``str``). kwargs : ``key=value`` pairs A list of keyword arguments to be written in the :py:meth:`__str__` function. diff --git a/bob/bio/base/script/preprocess.py b/bob/bio/base/script/preprocess.py index db58f297bf89d4a034be1400da833af94dcd5d88..ccc837046d97e089f5ce97dfc6fffb446e794a4f 100644 --- a/bob/bio/base/script/preprocess.py +++ b/bob/bio/base/script/preprocess.py @@ -6,7 +6,7 @@ import bob.core logger = bob.core.log.setup("bob.bio.base") import bob.bio.base -import bob.bio.db +from bob.bio.base.database.file import BioFile import bob.db.base import numpy @@ -47,7 +47,7 @@ def main(command_line_parameters=None): preprocessor = bob.bio.base.load_resource(' '.join(args.preprocessor), "preprocessor") logger.debug("Loading input data from file '%s'%s", args.input_file, " and '%s'" % args.annotation_file if args.annotation_file is not None else "") - data = preprocessor.read_original_data(bob.bio.db.BioFile(1, args.input_file, 2), "", "") + data = preprocessor.read_original_data(BioFile(1, args.input_file, 2), "", "") annotations = bob.db.base.annotations.read_annotation_file(args.annotation_file, 'named') if args.annotation_file is not None else None logger.info("Preprocessing data") diff --git a/bob/bio/base/test/dummy/database.py b/bob/bio/base/test/dummy/database.py index 94852fc1e1c39b8f9800f46fec0e1ad9d27b1cce..e8cfac92044055f84a343cae0a226b92a9fb94f8 100644 --- a/bob/bio/base/test/dummy/database.py +++ b/bob/bio/base/test/dummy/database.py @@ -1,5 +1,5 @@ from bob.bio.base.database import ZTBioDatabase -from bob.bio.base.file import BioFile +from bob.bio.base.database.file import BioFile from bob.bio.base.test.utils import atnt_database_directory diff --git a/bob/bio/base/test/test_preprocessor.py b/bob/bio/base/test/test_preprocessor.py index 577f73ad8da15fa6463090c5fb0db17088539b88..e822c1e5207e3bc7d0cacd62f3cfbe61608ace41 100644 --- a/bob/bio/base/test/test_preprocessor.py +++ b/bob/bio/base/test/test_preprocessor.py @@ -1,7 +1,4 @@ import bob.bio.base -import bob.bio.db - -from . import utils def test_filename(): # load extractor @@ -10,7 +7,7 @@ def test_filename(): assert isinstance(preprocessor, bob.bio.base.preprocessor.Filename) # try to load the original image - assert preprocessor.read_original_data(bob.bio.db.BioFile(1,"2",3), "/any/path", ".any.extension") is None + assert preprocessor.read_original_data(bob.bio.base.database.file.BioFile(1,"2",3), "/any/path", ".any.extension") is None # try to process assert preprocessor(None, None) == 1