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_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_extension are not stored in the database anymore. On the other hand, you can still specify these parameters in the constructor:
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.baseand remove the unused keywords in the
bob.dbDatabase constructors. In this way, the
bob.dbdatabases do not have the capability to query their original data files.
- Move the functionality of the old
bob.db.base(and remove it from
bob.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
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
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 an
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
A., as they would require the least modifications, But I can also see the benefits of options
B., which require more work, as
2. would add more information to the low-level
bob.db databases, and
B. would be cleaner.