mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 11:35:21 +00:00
enhancement for deepface home path creation
This commit is contained in:
parent
3bf8bcb349
commit
011a0987a7
@ -36,13 +36,15 @@ def initialize_folder():
|
||||
OSError: if the folder cannot be created.
|
||||
"""
|
||||
home = get_deepface_home()
|
||||
deepFaceHomePath = home + "/.deepface"
|
||||
weightsPath = deepFaceHomePath + "/weights"
|
||||
|
||||
if not os.path.exists(home + "/.deepface"):
|
||||
os.makedirs(home + "/.deepface")
|
||||
if not os.path.exists(deepFaceHomePath):
|
||||
os.makedirs(deepFaceHomePath, exist_ok=True)
|
||||
print("Directory ", home, "/.deepface created")
|
||||
|
||||
if not os.path.exists(home + "/.deepface/weights"):
|
||||
os.makedirs(home + "/.deepface/weights")
|
||||
if not os.path.exists(weightsPath):
|
||||
os.makedirs(weightsPath, exist_ok=True)
|
||||
print("Directory ", home, "/.deepface/weights created")
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user