ramgendeploy / headswap-machine Goto Github PK
View Code? Open in Web Editor NEWPipeline to do headswap using face segmentation and face landmarks
License: MIT License
Pipeline to do headswap using face segmentation and face landmarks
License: MIT License
Hi Ramgen,
it's me again โ๏ธ
I'm have been working on your project for a days, but no luck to get the perfect image result.
I can not move the source mask and the crop face into place to make the composition with the headless template.
Maybe the problems is in function : "transformation_from_points":
def transformation_from_points(points1, points2):
points1 = points1.astype(np.float32)
points2 = points2.astype(np.float32)
c1 = np.mean(points1, axis=0)
c2 = np.mean(points2, axis=0)
points1 -= c1
points2 -= c2
s1 = np.std(points1)
s2 = np.std(points2)
points1 /= s1
points2 /= s2
U, S, Vt = np.linalg.svd(points1.T * points2)
R = (U * Vt).T
return np.vstack([np.hstack(((s2 / s1) * R,
c2.T - (s2 / s1) * R * c1.T)),
np.matrix([0., 0., 1.])])
Could you please explain for me how it work and how to get the perfect result?
Thank you!
is there is any way to create the headless template image..
Hi Ramgen,
Thanks for your hard work.
I'm very new in this field.
I would like to test your code, but the pretrained model path not found:
pretrained_W = "/home/rama/legendfacesPipeline/models/bisenet_pretrained.pth"
Where can I download this model or which models can I use the same with "bisenet_pretrained.pth"?
Thanks!
Hi Ramgen,
Thanks for your hard work.
I'm very new in this field.
I don't wanted to open new issue but didn't find right way to contact you. By the way I have followed you on twitter just now. I tried your code and found that "test_result.jpg" is showing dark face where as "source_1.jpg" is on fair side. Let me know if something needs to be changed. Attaching all files for your reference.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.