Skip to content

Commit

Permalink
fix face
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrock94 committed Sep 11, 2024
1 parent 62d5783 commit 508adcb
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 4 deletions.
Binary file modified pyaesthetics/__pycache__/brightness.cpython-310.pyc
Binary file not shown.
Binary file modified pyaesthetics/__pycache__/facedetection.cpython-310.pyc
Binary file not shown.
Binary file modified pyaesthetics/__pycache__/utils.cpython-310.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions pyaesthetics/facedetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def detect_faces(imgpath, plot=False, model='hog'):
data_folder = basepath + "/../share/data/"

# Path to a sample image
sample_img = data_folder + "panda.jpg"
sample_img = data_folder + "face1.png"

# Read the sample image
img = cv2.imread(sample_img)
Expand All @@ -112,7 +112,7 @@ def detect_faces(imgpath, plot=False, model='hog'):
faces = detect_faces_cv2(img, plot=True)

# Print the number of faces detected
# print("Number of faces in the picture is:", len(faces))
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)
Expand Down
5 changes: 3 additions & 2 deletions pyaesthetics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def runtest():
# Path to a sample image for debugging # Set the data path to use sample images
datafolder = basepath + "/../share/data/"
# Path to a sample image
sampleImg = datafolder + "books.jpg"
sampleImg = datafolder + "test.png"
# Analyze the sample image using the 'complete' method
print('Running test')
analysis.analyze_image(sampleImg, method='complete')
Expand Down Expand Up @@ -199,8 +199,9 @@ def textdetection(img):

# Path to a sample image
sample_img = data_folder + "panda.jpg"
sample_img = "/home/giulio/Documents/whisky.jpg"

img = cv2.imread(sample_img)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

runtest()

Binary file removed share/data/2024-08-02_10-57-20_4397.png
Binary file not shown.
Binary file added share/data/face1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed share/data/jade.png
Binary file not shown.
Binary file removed share/data/jade2.png
Binary file not shown.

0 comments on commit 508adcb

Please sign in to comment.