I am not able to get how you got the test data. I have trained accordingly and even loaded the model while following up the video, but could not find where you have shown how you got the test data out from the train data. Can you point out which line of code does it ??? Thanks in advance, and great tutorial!
I have not done a train test split because i already did that - i have two folders train and test inside the data folder - github.com/chasinginfinity/number-sign-recognition
@@AdarshMenon I checked. I know. I mean to ask whether you manually added the photos to add to the test folder or was this process a part of the tutorial?
Hello, can you help me on the portion of loading the trained model as well as the prediction? I'm using a trained model built from google teachable machines, the website has a export to tensorflow keras-model however there are no further documents on how do I load the model and I also want to use a connected webcam to do predictions
Hello, i came across a cnn training code where they were not using the standard train_test_split function to divide the dataset nor did they divide it manually. Could you please tell me how that is possible?
The only reason we do train test split is to validate our model on some sample of the data it was trained on. Without validation there is no way to know if our model performed well or not. There is nothing wrong with using the entire dataset for training, provided there is some way to validate the model.
json_file = open("model-bw.json", "r") model_json = json_file.read() json_file.close() loaded_model = model_from_json(model_json) # load weights into new model loaded_model.load_weights("model-bw.h5") print("Loaded model from disk") Getting error on this one file not found please help
if you want to convert the image into numbers, inside the prediction instead of the string 'ZERO', 'ONE' etc.. you can use the respective numbers. Or even create a mapping between the words and actual numbers. And how you want to take in the input of the operations depends, maybe it could be a sign that you train the system on, or could be keyboard input
sir~ when i use 600 as steps_per_epoch, the result shows this >> Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 6000 batches). i really need your help sir
Threshold a value which ranges from least skin color to most vibrant skin color and then make a mask of it and apply it to your realtime video,. It will only detect your hand and exclude the background
Yes you can, I would suggest using the latest versions. If you want to do the detection in still images you can also try google colab, where you don't have to do any setup
@@AdarshMenon I'm having some trouble in installing tensorflow package with pycharm... So I tried running the same code in spyder... But facing some errors related keras
Adarsh Menon thank you for your reply and one more thing. Can i make this project as mobile based application? Do you have any kind of project that build in application? I hope u can help me 🥺
well this project in it's current form would be difficult to convert to a native mobile app. You can check tensorflow.js if you are interested. Another easy way would be to have a browser / native app that takes picture from mobile, and calls an api to do the prediction. But you would need to set up a server and api to accept the image, make prediction and send back the result
Hi, I downloaded your code and ran it. Thanks to you it working great but the issue I was facing is, it shows me warning about: "WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 30 batches). You may need to use the repeat() function when building your dataset. " While I have also added my gestures in the data set and they are adding up but while checking the length of test and train set it only shows 126 and 6 respectively. Also I have searched stack overflow but not able to sort out the error. The execution stops after it reaches 126th epoch. Kindly help we with this thanks.
@@madhurabhat8014 'accuracy' alone in metrics calculates the categorical accuracy from cost (since we are using categorical_crosentropy). You can try to modify your metrics to ['binary_accuracy', 'categorical_accuracy'] and see what the result variable contains. Ref - intellipaat.com/community/17161/keras-model-evaluate-vs-model-predict-accuracy-difference-in-multi-class-nlp-task
same error happened with me, it is because the anaconda i had did not have support of tensorflow, write 'conda install tensorflow' in the console and u r good to go!
Dear , Thanks for nice job and share with us. Here i face error : import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow' I try to install tensorflow but failed.Also faced error when try to install tensorflow --- Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow' what can i do now..? Thanks
Upgrade your python version from 2.x to 3.6 or 3.7 . Tensorflow will support in new updated version of python. Python 2.7 will not be able to support certain functions.
@@AdarshMenon sir please can you tell which are best system requirements for anaconda. I donot have gpu. I have i5 8 gb ram and 2 gb radeon graphics. Is it be okk
this is because recent updates to keras, you can try importing from tensorflow.keras instead of simply keras - ref - stackoverflow.com/questions/53135439/issue-with-add-method-in-tensorflow-attributeerror-module-tensorflow-python
Great Work Adarsh. Keep it up.
Thank you !
Thanks for helping us out with the tutorial. It helps a lot.🙏
thank you very much for the tutorial. great job!
hi, why not choose threshoding with white hand color and black background?
Sir Please Upload more Vidoes you are doing good job
Hey from where u learn building and training cnn model
thank you it is working is good ,but i want increage the index size could u plese help me
nyc project macha
Thank you so much bhai :)
You are super keep rocking
Thank you 🙂
Sir can you please tell me whether we can get the voice output from this project. If yes how?
I'm adding upto 9 digit and it's shows me array out of bonds for axis 0 ...how can I resolve it please reply
which algorithm you used basically ? can you give little information about it
I have used a convolutional neural network (CNN). You can search for CNN on youtube or google, there are lots of resources explaining how it works
I am not able to get how you got the test data. I have trained accordingly and even loaded the model while following up the video, but could not find where you have shown how you got the test data out from the train data. Can you point out which line of code does it ???
Thanks in advance, and great tutorial!
I have not done a train test split because i already did that - i have two folders train and test inside the data folder - github.com/chasinginfinity/number-sign-recognition
@@AdarshMenon yes, that I understand. I also understood how the images were gone in the train folder. But the test set folder remains empty, why?
the test set folder is not empty, please clone the git repo and check
@@AdarshMenon I checked. I know. I mean to ask whether you manually added the photos to add to the test folder or was this process a part of the tutorial?
@@ssaniljainn you simply replace 'train' to 'test' in collect data.py file.
Thanks mate
Hello, can you help me on the portion of loading the trained model as well as the prediction? I'm using a trained model built from google teachable machines, the website has a export to tensorflow keras-model however there are no further documents on how do I load the model and I also want to use a connected webcam to do predictions
Excellent tutorial...
can you classify eye directions like up down right left.I couldnt make , because I working in 1 sample with four dirctions
Great Tutorial.
Thanks!
Hello, i came across a cnn training code where they were not using the standard train_test_split function to divide the dataset nor did they divide it manually. Could you please tell me how that is possible?
The only reason we do train test split is to validate our model on some sample of the data it was trained on. Without validation there is no way to know if our model performed well or not.
There is nothing wrong with using the entire dataset for training, provided there is some way to validate the model.
json_file = open("model-bw.json", "r")
model_json = json_file.read()
json_file.close()
loaded_model = model_from_json(model_json)
# load weights into new model
loaded_model.load_weights("model-bw.h5")
print("Loaded model from disk")
Getting error on this one file not found please help
hey , can you please tell me how to train and predict data for a- z ??
How can we add the feature of mathematical operation like add, subtract, multiply etc on taken inputs. E.g-2+3=5. What changes should I make in code?
if you want to convert the image into numbers, inside the prediction instead of the string 'ZERO', 'ONE' etc.. you can use the respective numbers. Or even create a mapping between the words and actual numbers.
And how you want to take in the input of the operations depends, maybe it could be a sign that you train the system on, or could be keyboard input
thank you very much for this good tutorial
can you please upload test and train datasets for 6 to 9 and alphabets
very helpful
Is this project able to execute on a Raspberry Pi 3 Model B?
sir, is it posibble to have input from kinect?
iam getting this error
Error when checking input: expected conv2d_1_input to have shape (64, 64, 3) but got array with shape (64, 64, 1)
please reply
have you used black and white images ? the 3 stands for the three color channels - R, G and B.
sir~ when i use 600 as steps_per_epoch, the result shows this >> Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 6000 batches). i really need your help sir
Wht u did to overcome? Cause I'm also facing the same
Just keep 60 the issue will fix but when running the actual code I am getting wrong output
can apply the concept to American Sign Language ? Thanks for advice, please reply
Yes you can!
@@AdarshMenon I tried for ASL but it is not working. How can I do can you please tell me.
how to get plain image only with hand and excluding background . While collecting data the image captures background too . Help
Well the easiest way to stand before a plain wall. It is working well for me because I positioned myself in such a way that the background is plain
Threshold a value which ranges from least skin color to most vibrant skin color and then make a mask of it and apply it to your realtime video,.
It will only detect your hand and exclude the background
In prediction: Filenotfound error on json and h5 files any idea ?????
im getting an error ModuleNotFoundError: No module named 'cv2'
please install opencv using the command - pip install opencv-python
can i run this code in pycharm??
if yes can u please suggest me the version of pip and tensorflow
I'm facing error over there
Yes you can, I would suggest using the latest versions. If you want to do the detection in still images you can also try google colab, where you don't have to do any setup
@@AdarshMenon I'm having some trouble in installing tensorflow package with pycharm... So I tried running the same code in spyder... But facing some errors related keras
Nice one mate!
Thanks man ! :D
Hey I have question. Can I train my own dataset in this project?
yes you can
Adarsh Menon thank you for your reply and one more thing. Can i make this project as mobile based application? Do you have any kind of project that build in application? I hope u can help me 🥺
well this project in it's current form would be difficult to convert to a native mobile app. You can check tensorflow.js if you are interested. Another easy way would be to have a browser / native app that takes picture from mobile, and calls an api to do the prediction. But you would need to set up a server and api to accept the image, make prediction and send back the result
did u use cnn just for training and testing?
yes
@@AdarshMenon is this reinforcement learning
@@aaysharasheed1915 no this is supervised learning using a deep learning technique called convolutional neural networks (cnn)
Hi, I downloaded your code and ran it. Thanks to you it working great but the issue I was facing is, it shows me warning about:
"WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 30 batches). You may need to use the repeat() function when building your dataset.
"
While I have also added my gestures in the data set and they are adding up but while checking the length of test and train set it only shows 126 and 6 respectively. Also I have searched stack overflow but not able to sort out the error. The execution stops after it reaches 126th epoch. Kindly help we with this thanks.
set batch size = 1
@tamur does it work? that @vishaal mentioned
@@jotaro9664 I didn't worked on this project afterwards.
how does the data base works ?could you please explain me brother.
is the code to collect data supposed to automatically create the folders? or do I need to create the folders first before generating data
Is GPU is required to run this project?????
no
Am getting error like No module named cv2 ..help me please
install opencv using pip install opencv-python
Which version of tensor flow is used for training?
can we train it for a b c d letters also
yes you can
@@AdarshMenon by using capture .py and it will automatically lane it as A B C or we have to do it by changing the code in pridict.py
@@AdarshMenon make a video of adding an alphabet in it because in my project I want to recognize the alphabet also
Sir I want combine opencv hand gestures with python raspberry gpio
How to find accuracy of prediction each time? Please reply
You can print the result variable - it contains the prediction accuracy
@@AdarshMenon thank you....will try that
Result variable is a tuple....but I need accuracy to be printed as a percent value that too below the predicted result on frame. What to do?
@@madhurabhat8014 'accuracy' alone in metrics calculates the categorical accuracy from cost (since we are using categorical_crosentropy). You can try to modify your metrics to ['binary_accuracy', 'categorical_accuracy'] and see what the result variable contains. Ref - intellipaat.com/community/17161/keras-model-evaluate-vs-model-predict-accuracy-difference-in-multi-class-nlp-task
OK
Hey, can you please tell.. how to get accuracy in percentage using that result variable
unable to predict : error displaying import tensorflow as tf and some libraries., please make complete video of recognizing the numbers
give more data
same error happened with me, it is because the anaconda i had did not have support of tensorflow, write 'conda install tensorflow' in the console and u r good to go!
Dear , Thanks for nice job and share with us.
Here i face error :
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
I try to install tensorflow but failed.Also faced error when try to install tensorflow ---
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow'
what can i do now..?
Thanks
Upgrade your python version from 2.x to 3.6 or 3.7 . Tensorflow will support in new updated version of python.
Python 2.7 will not be able to support certain functions.
get older version of openCV like 3.4
how can I understand the code please?
Which model did u use in ur project?? plz tell me bro
Used a CNN
Can you send me the document of this project it's my humble request please respond and do favour to me
sir i want to ask that could we donot use googlecolab for this. Is it be ok.
please reply sir
@@ashuchauhan7235 We cannot use Google Colab for this. The reason is we cannot connect to webcam from colab.
@@AdarshMenon sir please can you tell which are best system requirements for anaconda. I donot have gpu. I have i5 8 gb ram and 2 gb radeon graphics. Is it be okk
thankyou for reply
@@ashuchauhan7235 yes that is great! You dont need a GPU. Simply install anaconda and the required libraries
Filenotfound error araha hai bhai,, woh data train ka path error aaraha hai!!
Same error did you find solution ??
module 'tensorflow.python.framework.ops' has no attribute '_TensorLike'
this is because recent updates to keras, you can try importing from tensorflow.keras instead of simply keras - ref - stackoverflow.com/questions/53135439/issue-with-add-method-in-tensorflow-attributeerror-module-tensorflow-python
bro how to import keras cv2 in spyder
you need to install it first using 'pip install opencv-python', but if you are using anaconda, you can run: 'conda install -c anaconda opencv'
Which CNN is used here?
a very simple 2 layer cnn custom built with keras
@@AdarshMenon Thanks for replying man... You're doing an amazing job...
@@AdarshMenon CAN YOU PLEASE PROVIDE THE ARCHITECTURE PICTURE please WITH LAYERS
Your code is not optimized. And so it is giving very less fps which is not good at all. Try to use opencv + cuda build.
why you preferred CNN algorithm, even the basic algorithm can detect the image and predict it right...
CNN is much lower as compared to other classification algorithms.
@@imalone7494 what?
lit
Face detection with cnn
?