Closed wang-kangkang closed 5 years ago
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).
@biubug6
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.
@wang-kangkang @takecareofbigboss have you solved this problem? i meet the same case. the lmk points overlap and always between the eyebrows.
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): , width, _ = image.shape if random.randrange(2): image = image[:, ::-1] boxes = boxes.copy() boxes[:, 0::2] = width - boxes[:, 2::-2]
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
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): , 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.
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?