deprecated functions

This commit is contained in:
Sefik Ilkin Serengil 2023-02-24 11:37:57 +00:00
parent d04ab28bd3
commit a010c4188f
4 changed files with 7 additions and 4 deletions

View File

@ -12,6 +12,7 @@ import pandas as pd
from tqdm import tqdm
import cv2
import tensorflow as tf
from deprecated import deprecated
# package dependencies
from deepface.basemodels import (
@ -812,11 +813,10 @@ def extract_faces(
# deprecated functions
@deprecated(version="0.0.78", reason="Use DeepFace.extract_faces instead of DeepFace.detectFace")
def detectFace(
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(
img_path=img_path,
target_size=target_size,

View File

@ -8,6 +8,7 @@ import requests
import numpy as np
import cv2
import tensorflow as tf
from deprecated import deprecated
# package dependencies
from deepface.detectors import FaceDetector
@ -257,6 +258,7 @@ def find_target_size(model_name):
# deprecated functions
@deprecated(version="0.0.78", reason="Use extract_faces instead of preprocess_face")
def preprocess_face(
img,
target_size=(224, 224),
@ -265,7 +267,6 @@ def preprocess_face(
enforce_detection=True,
align=True,
):
print("⚠️ Function preprocess_face function is deprecated! Use extract_faces instead of this.")
result = None
img_objs = extract_faces(
img=img,

View File

@ -14,4 +14,5 @@ dlib>=19.20.0
retina-face>=0.0.1
mediapipe>=0.8.7.3
fire>=0.4.0
gunicorn>=20.1.0
gunicorn>=20.1.0
Deprecated>=1.2.13

View File

@ -36,5 +36,6 @@ setuptools.setup(
"retina-face>=0.0.1",
"fire>=0.4.0",
"gunicorn>=20.1.0",
"Deprecated>=1.2.13",
],
)