Unbelievable Face Swapping with 5 Lines Code

  Рет қаралды 65,821

Rob Mulla

Rob Mulla

Күн бұрын

Easily swap faces between images using python with this tutorial on the open source python package InsightFace. This new python library allows you to swap faces in seconds.
Github: github.com/deepinsight/insigh...
Reddit Post: / please_reupload_inswap...
00:00 InsightFace
01:10 Setup
02:40 Face Detection
05:22 Face Swapping
08:10 More Examples
Check out my other videos:
Data Pipelines: Polars vs PySpark vs Pandas: • The BEST library for b...
Polars for Data Science: • Polars: The Next Big P...
Speed up Pandas Dataframes: • This INCREDIBLE trick ...
Avoid These Pandas Mistakes: • 25 Nooby Pandas Coding...
Links to my stuff:
* KZbin: youtube.com/@robmulla?sub_con...
* Discord: / discord
* Twitch: / medallionstallion_
* Twitter: / rob_mulla
* Kaggle: www.kaggle.com/robikscube

Пікірлер: 122
@sbhodges
@sbhodges 11 ай бұрын
Great tutorial. The Obi1 and Spock swap gave me and audible chuckle .Thanks for that.
@robmulla
@robmulla 11 ай бұрын
Glad you enjoyed it! One of my viewers suggested that. I thought it was funny too! 😄
@minsubLAB
@minsubLAB 11 ай бұрын
This is amazing! Thank you for making this video🙏 You made me feel like I can create funny and joyful projects.
@robmulla
@robmulla 11 ай бұрын
You are so welcome! There are some fun things you can do with this package. Just be sure to use it responsibly!
@bobilgner1420
@bobilgner1420 10 ай бұрын
Classic! You are an artist Rob.
@EniOnYouTube
@EniOnYouTube 4 ай бұрын
This is an amazing video! The tutorial was easy to follow
@randomhominid9816
@randomhominid9816 Жыл бұрын
Awesome! I'm going to have some fun with this.
@robmulla
@robmulla 11 ай бұрын
Don’t have too much fun!
@artistpw
@artistpw 4 ай бұрын
This is great! So funny with just a few lines of code.
@tomparatube6506
@tomparatube6506 6 ай бұрын
Amazing - thanks for your presentation!
@yahiarafik9965
@yahiarafik9965 11 ай бұрын
From the perspective of a Photoshop user, this is insanely fast and accurate, trying it asap! Thanks !
@robmulla
@robmulla 11 ай бұрын
Glad you found the video helpful.
@didiwaytrooo
@didiwaytrooo 4 ай бұрын
did you try this brother and run well with same result ?
@PatricioStegmann
@PatricioStegmann 11 ай бұрын
Very funny! Nice lib and tutorial!
@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
@irfanshaikh262
@irfanshaikh262 9 ай бұрын
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.
@I_Love_My_C4t
@I_Love_My_C4t 28 күн бұрын
He’s my friend’s dad
@DrDaab
@DrDaab 8 ай бұрын
Great explanation. Now I have to learn python : )
@Equilibrier
@Equilibrier 10 ай бұрын
Mindblowing, thanks you ! Deepfake made super accessible, simple, free and astonishingly performant.
@bilalimran1888
@bilalimran1888 8 ай бұрын
Great tutorial loved it. Can we use it with like training faces and then swaping/ generating with AI images like diffusion?
@themaniacbluez
@themaniacbluez 9 ай бұрын
great Tutorial! Is there a way to generate higher resolution image outputs other than matplot does?
@appanamukesh7264
@appanamukesh7264 4 ай бұрын
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.
@nikhilbhandari962
@nikhilbhandari962 11 ай бұрын
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 11 ай бұрын
You should give it a try! You can’t learn without trying. 😊
@DrDaab
@DrDaab 8 ай бұрын
What would you consider Goodenuf? Boris? Mr Badinoff ? : )
@borisbadinoff1291
@borisbadinoff1291 7 ай бұрын
@@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. :)
@thetransferaccount4586
@thetransferaccount4586 10 ай бұрын
this is fun. your tutorials are amazing for beginners. keep making them
@Glowbox3D
@Glowbox3D 7 ай бұрын
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 4 ай бұрын
did you run code and run without problem brother ?
@BILALAHMAD-cz9gu
@BILALAHMAD-cz9gu 11 ай бұрын
I love this man love from India
@robmulla
@robmulla 11 ай бұрын
Glad you liked it. Thanks for watching.
@AmeerEl-Tayeb
@AmeerEl-Tayeb 5 ай бұрын
Great Contents and very intersting
@whitequote-bs4vj
@whitequote-bs4vj 25 күн бұрын
very nice, btw how too download the swapped image to local computer? thank you
@jonathanreyes9707
@jonathanreyes9707 6 ай бұрын
Great tutorial! Also dealing with images is a pain since there is no standard for coordiantes.
@samdes678
@samdes678 11 ай бұрын
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
@user-sc4hy6px9m
@user-sc4hy6px9m 11 ай бұрын
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 8 ай бұрын
Same problem
@valentin4146
@valentin4146 6 ай бұрын
did u find a solution ?
@didiwaytrooo
@didiwaytrooo 4 ай бұрын
​@@Debjit625did you find solution brother ?
@didiwaytrooo
@didiwaytrooo 4 ай бұрын
​@@valentin4146did you find the solution brother ?
@IR240474
@IR240474 6 ай бұрын
Thank you for this..
@googlestolemyname
@googlestolemyname 7 ай бұрын
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.
@jaimegalloway4016
@jaimegalloway4016 7 ай бұрын
Hey Rob! Great video!! Just FYI seems like the in swapper_128 model is down and only accesible through discord bot 😔
@Rumi_activity
@Rumi_activity 11 ай бұрын
Great introduction, thanks! Btw, may you share your custom.css file for your notebook? The notebook looks great!
@robmulla
@robmulla 11 ай бұрын
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.
@judeufoh1691
@judeufoh1691 10 ай бұрын
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?
@RespectFalseIcons
@RespectFalseIcons 9 ай бұрын
does this code use GPU by default? or is there a way to tweak it so that it uses gpu?
@user-ep5rz4pe4d
@user-ep5rz4pe4d 11 ай бұрын
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 11 ай бұрын
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.
@ArunPrasathR-sp6lt
@ArunPrasathR-sp6lt Ай бұрын
do you have any classes or tutorial on cartoon face swapping (not a human face)
@judeufoh1691
@judeufoh1691 7 ай бұрын
Please where do I get your complete code for this tutorial?
@whynesspower
@whynesspower 6 ай бұрын
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?
@gelordtube
@gelordtube 6 ай бұрын
hi rob do you have this in a notebook colab???
@dominickipronoh4324
@dominickipronoh4324 11 ай бұрын
Hey Mula can you please create a video on facial expression recognition I feel I understands better your tutorials
@robmulla
@robmulla 11 ай бұрын
Thanks for watching. Have you watched my video on DeepFace? It covers emotion recognition. Thanks for watching!
@mahapeyuw5946
@mahapeyuw5946 2 ай бұрын
What are the odds? I was looking for a way to swap faces and I found this as I searched.
@usmanamjad1409
@usmanamjad1409 3 ай бұрын
Can i use it for video face swapping?
@Mr__BOT
@Mr__BOT 4 ай бұрын
Is there any same code for hair swaping between photos?
@Gojosatoru-sama
@Gojosatoru-sama 8 ай бұрын
can anyone help me i have downloaded inswapper but not being able to use it actually where exactly i have to move it
@shashankbabu4331
@shashankbabu4331 10 ай бұрын
Hi Rob, Where are you running the code?
@dojjy5798
@dojjy5798 2 ай бұрын
he runs the code on his own computer.
@Kaustubh56
@Kaustubh56 2 ай бұрын
How to replace only one face from a group photo with an external image and keep the rest of the faces intact?
@areebsajid1660
@areebsajid1660 3 ай бұрын
What can i do to load inswapper model it gives error
@powerfulcreations
@powerfulcreations 5 ай бұрын
How to import those packages in jupyter notebook?
@user-wt2kn4kj3c
@user-wt2kn4kj3c 3 ай бұрын
Where is the code notebook he is using ??
@jhonamorgan9194
@jhonamorgan9194 11 ай бұрын
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 11 ай бұрын
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 11 ай бұрын
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 9 ай бұрын
@@jhonamorgan9194 install visual studio with desktop development for C++
@user-cd4bh4lt2b
@user-cd4bh4lt2b 6 ай бұрын
Adding "--no-cache-dir" to "pip install" solved it for me
@GrimINAG
@GrimINAG 5 ай бұрын
Can I integrate this into my website?
@atwelve8665
@atwelve8665 5 ай бұрын
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 5 ай бұрын
I noticed that people has a big problem with the sawpping step in the reddit link ... including me
@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 11 ай бұрын
@@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?
@BILALAHMAD-cz9gu
@BILALAHMAD-cz9gu 11 ай бұрын
Please make a video on project of langchain library in python
@robmulla
@robmulla 11 ай бұрын
I need to learn more about it but I know its very popular.
@BILALAHMAD-cz9gu
@BILALAHMAD-cz9gu 11 ай бұрын
@@robmulla I'll wait for it
@virajunde7244
@virajunde7244 6 ай бұрын
How to download the weights
@parveztechcreation826
@parveztechcreation826 9 ай бұрын
which languge use in this swap?
@robmulla
@robmulla 9 ай бұрын
python!
@iftikhar58
@iftikhar58 2 ай бұрын
i replicate your code no erre is coming but its not give me inference on the source image.(pakistan)
@Blackrothschild
@Blackrothschild 6 ай бұрын
Nice
@didiwaytrooo
@didiwaytrooo 3 ай бұрын
could i run on android please ?
@jb48999
@jb48999 4 ай бұрын
does anyone have any issue with really crappy quality replacements ? Does the model need to be trained or somethign ?
@user-sd5vm5tw2f
@user-sd5vm5tw2f 4 ай бұрын
Yes same here. You didn't find a solution for this, did you?
@ToastRusk
@ToastRusk 2 ай бұрын
How do I swap the entire head? This just swaps face.
@nirmesh44
@nirmesh44 5 ай бұрын
can you provide source code of this video?
@Magicmobi
@Magicmobi 8 ай бұрын
Can you share the code please
@facundogoiriz7323
@facundogoiriz7323 7 ай бұрын
Is it possible to swap my face with lets say Messi's face in a live meeting?
@LRAOP
@LRAOP 5 ай бұрын
yes
@user-nr9ui9bx9e
@user-nr9ui9bx9e 5 ай бұрын
does it do videos
@SteveSolun
@SteveSolun 11 ай бұрын
Can you share your code?
@prashlovessamosa
@prashlovessamosa Жыл бұрын
Thank you that is something I need to do creepy things 😁.
@robmulla
@robmulla Жыл бұрын
On no. Please don’t.
@Pscytlk
@Pscytlk 11 ай бұрын
@@robmulla can i get the source code?
@davepunk2077
@davepunk2077 10 ай бұрын
😊
@emersondelemmus3819
@emersondelemmus3819 11 ай бұрын
Where's the source code??
@robmulla
@robmulla 11 ай бұрын
Check this out: github.com/RobMulla/twitch-stream-projects/blob/main/060-insightface/insight-face.ipynb
@cyberspider78910
@cyberspider78910 10 күн бұрын
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)."
@ademhilmibozkurt7085
@ademhilmibozkurt7085 9 ай бұрын
🤣🤣🤣 Amazing
@viralvibes1997
@viralvibes1997 2 ай бұрын
😂
@samtalks9045
@samtalks9045 10 ай бұрын
Thanks for wasting my time
@detroit-vi4iw
@detroit-vi4iw 4 ай бұрын
i downloaded the onnx file but where to put ? i put in C:\Users\username\.insightface\models\inswapper_128 still giving error
@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 11 ай бұрын
re to your edit: I knew you were joking when I read it, still super cringe
@nao_chan_
@nao_chan_ 11 ай бұрын
@@Maxam326 thanks for letting me know max. your opinion is important to me. please let me know other various facts about yourself.
@viralvibes1997
@viralvibes1997 2 ай бұрын
Jush show the code, I don't like story, really time wasteing thing
@user-xx3sd1ov9w
@user-xx3sd1ov9w 4 ай бұрын
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?
@Anonymous-fo2rv
@Anonymous-fo2rv 3 ай бұрын
InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /content/insightface/models/inswapper_128.onnx failed:Protobuf parsing failed. please help
Open Source Face Analysis with Python
15:07
Rob Mulla
Рет қаралды 45 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 258 М.
Como ela fez isso? 😲
00:12
Los Wagners
Рет қаралды 31 МЛН
Тяжелые будни жены
00:46
К-Media
Рет қаралды 5 МЛН
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 60 МЛН
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
Upscale your Images using DEEP SUPER RESOLUTION with ESRGAN
21:24
Nicholas Renotte
Рет қаралды 99 М.
Incredible face swap with AI in Stable Diffusion
12:38
Vladimir Chopine [GeekatPlay]
Рет қаралды 69 М.
how to remove nsfw filter in facefusion 2.2.1
0:46
Альберт Иванов
Рет қаралды 9 М.
LangChain Explained in 13 Minutes | QuickStart Tutorial for Beginners
12:44
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1 МЛН
Python Face Recognition (Beginner Tutorial)
12:36
Matthew Berman
Рет қаралды 38 М.
CRAZY Face Swap Feature Hidden in Photoshop!
8:12
PiXimperfect
Рет қаралды 217 М.
MIDJOURNEY FACE SWAP
12:51
Kim Alban
Рет қаралды 10 М.
The Best FaceSwapper yet! And it’s FREE!
9:19
Theoretically Media
Рет қаралды 116 М.
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 17 МЛН
ЭТОТ ЗАБЫТЫЙ ФЛАГМАН СИЛЬНО ПОДЕШЕВЕЛ! Стоит купить...
12:54
Thebox - о технике и гаджетах
Рет қаралды 133 М.
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 9 МЛН