diff --git a/README.md b/README.md index 0d8e076..6283696 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,6 @@ In order to work correctly, pyaesthetics requires the installation of the follow - imutils - pytesseract - pillow -- face-recognition - scikit-image ## Contacts diff --git a/pyaesthetics/__pycache__/analysis.cpython-310.pyc b/pyaesthetics/__pycache__/analysis.cpython-310.pyc index 3a2ede1..083b873 100644 Binary files a/pyaesthetics/__pycache__/analysis.cpython-310.pyc and b/pyaesthetics/__pycache__/analysis.cpython-310.pyc differ diff --git a/pyaesthetics/facedetection.py b/pyaesthetics/facedetection.py index 25278fb..7f991a6 100644 --- a/pyaesthetics/facedetection.py +++ b/pyaesthetics/facedetection.py @@ -17,7 +17,6 @@ import cv2 import matplotlib.pyplot as plt import numpy as np -import face_recognition from PIL import Image ############################################################################### @@ -54,39 +53,6 @@ def detect_faces_cv2(img, plot=False): # Return the list of detected faces return faces -# TODO: Wait for patch -# def detect_faces(imgpath, plot=False, model='hog'): -# """ This function uses face-recognition to detect faces in a picture. -# By default it uses the hog method. cnn method can be passed as model parameter. - -# :param img: path to the image to analyze -# :type img: string -# :param plot: whether to plot or not the results -# :type plot: bool -# :param model: which model to use for the detection of faces (hog or cnn). Default is 'hog'. -# :type model: string -# :return: list of detected faces as rectangles -# :rtype: list -# """ - -# # Convert the image to grayscale as Haar cascades work better on grayscale images -# image = face_recognition.load_image_file(imgpath) -# faces = face_recognition.face_locations(image, model=model) -# # If plot is True, draw rectangles around detected faces and display the image -# if plot: -# for top, right, bottom, left in faces: -# cv2.rectangle(image, (left, top), (right, bottom), (255, 0, 0), 2) -# plt.imshow(image) - -# # if plot: -# # for top, right, bottom, left in faces: -# # # You can access the actual face itself like this: -# # face_image = image[top:bottom, left:right] -# # pil_image = Image.fromarray(face_image) -# # pil_image.show() - -# # Return the list of detected faces -# return faces ############################################################################### # # @@ -115,9 +81,6 @@ def detect_faces_cv2(img, plot=False): # Print the number of faces detected print("Number of faces in the picture is:", len(faces)) - - # Detect faces in the image and plot the results - # faces = detect_faces(sample_img, plot=True) # Print the number of faces detected print("Number of faces in the picture is:", len(faces)) diff --git a/pyproject.toml b/pyproject.toml index a0b70c4..41bc279 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,6 @@ pandas = "^2.2" opencv-python = "^4.10" pytesseract = "^0.3" pillow = "^10.4" -face-recognition = "^1.3" scikit-image = "^0.24" tqdm = "^4.66" rembg = "^2.0.59" diff --git a/requirements.txt b/requirements.txt index 8acfa1c..8313cde 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,6 @@ pandas>=2.2 opencv-python>=4.10 pytesseract>=0.3 pillow>=10.4 -face-recognition>=1.3 scikit-image>=0.24 tqdm>=4.66 rembg>=2.0.59