3d Hand Tracking in Virtual Environment | Computer Vision

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • Visit brilliant.org/Murtaza/ to get started learning STEM for free, and the first 200 people will get 20% off their annual premium subscription.
    In this video, we will learn how to track hands in a 3D Environment. We will write the Hand tracking code using python OpenCV and CVZone. From there we will transfer the data to our unity 3D Environment.
    🚀🚀 My Urdu/Hindi AI CZcams Channel 🚀🚀
    / @murtazahassan01
    Download Code and Files:
    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
    00:00 Intro
    02:42 Webcam
    04:51 Hand Tracking Python
    07:26 Prepare Data
    14:28 Sending Data to Unity
    17:41 Unity Recieve Data
    21:15 Create Hand
    25:02 Hand Tracking Script
    42:23 Adding Lines
    46:25 Linking Lines
    54:58 Environment
    This video was sponsored by Brilliant.

Komentáře • 171

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

    One of the best projects, and we can also facilitate the work so that we can associate a 3D character with the engine. This is a wonderful thing

  • @LittleFifth
    @LittleFifth Před 2 lety +2

    Very excited about this video, I was looking forward to 3D stuff since a 2D pose estimation video you did- thank you and I'll be sure to try this

  • @zimpel35
    @zimpel35 Před 2 lety

    Super Video, super project. As always from you! one of the best channels on yt.

  • @abhilashh3904
    @abhilashh3904 Před rokem

    best tutorial i have seen related to computer vision and unity. thanks a lot. please do more videos

  • @surajpoudel755
    @surajpoudel755 Před 2 lety

    BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!

  • @FernandoMoreiraR
    @FernandoMoreiraR Před rokem +1

    This video won you a subscriber!

  • @giancarlopappalardo
    @giancarlopappalardo Před 2 lety

    you have really outdone yourself this time

  • @bunnythebun
    @bunnythebun Před rokem

    Wow amazing... I'm watching your all videos. Really appriciate your knowledge. Please give us more tutorial like this. Can u give more tutorials for starting how to code augmented reality? It will be a great help. God bless you

  • @SassyPantsy
    @SassyPantsy Před rokem

    Incredible tutorial. Very informative without being redundant. This is what the internet was for!!!
    Thank you so much for this knowledge. Subscribed!

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

    You're awesome, Murtaza.

  • @worldtimefactechzwtf4857

    Great stuff thanks!

  • @oezbro
    @oezbro Před měsícem

    You're a real life saver. Thanks a lot!
    Best tutorial for handtracking I've seen on CZcams. Keep up the good work!

  • @rhezafatria
    @rhezafatria Před 2 lety

    Many thanksss!!!!!🤩

  • @edbic4223
    @edbic4223 Před rokem

    This is awsome! I want to try this on my own and develop it! Do you think, if I make the unity 3d enviorment complex, is the detection or all the other process gonna get laggy??

  • @loveronthesunid
    @loveronthesunid Před 2 lety

    keep up the good work

  • @pickapack4704
    @pickapack4704 Před 2 lety

    Nice project sir 👍

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

    E là lớp phó gương mẫu, e chúc thầy và cô Thuỷ mạnh khoẻ, hạnh phúc và có nhà mới thật đẹp ạ

  • @deltakingoffisho3410
    @deltakingoffisho3410 Před 2 lety

    great, thanks you

  • @YigalBZ
    @YigalBZ Před 2 lety

    Thanks for the nice and interesting project. How will it work on a SBC like Jetson Nano? What I don't understand is how this software will be able to utilize the GPU?

  • @AiPhile
    @AiPhile Před 2 lety

    That's great 🤩 sir

  • @justfeta8409
    @justfeta8409 Před 2 lety

    amazing....

  • @1979zeesh
    @1979zeesh Před 9 měsíci

    awesome project bro....amazing. one question: are u using the usual unity collidor components to detect collision or what? that part is missing in your video. how u detected collision?

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

    Hello Sir, I had a question. Can we deploy DL models inside a Desktop App for Windows/Linux? I searched for solutions but couldn't come up with any reasonable ones

  • @lucker7579
    @lucker7579 Před rokem +1

    ArgumentOutOfRangeException: Index and count must refer to a location within the string.
    Parameter name: count

  • @angelojojo3338
    @angelojojo3338 Před 2 lety +12

    Hey man, great video.
    But use this line will yield a better control
    float x = float.Parse(points[i*3])/80-8;
    float z = float.Parse(points[i*3 +1])/80-5;
    float y = float.Parse(points[i*3 +2])/80;
    You need to transform the coordinate from OpenCV to Unity.
    You use:
    float x = 5 - float.Parse(points[i*3])/100 in your video
    However, this will reverse the coordinates of your hand.
    To transform the coordinate, you will need to turn the middle point in OpenCV from (0.5x, 0.5y) to (0,0)
    In this case, you will need to subtract the x value by 80, and then minus 8. and y value by 80 and then minus 5

    • @user-sv3rq3qp4w
      @user-sv3rq3qp4w Před 3 měsíci

      Hey ! thanks for this. Did you figure out how to make te hand go back and forth? The "point0" does not move on the z axis. tanks!

  • @umam.ytchannel9464
    @umam.ytchannel9464 Před 2 lety

    now i am in a good mood

  • @RuiMeloViPeR5000
    @RuiMeloViPeR5000 Před 2 lety

    Excelent

  • @RoboTron_Channel
    @RoboTron_Channel Před 2 lety

    Ты очень крутой, спасибо!

  • @Hekaro
    @Hekaro Před 2 lety

    the possibilities are endless. will certainly play around with this

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

    a very nice tutorial

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

    Thank you~~!!!!!

  • @VakariZ
    @VakariZ Před 2 lety

    Work bot, thanks broo

  • @farisdirar2976
    @farisdirar2976 Před 2 lety

    thank brooooooo !!!!!!!!!!

  • @JavieraPaulinaArgandonaOlivare

    great video:) is it possible to show both hands at the same time?

  • @ShivGp-tr3vk
    @ShivGp-tr3vk Před 10 měsíci

    Hai...thankyou so much for this video, this was so helpfull for me to make a project with this method. its work for me but can u give me another video about how the hands can grab the object like do some 360 move for the object, hope u saw this message, thankyou

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

    hello Friend would you help me do it for online game capture? people use CV to detect enemies and attacks on aim does this do the same?

  • @ry2453
    @ry2453 Před 2 lety

    hello sir, can you explain about udp receive scripts?
    thanks

  • @asurstark
    @asurstark Před rokem

    May I know sir, how you have integrated the camera?

  • @AlexSilva-cn1gp
    @AlexSilva-cn1gp Před 7 měsíci

    Hello, nice work! I wanted to know if there was a way to create a system for grabbing objects that are in unity, could anyone tell me?

  • @user-hv3ns8yy9k
    @user-hv3ns8yy9k Před rokem

    Hello sir, I want to ask why the effect line I made is separated from the sphere

  • @Soccertrash17
    @Soccertrash17 Před rokem +2

    Has anyone a solution for the z coordinate estimation?

  • @salloookhan1783
    @salloookhan1783 Před 2 lety

    Can we bring this hand tracking on tft display or other display so we are able to use it without computer like tracking face tracking hands tracking whatever but with out computer pc how can we do this

  • @user-rl1bq9zo9t
    @user-rl1bq9zo9t Před 2 lety +4

    Hello! Can you give me a solution to build project as a one exe file?

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

    he is going to make revolution in computer vision
    just tell me can't we cover our points like it we have red point and green lines as attachment, so we can increase the thickness and change the color in unity. so by this can't we create a real looking human hand

  • @VINESHRAJPUT
    @VINESHRAJPUT Před 2 lety +4

    Everything is perfect . One question Can I grab the cube also?

    • @055pq2
      @055pq2 Před rokem

      You can, but its extremely diffcult!

    • @user-zi8wg1eg8n
      @user-zi8wg1eg8n Před rokem

      @@055pq2 did you figure out how to?

  • @RC8Retro619
    @RC8Retro619 Před rokem +1

    Does anybody know how I can use the hand tracking as input so instead of colliding with the cube at the end, moving my hand left or right will move the cube left or right. Im trying to make a game with openCV using Unity for a school project and I am a bit stuck!

  • @MrBrains_
    @MrBrains_ Před 2 lety

    07:18 min
    AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)

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

    Does it work when published to android?

  • @abdelhaksaouli8802
    @abdelhaksaouli8802 Před rokem

    what is the z coordinate in hand track output ?

  • @kristijan1991ful
    @kristijan1991ful Před rokem

    Is hard implement to recognize more hands. Like both hands, or 4 hands. For example 2 players use both hands to play game.

  • @fiogar7006
    @fiogar7006 Před rokem +2

    How do I get the virtual hand in unity not to scale when I move my real hand forward and backwards to the camera

  • @nv7287
    @nv7287 Před rokem

    Can this work on mobile? Amazing video tutorial!!

  • @calvinthapro616
    @calvinthapro616 Před 2 lety +20

    Hey, good video. Could you post the code on how to move the hand on the z axis? That would be very helpful.

    • @f1l1p10
      @f1l1p10 Před 2 lety +4

      u can use code from this video czcams.com/video/jsoe1M2AjFk/video.html but using point 0 and 17 from your hand

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

      @@f1l1p10 thanks

    • @tokiotv2843
      @tokiotv2843 Před rokem +1

      Anyone has it?

  • @adhamymagdy8211
    @adhamymagdy8211 Před 2 lety

    what is the algorithm used in this project

  • @adhviklalthoppe2214
    @adhviklalthoppe2214 Před 2 lety +5

    Hey, great video. I was wondering how you could implement the python so that it opens up whenever the unity project opens up?

    • @bceg3961
      @bceg3961 Před 2 lety

      I need it!

    • @dante_zu
      @dante_zu Před rokem +2

      Hi! You can Import "os" library to python and use "os.startfile(path to your .exe file)" in order to execute the compiled Unity Project.

  • @flickermarc6308
    @flickermarc6308 Před 7 měsíci +1

    Does anyone know a way to implement two hands in Unity I already made it so it can track two in OpenCV But I'm having trouble implementing it in unity

  • @user-be8tc5kl6d
    @user-be8tc5kl6d Před 2 lety

    hello Murtaza'sn pls do project > (face detection for registration in web) and use TensorFlow

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

    pls tell me can I use this to grab a object how im trying its not working pls pls tell

  • @bceg3961
    @bceg3961 Před 2 lety

    How to create a build of this application? Is it necessary to run the code in python and in c#? I don't understand.

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

    Sir, can you do a video about face recognition and object detection(yolo) in a single python script, so that both run at the same time

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

    how can i make this work if I wanted to make a android build from unity and use the phone camera to do the hand tracking

  • @adityasprojects7126
    @adityasprojects7126 Před 2 lety +2

    Can you make a video where you do evrything in Unity. There is Opencv module in UNity also right. This will be easy for deployment and more advance project. I couldnt find any proper video explaing it.

    • @holoments
      @holoments Před 2 lety

      There is an opencv package at asset store what you can play with

  • @deejaysushant
    @deejaysushant Před rokem

    What the performance in using in a mobile?

  • @yoshirovilchez3392
    @yoshirovilchez3392 Před 2 lety

    Hi! I'm new ! How can I start in this field of Computer Vision? My dream is work in this kind of projects :)

  • @NotnotADHD
    @NotnotADHD Před rokem

    I have a issue. I dont know what the app that you used to code python in is called or where to download it. please help

  • @yuchen3587
    @yuchen3587 Před rokem

    Can this algorithm run on mobile devices like iOS or Android?

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

    is 2gb ram of respberry pi 4 is sufficient for making opencv Projects.. like find contours

  • @ajayysingh4976
    @ajayysingh4976 Před 2 lety

    Can u plzz say wt is the objective and scope of this project

  • @digamditwo7221
    @digamditwo7221 Před 2 lety

    all workеd baby

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

    all done points working but lines not , error is coming the variable origin of Line code has not assigned in the inspector but I had linked all the line and so many errors for many lines

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

    What logic can I use so that when separating or moving the hand away the same thing happens in the 3D environment instead of the hand being scaled? I've tried everything and I can't find a solution.

  • @alidkjfk
    @alidkjfk Před rokem +1

    for z , in lmList dictionary you have a center position yo can use math.hypot to calculation 0 position with center position and with numpy.interp you can make a relation with this space and plus it to z positions , my language is not English and i can explain this good but I hope you understand how is it work!

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

    hey sir, You done a great job but can you guide or make a tutorial for the hand tracking android application using mediapipe and unity

  • @blagues_it
    @blagues_it Před rokem +3

    wher can I download UDP receive Please??????????

  • @felixtechverse
    @felixtechverse Před 9 měsíci

    Where can I find the udp script? I didn't find it on the website.

  • @ibrahimshaikh_a
    @ibrahimshaikh_a Před 2 lety

    amazing
    make new project crowd counting !!!!!!

  • @Ivystra
    @Ivystra Před rokem

    When linking the lines, I create the LineCode as a new component for all the lines, but I can't change them individually. Changing the origin and destination points for one changes the origin and destination points for ALL THE LINES. HELP

  • @modeunpark1842
    @modeunpark1842 Před 2 lety

    Great cheat, a friend advised.

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

    Can we make the hand look like actual hand?

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

    Hello sir, i cant figure how do you add the z position of the hand tracking, i have tried using triangle similarity algorithm method to detect distance using single webcam but i get nowhere close to the solution. Since u mention the answer for moving hand backward and forward is easy can u explain on that?

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

    i am getting this error even though i installed mediapipe
    Traceback (most recent call last):
    File "E:/Alqadib/VirtuaLab/comp vision/main.py", line 1, in
    from cvzone.HandTrackingModule import HandDetector
    File "C:\Users\zeesh\AppData\Local\Programs\Python\Python39\lib\site-packages\cvzone\HandTrackingModule.py", line 10, in
    import mediapipe as mp
    ModuleNotFoundError: No module named 'mediapipe'

  • @harshahir5901
    @harshahir5901 Před 2 lety

    make video on 3d face recognition android app

  • @nickdev
    @nickdev Před 2 lety

    can tihs work on android too?

  • @BestMakerHackerCreater

    how we can use phone camera ??

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

    Orang Vrindavan pada pinter pinter yah

  • @user-sv3rq3qp4w
    @user-sv3rq3qp4w Před 3 měsíci

    amazing tutorial! .. Ive been trying for the last 2 hours to make the hand move on z axis, but the point 0 wont go back and forth.... any hints?? thank you

  • @lakpatamang2866
    @lakpatamang2866 Před rokem

    can we build this in mobile?

  • @vadox-6807
    @vadox-6807 Před rokem

    how i can save the python script in unity ?

  • @flioink
    @flioink Před 2 lety +4

    There's some kind of error in the "extend" part of the code, I keep getting: IndexError: list index out of range
    Edit: OK, I narrowed it down - the lmList list only gets 2 dimensions(x and y) and not the z.
    Why would that be?

    • @allamerican9414
      @allamerican9414 Před 2 lety

      Hey, I am having the same issue, did you ever end up figuring out why lmlist is refusing to give z values?

    • @yade1234
      @yade1234 Před 2 lety

      @@allamerican9414 Upgrade your cvzone package using pip

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

    Can we build apk out of it???

  • @user-be8tc5kl6d
    @user-be8tc5kl6d Před 2 lety

    Face Liveness Detection That With Web App For Registration
    Process
    please do this project

  • @toxicvaloplayers3210
    @toxicvaloplayers3210 Před 2 lety

    sir collision in unity is not so perfect in this way the hand many times enters the box bcz of hard code points it get from python

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

    Thank you so much, but I have a question? Will it work on mobile android/ios?

  • @laughtale1607
    @laughtale1607 Před 2 lety +2

    Did someone find how to move on the z axis ? I'm trying it so hard ! because the z is based on the wrist point so it stays at 0 ...

    • @calvinthapro616
      @calvinthapro616 Před 2 lety +2

      Hey, did you find a solution?

    • @itsjustepic5029
      @itsjustepic5029 Před rokem

      @@calvinthapro616 i didnt find one can you sent me the code my english and python knowledge is noct so good

  • @itsjustepic5029
    @itsjustepic5029 Před rokem

    how do i add 2 hands to unity

  • @lifeofeliteforces9203
    @lifeofeliteforces9203 Před 2 lety

    Hi sir...can u please make a one vedio on how to start a career in machine learning and artificial intelligence as a beginner....what basics we should cover before entering this field.
    .. please it's very important forany people like me

  • @pranshugraak3106
    @pranshugraak3106 Před 2 lety

    Good Afternoon Sir. Sir i am using a depth camera that is intel realsense d435i instead of a normal webcam for this hand tracking but this error ie (index and count must refer to a location within the script ) is showing to me when i write the code ie:
    data = data.Remove(0, 1);
    data = data.Remove(data.Length-1, 1).
    This error is not shown in the case of normal webcam but in the case of intel realsense depth camera this error is shown. Hoping for a fast reply need urgently.

    • @hamzathassan7080
      @hamzathassan7080 Před 2 lety

      Use this `data = data.Trim(new char[]{'[',']'});`

    • @ThatDodu
      @ThatDodu Před 2 lety

      i am gonna guess that means the hand script is not getting any data, try putting all the code in an if statement. First set the variable "string data = udpReceive.data;" and then add this if statement, "if ( data.Length != 0 ) {Put_All_Code_Here}"

  • @mohammadshahbaz6
    @mohammadshahbaz6 Před rokem

    Sir my pc can not inastall mediapipe

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

    really cool, but this project need python server to run the hand tracking. so, it cannot separate with the server when the unity build into mobile platform, I mean it cannot run only using unity. thats sad.

    • @Lightyboii
      @Lightyboii Před měsícem

      Theres a system to use python in unity

    • @coderserabutan
      @coderserabutan Před měsícem

      @@Lightyboii really? run python server? how?

    • @Lightyboii
      @Lightyboii Před měsícem

      @@coderserabutan theres a Python addon in unity. And AFAIK it does support modules. Not sure about Android though. Havent used unity in a while.

  • @user-fl5qv7ce6e
    @user-fl5qv7ce6e Před 2 lety

    I got an error when extracting the lmlist data, did anyone have the same problem