Hand Tracking 30 FPS using CPU | OpenCV Python (2021) | Computer Vision

Sdílet
Vložit
  • čas přidán 24. 03. 2021
  • In this tutorial we will learn Hand Tracking in real-time. We will first write the bare minimum code to run and then learn how to convert it into a module so we don't have to write it again and again for different projects. The best part is we don’t have to configure 100 parameters along with 20 installs to make it run. Within 10 to 15 mins you will have your model working.
    🚀🚀 My Urdu/Hindi AI CZcams Channel 🚀🚀
    / @murtazahassan01
    Download Code:
    www.computervision.zone/cours...
    Premium Courses:
    ✔️ Computer Vision Game Development Course:
    bit.ly/3ttLZ2s
    ✔️ Computer Vision with Arduino Course:
    bit.ly/3wzLB4m
    ✔️ Advanced Drone Programming Course:
    bit.ly/3qs3v5g
    ✔️ Learn to Build Computer Vision Mobile Apps:
    bit.ly/3uioY1J
    ✔️ Jetson Nano Premium Course:
    bit.ly/3L8uIlF
    ⚙️⚙️⚙️--My Gear - ⚙️⚙️⚙️
    👉 Complete Gear 💈: www.computervision.zone/tech-...
    👉 My PC Specs 🖥️: www.computervision.zone/tech-...
    👉 My Video Shooting Gear📽️ : www.computervision.zone/tech-...
    👉 My Laptops 💻: www.computervision.zone/tech-...
    👉 Educational Products🧑‍🎓: www.computervision.zone/tech-...
    👉 CZcams Starter Kit 🔴: www.computervision.zone/tech-...
    Follow Me:
    TikTok: bit.ly/3Vo76OQ
    Facebook Group: bit.ly/3irDcb7
    Discord: bit.ly/3JvyxAM
    Facebook Page: bit.ly/3IvpU7W
    Instagram : bit.ly/3NdGME3
    Website: bit.ly/3ICFTS0
    Github: bit.ly/3woU6PS
    #ComputerVision
    #OpenCV
    #CVZone

