bob verification databases do not use the `original_directory` and `original_extension` parameters
Sorry that I saw this soo late, after the new database packages have been published already.
I think, during the reimplementation of the databases, something got lost. In the old bob.db.verification.database.Database
interface, at least two parameters were accepted: original_directory
and original_extension
, and there was a method called original_file_names
, which was using these parameters.
Now, this functionality seems to be completely lost. For example, bob.db.mobio
has no way of getting the original file names, i.e., the original_directory
and original_extension
are not stored in the database anymore. On the other hand, you can still specify these parameters in the constructor:
https://gitlab.idiap.ch/bob/bob.db.mobio/blob/master/bob/db/mobio/query.py#L40
but they are not used anywhere in the code.
I know that most of this functionality was moved to bob.bio.base.database.BioDatabase
. Hence, I see two different ways of handling this:
- Leave the implementation in
bob.bio.base
and remove the unused keywords in thebob.db
Database constructors. In this way, thebob.db
databases do not have the capability to query their original data files.- Move the functionality of the old
bob.db.verification.utils.Database
intobob.db.base
(and remove it frombob.bio.base
). In this way, the databases themselves know their original data.
In a similar manner, the annotations
function inside the databases are arbitrary. When annotation files are read from file (for example in bob.db.mobio
), an implementation is provided in bob.bio.base.database.BioDatabase
: https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/database/database.py#L265, as well as in bob.db.mobio
: https://gitlab.idiap.ch/bob/bob.db.mobio/blob/master/bob/db/mobio/query.py#L602, both of which use the same basic functionality: https://gitlab.idiap.ch/bob/bob.db.base/blob/master/bob/db/base/annotations.py#L35
Hence, to be consistent with option 1. above, we would probably want to remove this functionality from bob.db.mobio
. In fact, in bob.bio.face
, the annotations
functionality inside bob.db.mobio
is not used at all.
On the other hand, there are databases, which store the annotations internally, such as bob.db.gbu
: https://gitlab.idiap.ch/bob/bob.db.gbu/blob/master/bob/db/gbu/models.py#L51 Hence, for these databases, the bob.bio.base.database.BioDatabase.annotations
:https://gitlab.idiap.ch/bob/bob.bio.base/blob/master/bob/bio/base/database/database.py#L265 functions need to be overwritten, i.e., in order to use the annotations from those databases. However, I cannot see this happening, e.g., in bob.bio.face.database.GBUBioDatabase
https://gitlab.idiap.ch/bob/bob.bio.face/blob/master/bob/bio/face/database/gbu.py#L16
Hence, for these databases there is currently no way to obtain the annotations from the original bob.db
databases. Again, there are two solutions:
A. provide a default implementation for these cases in
bob.bio.base.database.BioDatabase.annotations
, i.e., by checking if the low-level database has anannotations
function.
B. Provide these implementations in all derived classes from
BioDatabase
, where the low-level database has annotations stored internally.
I can check, which of the bob.db
databases are affected and open according issues there. But first, we have to decide, which way to go. I personally would vote for options 1.
and A.
, as they would require the least modifications, But I can also see the benefits of options 2.
and B.
, which require more work, as 2.
would add more information to the low-level bob.db
databases, and B.
would be cleaner.
@amohammadi @andre.anjos @tiago.pereira @sebastien.marcel What is your opinion? Did I miss something here? Is bob.db.gbu
(and others) really currently not working?