Commit a3055342 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'patch-1' into 'master'

improve documentation, remove licenes headers

Fixes the load method.

Fixes #2

See merge request !5
parents 0c49d208 322496d9
Pipeline #6132 passed with stages
in 2 minutes and 6 seconds
......@@ -2,20 +2,7 @@
# vim: set fileencoding=utf-8 :
# @author: Manuel Guenther <Manuel.Guenther@idiap.ch>
# @date: Fri Apr 20 12:04:44 CEST 2012
#
# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
The AT&T "Database of Faces" is a small free facial image database to test face
......
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# @author: Manuel Guenther <Manuel.Guenther@idiap.ch>
# @date: Fri Apr 20 12:04:44 CEST 2012
#
# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Commands the AT&T database can respond to.
"""
......
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# @author: Manuel Guenther <Manuel.Guenther@idiap.ch>
# @date: Wed Oct 17 15:59:25 CEST 2012
#
# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
This file defines simple Client and File interfaces that should be comparable
......@@ -26,13 +11,15 @@ import os
import bob
import bob.db.base
import bob.io.image # to be able to load images when File.load is called!
class Client:
class Client(object):
"""The clients of this database contain ONLY client ids. Nothing special."""
m_valid_client_ids = set(range(1, 41))
def __init__(self, client_id):
super(Client, self).__init__()
assert client_id in self.m_valid_client_ids
self.id = client_id
......
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# @author: Manuel Guenther <Manuel.Guenther@idiap.ch>
# @date: Wed Oct 17 15:59:25 CEST 2012
#
# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .models import Client, File
......@@ -163,12 +148,15 @@ class Database(bob.db.base.Database):
return model_id
def objects(self, model_ids=None, groups=None, purposes=None, protocol=None):
"""Returns a set of File objects for the specific query by the user.
"""Returns a set of :py:class:`File` objects for the specific query by the user.
Keyword Parameters:
model_ids : int or [int]
The ids of the clients whose files need to be retrieved. Should be a list of integral numbers from [1,40]
Limits the returned files relevant to this model id.
This is expected to be used with groups='dev' only.
When groups='world', this does not have any effect.
Should be a list of integral numbers from [1,40]
groups : str or [str]
One of the groups 'world' or 'dev' or a list with both of them (which is the default).
......@@ -180,7 +168,7 @@ class Database(bob.db.base.Database):
protocol
Ignored.
Returns: A list of File's considering all the filtering criteria.
Returns: A list of :py:class:`File` objects considering all the filtering criteria.
"""
# check if groups set are valid
......
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Laurent El Shafey <laurent.el-shafey@idiap.ch>
#
# Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""A few checks at the AT&T/ORL Face database.
"""
......
......@@ -8,7 +8,6 @@
This package contains the access API and descriptions for the `AT&T`_ database of faces, which is formerly known as the ORL database.
The actual raw data for the database should be downloaded from the original URL.
If you don't download the data yourself, it will automatically be downloaded to a temporary directory each time you create a :py:class:`bob.db.atnt.Database` object.
This package only contains the Bob_ accessor methods to use the DB directly from python, using a single self-designed evaluation protocol.
......@@ -17,9 +16,7 @@ The Database Interface
----------------------
The :py:class:`bob.db.atnt.Database` provides an interface to access the data.
.. todo::
Explain the particularities of the :py:class:`bob.db.atnt.Database`.
For more information, please refer to its documentation: :py:class:`bob.db.atnt.Database`
.. _at&t: http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment