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

There is a bug in face detection and alignment #150

Open
zhanglonghao1992 opened this issue Oct 12, 2019 · 0 comments
Open

There is a bug in face detection and alignment #150

zhanglonghao1992 opened this issue Oct 12, 2019 · 0 comments

Comments

@zhanglonghao1992
Copy link

zhanglonghao1992 commented Oct 12, 2019

get_src_landmarks(x0, x1, y0, y1, pnts)
This function requires a parameter face idx. Otherwise all faces in an image use the landmark of face0.

def get_src_landmarks(x0, x1, y0, y1, pnts, idx):
        """                                                                                                                                                                                                                                                                                                               
        x0, x1, y0, y1: (smoothed) bbox coord.                                                                                                                                                            
        pnts: landmarks predicted by MTCNN                                                                                                                                                                
        """                                                                                                                                                                                               
        src_landmarks = [(int(pnts[i+5][idx]-x0),                                                                                                                                                         
                          int(pnts[i][idx]-y0)) for i in range(5)]                                                                                                                                        
        return src_landmarks
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

1 participant