-
Notifications
You must be signed in to change notification settings - Fork 284
Expand file tree
/
Copy path__init__.py
More file actions
27 lines (23 loc) · 792 Bytes
/
__init__.py
File metadata and controls
27 lines (23 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from .face_detection_yunet.yunet import YuNet
from .text_detection_db.db import DB
from .text_recognition_crnn.crnn import CRNN
from .face_recognition_sface.sface import SFace
from .image_classification_ppresnet.ppresnet import PPResNet
from .human_segmentation_pphumanseg.pphumanseg import PPHumanSeg
from .qrcode_wechatqrcode.wechatqrcode import WeChatQRCode
class Registery:
def __init__(self, name):
self._name = name
self._dict = dict()
def get(self, key):
return self._dict[key]
def register(self, item):
self._dict[item.__name__] = item
MODELS = Registery('Models')
MODELS.register(YuNet)
MODELS.register(DB)
MODELS.register(CRNN)
MODELS.register(SFace)
MODELS.register(PPResNet)
MODELS.register(PPHumanSeg)
MODELS.register(WeChatQRCode)