mirror of
https://github.com/serengil/deepface.git
synced 2025-06-13 06:47:11 +00:00
singleton comment
This commit is contained in:
parent
fa44651e27
commit
5e2c530835
@ -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,
|
||||||
|
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user