Skip to content
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

two eyes #9

Closed
wang-kangkang opened this issue Sep 26, 2019 · 6 comments
Closed

two eyes #9

wang-kangkang opened this issue Sep 26, 2019 · 6 comments

Comments

@wang-kangkang
Copy link

wang-kangkang commented Sep 26, 2019

when i conduct similar trial in my face detection codebase, the two eyes' lmk points overlap and always between the eyebrows. But the nose lmk is always right. Do you know what might be the reason?

@takecareofbigboss
Copy link

i met the same problem, and hope get ur reply. Is it convenient for you to link with me by wechat(my wechat number: bigbossofwhom).
image

@takecareofbigboss
Copy link

@biubug6

@biubug6
Copy link
Owner

biubug6 commented Sep 26, 2019

In general, in order to detect the key points accurately, it is necessary to have a large learning rate for the key points. Through such methods the network can be optimized in the direction of utilizing the key points detection.

@biubug6 biubug6 closed this as completed Oct 18, 2019
@Dian-Yi
Copy link

Dian-Yi commented Dec 13, 2019

@wang-kangkang @takecareofbigboss
have you solved this problem? i meet the same case. the lmk points overlap and always between the eyebrows.

@wang-kangkang
Copy link
Author

wang-kangkang commented Dec 13, 2019

which may because you didn't notice in data argument, if do the mirror operation of this image, the left eye will be right eye, and vice versa. You should read the following code carefully.

def _mirror(image, boxes, landms):

def _mirror(image, boxes, landms):
_, width, _ = image.shape
if random.randrange(2):
image = image[:, ::-1]
boxes = boxes.copy()
boxes[:, 0::2] = width - boxes[:, 2::-2]
# landm
landms = landms.copy()
landms = landms.reshape([-1, 5, 2])
landms[:, :, 0] = width - landms[:, :, 0]
tmp = landms[:, 1, :].copy()
landms[:, 1, :] = landms[:, 0, :]
landms[:, 0, :] = tmp
tmp1 = landms[:, 4, :].copy()
landms[:, 4, :] = landms[:, 3, :]
landms[:, 3, :] = tmp1
landms = landms.reshape([-1, 10])

return image, boxes, landms

@Dian-Yi
Copy link

Dian-Yi commented Dec 13, 2019

which may because you didn't notice in data argument, if do the mirror operation of this image, the left eye will be right eye, and vice versa. You should read the following code carefully.

def _mirror(image, boxes, landms):

def _mirror(image, boxes, landms):
_, width, _ = image.shape
if random.randrange(2):
image = image[:, ::-1]
boxes = boxes.copy()
boxes[:, 0::2] = width - boxes[:, 2::-2]

landm

landms = landms.copy()
landms = landms.reshape([-1, 5, 2])
landms[:, :, 0] = width - landms[:, :, 0]
tmp = landms[:, 1, :].copy()
landms[:, 1, :] = landms[:, 0, :]
landms[:, 0, :] = tmp
tmp1 = landms[:, 4, :].copy()
landms[:, 4, :] = landms[:, 3, :]
landms[:, 3, :] = tmp1
landms = landms.reshape([-1, 10])

return image, boxes, landms

thanks very much, i find my code bug in mirror images. the left and right points value is error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants