AI Hands Pose Recognition with Python Tutorial - How to Control Volume with Computer Vision

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • Tutorial with Python to control the computer volume, using OpenCV and Mediapipe for computer vision.
    00:00 Intro
    00:19 Code Base & Logic
    05:03 Testing the Code
    06:04 Controlling Volume with Hands Gestures
    More projects in the channel: bit.ly/3faep9
    Guide, Cheat Sheets and eBooks: github.com/rocketingdatascien...
    SUPPORT THE CHANNEL
    ===============================
    - FREE: Leave a like in the video
    - FREE: Subscribe the channel: bit.ly/3faep9p
    Source Code: github.com/rocketingdatascien...
    TOP 3 Books for Data Science
    ===============================
    Python for Data Analysis: amzn.to/3sbBany
    Hands-On Machine Learning: amzn.to/3P6x49v
    Designing Machine Learning Systems: amzn.to/3sfBfGV
    My Setup
    ===============================
    Laptop: amzn.to/3qx8ftV
    Monitor: amzn.to/3E4nxcw
    Headset: amzn.to/3KStTzx
    USB Hub: amzn.to/3P1TFny
    KEYWORDS
    ===============================
    hand gesture recognition,hand gesture recognition using opencv python,python,gesture recognition,pose estimation python,hand recognition opencv python,action recognition python,real time hand gesture recognition python,mediapipe hand gesture recognition python,real-time hand gesture recognition python,how to make hand gesture recognition using python,hand pose estimation python,mediapipe python tutorial,python machine learning image recognition
  • Věda a technologie

