mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
deprecated functions
This commit is contained in:
parent
d04ab28bd3
commit
a010c4188f
@ -12,6 +12,7 @@ import pandas as pd
|
|||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
import cv2
|
import cv2
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
from deprecated import deprecated
|
||||||
|
|
||||||
# package dependencies
|
# package dependencies
|
||||||
from deepface.basemodels import (
|
from deepface.basemodels import (
|
||||||
@ -812,11 +813,10 @@ def extract_faces(
|
|||||||
# deprecated functions
|
# deprecated functions
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(version="0.0.78", reason="Use DeepFace.extract_faces instead of DeepFace.detectFace")
|
||||||
def detectFace(
|
def detectFace(
|
||||||
img_path, target_size=(224, 224), detector_backend="opencv", enforce_detection=True, align=True
|
img_path, target_size=(224, 224), detector_backend="opencv", enforce_detection=True, align=True
|
||||||
):
|
):
|
||||||
print("⚠️ Function detectFace is deprecated! Use extract_faces instead of this.")
|
|
||||||
|
|
||||||
face_objs = extract_faces(
|
face_objs = extract_faces(
|
||||||
img_path=img_path,
|
img_path=img_path,
|
||||||
target_size=target_size,
|
target_size=target_size,
|
||||||
|
@ -8,6 +8,7 @@ import requests
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import cv2
|
import cv2
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
from deprecated import deprecated
|
||||||
|
|
||||||
# package dependencies
|
# package dependencies
|
||||||
from deepface.detectors import FaceDetector
|
from deepface.detectors import FaceDetector
|
||||||
@ -257,6 +258,7 @@ def find_target_size(model_name):
|
|||||||
# deprecated functions
|
# deprecated functions
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(version="0.0.78", reason="Use extract_faces instead of preprocess_face")
|
||||||
def preprocess_face(
|
def preprocess_face(
|
||||||
img,
|
img,
|
||||||
target_size=(224, 224),
|
target_size=(224, 224),
|
||||||
@ -265,7 +267,6 @@ def preprocess_face(
|
|||||||
enforce_detection=True,
|
enforce_detection=True,
|
||||||
align=True,
|
align=True,
|
||||||
):
|
):
|
||||||
print("⚠️ Function preprocess_face function is deprecated! Use extract_faces instead of this.")
|
|
||||||
result = None
|
result = None
|
||||||
img_objs = extract_faces(
|
img_objs = extract_faces(
|
||||||
img=img,
|
img=img,
|
||||||
|
@ -15,3 +15,4 @@ retina-face>=0.0.1
|
|||||||
mediapipe>=0.8.7.3
|
mediapipe>=0.8.7.3
|
||||||
fire>=0.4.0
|
fire>=0.4.0
|
||||||
gunicorn>=20.1.0
|
gunicorn>=20.1.0
|
||||||
|
Deprecated>=1.2.13
|
Loading…
x
Reference in New Issue
Block a user