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

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 มี.ค. 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 TH-cam 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-...
    👉 TH-cam 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

ความคิดเห็น • 562

  • @amicableami87
    @amicableami87 2 ปีที่แล้ว +78

    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 2 ปีที่แล้ว

      Error resolved after adding model Complexity. Thanks.

    • @zachytg4227
      @zachytg4227 ปีที่แล้ว

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

    • @animeshbiswas2967
      @animeshbiswas2967 ปีที่แล้ว +2

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

    • @blackberryjam2211
      @blackberryjam2211 ปีที่แล้ว

      @@zachytg4227 man

    • @blackberryjam2211
      @blackberryjam2211 ปีที่แล้ว

      @@zachytg4227 same here man

  • @shihabshohaul2469
    @shihabshohaul2469 3 ปีที่แล้ว +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 3 ปีที่แล้ว +2

      I agree :-) !

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว +14

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

    • @CodeWithJoe
      @CodeWithJoe 3 ปีที่แล้ว

      @@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 3 ปีที่แล้ว +1

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

    • @mygametyms
      @mygametyms 2 ปีที่แล้ว

      joke of the day lol..

  • @simonhafner4750
    @simonhafner4750 3 ปีที่แล้ว +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 2 ปีที่แล้ว +3

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

  • @ibrahemtaha8177
    @ibrahemtaha8177 3 ปีที่แล้ว +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 3 ปีที่แล้ว +1

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

  • @joetkeshub
    @joetkeshub 3 ปีที่แล้ว +1

    Great pedagogy! Instructive and helpful. Thank you Murtaza!

  • @shahrulgw
    @shahrulgw 3 ปีที่แล้ว +9

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

  • @sohorabhossain4615
    @sohorabhossain4615 3 ปีที่แล้ว

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

  • @Draxper
    @Draxper 3 ปีที่แล้ว

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

  • @sampaksasa3756
    @sampaksasa3756 3 ปีที่แล้ว +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 3 ปีที่แล้ว

    Awesome video as always. Love this channel

  • @rudiklein
    @rudiklein 3 ปีที่แล้ว +7

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

  • @pinorinaudo2479
    @pinorinaudo2479 3 ปีที่แล้ว +3

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

  • @nabeast1980
    @nabeast1980 3 ปีที่แล้ว

    excellent, practical tutorial! I've subscribed :)

  • @TauheedKhanMohd
    @TauheedKhanMohd 2 ปีที่แล้ว

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

  • @josephdreamz
    @josephdreamz 3 ปีที่แล้ว

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

  • @mrCetus
    @mrCetus 2 ปีที่แล้ว +3

    professional explanation at its peak. thank you so much teacher

  • @xplorecoding2748
    @xplorecoding2748 3 ปีที่แล้ว

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

  • @cesarramoncantoecobar643
    @cesarramoncantoecobar643 3 ปีที่แล้ว +1

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

  • @winstonyeung1461
    @winstonyeung1461 3 ปีที่แล้ว +2

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

  • @jihunbae4795
    @jihunbae4795 3 ปีที่แล้ว

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

  • @byxlettera1452
    @byxlettera1452 3 ปีที่แล้ว

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

  • @ilanpeer2116
    @ilanpeer2116 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 3 ปีที่แล้ว +1

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

  • @youtubeyoutube6205
    @youtubeyoutube6205 3 ปีที่แล้ว

    I really liked this video, thank you!

  • @toetoeag
    @toetoeag 2 ปีที่แล้ว

    Excellent explanation and understandable content. Thanks.

  • @adriandonca3273
    @adriandonca3273 2 ปีที่แล้ว

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

  • @JaredTilston
    @JaredTilston 2 ปีที่แล้ว

    Great tutorial!! Thank you!!

  • @Jhorel.93gs
    @Jhorel.93gs 3 ปีที่แล้ว

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

  • @NonnofYobiznes
    @NonnofYobiznes 3 ปีที่แล้ว

    You're amazing my man!

  • @samauto69
    @samauto69 2 หลายเดือนก่อน

    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 3 ปีที่แล้ว +4

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

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว

      Glad you like them!

    • @Abcsciencemusic
      @Abcsciencemusic 3 ปีที่แล้ว

      @@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 3 ปีที่แล้ว

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

  • @koraksengupta3554
    @koraksengupta3554 2 ปีที่แล้ว +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 3 ปีที่แล้ว

    really very nice and amazing tutorial 😍❤💕

  • @gorkemkacakgil7141
    @gorkemkacakgil7141 ปีที่แล้ว +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)

    • @jazztyanatandroid4909
      @jazztyanatandroid4909 ปีที่แล้ว

      Thanks so much, it works

    • @manishkumar-vz6bw
      @manishkumar-vz6bw ปีที่แล้ว

      @@jazztyanatandroid4909 bro can you please share the file link here its not working

    • @jazztyanatandroid4909
      @jazztyanatandroid4909 ปีที่แล้ว

      @@manishkumar-vz6bw There's no any link bro, you just need to add the code like mentioned above

    • @subhadeeppaul4869
      @subhadeeppaul4869 ปีที่แล้ว

      Thank you, it works

  • @kalyanirajalingham1286
    @kalyanirajalingham1286 3 ปีที่แล้ว

    You're a fantastic genius!

  • @Memeistan-ei9ws
    @Memeistan-ei9ws 4 หลายเดือนก่อน

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

  • @Suman-zm7wx
    @Suman-zm7wx 3 ปีที่แล้ว +1

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

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว

      You’re welcome

    • @melocovers007
      @melocovers007 10 หลายเดือนก่อน

      ​@@murtazasworkshopI have error in hand tracking module

  • @OnePunchHeizou
    @OnePunchHeizou 2 ปีที่แล้ว +1

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

  • @premprasad3511
    @premprasad3511 2 ปีที่แล้ว

    Excellent content. Thanks for sharing

  • @fernandocanepari3795
    @fernandocanepari3795 3 ปีที่แล้ว

    Great video!
    Thanks,

  • @actionkey8042
    @actionkey8042 3 ปีที่แล้ว +1

    Murtaza's Workshop - Robotics and AI
    -awesomee

  • @foralianachawla8771
    @foralianachawla8771 3 ปีที่แล้ว

    Thanks for sharing your work.

  • @vishwas5344
    @vishwas5344 10 หลายเดือนก่อน

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

  • @anmolpunetha3994
    @anmolpunetha3994 3 ปีที่แล้ว

    Awesome🔥

  • @ezzeldin101
    @ezzeldin101 3 ปีที่แล้ว

    Thanks Hassan
    u r awesome dude!!!

  • @justus6899
    @justus6899 3 ปีที่แล้ว +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 3 ปีที่แล้ว

    Nice video, thanks :)

  • @antospin4004
    @antospin4004 3 ปีที่แล้ว

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

  • @davidallan6036
    @davidallan6036 3 ปีที่แล้ว

    Excellent video, very well explained

  • @g.s.3389
    @g.s.3389 3 ปีที่แล้ว

    very interesting and useful, it is also quite fast.

  • @stefanogrillo6040
    @stefanogrillo6040 3 ปีที่แล้ว

    Greeeeat. It works.

  • @haidyelnagdy2423
    @haidyelnagdy2423 3 ปีที่แล้ว +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 3 ปีที่แล้ว

    Very nice tutorial

  • @harppadabhishek3295
    @harppadabhishek3295 2 ปีที่แล้ว

    Thank You bro!😊

  • @sarthakpatelia9888
    @sarthakpatelia9888 3 ปีที่แล้ว

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

  • @Nulamir-ot6nf
    @Nulamir-ot6nf 3 ปีที่แล้ว +2

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

  • @clickhere6677
    @clickhere6677 3 ปีที่แล้ว +2

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

  • @yashjha7152
    @yashjha7152 2 หลายเดือนก่อน

    Absolute Legend!

  • @jucano
    @jucano 3 ปีที่แล้ว

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

  • @user-kd1kb6fk1e
    @user-kd1kb6fk1e 2 ปีที่แล้ว +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 3 ปีที่แล้ว +1

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

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว +4

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

  • @amashi6091
    @amashi6091 3 ปีที่แล้ว +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 3 ปีที่แล้ว

    thanks for this video

  • @ahmarhussain8720
    @ahmarhussain8720 ปีที่แล้ว

    great video

  • @kkhyyyz6535
    @kkhyyyz6535 2 ปีที่แล้ว

    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 3 ปีที่แล้ว

    Cool stuff

  • @akashhebsur
    @akashhebsur ปีที่แล้ว +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 3 ปีที่แล้ว

    thank you very much!

  • @lagio0lagio059
    @lagio0lagio059 3 ปีที่แล้ว

    thank you so much

  • @LandoCalrissiano
    @LandoCalrissiano 3 ปีที่แล้ว

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

  • @statusworld-hj5jj
    @statusworld-hj5jj 3 ปีที่แล้ว

    It's amazing 🤟

  • @nguyenangthang7473
    @nguyenangthang7473 3 ปีที่แล้ว

    thank you teacher :D

  • @__3093
    @__3093 3 ปีที่แล้ว +5

    gj! do more on C++

  • @harisreesa
    @harisreesa 2 ปีที่แล้ว +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 3 ปีที่แล้ว

    Great !!!!

  • @pisitnakjai1219
    @pisitnakjai1219 3 ปีที่แล้ว

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

  • @2.adityachouksey285
    @2.adityachouksey285 3 ปีที่แล้ว

    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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      thankyou this helped!❤️

    • @lusher00
      @lusher00 2 ปีที่แล้ว

      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 2 ปีที่แล้ว

      that helped me with my error thanks

  • @phee3D
    @phee3D 3 ปีที่แล้ว +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 2 ปีที่แล้ว +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 ปีที่แล้ว

    Thank you

  • @mankybrains
    @mankybrains 2 ปีที่แล้ว

    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 ปีที่แล้ว

      I added modelcomplexity in __init__ but still not working for me

    • @mankybrains
      @mankybrains ปีที่แล้ว

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

  • @wouterbrand2826
    @wouterbrand2826 3 ปีที่แล้ว

    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 3 ปีที่แล้ว

    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!

    • @murtazasworkshop
      @murtazasworkshop  3 ปีที่แล้ว +1

      Great share your results on the Discord Channel

    • @TheRealFrankWizza
      @TheRealFrankWizza 3 ปีที่แล้ว

      @@murtazasworkshop
      Sure, I will get around to signing up soon.

  • @ahmedadel-uv9sj
    @ahmedadel-uv9sj 2 ปีที่แล้ว

    you might have saved my graduation project damn

  • @amitdutta3875
    @amitdutta3875 3 ปีที่แล้ว +2

    can you make a video about sign language detection..

  • @binhthuan7901
    @binhthuan7901 ปีที่แล้ว

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

  • @codeshift1742
    @codeshift1742 3 ปีที่แล้ว

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

  • @araf4.086
    @araf4.086 2 ปีที่แล้ว

    great really

  • @UKReconGamerz
    @UKReconGamerz 3 ปีที่แล้ว

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

  • @abellachannel6050
    @abellachannel6050 2 ปีที่แล้ว

    It’s really good

  • @KrishuBrawlStars
    @KrishuBrawlStars 3 ปีที่แล้ว +2

    You are pro mam 🔥🔥🔥🔥🔥

  • @brunafortunato7449
    @brunafortunato7449 3 ปีที่แล้ว

    Could you detect gesture reconition using mediapipe?

  • @KSATica
    @KSATica ปีที่แล้ว

    Your the MAN!!!!!

  • @KSATica
    @KSATica ปีที่แล้ว

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

  • @GospelMusicians
    @GospelMusicians 10 หลายเดือนก่อน

    Do you have anything for C++

  • @usama57926
    @usama57926 3 ปีที่แล้ว +1

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

  • @eranfeit
    @eranfeit 3 ปีที่แล้ว

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

  • @TheRealFrankWizza
    @TheRealFrankWizza 3 ปีที่แล้ว

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