Komentáře • 39

  • @redeyemeltan6310
    @redeyemeltan6310 Před rokem +3

    how does this high quality video only have 9 likes?

    • @RDataScience
      @RDataScience  Před rokem +2

      That’s great to hear your feedback, thanks

  • @supradeepreddy8277
    @supradeepreddy8277 Před dnem

    Could you tell me how can i correct my code, as it is showing that , no cv2 module is found

  • @ellonmusketwannabe2201
    @ellonmusketwannabe2201 Před 11 měsíci +1

    i'd say this is pretty common, if you want something more complex try to add more gestures with a cooldown function in between transition. more of like an encapsulation of gestures

    • @RDataScience
      @RDataScience  Před 11 měsíci +2

      Thank you for your feedback. It is indeed a basic tutorial, to start playing around with these packages. I’m working now in something more interesting regarding computer vision and I’ll share a video about it soon

  • @rappuff6458
    @rappuff6458 Před 5 měsíci +1

    how do you flip the camera ? to get the mirror image ?

    • @RDataScience
      @RDataScience  Před 5 měsíci

      You can use the following: image_rgb=cv2.flip(image_rgb, 1)
      Is this what you’re looking for? Did it worked?

  • @EnderRobber101
    @EnderRobber101 Před 7 měsíci

    How do you autocomplete python imports? What extensions have you used can can you list them please? Thank you

    • @RDataScience
      @RDataScience  Před 6 měsíci

      This extension ms-python.python with the pylance (IntelliSense) dependency. Check if you have it
      Name: Python
      Id: ms-python.python
      Description: IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), code formatting, refactoring, unit tests, and more.
      Version: 2023.22.1
      Publisher: Microsoft
      VS Marketplace Link: marketplace.visualstudio.com/items?itemName=ms-python.python

    • @EnderRobber101
      @EnderRobber101 Před 6 měsíci

      @@RDataScience thank you

  • @quixnlle3531
    @quixnlle3531 Před 9 měsíci +1

    what is CV2 from where can i get it?

    • @RDataScience
      @RDataScience  Před 6 měsíci

      CV2 is OpenCV: pypi.org/project/opencv-python/

  • @ai_backend
    @ai_backend Před 9 měsíci +1

    Please put the sorce code in the description. More people will subscribe

    • @RDataScience
      @RDataScience  Před 6 měsíci

      I've done it, thank you for warning me. Here it is:
      github.com/rocketingdatascience/Volume_Control_with_Hand_Gestures_Recognition

  • @user-hj8ur2qv7r
    @user-hj8ur2qv7r Před 10 měsíci +1

    im getting INFO: Created TensorFlow Lite XNNPACK delegate for CPU. when i run the code

    • @RDataScience
      @RDataScience  Před 10 měsíci

      Is the webcam window displayed after that message? This is an INFO and should not affect its functionality

    • @Juma01
      @Juma01 Před 10 měsíci

      @@RDataScience Hi, I got that the same message, laptop's camera light switched to on, but video didn't displayed. Can you give me any tip?

    • @Juma01
      @Juma01 Před 10 měsíci +1

      My bad, I didn't know I should move my hands to make the video to be displayed haha

    • @RDataScience
      @RDataScience  Před 10 měsíci

      I see, there could be an indentation problem when that happens. But I’m glad to know that you were able to make it work anyway ahah

  • @suvarnavikendram.g.5287
    @suvarnavikendram.g.5287 Před 3 měsíci

    What does 'mp.solutions' do? since I wanted to test if my imports are working properly using your code but in mine it shows that "solutions" is not an attribute of Mediapipe or "module 'mediapipe' has no attribute 'solutions' '"

    • @RDataScience
      @RDataScience  Před 3 měsíci

      Solutions is the method that has already pre-built functions for gesture recognition. In this case, we are calling solutions.hands, for the hands gesture recognition. (It also has solutions.pose for pose use cases for example)
      So you imported “mediapipe as mp” correctly since it is saying that mp has no attribute.
      Now please verify if “solutions” is correctly spelled, if there isn’t any typo.
      If it is correct, uninstall mediapipe and install again. I never faced that problem, but let me know if it worked

    • @suvarnavikendram.g.5287
      @suvarnavikendram.g.5287 Před 3 měsíci +1

      @@RDataScience I got it to work as Mediapipe still doesn't support the newer versions of Python, so I just downgraded to Python 3.9.6? and it works, but another issue arises as the code runs but the camera pop up does not show up but the camera light indicating its active, is on. Its just stops at "INFO: Created TensorFlow Lite XNNPACK delegate for CPU"

    • @RDataScience
      @RDataScience  Před 3 měsíci

      @@suvarnavikendram.g.5287 Hey, if you wait a little longer it isn't displayed anyway? That is not an error, for me, the camera is displayed a couple of seconds after that INFO being displayed.
      Also, test in another py file the code that opens the camera just to degub and understand if that's working

  • @52maheshkumar
    @52maheshkumar Před rokem +2

    Can we control the brightness..??

    • @RDataScience
      @RDataScience  Před rokem +2

      Yes you can. With set_brightness() and fade_brightness() from screen_brightness_control package

  • @lakshyavasudeva8489
    @lakshyavasudeva8489 Před rokem

    Will this work on MacOS?

    • @RDataScience
      @RDataScience  Před rokem

      I haven't try, but yes, I believe so. Because from what I see in the docs PyAutoGUI works on MacOS (the remaining packages should too). pyautogui.readthedocs.io/en/latest/index.html

    • @lakshyavasudeva8489
      @lakshyavasudeva8489 Před rokem

      @@RDataScience Oh okay, thanks! I am facing the following error:
      line 8, in
      hands = mp.hands.Hands(static_image_mode=False, max_numhands=1,
      ^^^^^^^^
      AttributeError: module 'mediapipe' has no attribute 'hands'

    • @RDataScience
      @RDataScience  Před rokem

      You have mp.hands.Hands, replace that first . by a _
      Like: mp_hands.Hands
      Let me know if that worked

  • @user-sg5mt6jj4q
    @user-sg5mt6jj4q Před 7 měsíci

    sir unable to install mediapipe in vs code

    • @RDataScience
      @RDataScience  Před 6 měsíci +1

      What’s the error ?

    • @user-sg5mt6jj4q
      @user-sg5mt6jj4q Před 6 měsíci

      @@RDataScience mediapipe is not avaliable for python 3.12.0

    • @user-sg5mt6jj4q
      @user-sg5mt6jj4q Před 6 měsíci

      @@RDataScience Defaulting to user installation because normal site-packages is not writeable
      ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none)
      ERROR: No matching distribution found for mediapipe

    • @RDataScience
      @RDataScience  Před 6 měsíci

      @@user-sg5mt6jj4q mediapipe have some restrictions regarding requirements. Are you using an Apple macOS ?

    • @RDataScience
      @RDataScience  Před 6 měsíci

      @@user-sg5mt6jj4q does this help you?
      github.com/google/mediapipe/blob/master/docs/getting_started/python.md

  • @phantom_ttp28
    @phantom_ttp28 Před 11 měsíci

    es portugues?

    • @RDataScience
      @RDataScience  Před 11 měsíci +1

      Yap

    • @phantom_ttp28
      @phantom_ttp28 Před 11 měsíci

      @@RDataScience bem me parecia haha, ta fixe o video, continua mano q vais longe 🔥🔥

    • @RDataScience
      @RDataScience  Před 11 měsíci

      Ahahah obrigado mano ! É continuar a melhorar vídeo após vídeo 💪🔥