Traffic Signs Classification Using Convolution Neural Networks CNN | OPENCV Python




[ad_1]

Train and classify Traffic Signs using Convolutional neural networks This will be done using OPENCV in real time using a simple webcam . CNNs have been gaining popularity in the past couple of years due to their ability to generalize and classify the data with high accuracy. In this video we will train traffic signs with over 35000 images of 43 different classes with the help of tensorflow and keras . By the end of the video I be will sharing information that will help you classify your own data set. Info such as how long does it take to train and how much data of each class is required to have a good classification model.

Code & Text based Version:
https://www.murtazahassan.com/courses/opencv-projects/

Follow Me:
Instagram : https://www.instagram.com/murtazasworkshop/
Facebook: https://www.facebook.com/murtazasworkshop
Website: https://www.murtazahassan.com/
Github: https://github.com/murtazahassan
Thingiverse: https://www.thingiverse.com/Murtaza_Hassan/

#####################################
Full OpenCV 3 Hour Course: https://youtu.be/WQeoO7MI0Bs
Detailed CNN Tutorial: https://youtu.be/y1ZrOs9s2QA
#####################################

#CNN
#Keras
#TrafficSigns

Like — Comment — Share

Useful Links:
DC Motors + Wheels + Chassis: https://amzn.to/2SCZon3
DC Motors + Wheels: https://amzn.to/2QeEusw
Arduino UNO: https://amzn.to/2QdKthB
Motor Driver: https://amzn.to/35grl6x
Battery: https://amzn.to/2Fadc0c
Recommend Webcam for Computer Vision: https://amzn.to/2MNtVKZ
Budget Webcam: https://amzn.to/2ZP47Ug
Cheap Drone for OpenCV: https://amzn.to/2TZpsJy
Raspberry Pi 4 Best Starter Kit: https://amzn.to/2YVCEkL
Raspberry Pi Recommended Battery: https://amzn.to/2C0I9pl
Raspberry Pi Camera: https://amzn.to/2BDFcLF
Raspberry Pi Wide Lens: https://amzn.to/2NQH5qD
More powerful Raspberry Pi alternative: https://amzn.to/3eY3AWN

For daily updates :
https://www.instagram.com/murtazaswor

Links:
How To Install OPENCV in Python:
https://youtu.be/CJXIjApHYVs
Computer Vision Course:
https://www.youtube.com/watch?v=CJXIj
5 Must Know OpencCV Functions:
https://youtu.be/7kHhz7nkpBw
Easy Object Following Robot using Arduino and PixyCam:
https://youtu.be/w_krOCBk1DE
Robot Arm Arduino Tutorial | Gesture Controlled:
https://youtu.be/gmz7eOB-tCg
How to Build Tesla CyberTruck:
https://youtu.be/TE2REg4NEHM

Facing any Errors or want to discuss more?
✔️ Join my Discord
https://discord.gg/bFVMkzf

Source


[ad_2]

