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

how can add mask become more realtime? #1

Open
wzc118 opened this issue Apr 29, 2018 · 0 comments
Open

how can add mask become more realtime? #1

wzc118 opened this issue Apr 29, 2018 · 0 comments

Comments

@wzc118
Copy link

wzc118 commented Apr 29, 2018

Thx for sharing this interesting demo. I find that with the increasing number of faces, the step of adding a transparent mask (png) to the original photo consuming much more time, about 0.2s per mask. I think firstly merge these masks to one transparent backgound picture and then add to the original photo will save some time.
for c in range(0,3): out[0:out.shape[0],0:out.shape[1],c] = aligned_mask[:,:,c] * (aligned_mask[:,:,3]/255.0) + out[0:out.shape[0], 0:out.shape[1], c] * (1.0 - aligned_mask[:,:,3]/255.0)
I do not really understand what is the code doing, How can I save some time with multiple faces?

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