Unbelievable Face Swapping with 5 Lines Code

  Рет қаралды 83,330

Rob Mulla

Rob Mulla

Күн бұрын

Пікірлер: 131
@sbhodges
@sbhodges Жыл бұрын
Great tutorial. The Obi1 and Spock swap gave me and audible chuckle .Thanks for that.
@robmulla
@robmulla Жыл бұрын
Glad you enjoyed it! One of my viewers suggested that. I thought it was funny too! 😄
@yahiarafik9965
@yahiarafik9965 Жыл бұрын
From the perspective of a Photoshop user, this is insanely fast and accurate, trying it asap! Thanks !
@robmulla
@robmulla Жыл бұрын
Glad you found the video helpful.
@didiwaytrooo
@didiwaytrooo Жыл бұрын
did you try this brother and run well with same result ?
@randomhominid9816
@randomhominid9816 Жыл бұрын
Awesome! I'm going to have some fun with this.
@robmulla
@robmulla Жыл бұрын
Don’t have too much fun!
@irfanshaikh262
@irfanshaikh262 Жыл бұрын
Thank u Rob. When i sit down to count my blessings I count "finding robs YT channel" 10 times. Just one request rob. Could you please provide us with the ur YT videos code such as this over github or any ither forum if possible. Would love to take it as a canvas and start experimenting. Thanks again for being my best DATA SCIENCE teacher.
@TheGijianSnail
@TheGijianSnail 9 ай бұрын
He’s my friend’s dad
@bobilgner1420
@bobilgner1420 Жыл бұрын
Classic! You are an artist Rob.
@minsubLAB
@minsubLAB Жыл бұрын
This is amazing! Thank you for making this video🙏 You made me feel like I can create funny and joyful projects.
@robmulla
@robmulla Жыл бұрын
You are so welcome! There are some fun things you can do with this package. Just be sure to use it responsibly!
@molmock
@molmock Жыл бұрын
Definitely gonna try it and apple my kids picture to NBA players 😁 the explanations were crystal clear and the examples very funny
@robmulla
@robmulla Жыл бұрын
Haha. But seriously- use it responsibly
@artistpw
@artistpw Жыл бұрын
This is great! So funny with just a few lines of code.
@BILALAHMAD-cz9gu
@BILALAHMAD-cz9gu Жыл бұрын
I love this man love from India
@robmulla
@robmulla Жыл бұрын
Glad you liked it. Thanks for watching.
@nikhilbhandari962
@nikhilbhandari962 Жыл бұрын
I am encountering an InvalidProtobuf error while running this file on Colab. I have checked the file location as well. Any suggestions?
@borisbadinoff1291
@borisbadinoff1291 Жыл бұрын
Great tutorial, even if it's way above my coding skillset.:)
@robmulla
@robmulla Жыл бұрын
You should give it a try! You can’t learn without trying. 😊
@DrDaab
@DrDaab Жыл бұрын
What would you consider Goodenuf? Boris? Mr Badinoff ? : )
@borisbadinoff1291
@borisbadinoff1291 Жыл бұрын
@@DrDaab Let me think… An AI that works like a toaster: an on/off lever and a single knob. I shouldn’t need a human to explain me how to make a toast. And if I need to read the manual, it fails the Goddunoff test. :)
@autonate_ai
@autonate_ai 4 ай бұрын
I'd like to create a face filter. Something like the chadify filter. Would I start with the chad picture and then swap it onto a face? or, would i start wit the face and swap it onto chad's?
@tomparatube6506
@tomparatube6506 Жыл бұрын
Amazing - thanks for your presentation!
@ovrava
@ovrava Жыл бұрын
ähm where would i need the place the .onnx file?
@robmulla
@robmulla Жыл бұрын
I don't think it matters so long as you reference the complete path when creating the swapper.
@samdes678
@samdes678 Жыл бұрын
@@robmulla Hi Rob, I am getting error AttributeError: 'INSwapper' object has no attribute 'taskname' when invoking this: app = FaceAnalysis(name='buffalo_l') faces = app.get(image) Any ideas?
@dominickipronoh4324
@dominickipronoh4324 Жыл бұрын
Hey Mula can you please create a video on facial expression recognition I feel I understands better your tutorials
@robmulla
@robmulla Жыл бұрын
Thanks for watching. Have you watched my video on DeepFace? It covers emotion recognition. Thanks for watching!
@EniOnYouTube
@EniOnYouTube Жыл бұрын
This is an amazing video! The tutorial was easy to follow
@googlestolemyname
@googlestolemyname Жыл бұрын
Great video, problem is they privatized it. No longer open source, I tried recreating / following along to your video only to find I wasted a chunk of my day. Great content, shame it’s a lost moment in time.
@appanamukesh7264
@appanamukesh7264 Жыл бұрын
Hi Rob, Thanks for the tutorial and want to know if there are any other pre-trained models as the clarity is a bit low. Got a clear picture of the pipe line of face swapping. thanks for your tutorial.
@DrDaab
@DrDaab Жыл бұрын
Great explanation. Now I have to learn python : )
@mohammedbaig9569
@mohammedbaig9569 Ай бұрын
Hey I'm doing this on Google Colab, so I've gotten to the: - res = swapper.get(res, face, source_face, paste_back=True) line, but I'm getting this error on it: - 'NoneType' object has no attribute 'get' So I'm assuming it has something to do with my swapper line: - swapper = insightface.model_zoo.get_model('inswapper_128.onnx', download=False, download_zip=False) I downloaded the file from the link and put it in the path like normal and linked it, however when I run the line i get this error: - [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from inswapper_128.onnx failed:Protobuf parsing failed. so to fix that I modified the line as such: - swapper = insightface.model_zoo.get_model('inswapper_128.onnx ', download=False, download_zip=False) But that returns the former error, so I'm not sure what I'm doing wrong. Any help would be greatly appreciated
@mohamads9759
@mohamads9759 5 ай бұрын
Very Very Fantastic And Useful. Thank You.
@PatricioStegmann
@PatricioStegmann Жыл бұрын
Very funny! Nice lib and tutorial!
@mahapeyuw5946
@mahapeyuw5946 11 ай бұрын
What are the odds? I was looking for a way to swap faces and I found this as I searched.
@Equilibrier
@Equilibrier Жыл бұрын
Mindblowing, thanks you ! Deepfake made super accessible, simple, free and astonishingly performant.
@ZhijianLiang-d4k
@ZhijianLiang-d4k Жыл бұрын
Hi Rob, thank you for this tutorial, the demonstration is really good, even as a novice, I can understand it quickly. I also followed your steps to implement it with code, but the resolution of the final generated picture is relatively low (lower than the two original pictures). Is there any good way to improve the clarity of the final picture? Looking forward to your reply, thanks again
@Debjit625
@Debjit625 Жыл бұрын
Same problem
@valentin4146
@valentin4146 Жыл бұрын
did u find a solution ?
@didiwaytrooo
@didiwaytrooo Жыл бұрын
​@@Debjit625did you find solution brother ?
@didiwaytrooo
@didiwaytrooo Жыл бұрын
​@@valentin4146did you find the solution brother ?
@anpr
@anpr 4 ай бұрын
where to download the "5 lines of code" and .onnx file? thanks
@GrimINAG
@GrimINAG Жыл бұрын
Can I integrate this into my website?
@whitequote-bs4vj
@whitequote-bs4vj 9 ай бұрын
very nice, btw how too download the swapped image to local computer? thank you
@themaniacbluez
@themaniacbluez Жыл бұрын
great Tutorial! Is there a way to generate higher resolution image outputs other than matplot does?
@samranbeytollahi
@samranbeytollahi 8 ай бұрын
Thanks can I ask what editor do you use?in this video
@thetransferaccount4586
@thetransferaccount4586 Жыл бұрын
this is fun. your tutorials are amazing for beginners. keep making them
@Glowbox3D
@Glowbox3D Жыл бұрын
I kind of very much disagree--it's probably amazing for beginner *coders* - there were some skipped and unclear parts all over if you don't know how to code and don't know python. The demo title makes it sound super easy "...5 lines Code", but the entire process is far from easy.
@didiwaytrooo
@didiwaytrooo Жыл бұрын
did you run code and run without problem brother ?
@virajunde7244
@virajunde7244 Жыл бұрын
How to download the weights
@Live_draw_today
@Live_draw_today Жыл бұрын
Is there any same code for hair swaping between photos?
@jonathanreyes9707
@jonathanreyes9707 Жыл бұрын
Great tutorial! Also dealing with images is a pain since there is no standard for coordiantes.
@AswinS-w7u
@AswinS-w7u 8 ай бұрын
can i use it in a photo where only one person face have to change and other one have to remaon the same ,is that possible??
@Gojosatoru-sama
@Gojosatoru-sama Жыл бұрын
can anyone help me i have downloaded inswapper but not being able to use it actually where exactly i have to move it
@jhonamorgan9194
@jhonamorgan9194 Жыл бұрын
Hi Rob. Firts, thanks for the video. I have an issue installing the package: Building wheels for collected packages: insightface Building wheel for insightface (pyproject.toml) ... error error: subprocess-exited-with-error. Did you read something about this? Please, any help would be very well received. Greetings from Peru.
@robmulla
@robmulla Жыл бұрын
Hey. Thanks for watching. I haven’t seen that error. What version python and are you starting with a brand new conda environment?
@jhonamorgan9194
@jhonamorgan9194 Жыл бұрын
My python version is 3.9 by the way i was able to install packages in my windows machine after install ms c++ 14.0 with visual studio. But in my Ubuntu machine i wasn't cause i didn't find a linux version for VS. Maybe if exist a way to install c++ complements, the problem would be resolved
@phantomgaming5199
@phantomgaming5199 Жыл бұрын
@@jhonamorgan9194 install visual studio with desktop development for C++
@JimmieJönsson-p4s
@JimmieJönsson-p4s Жыл бұрын
Adding "--no-cache-dir" to "pip install" solved it for me
@AmeerEl-Tayeb
@AmeerEl-Tayeb Жыл бұрын
Great Contents and very intersting
@judeufoh1691
@judeufoh1691 Жыл бұрын
Great video. I am try to download the inswapper file but i keep getting errors. InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from inswapper_128.onnx failed:Protobuf parsing failed. ChatGPT is suggesting that the file is corrupted. please do you have the original file or how do you advice i overcome this?
@jaimegalloway4016
@jaimegalloway4016 Жыл бұрын
Hey Rob! Great video!! Just FYI seems like the in swapper_128 model is down and only accesible through discord bot 😔
@judeufoh1691
@judeufoh1691 Жыл бұрын
Please where do I get your complete code for this tutorial?
@bilalimran1888
@bilalimran1888 Жыл бұрын
Great tutorial loved it. Can we use it with like training faces and then swaping/ generating with AI images like diffusion?
@whynesspower
@whynesspower Жыл бұрын
Can you suggestions on how to do this in real time video ? Prexisting snapchat filters do a basic swap, not involving the eigen face values and swapping using AI, how can I do this?
@powerfulcreations
@powerfulcreations Жыл бұрын
How to import those packages in jupyter notebook?
@atwelve8665
@atwelve8665 Жыл бұрын
Hey all, noob question here. Can they see/use/download my photos when i use their package? I do not want to leak my photos and I want to be sure. Thanks
@robertovalenzuela8860
@robertovalenzuela8860 Жыл бұрын
I noticed that people has a big problem with the sawpping step in the reddit link ... including me
@Rumi_activity
@Rumi_activity Жыл бұрын
Great introduction, thanks! Btw, may you share your custom.css file for your notebook? The notebook looks great!
@robmulla
@robmulla Жыл бұрын
Glad you liked the video. I’m using the solarized dark theme for jupyter lab. I actually have a whole video about my jupyter lab setup you can check out.
@Kaustubh56
@Kaustubh56 10 ай бұрын
How to replace only one face from a group photo with an external image and keep the rest of the faces intact?
@ВеселыйРоджер-м8д
@ВеселыйРоджер-м8д Жыл бұрын
Hi Rob. Thanks for the video. In this example, the face is recognized based on a single photo, which can be unflattering. Is it possible to use several photos for more accurate recognition?
@robmulla
@robmulla Жыл бұрын
Thanks for watching. That's a great question, but I don't believe this package has that capability. I still think the results are impressive given the single photo as input.
@areebsajid1660
@areebsajid1660 11 ай бұрын
What can i do to load inswapper model it gives error
@usmanamjad1409
@usmanamjad1409 11 ай бұрын
Can i use it for video face swapping?
@gelordtube
@gelordtube Жыл бұрын
hi rob do you have this in a notebook colab???
@RespectFalseIcons
@RespectFalseIcons Жыл бұрын
does this code use GPU by default? or is there a way to tweak it so that it uses gpu?
@IR240474
@IR240474 Жыл бұрын
Thank you for this..
@shashankbabu4331
@shashankbabu4331 Жыл бұрын
Hi Rob, Where are you running the code?
@dojjy5798
@dojjy5798 10 ай бұрын
he runs the code on his own computer.
@detroit-vi4iw
@detroit-vi4iw Жыл бұрын
i downloaded the onnx file but where to put ? i put in C:\Users\username\.insightface\models\inswapper_128 still giving error
@iftikhar58
@iftikhar58 11 ай бұрын
i replicate your code no erre is coming but its not give me inference on the source image.(pakistan)
@UijaeJ
@UijaeJ 4 ай бұрын
Do you know how to run this in realtime?
@KhalidSadiq-g4y
@KhalidSadiq-g4y Жыл бұрын
Where is the code notebook he is using ??
@TechToLife2024
@TechToLife2024 5 ай бұрын
Thank you
@samdes678
@samdes678 Жыл бұрын
Hi Rob, can you also include the keyboard shortcuts that you are using while showing some of the help topics? it will be very helpful for someone newby like me to follow along Thanks
@facundogoiriz7323
@facundogoiriz7323 Жыл бұрын
Is it possible to swap my face with lets say Messi's face in a live meeting?
@LRAOP
@LRAOP Жыл бұрын
yes
@parveztechcreation826
@parveztechcreation826 Жыл бұрын
which languge use in this swap?
@robmulla
@robmulla Жыл бұрын
python!
@BILALAHMAD-cz9gu
@BILALAHMAD-cz9gu Жыл бұрын
Please make a video on project of langchain library in python
@robmulla
@robmulla Жыл бұрын
I need to learn more about it but I know its very popular.
@BILALAHMAD-cz9gu
@BILALAHMAD-cz9gu Жыл бұрын
@@robmulla I'll wait for it
@ToastRusk
@ToastRusk 10 ай бұрын
How do I swap the entire head? This just swaps face.
@jb48999
@jb48999 Жыл бұрын
does anyone have any issue with really crappy quality replacements ? Does the model need to be trained or somethign ?
@user-sd5vm5tw2f
@user-sd5vm5tw2f Жыл бұрын
Yes same here. You didn't find a solution for this, did you?
@nirmesh44
@nirmesh44 Жыл бұрын
can you provide source code of this video?
@didiwaytrooo
@didiwaytrooo Жыл бұрын
could i run on android please ?
@cyberspider78910
@cyberspider78910 8 ай бұрын
Not representing Insightface or any beneficiary. But be careful about their usage licence - it is tricky. So if anyone gives tutorial video - it is ok. But if monetised - not ok. If you use image for education (what one will do with it - images ! S_x education) - it is ok. If you sell those images - you are not ok. Code is free. Outcome is not...lol... "The code of InsightFace is released under the MIT License. There is no limitation for both academic and commercial usage. The training data containing the annotation (and the models trained with these data) are available for non-commercial research purposes only. Both manual-downloading models from our github repo and auto-downloading models with our python-library follow the above license policy(which is for non-commercial research purposes only)."
@emersondelemmus3819
@emersondelemmus3819 Жыл бұрын
Where's the source code??
@robmulla
@robmulla Жыл бұрын
Check this out: github.com/RobMulla/twitch-stream-projects/blob/main/060-insightface/insight-face.ipynb
@yimingqin-bl7th
@yimingqin-bl7th 6 ай бұрын
i download the inswapper_128.onnx and put it in the floder suggested, but it seems it does't work, my swapper's type is none?can anybody helps me,plz!
@Magicmobi
@Magicmobi Жыл бұрын
Can you share the code please
@JapreetKah
@JapreetKah Жыл бұрын
does it do videos
@SteveSolun
@SteveSolun Жыл бұрын
Can you share your code?
@Blackrothschild
@Blackrothschild Жыл бұрын
Nice
@prashlovessamosa
@prashlovessamosa Жыл бұрын
Thank you that is something I need to do creepy things 😁.
@robmulla
@robmulla Жыл бұрын
On no. Please don’t.
@Videx89
@Videx89 Жыл бұрын
@@robmulla can i get the source code?
@davepunk2077
@davepunk2077 Жыл бұрын
😊
@ademhilmibozkurt7085
@ademhilmibozkurt7085 Жыл бұрын
🤣🤣🤣 Amazing
@samtalks9045
@samtalks9045 Жыл бұрын
Thanks for wasting my time
@viralvibes1997
@viralvibes1997 10 ай бұрын
😂
@viralvibes1997
@viralvibes1997 10 ай бұрын
Jush show the code, I don't like story, really time wasteing thing
@nao_chan_
@nao_chan_ Жыл бұрын
oh man I can't wait to swap my face onto all of my exgirlfriends photos. its like Im still there, in her life! ㅎㅎㅎㅎㅎ edit: I felt like it was obvious that I'm joking, but it's youtube so I guess I should have lowered my expectations
@robmulla
@robmulla Жыл бұрын
😬
@Maxam326
@Maxam326 Жыл бұрын
cringe
@aryansuvarna4923
@aryansuvarna4923 Жыл бұрын
yikes
@Maxam326
@Maxam326 Жыл бұрын
re to your edit: I knew you were joking when I read it, still super cringe
@nao_chan_
@nao_chan_ Жыл бұрын
@@Maxam326 thanks for letting me know max. your opinion is important to me. please let me know other various facts about yourself.
@Anonymous-fo2rv
@Anonymous-fo2rv 11 ай бұрын
InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /content/insightface/models/inswapper_128.onnx failed:Protobuf parsing failed. please help
@MayankTamakuwala
@MayankTamakuwala Жыл бұрын
I am trying this on AWS Ubuntu. However, I am getting this error, even though I have already installed "onnxruntime": sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model) onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from ./inswapper_128.onnx failed:Protobuf parsing failed. Can anyone please help me with this?
@pathak_amit
@pathak_amit 4 ай бұрын
Where should we place the .onnx file ? Placed it in "\Users\\.insightface\models" directory but it does not work.
Open Source Face Analysis with Python
15:07
Rob Mulla
Рет қаралды 59 М.
This INCREDIBLE trick will speed up your data processes.
12:54
Rob Mulla
Рет қаралды 273 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Exploratory Data Analysis with Pandas Python
40:22
Rob Mulla
Рет қаралды 527 М.
Code With Me: Automating My Life With Python and AI
13:33
Tiff In Tech
Рет қаралды 81 М.
💀 R.I.P. YouTube Tutorials: Gemini 2.0 AI is the NEW Teacher
10:00
Teacher's Tech
Рет қаралды 151 М.
This CSS Property Replaces Hundreds of Lines of Code
6:36
Web Dev Simplified
Рет қаралды 104 М.
How to Face Swap Any Video using FREE AI | Deepfake 2024
4:28
Website Learners
Рет қаралды 1,2 МЛН
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,7 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН