JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
factory.py
Go to the documentation of this file.
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
19METRICS = Registery('Metrics')
20DATALOADERS = Registery('DataLoaders')
__init__(self, name)
Definition factory.py:2
register(self, item)
Definition factory.py:12