Comment List

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    I have one question!! There is too less image for train in class 0.so i copy all that picture and paste it again in that folder and make it around 1200 as other folders have .can train my model good? I mean copying picture will work?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    sir, would you please provide me the Github link for downloading the source code of this project

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Can you send me the pickle file..

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    can we add more images to this data and evaluate?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    How to download tranier.p file ??
    any suggestion

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    ValueError: Input 0 of layer dense is incompatible with the layer: expected axis -1 of input shape to have value 2700 but received input with shape [None, 900]
    Getting this error, can't reshape array. Plz follow this link to my stackoverflow question for detailed explanation.
    https://stackoverflow.com/questions/65130807/input-0-of-layer-dense-is-incompatible-with-the-layer-expected-axis-1-of-input/
    Please help.

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    i used 142 categories in place of 43 categories and there is an error coming " The dimesions of the Training images are wrong

    " can u plse help me how to solve it

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    make video of using this mode in android app

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    i have a problem ….when i m save my model in pickle file it so me error …
    TypeError: can't pickle _thread.RLock objects
    plzzzz help me

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Dear bro, it a very good tutorial just keep it up! what I am telling you is that, if possible please prepare a video which shows the detection of road traffic signs using Mask Rcnn…….

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    thank you so much for your work, it is amazing
    but I have a problem I cant download the files, could anyone help me plz

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Hello Sir, really loved the video thanks for this awesome video. Can you share me file "model_trained.p"??? Thank you.

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    I am not able to download files from the given link
    pls share the solution for this problem

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Hello, i love the video but i can't find the folder in your repositories, if you can please send it to me here is my mail adresse Anasslmoh1@gmail.com

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Epoch 1/10

    446/2000 [=====>……………………] – ETA: 5:49 – loss: 2.5445 – accuracy: 0.2902WARNING: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, 20000 batches). You may need to use the repeat() function when building your dataset.

    solution some one….

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Can we please have access to the files with the images of road signs, so we can download it. Thank you.

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    I want to try my own training. But I don't know how to convert pictures into 32x32x3. I did 32×32 but i don't know how to make a picture 3 dimension.

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Dear Hassan, many thanks for sharing..
    Unfortunately, I did not manage to find the repository neither on your website nor in GitHub.
    Is it possible to share the repository link with us?
    Cheers

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    sir, does the source code available at your github profile??

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    I am unable to download dataset. please send me the link for dataset

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Where is the repository to download?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    How to fix TypeError: can't pickle _thread.RLock objects?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    I have trained my data I also got graphs and plot ….but I didn't get model.trained.py pickle file..why sir?????

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Could you tell me please, how can I plot distribution data after augmentation?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    File "drive/My Drive/road_sign_1/TrafficSign_Main.py", line 67, in <module>

    assert(X_train.shape[1:]==(imageDimesions))," The dimesions of the Training images are wrong "

    AssertionError: The dimesions of the Training images are wrong
    How to solve this error please help

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Sir need of code and files

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    sir i need this
    code and file plz help me out in this
    and sir will it work in any python and pycharm version
    like all libraries like keras, tensarflow, pil, pandas i am facing issue in installing all this libraries plz help me out in this sir

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    I got a WARNING tensorflow saying “Your input ran out of data; interrupting training”. It stopped in the first epoch at 446/2000. I then changed “steps_per_epoch_val=445”. It worked till the end and reported test score & accuracy but could not produce the pickled file, and got the “TypeError: can't pickle _thread.RLock objects”. Can you please help resolve this error?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Excellent subject and great video

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Sir I can't get the model trained.p pickel file

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Thank u
    Is there another simpler method?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Can I write all these codes in one program? If possible how can I do that? Please suggest me

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Hii, I have tried your tutorial with my dataset. I am having very less data. I am getting an error as follow . My console output and error below:

    data shapes

    train (71,) (71,)

    validation (18,) (18,)

    test (23,) (23,)

    Traceback (most recent call last):

    File "E:demo3untitled1.py", line 71, in <module>

    assert (x_train.shape[1:] == (imageDimensions)), "the dimension of training images are wrong"

    AssertionError: the dimension of training images are wrong

    I am passing imageDimensions = (32, 32, 3) this way…

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Awesome! Easy to understand. One request, can I get the link to the datasets? I have tried all the links in the comment section(which you have provided). Either it says Error 404 or it is unable to download.

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Hello, I get the following output: Traceback (most recent call last):

    File "C:/Users/damie/PycharmProjects/pythonProject/training.py", line 214, in <module>

    pickle.dump(model, pickle_out)

    TypeError: cannot pickle '_thread.RLock' object

    This is for training the data

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Thanks for this very informative and clear lesson. I try exactly the same code but in while loop it trys to recognize everytime and gives predictions even my face front of it. As you guess it's all wrong predictions. Also when i show real signs(from my phone) it also predicts regardless what has been showed as it done the same for my face. Besides when i see the result screen, it's a little bit laggy. Is it because of my computers device feature or i did something wrong?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Hello Sir. i run the epoch to 15 and its start to show warnings and my epoch only run for 945.i reduce it back to 10 but its showing me this error.
    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, 20000 batches). You may need to use the repeat() function when building your dataset.

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Hello Sir, Thanks for the awesome project. I need your help with the camera issue. I was able to achieve run the project in Rasberry Pi (Raspbian GNU/Linux, VERSION=10). But when I run this project my integrated camera is opening and the camera turns to a white screen. How can I solve this problem?

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    File "drive/My Drive/road_sign_1/TrafficSign_Main.py", line 67, in <module>

    assert(X_train.shape[1:]==(imageDimesions))," The dimesions of the Training images are wrong "

    AssertionError: The dimesions of the Training images are wrong

    Hi Sir This error occurs How can i solve ?/
    Please Help

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    where is the github repository link??? anybody tell plz.

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Salam, sir murtaza r u available for paid projects??

  • Murtaza's Workshop - Robotics and AI
    December 23, 2020

    Hello sir, i have a question, when i try this code i have a some issue, here's the error code

    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, 20000 batches). You may need to use the repeat() function when building your dataset.

    Cant you tell me whats wrong? and help me for fix it. Thank you

Write a comment