-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fixed minor bugs in PyFry.py, Added basic gui made with tkinter #15
base: master
Are you sure you want to change the base?
Conversation
Fixed
Added a basic gui using tkinter in python,made relevant changes to hit proper functions
removed debug print statements
#Finding the center point of the eye using the average outer extremes average of the eyes | ||
mid = (eye[0] +eye[3])/2 | ||
# Finding the center point of the eye using the average outer extremes average of the eyes | ||
mid = (eye[0] + eye[3])/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't make aesthetic changes to the working code. It creates more diffs and takes extra time to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi ionicc, Actually While adding my changes somewhere I got indentation error.
I tried to fix it but couldn't, then copy-pasted whole content in sublime-text and fixed indentation and put that back.
So,these kind of changes came in. 😃 😄
I didn't check that much while commiting.
Will take care of these changes and raise a new PR.
img = img.resize((int(w ** .90), int(h ** .90)), resample = Image.BILINEAR) | ||
img = img.resize((int(w ** .90), int(h ** .90)), resample = Image.BICUBIC) | ||
img = img.resize((w,h), resample = Image.BICUBIC) | ||
img = img.resize((int(w ** .90), int(h ** .90)), resample=Image.BILINEAR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see you have made a lot of spaces and changes to already working code, Not that it does any harm. I would suggest not to touch the working part of code unless raised in open source projects 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah,got it.
def addFlare(img): | ||
''' Initialising dlib for frontal facial features ''' | ||
flare = Image.open('flare.png') | ||
detect = dlib.get_frontal_face_detector() | ||
predict = dlib.shape_predictor("assets\shape_predictor_68_face_landmarks.dat") | ||
face_landmarks_file = "assets/shape_predictor_68_face_landmarks.dat" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can add a dynamic addition of the face_landmarks_file from the GUI, That'll be clean 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some comments and please add a screenshot of the GUI as a comment in the PR.
My bad, I hadn't noticed the Screenshot already given. Looks clean 😄. How bout adding a file picker as mentioned above for face_landmarks_file. |
Fixed
If we give different image other than test.jpg, the flares are not drawn properly #14
Unable to open assets\shape_predictor_68_face_landmarks.dat #13
Description
For addressing issue 13, I have made sure we give absolute path instead of relative path.
This is should make sure we don't get any runtime errors of opening .dat file.
For addressing issue 14, We have hardcoded the image 'test.jpg' in the addFlare function
for any input image. I have stored img in 'temp.jpg' in the main and used 'temp.jpg'
in addFlare function.
I have tested all three images (test1,test2,meme1) all three gives expected output.
Fixes # (issue)
13 and 14
Type of change
This is my first PR ,feel free to give comments and correct me.