JeVoisBase
1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Tweet
Loading...
Searching...
No Matches
factory.py
Go to the documentation of this file.
1
class
Registery
:
2
def
__init__
(self, name):
3
self.
_name
= name
4
self.
_dict
= dict()
5
6
def
get
(self, key):
7
if
key
in
self.
_dict
:
8
return
self.
_dict
[key]
9
else
:
10
return
self.
_dict
[
'Base'
]
11
12
def
register
(self, item):
13
self.
_dict
[item.__name__] = item
14
# renaming *ImageLoader/*VideoLoader
15
if
'ImageLoader'
in
item.__name__:
16
name = item.__name__.replace(
'ImageLoader'
,
''
)
17
self.
_dict
[name] = item
18
19
METRICS =
Registery
(
'Metrics'
)
20
DATALOADERS =
Registery
(
'DataLoaders'
)
utils.factory.Registery
Definition
factory.py:1
utils.factory.Registery.get
get(self, key)
Definition
factory.py:6
utils.factory.Registery.__init__
__init__(self, name)
Definition
factory.py:2
utils.factory.Registery._name
_name
Definition
factory.py:3
utils.factory.Registery.register
register(self, item)
Definition
factory.py:12
utils.factory.Registery._dict
_dict
Definition
factory.py:4
opencv_zoo
benchmark
utils
factory.py
Please help us improve this page: Edit it on
GitHub
or
email us your edits and suggestions.
Generated by
1.9.8