Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.db.atnt
Commits
394892dc
Commit
394892dc
authored
Aug 25, 2014
by
Manuel Günther
Browse files
Moved to new version of bob.
parent
f6780a9a
Changes
9
Hide whitespace changes
Inline
Side-by-side
x
bob/__init__.py
→
bob/__init__.py
View file @
394892dc
File moved
x
bob/db/__init__.py
→
bob/db/__init__.py
View file @
394892dc
File moved
x
bob/db/atnt/__init__.py
→
bob/db/atnt/__init__.py
View file @
394892dc
File moved
x
bob/db/atnt/driver.py
→
bob/db/atnt/driver.py
View file @
394892dc
...
...
@@ -22,7 +22,7 @@
import
os
import
sys
from
bob.db.driver
import
Interface
as
BaseInterface
from
bob.db.
base.
driver
import
Interface
as
BaseInterface
def
dumplist
(
args
):
"""Dumps lists of files based on your criteria."""
...
...
@@ -38,7 +38,7 @@ def dumplist(args):
output
=
sys
.
stdout
if
args
.
selftest
:
from
bob.db.utils
import
null
from
bob.db.
base.
utils
import
null
output
=
null
()
for
f
in
r
:
...
...
@@ -65,7 +65,7 @@ def checkfiles(args):
# report
output
=
sys
.
stdout
if
args
.
selftest
:
from
bob.db.utils
import
null
from
bob.db.
base.
utils
import
null
output
=
null
()
if
bad
:
...
...
@@ -85,7 +85,7 @@ def reverse(args):
output
=
sys
.
stdout
if
args
.
selftest
:
from
bob.db.utils
import
null
from
bob.db.
base.
utils
import
null
output
=
null
()
r
=
db
.
reverse
(
args
.
path
)
...
...
@@ -104,7 +104,7 @@ def path(args):
output
=
sys
.
stdout
if
args
.
selftest
:
from
bob.db.utils
import
null
from
bob.db.
base.
utils
import
null
output
=
null
()
r
=
db
.
paths
(
args
.
id
,
prefix
=
args
.
directory
,
suffix
=
args
.
extension
)
...
...
@@ -123,7 +123,7 @@ class Interface(BaseInterface):
def
version
(
self
):
import
pkg_resources
# part of setuptools
return
pkg_resources
.
require
(
'
x
bob.db.%s'
%
self
.
name
())[
0
].
version
return
pkg_resources
.
require
(
'bob.db.%s'
%
self
.
name
())[
0
].
version
def
files
(
self
):
return
()
...
...
x
bob/db/atnt/models.py
→
bob/db/atnt/models.py
View file @
394892dc
...
...
@@ -19,13 +19,13 @@
"""
This file defines simple Client and File interfaces that should be comparable
with other
x
bob.db databases.
with other bob.db databases.
"""
import
os
import
bob
import
x
bob.db.verification.utils
import
bob.db.verification.utils
class
Client
:
"""The clients of this database contain ONLY client ids. Nothing special."""
...
...
@@ -37,7 +37,7 @@ class Client:
class
File
(
x
bob
.
db
.
verification
.
utils
.
File
):
class
File
(
bob
.
db
.
verification
.
utils
.
File
):
"""Files of this database are composed from the client id and a file id."""
m_valid_file_ids
=
set
(
range
(
1
,
11
))
...
...
@@ -48,7 +48,7 @@ class File (xbob.db.verification.utils.File):
# generate path on the fly
path
=
os
.
path
.
join
(
"s"
+
str
(
client_id
),
str
(
client_file_id
))
# call base class constructor
x
bob
.
db
.
verification
.
utils
.
File
.
__init__
(
self
,
client_id
=
client_id
,
file_id
=
file_id
,
path
=
path
)
bob
.
db
.
verification
.
utils
.
File
.
__init__
(
self
,
client_id
=
client_id
,
file_id
=
file_id
,
path
=
path
)
@
staticmethod
...
...
x
bob/db/atnt/query.py
→
bob/db/atnt/query.py
View file @
394892dc
...
...
@@ -19,16 +19,16 @@
from
.models
import
Client
,
File
import
x
bob.db.verification.utils
import
bob.db.verification.utils
class
Database
(
x
bob
.
db
.
verification
.
utils
.
Database
):
class
Database
(
bob
.
db
.
verification
.
utils
.
Database
):
"""Wrapper class for the AT&T (aka ORL) database of faces (http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html).
This class defines a simple protocol for training, enrollment and probe by splitting the few images of the database in a reasonable manner.
Due to the small size of the database, there is only a 'dev' group, and I did not define an 'eval' group."""
def
__init__
(
self
):
# call base class constructor
x
bob
.
db
.
verification
.
utils
.
Database
.
__init__
(
self
)
bob
.
db
.
verification
.
utils
.
Database
.
__init__
(
self
)
# initialize members
self
.
m_groups
=
(
'world'
,
'dev'
)
self
.
m_purposes
=
(
'enrol'
,
'probe'
)
...
...
x
bob/db/atnt/test.py
→
bob/db/atnt/test.py
View file @
394892dc
...
...
@@ -87,7 +87,7 @@ class ATNTDatabaseTest(unittest.TestCase):
def
test02_driver_api
(
self
):
from
bob.db.script.dbmanage
import
main
from
bob.db.
base.
script.dbmanage
import
main
self
.
assertEqual
(
main
(
'atnt dumplist --self-test'
.
split
()),
0
)
self
.
assertEqual
(
main
(
'atnt checkfiles -d "." --self-test'
.
split
()),
0
)
...
...
buildout.cfg
View file @
394892dc
; vim: set fileencoding=utf-8 :
;
author:
Manuel Guenther <manuel.guenther@idiap.ch>
;
date: Wed Feb 13 12:35:2
9 CET 201
3
; Manuel Guenther <manuel.guenther@idiap.ch>
;
Mon Aug 25 15:58:3
9 CE
S
T 201
4
[buildout]
parts = scripts
develop = .
eggs = xbob.db.atnt
eggs = bob.db.atnt
extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/bob.extension
src/bob.blitz
src/bob.core
src/bob.io.base
src/bob.db.base
src/bob.db.verification.utils
.
; options for bob.buildout extension
debug = true
verbose = true
newest = false
[sources]
bob.extension = git https://github.com/bioidiap/bob.extension
bob.blitz = git https://github.com/bioidiap/bob.blitz
bob.core = git https://github.com/bioidiap/bob.core
bob.io.base = git https://github.com/bioidiap/bob.io.base
bob.db.base = git https://github.com/bioidiap/bob.db.base
bob.db.verification.utils = git https://github.com/bioidiap/bob.db.verification.utils
[scripts]
recipe =
x
bob.buildout:scripts
dependent-scripts
=
true
recipe = bob.buildout:scripts
dependent-scripts
=
true
setup.py
View file @
394892dc
...
...
@@ -8,10 +8,10 @@ from setuptools import setup, find_packages
# parameters that define our package.
setup
(
name
=
'
x
bob.db.atnt'
,
version
=
'
1.1.3
a0'
,
name
=
'bob.db.atnt'
,
version
=
'
2.0.0
a0'
,
description
=
'ATNT/ORL Database Access API for Bob'
,
url
=
'http://github.com/bioidiap/
x
bob.db.atnt'
,
url
=
'http://github.com/bioidiap/bob.db.atnt'
,
license
=
'GPLv3'
,
author
=
'Manuel Guenther'
,
author_email
=
'manuel.guenther@idiap.ch'
,
...
...
@@ -24,28 +24,28 @@ setup(
install_requires
=
[
'setuptools'
,
'bob
'
,
# base signal proc./machine learning library
'
x
bob.db.verification.utils
>=0.1.4
'
# defines a set of utilities for face verification databases like this one.
'bob
.db.base'
,
'bob.db.verification.utils'
# defines a set of utilities for face verification databases like this one.
],
namespace_packages
=
[
'
x
bob'
,
'
x
bob.db'
,
],
'bob'
,
'bob.db'
,
],
entry_points
=
{
# declare database to bob
'bob.db'
:
[
'atnt =
x
bob.db.atnt.driver:Interface'
,
],
'atnt = bob.db.atnt.driver:Interface'
,
],
# declare tests to bob
'bob.test'
:
[
'atnt =
x
bob.db.atnt.test:ATNTDatabaseTest'
,
],
'atnt = bob.db.atnt.test:ATNTDatabaseTest'
,
],
},
},
classifiers
=
[
'Development Status :: 4 - Beta'
,
...
...
@@ -56,5 +56,5 @@ setup(
'Programming Language :: Python :: 3'
,
'Topic :: Scientific/Engineering :: Artificial Intelligence'
,
'Topic :: Database :: Front-Ends'
,
],
],
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment