XaiJu
Concept Bytes
Concept Bytes

patreon


HoloMat Part1 Hand Tracking

Here is the first of many tutorials for building your own Holomat.

Unlock the Power of Hand Tracking with Real-Time Computer Vision

Welcome to our exclusive Patreon series where you delve into the fascinating world of real-time hand tracking using OpenCV and MediaPipe! Whether you're a hobbyist, a student, or a budding developer, this project is your gateway to understanding and implementing cutting-edge computer vision techniques.

Skip the tutorial and run the code: https://github.com/Concept-Bytes/HandTracking

What You'll Learn:

Comments

Hey I got the same error what where some of the changes you made?

Cens

anyone know where the list of hardware is?

Nick Huffstetler

Is there a video showing about the projectors and other parts?

Ney Torres

where can i find the parts list

Alim Williams

Where can i buy the mat itself

Jordan Newman

Do you have a parts list?

Lux Tenebris

Hello, I was wondering if you’d know how to fix this - whenever I try to do python handtracking.py it doesn’t do anything… I have python installed and I have downloaded opencv-python and mediapipe

Freely Porshe

@concept Bytes

Stoo

I was also wondering where those were

Masyad

i cant see anywhere where i get the files and manual on building the actual projector for jarvis?

Stoo

Did you ever post this anywhere? Thanks

Jordan Newman

pip install opencv-python mediapipe numpy

Alexander Jones

hi I can't make it run but any error comes out in the moment of the camera to pop out it doesn't

yoel

That always helps

Designer123

Messed with the code a bit and got it to work

Jordan Hobbs

After using the code for hand tracking, I get the following response: INFO: Created TensorFlow Lite XNNPACK delegate for CPU. WARNING: All log messages before absl::InitializeLog() is called are written to STDERR W0000 00:00:1723428106.456605 6700 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors. W0000 00:00:1723428106.491182 6700 inference_feedback_manager.cc:114] Feedback manager requires a model with a single signature inference. Disabling support for feedback tensors. Error I'm using python 3.11 and I have all the libraries installed. I'm not very knowledgeable in programming at all, but I figured copying and pasting code wouldn't be too hard. Not sure what the errors mean or how to fix them, please let me know if anyone has any information. Please and thank you.

Jordan Hobbs

So I had to redo my env and downgrade mediapipe to 0.9.3.0 to get the code to run

Jonathan Perez

