singleton comment

This commit is contained in:
Sefik Ilkin Serengil 2021-06-27 00:56:27 +03:00
parent fa44651e27
commit 5e2c530835
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def build_model(model_name):
built deepface model built deepface model
""" """
global model_obj global model_obj #singleton design pattern
models = { models = {
'VGG-Face': VGGFace.loadModel, 'VGG-Face': VGGFace.loadModel,

View File

@ -6,7 +6,7 @@ from deepface.commons import distance
def build_model(detector_backend): def build_model(detector_backend):
global face_detector_obj global face_detector_obj #singleton design pattern
backends = { backends = {
'opencv': OpenCvWrapper.build_model, 'opencv': OpenCvWrapper.build_model,