Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

models refactored #1303

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
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.
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.
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