Komentáře • 563

  • @amicableami87
    @amicableami87 Před 2 lety +79

    For anyone who may be looking at this video recently, it looks as though you may need to add a new parameter to the .Hands method. "model_complexity", otherwise you may get an error. (I was), after maxHands just add 1 as an extra parameter (Unless you need to modify this)

    • @mrruchirgupta
      @mrruchirgupta Před 2 lety

      Error resolved after adding model Complexity. Thanks.

    • @zachytg4227
      @zachytg4227 Před rokem

      can u please explain more cause ive been trying to and nothing is working

    • @animeshbiswas2967
      @animeshbiswas2967 Před rokem +2

      @@zachytg4227 add extra parameter in _ _init_ _ put “model_complexity”. Then your problem will be solved. Thank You….

    • @blackberryjam2211
      @blackberryjam2211 Před rokem

      @@zachytg4227 man

    • @blackberryjam2211
      @blackberryjam2211 Před rokem

      @@zachytg4227 same here man

  • @shihabshohaul2469
    @shihabshohaul2469 Před 3 lety +134

    This channel is so underrated!!
    I'm sure this channel will hit 1 million within short time if other coders know about it.

    • @johannesalbrecht4705
      @johannesalbrecht4705 Před 3 lety +2

      I agree :-) !

    • @murtazasworkshop
      @murtazasworkshop  Před 3 lety +14

      Thank you for your kind words. Keep Spreading the word and by you help I will be there in no time.

    • @CodeWithJoe
      @CodeWithJoe Před 3 lety

      @@murtazasworkshop please update your github, following your video gives me error- cTime = time.time()
      fps = 1 / (cTime - pTime)
      pTime = cTime
      this gives me an error saying pTime is not defined

    • @sivakrishna1682
      @sivakrishna1682 Před 3 lety +1

      you need to set pTime to 0 for the purpose of initialization:
      pTime = 0
      hope this solves your error

    • @mygametyms
      @mygametyms Před 2 lety

      joke of the day lol..

  • @simonhafner4750
    @simonhafner4750 Před 3 lety +23

    Brilliant! Thank you so much for sharing this topic. The way you explain this topic is very professional and accessible. Keep up your good work!

  • @varunittigi9288
    @varunittigi9288 Před 2 lety +3

    Not many people do such video... That too with so much detail and explanation.. You have my subscription 👍🏻

  • @ibrahemtaha8177
    @ibrahemtaha8177 Před 3 lety +10

    amazing tutorial brother!!! OMG from start to finish with detailed explination!!
    You're AMAZING brother!! plz continue sharing with us more amazing projects and videos like that all the time!

  • @shreeharjoshi6143
    @shreeharjoshi6143 Před 3 lety +1

    Best ever explanation. Specially while explaining the parameters and not simply writing them out.

  • @joetkeshub
    @joetkeshub Před 3 lety +1

    Great pedagogy! Instructive and helpful. Thank you Murtaza!

  • @shahrulgw
    @shahrulgw Před 3 lety +9

    Thank you so much for this wonderful project!! Please keep on posting such content, you are really talented! :D

  • @sohorabhossain4615
    @sohorabhossain4615 Před 3 lety

    What a fabulous channel ! Keep up the good works brother.

  • @Draxper
    @Draxper Před 3 lety

    Amazing video. Loved your clarity and procedure of teaching.
    Subscribed

  • @sampaksasa3756
    @sampaksasa3756 Před 3 lety +1

    bro i have learned a lot of great things from this video, thankyou so much brother, pls keep uploading such kinds of videos

  • @yaronbarlevy8588
    @yaronbarlevy8588 Před 3 lety

    Awesome video as always. Love this channel

  • @rudiklein
    @rudiklein Před 3 lety +7

    Seen this channel for the first time. I love it already!

  • @pinorinaudo2479
    @pinorinaudo2479 Před 3 lety +3

    Oh my God. Amazing video!!! You're the best

  • @nabeast1980
    @nabeast1980 Před 3 lety

    excellent, practical tutorial! I've subscribed :)

  • @TauheedKhanMohd
    @TauheedKhanMohd Před 2 lety

    I would be able to follow the tutorial and gets the exact same result as yours. Hats of to you man.

  • @josephdreamz
    @josephdreamz Před 3 lety

    This is the right tutorial I was expecting... Thank you so much👍👍👍👍👍

  • @mrCetus
    @mrCetus Před 2 lety +3

    professional explanation at its peak. thank you so much teacher

  • @xplorecoding2748
    @xplorecoding2748 Před 3 lety

    you are very talented...keep making more videos...i watched more than 10 videos in 2 days

  • @cesarramoncantoecobar643
    @cesarramoncantoecobar643 Před 3 lety +1

    You, Mr. Murtaza, you are my idol for doing this kind of videos. Thank you.

  • @winstonyeung1461
    @winstonyeung1461 Před 3 lety +2

    Thank you sir. I am working on a small project exactly on this. Your tutorial helps a lot.

  • @jihunbae4795
    @jihunbae4795 Před 3 lety

    Wow . I`m really appreciated for you to upload these wonderful video thx !

  • @byxlettera1452
    @byxlettera1452 Před 3 lety

    Dear Murtaza perfect tutorial. I have found everything I was looking for.
    Thanks

  • @ilanpeer2116
    @ilanpeer2116 Před 2 lety +11

    First part was a great intro 👍
    The second "module" was a good idea but please try sticking with python's code conventions.
    Thanks and keep making more videos like this!

    • @lusher00
      @lusher00 Před 2 lety +1

      what don't you like? I'm learning python from these videos as much as I'm learning openCV. I don't want to pick up bad habits. I grew up on C (and still wish every language was C)

  • @trr3576
    @trr3576 Před 3 lety +1

    What a useful content
    Appreciate your work sir
    Thank you very much

  • @youtubeyoutube6205
    @youtubeyoutube6205 Před 3 lety

    I really liked this video, thank you!

  • @toetoeag
    @toetoeag Před 2 lety

    Excellent explanation and understandable content. Thanks.

  • @adriandonca3273
    @adriandonca3273 Před 2 lety

    Creative and sincere, thank you! I will follow you.

  • @JaredTilston
    @JaredTilston Před 2 lety

    Great tutorial!! Thank you!!

  • @Jhorel.93gs
    @Jhorel.93gs Před 3 lety

    I from Brazilian and a start learning Lange progamation on 2021 and I love It. Thanks

  • @NonnofYobiznes
    @NonnofYobiznes Před 3 lety

    You're amazing my man!

  • @samauto69
    @samauto69 Před 2 měsíci

    Absolutely love your videos, cannot have enough of them. I am working on my project and your tutorial is essential for me. A BIG THANK YOU

  • @Maertaugh
    @Maertaugh Před 3 lety +4

    I'm a beginer and your tutorials are greats and so explicite.
    Thank's a lot.

    • @murtazasworkshop
      @murtazasworkshop  Před 3 lety

      Glad you like them!

    • @Abcsciencemusic
      @Abcsciencemusic Před 3 lety

      @@murtazasworkshop HELP ! .....not able to install mediapipe ERROR: Could not find a version that satisfies the requirement mediapipe
      ERROR: No matching distribution found for mediapipe

    • @Abcsciencemusic
      @Abcsciencemusic Před 3 lety

      @@theryze. I am also using 3.7 ..... already checked.

  • @koraksengupta3554
    @koraksengupta3554 Před 2 lety +6

    Sir, it would be highly beneficial, if you explain the image stacking function you personally made, in the "open cv in 3 hrs" video.

  • @kunalsoni7681
    @kunalsoni7681 Před 3 lety

    really very nice and amazing tutorial 😍❤💕

  • @gorkemkacakgil7141
    @gorkemkacakgil7141 Před rokem +4

    For people getting errors from module and not running, you need to add 1 more parameter to self.mpHands.Hands to fix the issue. It changed with new framework in last update
    in init add complexity = 0 parameter (if you want better detection make = 1)
    add under other self parameters
    self.complexity = complexity
    lastly
    self.hands = self.mpHands.Hands(self.mode, self.maxHands, self.complexity, self.detectionCon, self.trackCon)

  • @kalyanirajalingham1286

    You're a fantastic genius!

  • @Memeistan-ei9ws
    @Memeistan-ei9ws Před 4 měsíci

    I have watched the whole playlist, Kepp up the Good work sir Thank you so much

  • @Suman-zm7wx
    @Suman-zm7wx Před 3 lety +1

    Really man great job, and thanks a lot for this enthralling tutorial

  • @OnePunchHeizou
    @OnePunchHeizou Před 2 lety +1

    This tutorial was really helpful, can u do one for stereoscopic cameras as well.

  • @premprasad3511
    @premprasad3511 Před 2 lety

    Excellent content. Thanks for sharing

  • @fernandocanepari3795
    @fernandocanepari3795 Před 3 lety

    Great video!
    Thanks,

  • @actionkey8042
    @actionkey8042 Před 3 lety +1

    Murtaza's Workshop - Robotics and AI
    -awesomee

  • @foralianachawla8771
    @foralianachawla8771 Před 3 lety

    Thanks for sharing your work.

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

    I don't know about opencv Library but i could understand everything. Wow how you are good at teaching ❤❤

  • @anmolpunetha3994
    @anmolpunetha3994 Před 3 lety

    Awesome🔥

  • @ezzeldin101
    @ezzeldin101 Před 3 lety

    Thanks Hassan
    u r awesome dude!!!

  • @justus6899
    @justus6899 Před 3 lety +1

    Hello, love the channel from Kenya, quick question though....at 9:40 when testing if the image is being processed, why didn't you pass variable results into cv2.imshow() function instead of variable img???

  • @Bianchi77
    @Bianchi77 Před 3 lety

    Nice video, thanks :)

  • @antospin4004
    @antospin4004 Před 3 lety

    Fantastic tutorial!! Do you happen to know why the main function is executed on one hand only?

  • @davidallan6036
    @davidallan6036 Před 3 lety

    Excellent video, very well explained

  • @g.s.3389
    @g.s.3389 Před 3 lety

    very interesting and useful, it is also quite fast.

  • @stefanogrillo6040
    @stefanogrillo6040 Před 3 lety

    Greeeeat. It works.

  • @haidyelnagdy2423
    @haidyelnagdy2423 Před 3 lety +3

    Greate video, helped me a lot.
    I am trying to crop the hand after detecting it ( if one hand crop it if 2 hands crop both hands as one image) any idea how to do this?

  • @aloksheth7477
    @aloksheth7477 Před 3 lety

    Very nice tutorial

  • @harppadabhishek3295
    @harppadabhishek3295 Před 2 lety

    Thank You bro!😊

  • @sarthakpatelia9888
    @sarthakpatelia9888 Před 3 lety

    This blowed my mind, Absolutely stunning!! Thanks lot sir for sharing your knowledge.

  • @Nulamir-ot6nf
    @Nulamir-ot6nf Před 3 lety +2

    Hi, amazing project, and that about capture from more than one cameras for more beatiful results?

  • @clickhere6677
    @clickhere6677 Před 3 lety +2

    Can we save inputs for gestures like I can command python to do something when my index finger is up?

  • @yashjha7152
    @yashjha7152 Před 2 měsíci

    Absolute Legend!

  • @jucano
    @jucano Před 3 lety

    Very nice tutorial .What is the use of Z coordinates that appear in each point ?

  • @user-kd1kb6fk1e
    @user-kd1kb6fk1e Před 2 lety +2

    Thank you for the good video!
    I have a question sir
    How can we enhance the detecting accuracy of the fingertip??
    Most of the times it finds the fingertip well, but sometimes it doesn't
    I would appreciate if you tell me the solutions

  • @shaweewishissime6718
    @shaweewishissime6718 Před 3 lety +1

    Really truly top video !
    I wonder how to use it as a Leap motion alternative.
    Hassan you're a killer.
    ;)

    • @murtazasworkshop
      @murtazasworkshop  Před 3 lety +4

      Put the camera upside down on a table, and you get a cheap leap motion controller 😂

  • @amashi6091
    @amashi6091 Před 3 lety +11

    thank you so much! I've been trying to make it to where I could memify my webcam by making it so that i could teach a very simple model the substitution naruto jutsu and make it so when i did the hand signs it would make me dissapear from camera. Thank you so much

  • @mmostafa4699
    @mmostafa4699 Před 3 lety

    thanks for this video

  • @ahmarhussain8720
    @ahmarhussain8720 Před rokem

    great video

  • @kkhyyyz6535
    @kkhyyyz6535 Před 2 lety

    Thanks much Murtaza...thinking about making a Magic Mirror and adding all this automation...i guess you should be able to select stuff on the screen with gestures ?

  • @thunderstack5365
    @thunderstack5365 Před 3 lety

    Cool stuff

  • @akashhebsur
    @akashhebsur Před rokem +3

    if any one is getting error in detectionCon then change its value from 0.75 to 1, it will work

  • @qymyz_shubat
    @qymyz_shubat Před 3 lety

    thank you very much!

  • @lagio0lagio059
    @lagio0lagio059 Před 3 lety

    thank you so much

  • @LandoCalrissiano
    @LandoCalrissiano Před 3 lety

    Do you get higher framerates when you put the I/O operations on other threads?

  • @statusworld-hj5jj
    @statusworld-hj5jj Před 3 lety

    It's amazing 🤟

  • @nguyenangthang7473
    @nguyenangthang7473 Před 3 lety

    thank you teacher :D

  • @__3093
    @__3093 Před 3 lety +5

    gj! do more on C++

  • @harisreesa
    @harisreesa Před 2 lety +8

    For those who are getting error on inits in module creation....add model_complexity to the parameters and the error will be solved

  • @eranfeit
    @eranfeit Před 3 lety

    Great !!!!

  • @pisitnakjai1219
    @pisitnakjai1219 Před 3 lety

    What is the algorithm or model that you use to extract the marker point of finger?

  • @2.adityachouksey285
    @2.adityachouksey285 Před 3 lety

    brother thank you soo much with your help i am able to use opencv and hand gesture like a pro thank you soo much bro you will hit 10 million till 2023 i am sure (not writing so i can get a heart my heart voice say this about the chanell

  • @kevinflanigan8653
    @kevinflanigan8653 Před 2 lety +10

    Enjoying this tutorial. For some reason, my version of hands.py has a fifth parameter called "model_complexity" after "max_num_hands". I had to insert that into the class handDetector and in the self.hands definition.

    • @elizabethmathew3400
      @elizabethmathew3400 Před 2 lety

      thankyou this helped!❤️

    • @lusher00
      @lusher00 Před 2 lety

      that took me a hot minute to figure out. I'm here to figure out how to mirror the whole thing now so my display matches my gestures. I figured that answer must be in the comments somewhere.

    • @UltraSolarGod
      @UltraSolarGod Před 2 lety

      that helped me with my error thanks

  • @phee3D
    @phee3D Před 3 lety +7

    Hey, great video. I'm using this tutorial to figure out how to move the cursor using finger tracking. Right now I'm using the index finger to move the cursor and it works fine, I'm using pywin32 module to set the cursor using the index finger's tip landmark. One thing I'm not being able to figure out is how do I manipulate the sensitivity of the cursor. I don't want to move my finger across the whole screen to move the cursor from one edge to the other. This is how I set the cursor: landmark ratio (for example 0.5 if at middle of screen) multiplied by 1920 (width of my screen). I feel like I'm missing something really obvious and simple but after a few hours of trying to manipulate the sensitivity, I thought perhaps you have an idea about how to achieve this.

    • @rehankhan456
      @rehankhan456 Před 2 lety +1

      If you still haven't found something I think this may help.
      Find an optimal constant and multiply the cursor distance traveled with your finger distance traveled that may solve the problem
      Optimal_constant_x = screen_resolution_x/cam_resolution_x
      Same for "y" also

  • @glebmaks369
    @glebmaks369 Před rokem

    Thank you

  • @mankybrains
    @mankybrains Před 2 lety

    Thanks to all for pointing out the 'model_complexity' issue. I added it to the method __init__ and was able to get it to work now.

    • @belcamara4874
      @belcamara4874 Před rokem

      I added modelcomplexity in __init__ but still not working for me

    • @mankybrains
      @mankybrains Před rokem

      @@belcamara4874 oh sorry, for init it's double under. Like this "__init__" . Not single _init_. For some reason CZcams isn't showing the first underscore. So two underscores in front and back..... Now it shows... Hope you understood.

  • @wouterbrand2826
    @wouterbrand2826 Před 3 lety

    awsome!
    how about using this to teach kids typewriting skils.
    example
    if you type the q with your index it does not print the character
    but complain that you mist use your pinkie

  • @TheRealFrankWizza
    @TheRealFrankWizza Před 3 lety

    FYI, I found someone who kindly packaged this for jetson nano and raspberry pi. I get a couple of errors, but it seems to work.
    I just got to the point of the video where we draw the lines to connect the landmarks, and it seems to be working perfectly.
    Thanks a lot for the lessons!

  • @ahmedadel-uv9sj
    @ahmedadel-uv9sj Před 2 lety

    you might have saved my graduation project damn

  • @amitdutta3875
    @amitdutta3875 Před 3 lety +2

    can you make a video about sign language detection..

  • @binhthuan7901
    @binhthuan7901 Před rokem

    before 1 day looking for a app that work, finally i found

  • @codeshift1742
    @codeshift1742 Před 3 lety

    Do you know anyways of getting it to calculate the distance between the camera and one of the id points?

  • @araf4.086
    @araf4.086 Před 2 lety

    great really

  • @UKReconGamerz
    @UKReconGamerz Před 3 lety

    So instead of webcams, what would you put for programs that output video/stream such as ps4 remote play?.

  • @abellachannel6050
    @abellachannel6050 Před 2 lety

    It’s really good

  • @KrishuBrawlStars
    @KrishuBrawlStars Před 3 lety +2

    You are pro mam 🔥🔥🔥🔥🔥

  • @brunafortunato7449
    @brunafortunato7449 Před 3 lety

    Could you detect gesture reconition using mediapipe?

  • @KSATica
    @KSATica Před rokem

    Your the MAN!!!!!

  • @KSATica
    @KSATica Před rokem

    AMAZING!!!!!!!!!!!!!!!!!!!!!!!!

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

    Do you have anything for C++

  • @usama57926
    @usama57926 Před 3 lety +1

    amazing................

  • @eranfeit
    @eranfeit Před 3 lety

    Hi , Thanks, How can I detect if it is left or right hand ?

  • @TheRealFrankWizza
    @TheRealFrankWizza Před 3 lety

    Cool, I will try this out tonight.
    Nevermind, mediapipe is too complicated to get working in python on the jetson nano.