Sign language detection with Python and Scikit Learn | Landmark detection | Computer vision tutorial

  Рет қаралды 154,375

Computer vision engineer

Computer vision engineer

Күн бұрын

Пікірлер: 393
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Did you enjoy this video? Try my premium courses! 😃🙌😊 ● Hands-On Computer Vision in the Cloud: Building an AWS-based Real Time Number Plate Recognition System bit.ly/3RXrE1Y ● End-To-End Computer Vision: Build and Deploy a Video Summarization API bit.ly/3tyQX0M ● Computer Vision on Edge: Real Time Number Plate Recognition on an Edge Device bit.ly/4dYodA7 ● Machine Learning Entrepreneur: How to start your entrepreneurial journey as a freelancer and content creator bit.ly/4bFLeaC Learn to create AI-based prototypes in the Computer Vision School! www.computervision.school 😃🚀🎓
@jesussachez5468
@jesussachez5468 Жыл бұрын
Hello from Mexico! I love your job, I did each step in the same way as you, and I had no difficulties, I really feel very grateful for the time you spent teaching us. Congratulations teacher! 👨‍🏫
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Thank you! So glad you enjoy the content! 😃🙌
@ITRAiswaryaS
@ITRAiswaryaS 5 ай бұрын
Could you tell me the installation process
@joque4
@joque4 6 ай бұрын
For all who are getting errors like "inhomogeneous shapes" while training on big datasets take into account that the MP Hands processing not always return 42 features (sometimes it just doesn't predict the coordinates well enough). To avoid this situations always check the length of every array. You must have the same amount of images and labels, and the labels (landmark coordinates) should have the same shapes. Just remove the samples that doesn't return all the landmarks or doesn't work well with the Mediapipe hands solution, to ensure all the data has the same shape and to avoid these numpy errors (and bad models).
@RAHUL-dt5xm
@RAHUL-dt5xm 5 ай бұрын
can you help me. when I trained only one gesture nothing else, but the system detects untrained gestures as the trained gesture why? any idea
@aryanrana-o6n
@aryanrana-o6n 5 ай бұрын
can you please share the changed code
@mohamedlhachimi2933
@mohamedlhachimi2933 4 ай бұрын
i think guys to solve this problem we had to tell the collect data script to save just frames where he could detect our hands else we will store bad models that will ends with this getting errors like "inhomogeneous shapes" , i actually try to solved this problem by not moving my hand when collecting data and making my model else you can try this code to check your images that are stored This script will only print the paths of the images that are deleted due to no hands being detected. It won't display any image windows. ##########################################" import os import cv2 import mediapipe as mp def process_and_show(image_path, mp_drawing): mp_hands = mp.solutions.hands hands = mp_hands.Hands() # Read the image image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Detect hands and landmarks results = hands.process(image_rgb) if not results.multi_hand_landmarks: print(f"Deleted image: {image_path}") # Delete the image with no hands detected os.remove(image_path) # Path to your data folder containing subfolders data_folder = "data" mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # Iterate through subfolders for folder_name in os.listdir(data_folder): folder_path = os.path.join(data_folder, folder_name) if os.path.isdir(folder_path): print(f"Checking images in folder: {folder_name}") # Iterate through images in the folder for filename in os.listdir(folder_path): if filename.endswith(".jpg") or filename.endswith(".png"): image_path = os.path.join(folder_path, filename) process_and_show(image_path, mp_drawing)
@pawnidixit1084
@pawnidixit1084 Ай бұрын
I understood the problem but can't really put it in the program. could you explain it please?
@clementdethoor5533
@clementdethoor5533 14 күн бұрын
Just add in create_dataset : if (len(data_aux) == 42): data.append(data_aux) labels.append(dir_)
@shwetaevangeline
@shwetaevangeline 5 ай бұрын
Thank you so much, sir for this wonderful project. I've completed my term project easily with the help of your video. Loved how we can create our own data instead of getting it from somewhere else.
@malesaketh8952
@malesaketh8952 3 ай бұрын
Can u pls help me out? Please
@aryanrana-o6n
@aryanrana-o6n 5 ай бұрын
Really Thank you sir. Great Project you helped me a lot to learn many things. After multiple errors solving finally i succeeded in making full project.
@ComputerVisionEngineer
@ComputerVisionEngineer 5 ай бұрын
Glad the content is helpful! 😃🙌
@thesoftwareguy2183
@thesoftwareguy2183 6 ай бұрын
Sir!! You have my respect I have really learned lots of things in your whole video . Just keep making this ML/DL Project videos , that you have done like implementing from scratch any exciting ML/DL project. Just Keep Going Sir!!! Thankyou So much!!✨✨✨✨✨✨❤❤❤❤❤❤
@ComputerVisionEngineer
@ComputerVisionEngineer 5 ай бұрын
Thank you for your support! 😃🙌💪
@moMo-zu4ds
@moMo-zu4ds 3 ай бұрын
Having trouble with my ML project now, but so happy to find your video. Thanks for all the work!!
@vignesh.v4247
@vignesh.v4247 Ай бұрын
The best tutorial ever!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@artiste9357
@artiste9357 8 ай бұрын
Thanks a lot! I really appreciate keeping this under an hour as well :))
@ivanvijandi2052
@ivanvijandi2052 7 күн бұрын
Mas argentino imposible jsjs, Gran video!
@sudarsonbharathwaaj1412
@sudarsonbharathwaaj1412 8 ай бұрын
Thanks a lot bro, I watched many videos and i wasted a lot of time and finally found your video and done my project.
@ComputerVisionEngineer
@ComputerVisionEngineer 8 ай бұрын
You are welcome! Glad it was helpful! 😃
@RohanVector
@RohanVector 8 ай бұрын
Please send your github link please
@RohanVector
@RohanVector 8 ай бұрын
I got lot of error bro please please please please
@1hpxalphaop741
@1hpxalphaop741 5 ай бұрын
srsly like the best video, now i can train my custom hand gestures etc. even, thank youu❤❤
@paradisofernando97
@paradisofernando97 Жыл бұрын
i love all that, you are very clearly and simply 😍😍
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Thank you! Glad you enjoyed it! 😃💪
@mariamartinez4860
@mariamartinez4860 10 ай бұрын
why does it close when you put another hand?
@LEDAT-AI
@LEDAT-AI Жыл бұрын
Hello, I have watched your video and found it very informative. However, I was wondering if you could make a video for recognizing different characters for a sequence of movements, for example, the letter "J" or "Z." Thank you for your video.
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
I will try to. 🙌
@abdulbarisoylemez2817
@abdulbarisoylemez2817 11 ай бұрын
thank you my teacher, great a video , i tried it myself, I did it :)
@ComputerVisionEngineer
@ComputerVisionEngineer 11 ай бұрын
You are welcome! 😃 Glad you enjoyed it!! 🙂🙌
@emnahamdi-wq4mz
@emnahamdi-wq4mz 11 ай бұрын
Hi! Great tutorial thank you. I have a question: does this program have data augmentation? and did u calculate the sensibility and accuracy of the program?
@kane_jester
@kane_jester 11 ай бұрын
sir , the projects get closed if more hands are placed in the real-time video , i know that randomforest classifier uses only certain features , is there a way so that the program doesnt close if more hands are in the video
@Yousef_Osman2000
@Yousef_Osman2000 9 күн бұрын
how do i get that function 18:10 ?
@hayatlr3000
@hayatlr3000 Жыл бұрын
great tutorial so helpful for my pfe project i actually have to do hand recognition identification biometric only but the hand contour you explained so well the part "this is the most important thing" and I really need help when it comes to the approach of how i can solve this if it? is possible for you to help me by doing a video of it ?cause its the first time for me working with python i usually work with Matlab. thank you again for this video
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey Hayat, I am glad you found it helpful! 😄 Do you mean making a video about how to be strategic when starting a project and choose the most promising approach? Sure, I can do a video about problem solving strategies! 😃🙌
@luongtranle2979
@luongtranle2979 Жыл бұрын
Do you have file word report ?
@sourabhchandra1740
@sourabhchandra1740 Жыл бұрын
Hlo Sir, very nice video.... I also want to make a similar project ... But there will a bit difference.. I want to generate the entire subtitle for people who can't speak using their hand gestures during video conferencing in real time. Can you please guide me with the same ... Bcoz I completely a beginner. Your help will be appreciated. Thanks in advance. 😀
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey Sourabh, it sounds like a complex and very cool project! I would start by saving all the symbols you detect, its confidence score, and the duration of time you detect them so you can analyze this info later on. This is going to help you to understand the problem a little better and also it is going to help you to define rules in order to achieve your goal. 😃💪
@Abhaykumar-bu7ei
@Abhaykumar-bu7ei 11 ай бұрын
Hi Sourabh were you able to make it if yes could you please share some update or code for the same
@000HASNAIN_AHMED
@000HASNAIN_AHMED 11 ай бұрын
Thank you sir for this video
@RohanVector
@RohanVector 7 ай бұрын
Some hand sign have two hand ,than what we can do that situation ?
@fragileaf1778
@fragileaf1778 8 ай бұрын
The camera crashes when I show more than one hand. Can you tell me how it can be fixed?
@senpaihere6512
@senpaihere6512 6 ай бұрын
hehe subscribed, tysm for this it was very helpful
@saurabhmishra7487
@saurabhmishra7487 4 ай бұрын
The app crashes when using both hands. How can I fix this?
@touchwood8404
@touchwood8404 5 ай бұрын
The mediapipe library is giving error in installation what should I do?
@fruitpnchsmuraiG
@fruitpnchsmuraiG 5 ай бұрын
did you figure it out?
@MoominMoomin-f2b
@MoominMoomin-f2b Ай бұрын
Hello!! Can you tell me which ML algorithm did you use in this?
@arif-emre-yaman
@arif-emre-yaman Жыл бұрын
another great project
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Thank you, Arif! I am happy you enjoyed it. 😃🙌
@nilayguler8397
@nilayguler8397 6 ай бұрын
Thanks a lot! I really appreciate keeping this under an hour as well :)) We are trying to implement this model in Flutter to develop a mobile app. How can we create Flutter integration ?
@UtsavKuntalwad
@UtsavKuntalwad 9 ай бұрын
Hello, i was adding new alphabets to the dataset and got this error , unable to solve : " File "D:\Major project\.Major Project\code\train_classifier.py", line 11, in data = np.asarray(data_dict['data']) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (400,) + inhomogeneous part."
@tvrtkokaurinovic7370
@tvrtkokaurinovic7370 8 ай бұрын
did you fix this error?
@raziehahmadi4185
@raziehahmadi4185 3 ай бұрын
Thanks for your good tutorial How to act for the rest of the letters?
@iinfinixvilla389
@iinfinixvilla389 2 ай бұрын
Hola from India sir, Sir i enjoyed your video very much. sir, I have a small doubt can you tell me how to check and the accuracy of the model being trained.
@martinsilungwe2725
@martinsilungwe2725 Жыл бұрын
I have just subscribed, Currently working on a similar project, fingers crossed I'm at a right place..😂
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
🤞😀 Good luck with your project, Martin! 🙌
@martinsilungwe2725
@martinsilungwe2725 Жыл бұрын
@@ComputerVisionEngineer Sir i have an error "ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2. ", what can be the problem, im trying to classfy all the alphabet letters, your help will be highly appreciated.
@ประหยัดจันอังคาร-ฬ9จ
@ประหยัดจันอังคาร-ฬ9จ 6 ай бұрын
Great Video
@zeroboom4
@zeroboom4 6 ай бұрын
I have tried it with arabic Sign language,and it did not working correctly, I get one letter almost every time and it's wrong letter, any ideas that can help me train the model. I got the dataset from kaggle.
@frankleonardoluquelineros9389
@frankleonardoluquelineros9389 11 ай бұрын
Really great video tutorial! Why did you choose scikt learn and not Yolo? How many changes would you have to make to use Yolo?
@ComputerVisionEngineer
@ComputerVisionEngineer 11 ай бұрын
Do you mean using Yolo for object detection instead of mediapipe + Scikit learn? It can be done. You just need to train it. I did it with mediapipe + Scikit learn only for simplicity, and I think it also results in a more robust classifier. 🙌
@szmasclips1774
@szmasclips1774 2 ай бұрын
Great video but How do you do the collecting images part of the code?
@abdallahsamir2707
@abdallahsamir2707 Жыл бұрын
Hello, I have watched your video and found it very informative. However, I was wondering what is the limitation of this project?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, limitation in terms of possible symbols? I would say any static symbol made with only one hand.
@vamsianurag3415
@vamsianurag3415 Жыл бұрын
Hi, while going through this code i'm getting model_dict = pickle.load(open('./model.p', 'rb')) FileNotFoundError: [Errno 2] No such file or directory: './model.p' and I didn't find any model.p file in your repository
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, you can create the model yourself following the steps I describe in the video. 😃🙌
@sandanuwan4441
@sandanuwan4441 6 ай бұрын
I am new to AI. I just want to know are we using Natural Language, Machine Learning and computer vision.
@jeet611_
@jeet611_ 11 ай бұрын
life saver.
@tihbohsyednap8644
@tihbohsyednap8644 Жыл бұрын
Hello sir, Kindly solve this error for me ----> ValueError: With n_samples=1, test_size=0.2 and train_size=0.8, the resulting train set will be empty. Adjust any of the aforementioned parameters.
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, would you please copy paste the full description of the error you get?
@AkshatManohar
@AkshatManohar Жыл бұрын
Hi, I am getting an error that ./data/.DS_Store is not a directory and is not found.
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, what file / line triggers this error?
@miladsayedi59
@miladsayedi59 4 ай бұрын
can we make this project with pose detection models like openpose or deeppose? and what is the difference
@makiizenin
@makiizenin Жыл бұрын
Hello sir, I got a one problem. I made the same with you and my code is worked but it only showed at least 5 mins for capturing then the camera will shutdown automatically and got some errors. :((((
@NarutoTamilan007
@NarutoTamilan007 2 ай бұрын
Sir what is your python version
@livelife846
@livelife846 10 ай бұрын
Who can I add more sign because it's getting error when I try to add more signs
@tihbohsyednap8644
@tihbohsyednap8644 Жыл бұрын
Sir kindly help me with this error . . ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.
@tihbohsyednap8644
@tihbohsyednap8644 Жыл бұрын
Sir kindly help me with this error. I am working on this project as my final year project and I have to extend it as my major project work.
@mohamedlhachimi2933
@mohamedlhachimi2933 4 ай бұрын
i think guys to solve this problem we had to tell the collect data script to save just frames where he could detect our hands else we will store bad models that will ends with this getting errors like "inhomogeneous shapes" , i actually try to solved this problem by not moving my hand when collecting data and making my model else you can try this code to check your images that are stored This script will only print the paths of the images that are deleted due to no hands being detected. It won't display any image windows. ##########################################" import os import cv2 import mediapipe as mp def process_and_show(image_path, mp_drawing): mp_hands = mp.solutions.hands hands = mp_hands.Hands() # Read the image image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Detect hands and landmarks results = hands.process(image_rgb) if not results.multi_hand_landmarks: print(f"Deleted image: {image_path}") # Delete the image with no hands detected os.remove(image_path) # Path to your data folder containing subfolders data_folder = "data" mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # Iterate through subfolders for folder_name in os.listdir(data_folder): folder_path = os.path.join(data_folder, folder_name) if os.path.isdir(folder_path): print(f"Checking images in folder: {folder_name}") # Iterate through images in the folder for filename in os.listdir(folder_path): if filename.endswith(".jpg") or filename.endswith(".png"): image_path = os.path.join(folder_path, filename) process_and_show(image_path, mp_drawing)
@Oof_the_gamer
@Oof_the_gamer Ай бұрын
what si the data.pickle?
@kiranmahapatra8716
@kiranmahapatra8716 Жыл бұрын
Sir please help............during training it shows value error..data = np.asarray(data_dict['data']) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (199,) + inhomogeneous part......for 3 class
@SohamKaranjkar
@SohamKaranjkar 9 ай бұрын
i got the same error, were you able to solve it?
@krzysztofgalek5276
@krzysztofgalek5276 8 ай бұрын
Did u solve it?
@e2mnaturals442
@e2mnaturals442 8 ай бұрын
i was able to sort it using padding if you want me to explain more, i will be glad to
@Elenas1178
@Elenas1178 7 ай бұрын
@@e2mnaturals442 please explain
@preetirathod5244
@preetirathod5244 2 ай бұрын
​@@e2mnaturals442can u please explain it
@travisfernandes5387
@travisfernandes5387 5 ай бұрын
how to make this project on web based like on react or flask
@locphan1221
@locphan1221 Жыл бұрын
thanks
@hamzak2883
@hamzak2883 Жыл бұрын
First of all i want to thank you for this tutorial. I want actually to make a program for sign language but i am confused about the Dataset and how to process the Data which i will maybe get as Videos or Images. can you maybe give me some advice.
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Sure. Do you think you can take an approach as I do in the video?
@harshasshet6755
@harshasshet6755 5 ай бұрын
I am getting plots for every data set size which i have taken is it fine bcs i have plt.savefig function, annotated it so that the plt for every dataset size is saved in main data directory
@prathamupadhyay1265
@prathamupadhyay1265 Жыл бұрын
How can I get accuracy for the letters predicted? Basically I want live accuracy for the letters that are predicted , since if you show any random hand gesture it will always predict some random letter, so it will be much better if you could also show live accuracy .Is it possible can u guide me a little bit through this?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Try using the method 'predict_proba' instead of 'predict'. You wil get a probability vector for all the classes. Taking the largest number will give you the confidence value you are looking for. 💪💪
@prathamupadhyay1265
@prathamupadhyay1265 Жыл бұрын
@@ComputerVisionEngineer Thanks a lot you are amazing !!! 😃
@yashanchule9641
@yashanchule9641 Жыл бұрын
@@prathamupadhyay1265 bhai if u dont mind kya app apke code ki zip file mujhe share kar skte hai, coz im getting many errors and i have tried many steps but kuch ho nahi raha hai. PLZ!!!!!!
@yashanchule9641
@yashanchule9641 Жыл бұрын
plz bhai
@054_vishwadhimar4
@054_vishwadhimar4 Жыл бұрын
@@yashanchule9641 GitHub link is there..or have you tried that too?!
@darrellardhanihidayat555
@darrellardhanihidayat555 9 ай бұрын
Hi sir, i got some error at inference_classifier.py, the errors says: Line 36, in H, W, _= frame.shape AttributeError: ‘NoneType’ object has no attribute ‘shape’ Thank you for the help🙏🏻
@RohanVector
@RohanVector 8 ай бұрын
It's fully working for you now? Because I cannot able to run the first step please help mee
@RohanVector
@RohanVector 8 ай бұрын
In collect_img is cv2.imshow(frame) is error bro kindly help me
@RohanVector
@RohanVector 8 ай бұрын
Error name :size.width>0 && size.height>0 in function 'cv::imshow'
@manasayjoseph1075
@manasayjoseph1075 8 ай бұрын
can you please show the err @@RohanVector
@saivaraprasadmandala8558
@saivaraprasadmandala8558 8 ай бұрын
Change the line to -> cap = cv2.VideoCapture(0)... Previously it was -> cap = cv2.VideoCapture(2)@@RohanVector
@Om-id1qr
@Om-id1qr Жыл бұрын
Great tutorial! Can you tell me how can I do this for Indian Sign Language which uses 2 hands?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
I am looking at the Indian sign language alphabet and I see some characters are done with 2 hands and others with 1 hand. In order to do something based on landmarks as we did on this video you would have to train 2 classifiers, one of them taking as input the landmarks of one hand only (as we did on the video) and the other classifier taking as input the landmarks of both hands. Then some logic to apply one classifier or the other one depending on how many hands appear on the frame. Or, you can just follow a different approach and train an image classifier taking the crop of the hand/s. 💪🙌
@v5j7bxb
@v5j7bxb 5 ай бұрын
Hi ! Have you completed working on this project? Did it worked ?
@mahmudsherbhai2325
@mahmudsherbhai2325 Жыл бұрын
hi I am a 15 year old and i want to do this for my school tech convention. What program are you using to code this
@ranjanadevi7965
@ranjanadevi7965 8 ай бұрын
Hello while executing your codes when i was keeping the number of objects grater than 4 thn trainclassifier was unable to generate model.p file in my device can you help me out to solve this issue
@jonrexzelvalloyas6294
@jonrexzelvalloyas6294 Жыл бұрын
great project! may i ask what algorithm is used in your sign language?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, thank you! I am using mediapipe as a hand detector and landmark detector and a Random Forest classifier as sign classifier. 🙌
@arptv4962
@arptv4962 Ай бұрын
Hello ! Thank you for the porject. Is anybody knows how to fix this error: H, W, _ = frame.shape AttributeError: 'NoneType' object has no attribute 'shape'. I have done all the steps before until the last program, however, it looks like it doesn't see images or something? have anybody had the same problem?
@ahamedkhalifa8377
@ahamedkhalifa8377 2 күн бұрын
change VideoCapture(2) -> VideoCapture(0)
@dinem0023
@dinem0023 4 ай бұрын
in all hand gesture im getting only L what could be the reason can anyone tell me
@sivaips680
@sivaips680 3 ай бұрын
model p file is missed on the folder
@adn4779
@adn4779 7 ай бұрын
@ComputerVisionEngineer ValueError: X has 84 features, but RandomForestClassifier is expecting 42 features as input..I am getting this error when i run the inference_clasifier.py model...What change should i make in the code.....
@shwetaevangeline
@shwetaevangeline 5 ай бұрын
If you're getting this, that means you're showing something else that isn't in the data. Only show what you've captured. Or else simply increase number of classes and take different pictures from different angles.
@mohamedlhachimi2933
@mohamedlhachimi2933 4 ай бұрын
i think guys to solve this problem we had to tell the collect data script to save just frames where he could detect our hands else we will store bad models that will ends with this getting errors like "inhomogeneous shapes" , i actually try to solved this problem by not moving my hand when collecting data and making my model else you can try this code to check your images that are stored This script will only print the paths of the images that are deleted due to no hands being detected. It won't display any image windows. ##########################################" import os import cv2 import mediapipe as mp def process_and_show(image_path, mp_drawing): mp_hands = mp.solutions.hands hands = mp_hands.Hands() # Read the image image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Detect hands and landmarks results = hands.process(image_rgb) if not results.multi_hand_landmarks: print(f"Deleted image: {image_path}") # Delete the image with no hands detected os.remove(image_path) # Path to your data folder containing subfolders data_folder = "data" mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # Iterate through subfolders for folder_name in os.listdir(data_folder): folder_path = os.path.join(data_folder, folder_name) if os.path.isdir(folder_path): print(f"Checking images in folder: {folder_name}") # Iterate through images in the folder for filename in os.listdir(folder_path): if filename.endswith(".jpg") or filename.endswith(".png"): image_path = os.path.join(folder_path, filename) process_and_show(image_path, mp_drawing)
@luciferani8279
@luciferani8279 3 ай бұрын
Do not give 2 hands at the same on your camera
@CanalIFES
@CanalIFES Жыл бұрын
why do you use and random forest classifier algorithm? maybe it is better for it? could i try with a pretrained model to get better results?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
No particular reason why I used a Random Forest, I think pretty much any other classifier would have a similar performance in this case.
@CanalIFES
@CanalIFES Жыл бұрын
@@ComputerVisionEngineer Thanks felipe!!
@essiebx
@essiebx 11 ай бұрын
doesnt this work when you use labeled dataset
@MEGHAJJADHAV
@MEGHAJJADHAV Жыл бұрын
How can we make a confusion matrix for the model that was made?
@e2mnaturals442
@e2mnaturals442 8 ай бұрын
hi were you able to solve this? i used import matplotlib.pyplot as plt import seaborn as sns # class names class_names = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] # Plot the confusion matrix plt.figure(figsize=(15, 15)) sns.heatmap(conf_matrix, annot=True, fmt='d', cmap='Blues', xticklabels=class_names, yticklabels=class_names) plt.title('Confusion Matrix') plt.xlabel('Predicted') plt.ylabel('True') plt.show()
@NourashAzmineChowdhury
@NourashAzmineChowdhury Жыл бұрын
Sir i am getting this error: [ERROR:0@0.045] global obsensor_uvc_stream_channel.cpp:156 cv::obsensor::getStreamChannelGroup Camera index out of range Traceback (most recent call last): File "D:\sign-language-detector-python-master\collect_imgs.py", line 25, in cv2.imshow('frame', frame) cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:971: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow' while running collect_imgs.py can you help solve it. can provide me the model or data set you have used . it will be help for me
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Try this: go to line 13 and change it by 'cap = cv2.VideoCapture(0)'.
@mdemike1781
@mdemike1781 9 ай бұрын
If you train it in a specific place ex: your bedroom would this work like with the background of your kitchen or different place?
@ComputerVisionEngineer
@ComputerVisionEngineer 9 ай бұрын
Yes, by the way we are doing it in this tutorial, it should work if you change the background. 🙌
@mohamedlhachimi2933
@mohamedlhachimi2933 4 ай бұрын
@@ComputerVisionEngineer i think guys to solve this problem we had to tell the collect data script to save just frames where he could detect our hands else we will store bad models that will ends with this getting errors like "inhomogeneous shapes" , i actually try to solved this problem by not moving my hand when collecting data and making my model else you can try this code to check your images that are stored This script will only print the paths of the images that are deleted due to no hands being detected. It won't display any image windows. ##########################################" import os import cv2 import mediapipe as mp def process_and_show(image_path, mp_drawing): mp_hands = mp.solutions.hands hands = mp_hands.Hands() # Read the image image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Detect hands and landmarks results = hands.process(image_rgb) if not results.multi_hand_landmarks: print(f"Deleted image: {image_path}") # Delete the image with no hands detected os.remove(image_path) # Path to your data folder containing subfolders data_folder = "data" mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # Iterate through subfolders for folder_name in os.listdir(data_folder): folder_path = os.path.join(data_folder, folder_name) if os.path.isdir(folder_path): print(f"Checking images in folder: {folder_name}") # Iterate through images in the folder for filename in os.listdir(folder_path): if filename.endswith(".jpg") or filename.endswith(".png"): image_path = os.path.join(folder_path, filename) process_and_show(image_path, mp_drawing)
@itzbumblebee6694
@itzbumblebee6694 6 күн бұрын
do you have research paper of this project?
@ComputerVisionEngineer
@ComputerVisionEngineer 4 күн бұрын
Hi, no, I do not. 🙌
@pawanrajbhar6377
@pawanrajbhar6377 Жыл бұрын
data = np.asarray(data_dict["data"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (296,) + inhomogeneous part. can u help me where i going wrong ?
@foru1854
@foru1854 11 ай бұрын
bro did you corrected the error pls can you tell me how you did it??
@saivaraprasadmandala8558
@saivaraprasadmandala8558 8 ай бұрын
For those who faces the error where it can't convert the 'data' values from dictionary data_dict, just make sure that in photo samples you are giving the full hand because if not, there will be inconsistent data and the lists will not have the same lenght inside the data_dict['data']. Do again the photos retrieve part and all should be fine
@saivaraprasadmandala8558
@saivaraprasadmandala8558 8 ай бұрын
For those who faces the error where it can't convert the 'data' values from dictionary data_dict, just make sure that in photo samples you are giving the full hand because if not, there will be inconsistent data and the lists will not have the same lenght inside the data_dict['data']. Do again the photos retrieve part and all should be fine@@foru1854
@lolalikee
@lolalikee 11 ай бұрын
Can the project created by exported to an .exe? Im worried because of the pickle file.
@saivaraprasadmandala8558
@saivaraprasadmandala8558 8 ай бұрын
Error: Traceback (most recent call last): File "h:\Mini Project\Mallikarjun Project\sign-language-detector-python-master\sign-language-detector-python-master\inference_classifier.py", line 7, in model_dict = pickle.load(open('./model.p', 'rb')) ^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: './model.p' Could u help me out in fixing this error sir!!!!.
@maanyerewalter9748
@maanyerewalter9748 6 ай бұрын
Am from Ghana
@harshasshet6755
@harshasshet6755 3 ай бұрын
I am facing wierd problem actually i have altered your project for all 26 alphabets but whatever I show I am getting wrong alphabets
@luciferani8279
@luciferani8279 3 ай бұрын
What is your error?
@abhikpanda1581
@abhikpanda1581 7 ай бұрын
The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2. The above error is coming . Can anybody pls help me out?
@ArjunSharma-ix1gk
@ArjunSharma-ix1gk 5 ай бұрын
did you solve it?
@Envyro1
@Envyro1 Жыл бұрын
when you crop the image to just show the sign does that mean anyone can sign the alphabet and it will show what sign they are doing?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Once the model is trained, anyone can sign the alphabet and it will show what sign they are doing.
@Pommesperfektion
@Pommesperfektion Жыл бұрын
is anywhere your dataset online?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, the dataset I used in this tutorial is not available. But you can create your own dataset following the steps I provide in the video. 😃🙌
@tharas3368
@tharas3368 6 ай бұрын
Can i get the document of this peoject please 🙏it's my humble request please
@ocelottes
@ocelottes Жыл бұрын
Very cool, i have a question. How can i test de accuracy of the detection?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Do you mean the accuracy of the hand detection?
@ocelottes
@ocelottes Жыл бұрын
@@ComputerVisionEngineer yes
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
@@ocelottes it is mediapipe hand detection, if you want to test it's accuracy you would need to take another hand detector to compare mediapipe detections against
@caio_pohlmann
@caio_pohlmann Жыл бұрын
How could you make the project recognize two hands?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, take a look at our discord server, a member of our community has shared the code to train using 2 hands 💪🙌
@LincolinARanee
@LincolinARanee 11 ай бұрын
@@ComputerVisionEngineer Kindly share your discord server
@MateResuelve18
@MateResuelve18 10 ай бұрын
Is the program you are using called pycharm?
@ComputerVisionEngineer
@ComputerVisionEngineer 10 ай бұрын
Yes. 🙌
@Swathi-oo2be
@Swathi-oo2be Жыл бұрын
ValueError: X has 84 features, but RandomForestClassifier is expecting 42 features as input. ???? Please help me
@martinsilungwe2725
@martinsilungwe2725 Жыл бұрын
Did you get any solutions for the error??
@ad-0307
@ad-0307 Жыл бұрын
Hello! If you have found a solution to this error, would you mind assisting me with it as well?
@SriramK-eq6sq
@SriramK-eq6sq 7 ай бұрын
Just add an "if" condition in the interference classifier.py file before detecting. if len(data_aux) == 42: # Adjust this number based on the expected features prediction1 = model2.predict([np.asarray(data_aux)]) print("Predicted Value (Model 1):", prediction1[0]) predicted_character1 = labels_dict[int(prediction1[0])] cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 0, 0), 4) cv2.putText(frame, predicted_character1, (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 1.3, (0, 0, 0), 3, cv2.LINE_AA)@@ad-0307
@michaenrangelgiraldo5428
@michaenrangelgiraldo5428 Жыл бұрын
Hello, thank u for tutorial, that was amazing but i have an error when y run the classifier: ValueError: X has 42 features, but RandomForestClassifier is expecting 84 features as input. how can i fix that error?
@uzairkabeer
@uzairkabeer Жыл бұрын
@michaenrangelgiraldo5428 Okay so, I'm assuming that you are getting this error when predicting for that I just put an if condition like: if (len(data_aux) != 84) And with in that if condition I predict the values. I myself don't know whats causing this error but my assumption is it has something to do with the both left and right hand landmarks (42+42=84). Nevertheless, this solves this issue hope it will help you too.
@alexday4949
@alexday4949 Жыл бұрын
Can you try this code: desired_length = 4200 # Pad data_aux with zeros to achieve the desired length while len(data_aux) < desired_length: data_aux.extend([0.0, 0.0]) # Truncate data_aux if it exceeds the desired length data_aux = data_aux[:desired_length]
@mohamedlhachimi2933
@mohamedlhachimi2933 4 ай бұрын
i think guys to solve this problem we had to tell the collect data script to save just frames where he could detect our hands else we will store bad models that will ends with this getting errors like "inhomogeneous shapes" , i actually try to solved this problem by not moving my hand when collecting data and making my model else you can try this code to check your images that are stored This script will only print the paths of the images that are deleted due to no hands being detected. It won't display any image windows. ##########################################" import os import cv2 import mediapipe as mp def process_and_show(image_path, mp_drawing): mp_hands = mp.solutions.hands hands = mp_hands.Hands() # Read the image image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Detect hands and landmarks results = hands.process(image_rgb) if not results.multi_hand_landmarks: print(f"Deleted image: {image_path}") # Delete the image with no hands detected os.remove(image_path) # Path to your data folder containing subfolders data_folder = "data" mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # Iterate through subfolders for folder_name in os.listdir(data_folder): folder_path = os.path.join(data_folder, folder_name) if os.path.isdir(folder_path): print(f"Checking images in folder: {folder_name}") # Iterate through images in the folder for filename in os.listdir(folder_path): if filename.endswith(".jpg") or filename.endswith(".png"): image_path = os.path.join(folder_path, filename) process_and_show(image_path, mp_drawing)
@AnupamMoharana
@AnupamMoharana Жыл бұрын
Expected 84 features, but got 42 This error pops up every time
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey Anupam, seems like you are training the classifier with twice the features as you use in inference. Are you training the classifier using gestures from one hand only?
@AnupamMoharana
@AnupamMoharana Жыл бұрын
@@ComputerVisionEngineer Yeah I used 1 hand only i will try with both
@ashokreddy6602
@ashokreddy6602 Жыл бұрын
i'm getting same error how to resolve it and i used one hand only
@pirson910
@pirson910 Жыл бұрын
@@ashokreddy6602 u probably had to collect again the images
@rajsingh8495
@rajsingh8495 Жыл бұрын
can we make an android app for this???
@sherwingeorge6959
@sherwingeorge6959 11 ай бұрын
What python version have you used in this project?
@ComputerVisionEngineer
@ComputerVisionEngineer 11 ай бұрын
Python 3.7 if not mistaken
@akihitonarihisago4276
@akihitonarihisago4276 4 ай бұрын
has anyone tried to implement this for more than 20 classes?
@franciscolopez7830
@franciscolopez7830 5 ай бұрын
chilean spanish?? good tutorial
@ComputerVisionEngineer
@ComputerVisionEngineer 5 ай бұрын
Hi, thank you! My home country is Uruguay. 🙌
@sageloveswipha
@sageloveswipha 4 ай бұрын
Hello please I need help, I have a question
@oterotube13
@oterotube13 Жыл бұрын
help!: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (7960,) + inhomogeneous part. Need to something to remove the bad part from the pickle file.
@OsazeOgedegbe
@OsazeOgedegbe Жыл бұрын
hello I am having the same problem. Could be share your solution if you find one. Thank you!
@mohamedlhachimi2933
@mohamedlhachimi2933 4 ай бұрын
i think guys to solve this problem we had to tell the collect data script to save just frames where he could detect our hands else we will store bad models that will ends with this getting errors like "inhomogeneous shapes" , i actually try to solved this problem by not moving my hand when collecting data and making my model else you can try this code to check your images that are stored This script will only print the paths of the images that are deleted due to no hands being detected. It won't display any image windows. ##########################################" import os import cv2 import mediapipe as mp def process_and_show(image_path, mp_drawing): mp_hands = mp.solutions.hands hands = mp_hands.Hands() # Read the image image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Detect hands and landmarks results = hands.process(image_rgb) if not results.multi_hand_landmarks: print(f"Deleted image: {image_path}") # Delete the image with no hands detected os.remove(image_path) # Path to your data folder containing subfolders data_folder = "data" mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # Iterate through subfolders for folder_name in os.listdir(data_folder): folder_path = os.path.join(data_folder, folder_name) if os.path.isdir(folder_path): print(f"Checking images in folder: {folder_name}") # Iterate through images in the folder for filename in os.listdir(folder_path): if filename.endswith(".jpg") or filename.endswith(".png"): image_path = os.path.join(folder_path, filename) process_and_show(image_path, mp_drawing)
@ahanatola6522
@ahanatola6522 7 ай бұрын
Can anybody please tell using this same process can we create it for all 26 alphabet
@TheDreamsandTears
@TheDreamsandTears 3 ай бұрын
did you get it?
@nitishsaini63
@nitishsaini63 10 ай бұрын
raise ValueError( ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2. please any can resolve this error
@ArjunSharma-ix1gk
@ArjunSharma-ix1gk 5 ай бұрын
did you solve it?
@MarkEugeneDulay-oi5iu
@MarkEugeneDulay-oi5iu 8 ай бұрын
how many classes or folders of data can i do with this?
@ComputerVisionEngineer
@ComputerVisionEngineer 8 ай бұрын
Potentially, there is no limit with the number of categories you can train your classifier in.
@MarkEugeneDulay-oi5iu
@MarkEugeneDulay-oi5iu 8 ай бұрын
@@ComputerVisionEngineer i'm having an error that says ValueError: X has 84 features, but RandomForestClassifier is expecting 42 features as input" do you have any fix for this? im sorry, chatgpt aint helpful enough
@ROHANKUMAR_
@ROHANKUMAR_ Жыл бұрын
sir,can you please provide all image as used in this project
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey Rohan, in this video I used my webcam to collect images, I show you the process in the 'data collection' chapter. You can collect the images yourself for your project following the same approach! 😃🙌
@rutujakothale3829
@rutujakothale3829 5 ай бұрын
i'm getting this error, please help Traceback (most recent call last): File "d:\sign lang\testing.py", line 27, in H, W, _ = frame.shape AttributeError: 'NoneType' object has no attribute 'shape' INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
@rentaroiino1789
@rentaroiino1789 3 ай бұрын
were you able to find a solution to your problem?
@legion4924
@legion4924 Жыл бұрын
Hello sir, in this project can uses for 2 hands?
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
Hey, yeah sure the project can be adapted for 2 hands. 🙌
@legion4924
@legion4924 Жыл бұрын
@@ComputerVisionEngineer okay sir thank u🙏
@УльянаМедведева-б5и
@УльянаМедведева-б5и 5 ай бұрын
Hello everyone, please tell me, maybe someone knows why when you run the test you get this error: "ValueError: X has 84 features, but RandomForestClassifier is expecting 42 features as input". how can i fix this? Thanks in advance for the answer!
@fruitpnchsmuraiG
@fruitpnchsmuraiG 5 ай бұрын
hey did it work then?
@УльянаМедведева-б5и
@УльянаМедведева-б5и 5 ай бұрын
​@@fruitpnchsmuraiG Yes, the program starts, detects the gesture, but after a minute it shuts down and gives the above error
@mohamedlhachimi2933
@mohamedlhachimi2933 4 ай бұрын
i think guys to solve this problem we had to tell the collect data script to save just frames where he could detect our hands else we will store bad models that will ends with this getting errors like "inhomogeneous shapes" , i actually try to solved this problem by not moving my hand when collecting data and making my model else you can try this code to check your images that are stored This script will only print the paths of the images that are deleted due to no hands being detected. It won't display any image windows. ##########################################" import os import cv2 import mediapipe as mp def process_and_show(image_path, mp_drawing): mp_hands = mp.solutions.hands hands = mp_hands.Hands() # Read the image image = cv2.imread(image_path) image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) # Detect hands and landmarks results = hands.process(image_rgb) if not results.multi_hand_landmarks: print(f"Deleted image: {image_path}") # Delete the image with no hands detected os.remove(image_path) # Path to your data folder containing subfolders data_folder = "data" mp_drawing = mp.solutions.drawing_utils mp_drawing_styles = mp.solutions.drawing_styles # Iterate through subfolders for folder_name in os.listdir(data_folder): folder_path = os.path.join(data_folder, folder_name) if os.path.isdir(folder_path): print(f"Checking images in folder: {folder_name}") # Iterate through images in the folder for filename in os.listdir(folder_path): if filename.endswith(".jpg") or filename.endswith(".png"): image_path = os.path.join(folder_path, filename) process_and_show(image_path, mp_drawing)
@RaviRavi-wq8pv
@RaviRavi-wq8pv Жыл бұрын
Sir in collect data..camera is not opening..🥺
@ComputerVisionEngineer
@ComputerVisionEngineer Жыл бұрын
You may need to change the camera id. Try changing the line 13 to cap = cv2.VideoCapture(0).
@manhimself4560
@manhimself4560 7 ай бұрын
cv2.VideoCapture(0) is for main camera and (2) is for alternative camera
Building a Realtime Video and Chat App in React Native with Stream
3:59:43
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 69 МЛН
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 10 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 1,7 МЛН
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Two Minute Papers
Рет қаралды 185 М.
Train Yolov10 object detection custom data FULL GUIDE | Computer vision tutorial
49:18
Real Time Sign Language Recognition using Python | Computer Vision #python
10:26
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 69 МЛН