Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob bob
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bob
  • bobbob
  • Issues
  • #235
Closed
Open
Created Oct 20, 2016 by Manuel Günther@mguentherMaintainer

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:

  1. Leave the implementation in bob.bio.base and remove the unused keywords in the bob.db Database constructors. In this way, the bob.db databases do not have the capability to query their original data files.
  2. Move the functionality of the old bob.db.verification.utils.Database into 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 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 an annotations 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?

Assignee
Assign to
Time tracking