Skip to content

Commit 41c4e3b

Browse files
committed
moved the deepface depencies into the method.
1 parent 71b4f44 commit 41c4e3b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

r_deepface/demography.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
import numpy as np
66
from tqdm import tqdm
77

8-
# project dependencies
9-
from deepface.modules import modeling, detection, preprocessing
10-
from deepface.models.demography import Gender, Race, Emotion
11-
128

139
def analyze(
1410
img_path: Union[str, np.ndarray],
@@ -21,6 +17,9 @@ def analyze(
2117
anti_spoofing: bool = False,
2218
is_single_face_image: bool = False,
2319
) -> List[Dict[str, Any]]:
20+
# project dependencies
21+
from deepface.modules import modeling, detection, preprocessing
22+
from deepface.models.demography import Gender, Race, Emotion
2423
"""
2524
Analyze facial attributes such as age, gender, emotion, and race in the provided image.
2625

0 commit comments

Comments
 (0)