Skip to content

Commit

Permalink
Merge pull request #1303 from serengil/feat-task-0808-refactoring-models
Browse files Browse the repository at this point in the history
models refactored
  • Loading branch information
serengil authored Aug 8, 2024
2 parents d2b9b75 + b7c7a55 commit e533489
Show file tree
Hide file tree
Showing 31 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import gdown
import numpy as np
from deepface.basemodels import VGGFace
from deepface.models.facial_recognition import VGGFace
from deepface.commons import package_utils, folder_utils
from deepface.models.Demography import Demography
from deepface.commons.logger import Logger
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np

# project dependencies
from deepface.basemodels import VGGFace
from deepface.models.facial_recognition import VGGFace
from deepface.commons import package_utils, folder_utils
from deepface.models.Demography import Demography
from deepface.commons.logger import Logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np

# project dependencies
from deepface.basemodels import VGGFace
from deepface.models.facial_recognition import VGGFace
from deepface.commons import package_utils, folder_utils
from deepface.models.Demography import Demography
from deepface.commons.logger import Logger
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import cv2
import pandas as pd
import numpy as np
from deepface.detectors import OpenCv
from deepface.models.face_detection import OpenCv
from deepface.commons import folder_utils
from deepface.models.Detector import Detector, FacialAreaRegion
from deepface.commons.logger import Logger
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self):
)

# guarantees Fasnet imported and torch installed
from deepface.spoofmodels import FasNetBackbone
from deepface.models.spoofing import FasNetBackbone

# Fasnet will use 2 distinct models to predict, then it will find the sum of predictions
# to make a final prediction
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion deepface/modules/demography.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# project dependencies
from deepface.modules import modeling, detection, preprocessing
from deepface.extendedmodels import Gender, Race, Emotion
from deepface.models.demography import Gender, Race, Emotion


def analyze(
Expand Down
8 changes: 4 additions & 4 deletions deepface/modules/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any

# project dependencies
from deepface.basemodels import (
from deepface.models.facial_recognition import (
VGGFace,
OpenFace,
FbDeepFace,
Expand All @@ -13,7 +13,7 @@
Facenet,
GhostFaceNet,
)
from deepface.detectors import (
from deepface.models.face_detection import (
FastMtCnn,
MediaPipe,
MtCnn,
Expand All @@ -25,8 +25,8 @@
YuNet,
CenterFace,
)
from deepface.extendedmodels import Age, Gender, Race, Emotion
from deepface.spoofmodels import FasNet
from deepface.models.demography import Age, Gender, Race, Emotion
from deepface.models.spoofing import FasNet


def build_model(task: str, model_name: str) -> Any:
Expand Down

0 comments on commit e533489

Please sign in to comment.