Facereclib with custom database

35 views
Skip to first unread message

dmytro....@buddyguard.io

unread,
Nov 6, 2015, 4:43:41 PM11/6/15
to bob-devel
Thanks to Manuel, I managed to train the speaker recognition model on a custom database: https://groups.google.com/forum/#!topic/bob-devel/e4kNR-WCTQE

Now I am trying to train a face recognition model on a dataset that is not standard for facereclib, namely color FERET.

I tried to learn examples from facereclib/facereclib/configurations/databases and bob.db.atnt-2.0.2-py2.7.egg/bob/db/atnt, but it seems that for the face recognition, database definition is more complicated compared to speaker recognition.

So, my question is: Can I define a database with a single configuration file like I did it for speaker recognition? Something like:
import facereclib


database = facereclib.databases.DatabaseBob(
    database = bob.db.verification.utils.Database(
        name = "colorferet-thumbnail"
        original_directory = "/home/work/corpora/colorferet/thumbnail",
        original_extension = ".ppm"
    ),
    name = 'colorferet-thumbnail'
)


How do I define 'world' and 'dev' groups? How to specify file lists corresponding to those groups?
I do not really want to create a package for the database, what would be the easiest way to do it?

Many thanks in advance.

Dmytro



Manuel Günther

unread,
Nov 6, 2015, 5:43:45 PM11/6/15
to bob-devel
You should make use of the bob.db.verification.filelist.Database, and not of bob.db.verification.utils.Database
In its constructor you can specify all directories that you require.

Best wishes
Manuel

dmytro....@buddyguard.io

unread,
Nov 7, 2015, 7:06:27 AM11/7/15
to bob-devel
Thanks.

How do I specify the protocol?

Manuel Günther

unread,
Nov 9, 2015, 12:40:06 PM11/9/15
to bob-devel
I am not sure if the question you asked is precise. There are two ways to specify the protocol. You can either put it in the configuration file:

import facereclib

database = facereclib.databases.DatabaseFileList(
    database = bob.db.verification.filelist.Database(
        name = "colorferet-thumbnail"
        original_directory = "/home/work/corpora/colorferet/thumbnail",
        original_extension = ".ppm"
    ),
    name = 'colorferet-thumbnail',
    protocol = 'my-protocol-name'
)
or on the command line using the --protocol option.

What I think that you want to ask is, how to define a protocol. The simple answer is, you don't need to. Particularly for the bob.db.verification.filelist.Database, we have designed a wrapper: facereclib.databases.DatabaseFileList, see the code snippet above. Simply specify the protocol to be 'None' (also None might work).

Manuel

Reply all
Reply to author
Forward
0 new messages