Hey guys. I'm trying to run the hand tracking, but I'm getting the following error: Traceback (most recent call last): File "handtracking.py", line 8, in hands = mp_hands.Hands(static_image_mode=False, File "/Users/jp/.pyenv/versions/3.8.10/lib/python3.8/site-packages/mediapipe/python/solutions/hands.py", line 114, in __init__ super().__init__( File "/Users/jp/.pyenv/versions/3.8.10/lib/python3.8/site-packages/mediapipe/python/solution_base.py", line 248, in __init__ self._graph = calculator_graph.CalculatorGraph( RuntimeError: ValidatedGraphConfig Initialization failed. ImageToTensorCalculator: ; RET_CHECK failure (mediapipe/calculators/tensor/image_to_tensor_calculator.cc:144) ValidateOptionOutputDims(options) returned INTERNAL: ; RET_CHECK failure (./mediapipe/calculators/tensor/image_to_tensor_utils.h:136) options.has_output_tensor_float_range() || options.has_output_tensor_int_range() || options.has_output_tensor_uint_range()Output tensor range is required. ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options. ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options. ImageToTensorCalculator: ; RET_CHECK failure (mediapipe/calculators/tensor/image_to_tensor_calculator.cc:144) ValidateOptionOutputDims(options) returned INTERNAL: ; RET_CHECK failure (./mediapipe/calculators/tensor/image_to_tensor_utils.h:136) options.has_output_tensor_float_range() || options.has_output_tensor_int_range() || options.has_output_tensor_uint_range()Output tensor range is required. ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options. ConstantSidePacketCalculator: ; RET_CHECK failure (mediapipe/calculators/core/constant_side_packet_calculator.cc:64) (cc->OutputSidePackets().NumEntries(kPacketTag))==(options.packet_size())Number of output side packets has to be same as number of packets configured in options. SplitTensorVectorCalculator: The number of output streams should match the number of ranges specified in the CalculatorOptions. Has anyone run into this? Thanks, JP

Jonathan Perez

Hey where can I add a 3d Model on my project?

emir

Starting today, followed the guide and it all worked perfectly using my laptops webcam, if anyone is having problems I would suggest making sure you can code a basic python program first so you know python is working correctly. My only real problem since I don't use python much was I had to set the path in my enviornment variables in order to use 'pip'

Adam

What’s your camera and projector setup like?

Abigail Koval

camera is not working with me

P Raja Rajeshwar Reddy

I've copied from your Github to confirm i had it all correct and for some reason every time i run the code, it thinks i'm already "clicking", any ideas?

Mitchell

I’m getting this error as well on a Raspberry Pi 5

Megan Smith

How would I reduce the bounding box of where you have to move your hands? For example, halving the amount you move your hand to get the same level of movement.

Tom Tharp

I have this same issue but with OpenAI and can’t seem to find out why

Spyder Flag Check

Try opening up an annoconda prompt and type in "pip install mediapipe"

Adam Robinson

import mediapipe as mp ModuleNotFoundError: No module named 'mediapipe'

Johnny

got it to work, i may have corrected some depdency issues during another project. but shes up and running. very light and impressive

Jonathan Luna

PS C:\Users\jonat\Downloads\HandTracking-main\HandTracking-main> & C:/ProgramData/anaconda3/envs/myenv/python.exe c:/Users/jonat/Downloads/HandTracking-main/HandTracking-main/handtracking.py Traceback (most recent call last): File "c:\Users\jonat\Downloads\HandTracking-main\HandTracking-main\handtracking.py", line 1, in import cv2 ModuleNotFoundError: No module named 'cv2' PS C:\Users\jonat\Downloads\HandTracking-main\HandTracking-main> Pip install opencv-python Requirement already satisfied: opencv-python in c:\python311\lib\site-packages (4.9.0.80) Requirement already satisfied: numpy>=1.21.2 in c:\python311\lib\site-packages (from opencv-python) (1.24.2) PS C:\Users\jonat\Downloads\HandTracking-main\HandTracking-main>

Jonathan Luna

its installed and verified. also verified i was using the correct interpreter "

Jonathan Luna

Pip install opencv-python in your terminal

Kevin Coda

i have tried with not much luck, I keep running into this error " line 1, in import cv2 ModuleNotFoundError: No module named 'cv2'

Jonathan Luna

Git link in the description. It's got a read me attached. You can just clone it and run it if ya want

Kevin Coda

I'm totally lost, can you possibly please provide a wiki, git, or some sort of written readMe documentation for us to follow along? I am working with one monitor and switching from fullscreen video to IDE can become overwhelming very quickly.

Jonathan Luna

I am having trouble installing the mediapipe library I was on python 3.12 and went down to python 3.9 and I still can’t get it to work what should I do ?

Matthew

Hello, I followed the specified steps and completed the installation. The camera opens, and the camera tab also opens, but there is no image. What could be the reason for this?

Halil Sevim

I'm using 3.12.

Infinite Tech

I just updated it and I still can't

Infinite Tech

Yeah what version of python are you using? Other had this issue with 3.12. I think mediapipe works with 3.11

Kevin Coda

Can someone help me

Infinite Tech

Mine say import mediapipe could not be resolved and when I do pip install it says error no matching distribution found for mediapipe

Infinite Tech

This fixed it for me

Devin Roberts

Ok, maybe this feature is not contemplated in future projects (and possibly most of the users on this channel are not interested). But is there any way that Jarvis can scan the content of a TCG (i.e. Magic, Pokemon) that can be projected in the Holomat? My idea is, for example, to scan a deck and have Jarvis (using AI algorithms) be able to play a game of any TCG using this scanned deck against another physical deck. It would be something quite nerdy but useful to test the competitiveness of the decks.

Juan Carlos P. Melgar

It would also be great for you to release a schedule of what tutorials will be released with parts needed so we can get parts in time for the tutorial to come out!

Nicholas Wen

I'd love to get a tutorial adding in the projection functionality soon!

Nicholas Wen

WHOOOHOO!

Kevin Coda

omg! it's working! I have to adjust the circle between the index and the thumb, but its working!

Juan Carlos P. Melgar

Absolutely. That will be in HoloMat tutorial part 2 where we do the calibration for it

Kevin Coda

Sweet! I’ll definitely be following together. I’m very curious on how you’re protecting the light. You never showed on your videos (not that I have seen) where is the projector. I’m not a python dev so will definitely be enjoying this

Gil Henrique Penner

Saturdays weekly and code and other content more often than that. That might change. Jarvis is a large project and is hard to break down. Even for part 1 of the release I plan on having the full Jarvis pipeline to give you from whisper ->LLM->TTS so even part 1 is pretty big

Kevin Coda

What's the frequency you're planning on releasing those tutorials?

Gil Henrique Penner

Try python -m pip install mediapipe

Brantley O'Day

ImportError: cannot import name 'builder' from 'google.protobuf.internal'

Theo

i have 3.10.11 and it wont work for me

Theo

Maybe an idea tot print not just an error, but add what kind of error

Sjoerd Stouten

It+s no Mac related, I had to downgrade to the same version of python and pip as you on windows. Also in handtracking.py you might need to change cap = cv2.VideoCapture(0) to 0-1-2-3 to start.

Sjoerd Stouten

I want to see how to access the 3d files for 3d printing on the holomat, that or Jarvis! :) Thank you!

Wesley Spangler

you need to install first python on your machine (use MS market), then you can use pip on the termial. Just a reminder to use python 3.11 due to mediapipe only works on 3.11 version

Juan Carlos P. Melgar

NVM , solved ^ ^

Juan Carlos P. Melgar

Hi, quick question: pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Yes, I've installed Python

Juan Carlos P. Melgar

Do i need a webcam for the media import to work? Because ive copy pasted the github, pip installed everything and double checked it but its not resolving the import.

Theo

Glad I read this comment :-D

Analytical Creative

Just a webcam, or a laptop with a webcam for now. Eventually we will transfer it to a projector. But in this tutorial you just need a webcam to learn about hand tracking

Kevin Coda

What componants do i need for this?

Theo

I also had luck with adjusting the distance check values. I ended up with 0.05 for mouseDown and 0.2 for mouseUp. This had the best results for my camera placement and the angle it can see my hands. I imagine once I move the camera overhead to see the tops of my hands it will be different values for better results.

Cody Eves

Is everyone paid member here?

Jay Shrestha

I'm debugging the same thing. I changed "if distance > 0.3 and mouseDown == True:" to "if distance >= 0.3 and mouseDown == True:" and that seemed to help

Cody Eves

Turn the “1” to a “0” in the place where which camera it’s choosing is listed. If you look in the code it shows it displays only “error” when the camera cannot be found. A “1” indicates the first camera listed a “0” indicated the default camera, which solved my problem

Devin Roberts

I have the same issue. What did you do?

Gustavo Cotom

Working on Error where you can’t “unclick” once you’ve pinched.

Devin Roberts

Solved the “Error” message problem showing up for myself, if anyone runs into it maybe I can help.

Devin Roberts

Created TensorFlow Lite XNNPACK delegate for CPU. ERROR any idea why I may be getting this?

Devin Roberts

Thank you very much Resh, one last question, people, will you show how to connect everything and display everything with the projector and that everything will work like in your videos on Tiktok because it's really impressive

royyalbert

I'm using a Logitech HD webcam. I'll get the model number but it's like the most basic one you can get from them. It's 1080p. My surface size is going to be 32inx24in for the new HoloMat in building.

Kevin Coda

What camera are you using? And what is the size of your surface?

royyalbert

TY

royyalbert

Thank you for this advice! You guys are helping everyone. I love it! I would have never known that. Will keep that in mind

Kevin Coda

Also for the Mouse movement script you need to enable the Accessibility settings under Mac. "As a security measure, macOS doesn’t normally let programs control the mouse or keyboard. To make PyAutoGUI work on macOS, you must set the program running your Python script to be an accessibility application. Without this step, your PyAutoGUI function calls will have no effect."

Florian Middendorf

Try printing the distance variable and see what it says. That's super useful for debugging. Compare that to the limits you have set for clicking

Kevin Coda

Link in the description

Kevin Coda

If someone use like me a Mac Book with the M chips. is not so easy to get the application running. On my machine it works now. I have solved problem with an environment on Python 3.11.4 and a pip version of 23.2.1. then Pip install works but crash by initializing the package. I have downgraded it to mediapipe==0.10.9 and know my application is running.

Florian Middendorf

Where do I get a link to github?

royyalbert

Thank you for the tutorial! I might have just a little issue with click and drag. I have tried to tweak the distance values and also making the radius bigger but it seems that nothing works. Do you have any suggestion?

pepDC

Great idea. I'll do that

Kevin Coda

Maybe a min and recommend specs list like they do for games

Brantley O'Day

I can put together a recommendation, but my goal is to make this work on any cheap projector and webcam setup so anyone can do it.

Kevin Coda

Can we get a full parts list for the Holomat early on so we can buy parts over time?

Brantley O'Day

Hi, sorry you having issues. You can try "python -m pip" instead of just pip. Or you can try running it outside of vs code terminal. Just open up a command prompt. And pip install and run from there

Kevin Coda

I'm having issues on Vs, it is not recognising pip . How can i fix this?

Alec Dobbie

Good to know, I'll add this to the read me. Thanks for reporting back!

Kevin Coda

I apologize for the error, it's up now!

Kevin Coda

I apologize for the error, it's fixed now!

Kevin Coda

I'm also getting a 404 page. Is this an issue for anyone else?

Gustavo Cotom

The GitHub link leads to a 404 page. Is there anything else I should do to have access?

amirhosein fj

nevermind, fixed. mediapipe only works up to python 3.11 and I had 3.12

Brantley O'Day

does my github have to be linked to my patreon to access the repo?

Jaxon Watt

I'm having toruble with mediapipe. I'm trying to pip install mediapipe and getting an error. ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none) ERROR: No matching distribution found for mediapipe

Brantley O'Day

Comment what you guys wanna see next!

Kevin Coda

It's up to you guys!

Kevin Coda

Holo record player next?

Brantley O'Day


More Creators