Custom Hand Gesture Recognition with Hand Landmarks Using Google’s Mediapipe + OpenCV in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

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

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

    Hey! Just wanted to say thank yoy, because of your video we are making a project of universal hand gesture recognition applied in cobots, it´s really exciting and you really helped us out, greetings from Mexico! I hope you upload more videos soon

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

    Hey folks! This video was filmed weeks before the recent events in the region that I'm from, which almost gives a double-meaning to all the "peace sign" references in the video... I mean, I just really hope that things can normalize, and that if you or your loved ones are affected by it that you can stay safe and make it through. Lmk if I can help in any way, too.

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

      Please can you help me to solve error install pycocotools Note: I implemented all your instructions with an algorithm yolov5 video

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

      @@hudahamed7693 Maybe this'll help github.com/cocodataset/cocoapi/issues/393

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

      @@IvanGoncharovAI Can we read #multipleHand (3, 4, ...), sir?

    • @sudhanshudambare7162
      @sudhanshudambare7162 7 หลายเดือนก่อน

      Which screen recorder do you use please help me ..

    • @kiranbabu4414
      @kiranbabu4414 7 หลายเดือนก่อน

      Can you please help me with the project regarding stone , paper , scissors where input is given using hand gestures

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

    interesting tutorial... and with classification on the point history one should also be able to recognize movements like "swipe left", "swipe right", "clockwise turning" etc which makes the system even more useful

  • @CodeBrewCS
    @CodeBrewCS 3 หลายเดือนก่อน

    One of the best and more enganging videos Ive watched on this topic ! Good stuff

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

    so..... we are using numpad (0-9) to save each different gesture right.
    can we only save 10 hand gestures?????
    how to save more than 10 gestures???

  • @ramanasai7025
    @ramanasai7025 8 หลายเดือนก่อน

    Kudos to you for explaining very clearly . I mean it , and kudos to the github repo owner as well. 👏👏👏

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

    I've developed image processing apps because of you, thank you for these tutorials

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

      That's SO cool to hear!! Awesome job man!

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

    This video helped me greatly with a game I'm doing as i was planning to implement hand recognition to play it

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

      Awesome to hear that buddy! Really glad you liked it and it helped :)

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

      @@IvanGoncharovAI I mean, I thought i'd have to implement this all by myself. It already does all I wanted and let you train new hand gestures in such a easy way...
      I wish there was a way to train both hands at the same time tho, like touching hands and such

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

      @@itsmemattagain9841 I can see how that could be implemented though it'd be a rather serious rewrite and would take some solid familiarity with what's going on the code. Probably would need to encode hand gestures into a vector from both hands and then modify the neural to be trainable on more keypoints - that's just a really broad view of what could be done

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

      ​@@itsmemattagain9841Hey bro I've having project of hand gesture recognition
      Can you please guide me how to execute all this

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

    Hi Ivan! Such a great tutorial, I love that you really get into the details of the code and explain what is going on concretely. Perhaps a stupid question but is it possible to do transfer learning with the Mediapipe framework (for example by training it with images of hands with more keypoints added for more accuracy)?

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

    Thanks for sharing this with us Ivan, very well explained and actually it will help me on a real use-case project I am working. Thanks a lot ! very well done.

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

    Hi Ivan! This was a really helpful and amazing tutorial! The only question I have is how to change the model so that it can take more than 10 gestures. What/where/how should I change the code? Can you explain?

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

      In logging_csv function you have to change
      writer.writerow([number , *point_history_list])
      to
      writer.writerow([number + increment, *point_history_list])
      where increment = 10 allow you to save symbols from 10 to 19 (button 0 = 10, button 1=11, button 2 = 12 and so on), increment = 20 allow you to save symbols from 20 to 29 and so on. But you will press button from 0 to 9.
      To see that you are pressing and saving the correct button, in draw_info function you have to add increment to number value. I don't know if i am clear

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

    Hi Ivan! Masterpiece video u have made here! Loved every part of it! Keep it going! Would love to see how you can build onto this and make it even better for real world application

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

      Thank you! I've answered that several times in the comments, could you look through them please? If you'll have more questions, feel free to ask :)

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

      @@IvanGoncharovAI What about a sign gesture that requires motion or 2 hands. For instance, Sorry, Where, Name and etc

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

      Is there a way to train the model to identify between the left and right. For instance, left and right hand is doing a total different sign but to form 1 word, like Help

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

      @@animehd2628 With two hands you'd need to rewrite some of the code and the neural net to capture input from two hands (and normalize it in a similar way too), and I think it's doable with some technical expertise on the subject. With motion, things are quite a bit more complex because you'd likely want an encoding algorithm that gives inputs to a neural net to work across several frames and potentially a very different neural net architecture with it.

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

      @@animehd2628 I think you could, like, two gestures for example "piece sign" and "rock sign" and then, say, if left hand is "piece sign" and right is "rock sign" you trigger some response that says that it's the "help" sign or something like that

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

    20:00 i tried running app.py in vscode yet it didn't work, giving me this error: ValueError: Could not open 'model/keypoint_classifier/keypoint_classifier.tflite'.
    any idea why?
    Thank you so much!

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

      Hi, I'm also facing the same issue while executing app.py . where u able to find any solution for fixing this?

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

      @@gouthamsuresh5672 i havent :(

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

      @@alankuo2727 I found the issue. It's because of library versions.
      If u install these versions specifically , u will get it working:
      OpenCV - 4.5
      MediaPipe - 0.8.5
      Tensorflow - 2.5.0

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

      ​@@gouthamsuresh5672 I downgraded opencv to a older version and I've got it working!

    • @shwetabhagat8920
      @shwetabhagat8920 7 หลายเดือนก่อน

      ​@@gouthamsuresh5672 hey!
      converter = tf.lite.TFLiteConverter.from_keras_model(model)
      converter.optimizations = [tf.lite.Optimize.DEFAULT]
      tflite_quantized_model = converter.convert()
      on executing the above the kernel is crashing each time
      Any help would be appreciated!

  • @lolopupka
    @lolopupka 3 หลายเดือนก่อน +1

    Hi Ivan I was researching to make the same thing as your student! I want to make a sign language learning app as well, for fun. If your student completed the project, could you share a link? I would love to see what a finished project could look like.

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

    thank you for your great video ... I have questions how I can use my existing dataset Image for labelling and training ?

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

    Hi Ivan! I wanna ask why do I get an UnicodeDecodeError when I try to run the app.py? The error states that 'charmap' codec can't decode byte 0x81 in position 15718: character maps to

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

    Hi Ivan! This is a fantastic tutorial! Really helpful for starting to learn gesture recognition. I heard the palm detection method and Mediapipe for the very first time thanks to your video. Just want to know how to add new gestures to the current model that allows the machine to recognize them?

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

      I think I explain that in the video. Like, the first training that I do is exactly adding new classes to the existing model. And the second training was training a completely new model from scratch.

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

    Hey Ivan! Great stuff here! One question from me is how do I make the Hand Gesture Recognition model more robust and accurate, as compared to the provided simple sequential model. Cheers!

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

      Thanks! So, the thing here is that I don’t think that a larger model would be necessarily better because the input size is quite small (40 x and y points) and you could risk overfitting the model. You could experiment though with adding more neurons to the sequential model in the case that you train it on a lot of gestures or you aren’t satisfied with the model performance now. I’d say the safest bet to is always to focus on more quality data in general

  • @SophiaGalelli
    @SophiaGalelli 3 หลายเดือนก่อน

    HI, it is not clear to me what types of neural networks are used in this project, because you mentioned CNN and feed forward, but in the project there is something about LSTM neural net. Thanks in advance

  • @TaeHoonKim-h6m
    @TaeHoonKim-h6m 11 หลายเดือนก่อน

    This video was really helpful! Thanks for the tutorial :)

  • @sonpham1886
    @sonpham1886 24 วันที่ผ่านมา

    no module name 'sklearn" though I already installed it. Can you explain ?

    • @ParthKeshav-h2u
      @ParthKeshav-h2u 15 วันที่ผ่านมา

      type this in your terminal and it should work out:-
      pip install scikit-learn

  • @FaisalKhan-gx5eg
    @FaisalKhan-gx5eg ปีที่แล้ว +1

    20:01 after running my camera window is not open in this code ..... i tried it with basic code it is working there ... plz help

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

    Thanks, I needed exactly that for my project, I'm working on a Libras translator, which is the Brazilian sign language.

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

    Hey! I tried this project and it works. Thanks. I tried to train using both hands but it only saves one hand gesture. But the the gesture is combination of 2 hands. Can you me out?

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

    Hi, this is a really cool tutorial for sure. But what if I have to use both hands to perform a hand gesture such as heart sign?

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

    hey thanks for sharing. : ) Is there a way to get the wrist rotation data from this? I'm trying to retarget the finger motions (which I got it working somewhat), but I can't find a way to get rotation data of the hand itself.. (ex: hand facing palm up or down). any tips? thanks!

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

      I am not sure if such data is present (but can be wrong as I haven't thought about it in some time). I think if you treat hand rotation data and train it as gestures, you can get something reasonable in this way.

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

    Great vid. I would like a pointer one from you too!

  • @shwetabhagat8920
    @shwetabhagat8920 7 หลายเดือนก่อน +2

    KERNEL IS CRASHING
    Initially I was getting the error that the model name must be in ".keras" format later I commented the part which was throwing the error and then I executed the cells of the keypoint_classifier.ipynb in the vs code in the kernel(that is the virtual environment that I created). But now the kernel is crashing and if I run the cells on the jupyter notebook then it is not identifying the modules,i.e. giving errors like tensorflow not found.
    Do you have any idea how to fix any one of the issues, i.e. either the crashing of the kernel or the issue of jupyter notebook?

    • @aishezsingh7004
      @aishezsingh7004 7 หลายเดือนก่อน +1

      hey did you found a fix for that keras error ?

    • @Aften_ved
      @Aften_ved 7 หลายเดือนก่อน +1

      Yep. Facing the same issue

    • @abuzerkomurcu9997
      @abuzerkomurcu9997 7 หลายเดือนก่อน +1

      Friends, did you find the solution?

    • @Aften_ved
      @Aften_ved 7 หลายเดือนก่อน +1

      @@abuzerkomurcu9997 nah man

    • @EVANSSAMUELBIJU
      @EVANSSAMUELBIJU 5 หลายเดือนก่อน

      @@Aften_ved apparently.hpf5 is legacy and instead change it to .keras

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

    Finally Ivan is back😎😎😎

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

    Hi Ivan ,Thanks for the video!

  • @ayushkshirsagar5930
    @ayushkshirsagar5930 8 วันที่ผ่านมา

    Hey I have tried but after 9 sign it is not accepting other 10 sign

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

    Hi Ivan! This is a fantastic tutorial! ♥Really helpful for starting to learn gesture recognition as you have clearly explained everything!! :) I heard the palm detection method and Mediapipe for the very first time... thanks to your video.
    Could you tell what can I do for recognizing a motion based gesture rather than static gestures? I am trying to do it as a part of a research and really want to solve this issue. It would be very very helpful if you can give your valuable guidance. Also is it possible to connect with you in discord or any other platform? Thank you very much!! 😊

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

      Hey Raiyan! Thanks! Motion gesture recognition would be quite a bit more of a complex task. You'd need to classify for each frame the static gesture and then combine that with the data about how the hand is moving. I honestly haven't dove into the topic that deeply myself but it would be quite a bit different from the approach in the video. Maybe you'd even need some sort of 3d hand landmarks estimation thingy.

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

      @@IvanGoncharovAI Thank you so much for your input Ivan 😊😊 I am actually struggling to figure this out. Please let me know if you come up with something that can solve the issue or if you have plans to make a video! It will be highly helpful :) Love your videos anyways! 😃😃

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

      @@rryann088 Hey Raiyan! Did you find a motion based gesture recognition tutorial?

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

      @@lailagaber5434 sorry but no, I havent. Are you working on it?

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

      @@rryann088 i think you can use a classifier on the point history to do that (actually the repo seems to contain code for this already)

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

    Hello Ivan, is there a way to add audio to the gestures? Like can we make it so when we sign "hello" can the AI say "hello?

    • @yoggjoshi07
      @yoggjoshi07 8 หลายเดือนก่อน

      That could actually be a really good addition might try doing it with sapi5 and os modules

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

    Hey Ivan,
    Awesome video. Can you please tell me if you came across a way to fine tune the mediapipe hand landmark detection using ones own dataset. Some how I cannot find the model subgraph at their documentation or github. The application that I am working on has the hand close to the screen which I sometimes results in inaccuracies.

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

      Hey! Interesting question that I haven't really explored yet. My guess would be do kind of get this thing to work locally and then look through mediapipe files until you find those tensorflow lite neural nets, and then get them to work in Keras/TF or something like that and try fine-tuning? Maybe I am overthinking it but not sure how else to approach this if - as you're saying - they're not explaining that in the docs

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

    Great video, although I am having trouble when running app.py, it seems as if the tflite inepreter has trouble opening the tf.lite file in the folder. Here's the error:
    File "d:\Project\lib\Lib\site-packages\tensorflow\lite\python\interpreter.py", line 464, in __init__
    self._interpreter = _interpreter_wrapper.CreateWrapperFromFile(
    ValueError: Could not open 'model/keypoint_classifier/keypoint_classifier.tflite'.
    Any help would be appreciated.

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

      Well, I was able to solve this issue (maybe not properly), by replacing "model_path" in interpreter.py, with the actual path to keypoint_classifier.tflite, but now, while the video shows up, it crashes when it "sees" a hand, and gives this error:
      Traceback (most recent call last):
      File "d:\\hand-gesture-recognition-mediapipe-main\app.py", line 543, in
      main()
      File "d:\\hand-gesture-recognition-mediapipe-main\app.py", line 153, in main
      finger_gesture_id = point_history_classifier(
      ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "d:\\hand-gesture-recognition-mediapipe-main\model\point_history_classifier\point_history_classifier.py", line 30, in __call__
      self.interpreter.set_tensor(
      File "d:\\lib\Lib\site-packages\tensorflow\lite\python\interpreter.py", line 720, in set_tensor
      self._interpreter.SetTensor(tensor_index, value)
      ValueError: Cannot set tensor: Dimension mismatch. Got 32 but expected 42 for dimension 1 of input 0.

    • @aaquibtayyabi
      @aaquibtayyabi 7 หลายเดือนก่อน

      were you able to resolve this ?@@sillius

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

    Great, Ivan. But I have a question: the default hand skeleton of mediapipe looks weird. If I want to replace it with a real virtual hand model, what should I do? Thanks

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

      Thanks! So, there are a bunch of simple OpenCV drawing functions under the hood (drawing lines and circles one by one). You may wanna look into somehow building up on top of those drawing functions but in a different way.

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

    Appreciate your work bruv

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

    Sir! Thank you for a very awesome video. But when I did like you, I have trouble in Jupyter notebook. I have an error in "model.fit(
    X_train,
    y_train,
    epochs=1000,
    batch_size=128,
    validation_data=(X_test, y_test),
    callbacks=[cp_callback, es_callback]
    )"
    It said "InvalidArgumentError Traceback (most recent call last)
    Cell In[32], line 1"
    I don't understand why and how to fix this problem, can you help me with this error?
    Thank you very much!

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

      I too got same problem
      InvalidArgumentError Traceback (most recent call last)
      Cell In [11], line 1
      ----> 1 model.fit(
      2 X_train,
      3 y_train,
      4 epochs=1000,
      5 batch_size=128,
      6 validation_data=(X_test, y_test),
      7 callbacks=[cp_callback, es_callback]
      8 )
      can clarify this???

  • @NIHAL_THAKUR
    @NIHAL_THAKUR 4 หลายเดือนก่อน

    hey could you pls tell me how do i integrate a volume reduction function when the clock-wise movement of the hand is detected , thanks

  • @Swetha-l2m
    @Swetha-l2m 6 หลายเดือนก่อน

    SOME IMPORTANT KEYPOINTS:
    - Custom hand gesture recognition using Google's Mediapipe and OpenCV in Python is explored in-depth.
    - Two primary approaches, pixels-first and landmarks-first, are discussed for hand gesture recognition.
    - The necessity of machine learning or deep learning for recognizing complex hand gestures is emphasized.
    - Mediapipe simplifies hand detection and landmark extraction through its pre-trained models.
    - Steps like pre-processing hand landmarks, converting to relative coordinates, and training models are detailed.
    - Training data stored in dot cc files, normalization of values, and Jupyter notebooks for classification are highlighted.
    - The video serves as a comprehensive guide for developing a reliable hand gesture recognition system.

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

    thank you sir for the video very helpful, may I ask something sir? there is a file keypoint_classification and point classification history, I see both of them use different models, namely NN and LSTM. does it compare the two algorithms? please help explain

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

      Hey! I am not covering point classification in the video but it makes sense that it uses something different for making predictions as the task itself is different

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

    Great explanation!
    I want to remove the thumb from the Hand landmark tracking Mediapipe model to only track my 4 fingers without the thumb. How can I do that?
    So far I was able to remove the unwanted CONNECTIONS by defining a custom connections list. But still landmark dots/points visible. How can I remove them?. Thank You.

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

      So, in the video where I show on the mediapipe website there are indices of which points correspond to which numbers, I think that you could do something around that since the thumb would always have the context index at which its points are located in the Python list we get with those points

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

    You should make a video on Yolov3 Ivan, this was incredibly helpful!

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

    I want to make project when a person writes K in air it should be converted into text K , how can do this

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

    Such a helpful Gesture Recog video! And thanks for the TimeStamps!

  • @shreyaprakasan3891
    @shreyaprakasan3891 11 หลายเดือนก่อน

    Hey! Very informative video!! Had a query - is it possible to use Mediapipe for detecting Dynamic Gestures as well ??

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

    Hi Ivan, great video although i have a question about which algorithm did you use for prediction, if anyone knows please help

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

      I think it's just a simple MLP architecture of a neural net implemented in Keras

  • @LearnExploregrow-i3g
    @LearnExploregrow-i3g ปีที่แล้ว

    Is there any method to get voice output along with this detected text,ie how to convert the text displayed on bounding box converted to speech....

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

    Hi Ivan ! Can i use this concept as my college project? Can you suggest me something to do more interesting my college project with this project?

  • @rashadal-hamhami8064
    @rashadal-hamhami8064 2 ปีที่แล้ว +1

    Hey Ivan. Any recommendations on how to achieve this project in a web app ?

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

      Well, it's a two-part project. First you could see if Mediapipe can be used within JavaScript, and then you could see if you could get that small Keras neural net to work there as well. The latter sounds like the most likely one to and the more, I think, may-or-may-not-work one is the Mediapipe part. After that, probably, you could try to pull other algorithm pieces that tie the both parts. Alternatively, I think, that if you develop, like, a website with Python (maybe, like, Jango or Flutter or something) you could have a much easier time probably integrating this project in it as it's itself in Python

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

    hello ivan , I want to integrate this Custom Hand Gesture Recognition into a video calling system , how do you think I should start it and can you give me some ideas to what exactly I must do ?

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

    Hi Ivan, the tutorial was amazing and worked perfectly. I have a small doubt, i wanted to add the accuracy of detected class on screen along with class name. But I wasn't able to figure out how to get the accuracy value from the model. Could you please help?

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

      Hey ! responded to your other comment. P.S. it's really easy to do and you may also look through other examples of how it's done with Keras nets to apply it here easier.

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

      @@IvanGoncharovAI Thank you!! , will try it

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

    Hey Ivan, super helpful video.
    I got stuck on one part for a project I'm doing. How would you write an if statement for no hand being detected. I am trying to reset a counter when there is no hand on screen, but cant seem to figure it out so right now it just resets when it sees a different gesture.

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

      I think mediapipe somewhere in the code must return somewhat of a list containing landmarks for different hands, so you can see if the length of that list is 0,1 or 2. For no hands, one hand and two hands. Or something like that is one way to do it.

  • @vyshnavik7028
    @vyshnavik7028 23 วันที่ผ่านมา

    Is there any specific amount of data needed for training

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

    Thanks, it was really useful.

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

    Hi Ivan! This is a fantastic tutorial!
    what if I need more than 10 classes? is there any method to do it? thanks

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

      Yes! thanks! I've answered that several times in the comments already, if you don't mind looking through them

  • @ahemeida3712
    @ahemeida3712 5 หลายเดือนก่อน

    Hey! I'm running issues with the model and I was wondering how to reach you for some advice or if anyone else is willing to help. I need to get this working in the next 2 days.

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

    This is awesome! Thank you!

  • @user-oo1le7yx4x
    @user-oo1le7yx4x ปีที่แล้ว

    what about when you want to train a gesture that incorporates two hands?

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

    nice video ivan! thanks a lot!

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

    can you tell me how to improve the distance for detection? when i moving far away the camera, above 2 to 3 meters, the hand disapeared.

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

      do some sort of crop with the area of interest with your hands are and pass that through mediapipe and the rest of the pipeline in general as an option

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

    Hello Ivan! Great video keep going .
    I just have a question, what if i want to add a voice function to make the model speaking. I did wrote the function but i don't know where to put the function? cuz when i put it anywhere the model work but it's being so slow and lagging, plz help.

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

      You would need to put that function in between frames changing probably and, ideally, work out a way for it to be voiced in a different thread so that the model doesn't have to wait with computing stuff until it's finishing voicing

  • @jyotiprakash5137
    @jyotiprakash5137 5 หลายเดือนก่อน

    there is a certain early stopping while training the data
    is there anything i can do to solve it

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

    Thanks, man
    No errors ✌

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

    I have to feed an input video other than a selfie cam from my laptop, but when i do so it recognizes left hand as right and right hand as left, i guess it has something to do with mirroring, how can i change the code so that it works on video which are not from a selfie point of view and recognize right hand as right and vice verca?

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

      I believe he mentioned that somewhere in the video

  • @沈楷钧
    @沈楷钧 11 หลายเดือนก่อน

    Can I use this one to control a DIY music media player?How can I sent the recoginiton result to the player ?☺

  • @otkrivlenie
    @otkrivlenie 8 หลายเดือนก่อน

    How to find the direction the hand moves? I have signs where it needs to go to the right to be one label, and still to ramain as other label. Is there a way to do that in this program?

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

    the part where jupyter notebook is opened from folder using cmd, im geting error in it .. its showing 'jupyter' is not recognized as an internal or external command,
    operable program or batch file.
    what to do ?

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

      Maybe you need to sort out jupyter module installation in Python, should be easy enough, look it up

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

      ​@@IvanGoncharovAI thank u i sorted it out.

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

    Ivan, thank you for the video! Great job!
    Is it possible to dockerize this script to run on a rasp with a usb webcam? If so, how would you do it?

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

      Thank you! I haven't had experience with docerizing things, so can't answer that. But it's basically TensorFlow and OpenCV running in the background, so if it's possible to docerize, then maybe

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

    Hello Ivan. You have a video at the beginning (00:10), where the program, when showing gestures, displays Russian letters. Please tell me how can this be done?
    And one more question. How can I add more than 10 gestures?

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

      Hey man, the "more than 10 gestures" Q was asked many times in the comments, just look for it. In terms of the letters, I think OpenCV supports Cyrillic alphabet, so it's just the matter of naming your gestures as Russian letters in this way.

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

      @@IvanGoncharovAI Я уже пробовал назвать жесты русскими буквами, но это не работает и я не знаю как это можно исправить.

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

      @@NAVINOISYBOY а в чём проблема?

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

      @@IvanGoncharovAI Проблема в том, что, когда я меняю название жеста с английского на русский, то просто выводит знаки вопроса над жестом.

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

      @@NAVINOISYBOY погугли это связано с тем как OpenCV в твоём случае почему-то воспринимает кириллицу.

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

    hello, thanks your intro.
    What is the purpose of training if we aleard can use landmark to "recognize" the Gesture ?

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

      We use training to add new custom gestrues

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

      @@IvanGoncharovAIyes I know. what is the advantage of traing the AI model instead of useing landmark to do it.
      For example, if the 8th point is lower than the 6th point, it means that the forefinger is not lifted.

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

    Hi what type of neural network have been used?

  • @RickSanchez-l5u
    @RickSanchez-l5u 9 หลายเดือนก่อน +1

    Can it detect sign language?

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

    Hi Ivan! Is it possible to calculate the accuracy of this model?

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

    I am unable to train the model by pressing the key 'k' I am not sure what is the issue can someone help me

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

      Sometimes if your language on the keyboard is set wrong or if you haven't clicked on the OpenCV window this can happen

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

    Fantastic video.
    Is it possible for the code to read a video instead of use webcam?
    I changed line 56 to cv.VideoCapture('\video address') yet it doesn't seem to work

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

      Yeah, it's definitely possible and how I would do it is close to how you're describing it. I'm not sure what's the problem in your case specifically, but, yeah, I would pass a video path and I just suggest that you do more debugging because it can be, like, a 100 little silly error thingies that are wrong. Maybe filepath is wrong, maybe you forgot something additional. But yeah, it should be possible.

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

      @@IvanGoncharovAI i fixed it!!
      i used OBS's virtual webcam and put my video through that and it worked

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

      @@alankuo2727 Hi Alan, I have the same issue, can you explain me in detail, how you did it with a video? I would really appreciated!

  • @ashif_107
    @ashif_107 11 หลายเดือนก่อน

    cant we add 11 classifier label .. if yes how so .. plz explain

  • @Aften_ved
    @Aften_ved 9 หลายเดือนก่อน +1

    FOR: Training Mediapipe models using custom datasets.

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

    Hi, amazing video ! I was wondering how do you access to raw data of each "sessions" and if you can transform them to just have a csv file with the classifications e.g: Ok sign, Open sign, instead of coordinates

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

      Thanks! I don't think the raw data of each sessions is saved automatically, what is saved is when you press a key and log it to a .csv file - aka your training data. You can probably work out a way to save all of that stuff in the code with a bit of trial and error though, but I don't think it's present there right now.

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

      @@IvanGoncharovAI Cooll thansk ! do you know which key to press to log it to a .csv file ?

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

      @@inessebti1239 I think I mention it in the video. "k" if I am not mistaken; it's defined in the code.

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

      @@inessebti1239 It says it in the repo docs

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

      @@IvanGoncharovAI Cool thanks! Other question, do you know how mediapipe gives timestamps, I understand that it is a real time calculator but do we know whether It gives a row every 10ms or 20ms or is it by frames ?

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

    Traceback (most recent call last):
    File "C:\Users\AA\Desktop\hand-gesture-recognition-mediapipe-main\app.py", line 545, in
    main()
    File "C:\Users\AA\Desktop\hand-gesture-recognition-mediapipe-main\app.py", line 170, in main
    keypoint_classifier_labels[hand_sign_id],
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
    IndexError: list index out of range
    Process finished with exit code 1 . How can i fix this error? Pleaes help.

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

      I have the same problem 😂😭

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

      I found something! Try making a new symbol and avoid using the old one, then train it again and it might work

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

      @@Danny_davito_mk2 ty bruv

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

      Oh nvm you need to save all files before running the code 🤣

  • @Мария-р8э3й
    @Мария-р8э3й 2 ปีที่แล้ว +2

    Hi Ivan, thank you for an amazing video! Could you tell me please if there is a way to train the system to recognize not only static gesture as you show in tutorial but like a motion? I mean motion by hand. For example, like an entire hand making circle, or hand moving on screen on the left or on the right. If yes, what is a possible way to do it? Заранее спасибо

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

      Hi! Interesting question. So, in the repo that I talk about there's also point history recognition option where if it detects you doing a "point finger" gesture you can draw something on screen and the model will recognize it, so you could potentially hack around with it and have it detect point history of any hand gesture moving in some way. Also, if the task is really simple you could possibly program something yourself (if we're talking, like, "detect if the gesture upon appearing has moved right in the first 10 seconds" or something like that). Пожалуйста)

    • @Мария-р8э3й
      @Мария-р8э3й 2 ปีที่แล้ว

      @@IvanGoncharovAI thank you very much, Иван, I'll try! 🤩

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

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

      hey @@Мария-р8э3й ...did you find anything for motion detetction?

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

    Здравствуйте, Иван. У вас в начале показывается видео (00:10), где программа при показывании жестов выводит русские буквы. Подскажите пожалуйста как это можно сделать?

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

      Привет, только что на англ ответил твой коммент

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

    Hi Ivan! I just wanted to know suppose i have that android solution API for mobile devices running fine will i be able make changes like u did in the video thanks mate for the content :)

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

      Hey! Do you mean whether you'll be able to run the same stuff on Android? I think it's possible as TensorFlow Lite stuff can run on Android but you'd be probably making many changes on the OpenCV part

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

    Hi ivan, that helps alot!
    I'd like to ask if I can get the full code because I'm trying to build something similar on my robotic arm project.

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

      What code parts are you missing in particular?

  • @ECEAtulDhiman
    @ECEAtulDhiman 11 หลายเดือนก่อน

    i want to add more than 10 gestures,how can i add them when we can usly press 0-9

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

      In logging_csv function you have to change
      writer.writerow([number , *point_history_list])
      to
      writer.writerow([number + increment, *point_history_list])
      where increment = 10 allow you to save symbols from 10 to 19 (button 0 = 10, button 1=11, button 2 = 12 and so on), increment = 20 allow you to save symbols from 20 to 29 and so on. But you will press button from 0 to 9.
      To see that you are pressing and saving the correct button, in draw_info function you have to add increment to number value. I don't know if i am clear

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

    Thank Ivan, that helps alot. I have a question that I want to put the accuracy rate (detection_confidence ) on the review time screen. How can I do that

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

      Glad to hear it. You can use cv2.putText to print things on the opencv window. You can find how to use it with a quick google search

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

      Hi, i was looking for a way to do the same. To print accuracy along with the predicted class name. Do you know how to get the accuracy value ?

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

      @@gouthamsuresh5672 Well, I guess you're referring to the activation value of a particular neuron in the output class aka the confidence score. (Idk, I typically think of accuracy as being a training/testing evaluation metric rather). So, what you do is you look through the code and there should be the output of the Keras neural net. Now what it's likely doing is using argmax to get the index of the neuron with the highest activation. What you can is also get the value of that neuron and there's your confidence score.

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

    anyone else getting this error:
    TypeError: 'PointHistoryClassifier' object is not callable

  • @rentaroiino1789
    @rentaroiino1789 4 หลายเดือนก่อน

    How would I be able to get a confidence percentage for each recognized hand gesture?

    • @rentaroiino1789
      @rentaroiino1789 4 หลายเดือนก่อน

      or possibly thresholding data?

    • @Abbuu22
      @Abbuu22 3 หลายเดือนก่อน

      @@rentaroiino1789 Heeyy hie did u get the codee?? or else atleast the datasets running for it?? If so could u please help mee i need it for my project plss

    • @rentaroiino1789
      @rentaroiino1789 2 หลายเดือนก่อน +1

      @@Abbuu22 im sorry for the late reply but i did

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

    Hey bro .
    What type of neural network did you use in this project?????

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

      Hey, it's a Keras neural net + Google's Mediapipe (which is several neural nets working together)

  • @bixpii
    @bixpii 7 หลายเดือนก่อน

    Hi. Can i use rtsp link from ip camera to recognition?

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

    Hey hi, great tutorial. Really helped get through my major project. Can you please share the github repo of your student's project which included recognizing the russian sign language. It be really helpful. Thank you in advance!

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

      I'll see if that's possible, great suggestion

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

      @@IvanGoncharovAI Hi Ivan Can you please share the github repo of your student's project which included recognizing the russian sign language. It be really helpful. Thank you

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

    which interpreter should i use for this project

  • @jorgesanchez4831
    @jorgesanchez4831 6 หลายเดือนก่อน

    Great video!!

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

    Hi, Ivan ..Thanks for the helpful tutorial ... I'm working on a similar project and for American sign language recognition .. i hope to get your help with it ..Just want to know how to add new gestures fro images file for my custom model ?

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

      Hey! You'd need to write around OpenCV which is used to grab frames to do it. For example: define a Python list with image paths to your data, iterate over it with a cycle where with each filepath it gets visualized by the OpenCV and plug that logic into the repo code. You'll have then be able to iterate over your dataset in this way and still press the key and use other built-in repo things to collect the data and train the model. Does require some understanding of OpenCV, but isn't that hard to do at the end of the day, and needless to say it's one way to do it of probably quite a few.

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

      ​@@IvanGoncharovAI Thank you so much Ivan, this was really helpful❤.. I also wanted to know if the repo could be applicable for android app deployment and how ?
      your help would be appreciated 🙏🏻

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

      @@wafaasiddig1043 Glad to hear it. No, it wouldn't be EASILY applicable for an Android application, however, if you have enough knowledge of how the system works in the repo and have the Android dev coding skills than this repo can be an example of how you could make something like that work on Android. But it'd be quite different in terms of code: Java instead of Python, different libraries for ML and how they're implemented etc.

  • @fran-filipandric9690
    @fran-filipandric9690 2 ปีที่แล้ว

    Hey do you know how would i increase amount of possible patternes when adding new positions/fingerpoint histories. Let me explain better: i want to make letter recignition so from "0" to "9" is not enough for all letters in alphabet.

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

      So, the workaround that I tell people about is that in the code in the line that inputs keys from the OpenCV window (cv2.waitKey line), do a +10 to that variable. That way when you press "0", it'll be "10" and when when you press 1, it'll be 11

    • @fran-filipandric9690
      @fran-filipandric9690 2 ปีที่แล้ว +2

      @@IvanGoncharovAI thanks man it works for me, sorry to bother you i later saw that u already answered that question for a few people in comments. And if it helps you it is in app.py def function logging_csv, row 288 for keypoints and row 293 for point history and add +10 in front of number variable.

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

      @@fran-filipandric9690 Yeah, that's a common question. Thanks for posting a more detailed answer. Sure lots of folks will find it useful

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

      @@fran-filipandric9690 can you please share thecide snippet. Shall we also Chang number range in mode selection from 48 to 57?

    • @fran-filipandric9690
      @fran-filipandric9690 2 ปีที่แล้ว +1

      @@mudassarayub5628 writer.writerow([number+10, *landmark_list]) this is how Line 276 should look if u want to add ten New keypoints and when u fill em up and u need more then just change "number+10" to "number+20" and so on. And no you dont have to change anything else especially key range because your inputs would be on diffrent keys then and you dont want that i suppose

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

    Hi Ivan! How can we save more than 10 gestures?

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

    The video is a useful one but what shud i do if i wanna add a 10th gesture...can u please help me out!!

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

      Hey, thanks! I've answered that already in some of the comments, could you look through them?

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

    What are the algorithms you have used here?

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

    thats very very helpfull sir, sir i am trying to create a sentence on the screen while gesturing, is that possible if it is so can you tell me how to do that. ill be very very gratefull

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

      For sure! You can put text on screen with cv2.PutText (you can look up the exact command) and before that you need some sort of algorithm written in python where, say, you press some keyboard key (OpenCV can help with that too - meaning getting input from the keys pressed when you click on the window that shows up) and that records the key, adds that to some variable in Python and that that variable gets displayed with cv2.PutText on screen somewhere. That's kinda how I would do it probably.

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

      @@IvanGoncharovAI Thank you very much sir, but last thing i wanna ask i know u r soo busy but ill appreciate if u help me with that, sir the thing that i wanna ask that how would i increase number of classes and which line of code in app.py i would have to change inorder to increase the classes.

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

      @@sameershahbaz8821 Sure! You can just the variable in which the input is sent from cv2.waitKey and then add, say, +10 to it. Thus, whenever you press 0 it'll be 10, press 1, it'll 11 and so on

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

      Um u mean to say I add key = key + 10 after key = cv.waitkey(10)?

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

      @@sameershahbaz8821 Yeah, something like that. The result should be that they're written to the csv file like that

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

    Great Tutorial 👌👌🙏🙏