Extracting Faces with MediaPipe in Python

Поделиться
HTML-код
  • Опубликовано: 26 авг 2024
  • In this video, we demonstrate how to extract the facial area from an image using the Google empowered Mediapipe library and its facial landmark detection module in Python. This technique is important for facial recognition studies, as it provides clear inputs to face recognition models, and is also commonly used in deepfake studies.
    Facial recognition models require clear and accurate inputs to perform effectively. By extracting the facial area from an image, we can ensure that the face recognition model is fed with high-quality inputs, resulting in better accuracy and performance.
    In this study, we use the Mediapipe library to detect the facial landmarks in an image, and we use these landmarks to extract the facial area. We also showcase how this technique can be used to enhance the quality of inputs for deepfake studies, where the goal is to create realistic fake videos by swapping faces.
    Our video highlights the importance of accurate inputs in facial recognition studies and showcases the power of the Mediapipe library and its facial landmark detection module in achieving this goal.
    If you're interested in the world of facial recognition and deepfake studies, and want to learn how to extract the facial area from an image using the Mediapipe library, then this video is for you.
    Tutorial: sefiks.com/202...
    Please Subscribe! That's what keeps me going ► bit.ly/40NfIS7
    Want more? Connect with me here:
    Blog: sefiks.com/
    Twitter: / serengil
    Instagram: / serengil
    Facebook: / sefikscom
    Linkedin: / serengil
    If you do like my videos, you can support my effort with your financial contributions on
    - Patreon: www.patreon.co...
    - GitHub Sponsors: github.com/spo...
    - Buy Me a Coffee: buymeacoffee.c...

Комментарии • 29

  • @BulentSiyah
    @BulentSiyah Год назад +1

    I learned the mediapipe library from this video, thank you very much.

  • @CemilPars
    @CemilPars Год назад +1

    a very nice video, simple and clear expression

  • @MotuDaaduBhai
    @MotuDaaduBhai Год назад +1

    Awesome tutorial! What if I want to extract face from a video or jpg sequence? From my understanding your tutorial does one image at a time. Thanks in advance.

    • @sefiks
      @sefiks  Год назад

      a video is a sequence of images. you can read this tutorial to understand how to process each frame of video: sefiks.com/2019/10/28/artistic-style-transfer-for-videos/

    • @MotuDaaduBhai
      @MotuDaaduBhai Год назад

      @@sefiks Thanks for the reply. I already have a set of images extracted from video. I was trying add something in your code mentioned in this video to take in the set of images and process.

  • @idkname
    @idkname Год назад +1

    have a good time

  • @nesliserengil
    @nesliserengil Год назад +1

    💛💙

  • @EnesCanErkan
    @EnesCanErkan Месяц назад

    bir sorum var yüzün maskesini alabiliyoruz ancak kafanın tamamını almak istersek yalnızca kafa gözüksün maske şeklinde nasıl yapabiliriz ben sadece yüzü yapabildim ?

    • @sefiks
      @sefiks  Месяц назад

      Landmark noktalarinda o sekilde tanimli degil malesef

    • @EnesCanErkan
      @EnesCanErkan Месяц назад

      @@sefiks peki dediğim uygulamayı hem saç hem kafa (çeneye kadar) çıkarabilecek bir uygulama var mıdır ?

    • @sefiks
      @sefiks  Месяц назад

      suna bir goz atar misin? ruclips.net/video/zcf5SOKZNN4/видео.html

  • @alishadman6131
    @alishadman6131 Год назад

    Can you help that if its possible how can I extract a 3D model of the face? from the 2D image?? like to have a volume of the face!

    • @sefiks
      @sefiks  Год назад

      Please read this tutorial: sefiks.com/2022/01/14/deep-face-detection-with-mediapipe/

  • @g.s.3389
    @g.s.3389 Год назад

    ok, but among all your videos is still not clear which is the most precise face recognition or the fastest face recognition , which needs GPU or which can be used on CPU with good performance. can you make a video that manages all those aspects, an update video I mean. thx

    • @sefiks
      @sefiks  Год назад

      all experiments in my videos were run on my local machine with only cpu

  • @ahmadkemalalizzi8465
    @ahmadkemalalizzi8465 9 месяцев назад

    sorry sir, how to extract nose, mouth cheek, jaw etc.?

    • @sefiks
      @sefiks  9 месяцев назад

      You need to use pre-defined face mouth points instead of face oval

  • @tunateke9806
    @tunateke9806 Год назад +1

    🙏🙏🙏🙏

  • @nathansuarez5543
    @nathansuarez5543 Год назад

    How to save the extracted image? if possible with a transparent background or png type

    • @sefiks
      @sefiks  Год назад +1

      cv2.imwrite("img.png", img)

    • @nathansuarez5543
      @nathansuarez5543 Год назад

      @@sefiks thank you so much! You are an inspiration!

  • @KrdDeveloper
    @KrdDeveloper Год назад

    Bro I'm have mobile how i can change face

    • @sefiks
      @sefiks  Год назад

      This has no relation with face change

  • @lucianogomide2972
    @lucianogomide2972 8 месяцев назад

    How do i use my own photo ? Can u answer

    • @sefiks
      @sefiks  8 месяцев назад +1

      Set your own photo where I set that lady's photo.

    • @lucianogomide2972
      @lucianogomide2972 8 месяцев назад

      ​@@sefiks Dude, is it possible at the end of this process to save the image so that I can open it in Blender and have the image in 3D so that I can edit and perfect it through Blender

  • @parulchoudhary629
    @parulchoudhary629 11 месяцев назад

    its better for me.. if you provide code

    • @sefiks
      @sefiks  11 месяцев назад

      Follow the link in description