Skip to content

AI project (5th semester of control engineering and robotics)

Notifications You must be signed in to change notification settings

TheZlodziej/crosswalk_sign_recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem description

Goal

Determine whether input image(s) are of crosswalk sign

Justification

Chose this because the previous year couldn't manage and needed to see if what they were saying was true (it wasn't). Also, Chat GPT suggested CNN, thus I chose this approach 🫡.

Input

Cropped images of traffic signs to be determined as traffic sign (detection not implemented!!!)

AI Field

Deep learning, neural network (convolutional neural network)


State of art

Different approaches Pros Cons
CNN Good performance Needs large amount of labeled data, High computional cost
SVM Good performance on image classification tasks Poor performance on non-linear separable datasets
KNN Easy to implement and understand, Good performance on small datasets Poor performance on large datasets, high computational cost, poor interpretability (decisions made)

Description of chosen concept (CNN)

CNN description

A Convolutional Neural Network (CNN) is a type of deep learning neural network that is typically used for image and video processing tasks. It is composed of multiple layers, including convolutional layers, pooling layers, and fully connected layers. The convolutional layers are responsible for detecting features in the input data, such as edges and shapes, while the pooling layers reduce the spatial dimensions of the data to make it more manageable. The fully connected layers are used to classify the features detected by the convolutional layers.

Data needed

Large set of labeled images that represent different traffic sign (including crosswalk sign)

Description of my solution

This solution consists of 2 main stages first - training and saving the model, second loading the model and input images and specifing output for every single one of them.

  1. Building the model.
    1. Load images, preprocess them and split into train, test and validation sets.
    2. Make the model using sequential group of linear stack of layers, and compile it.
    3. Train the model with train dataset and validate it with validation dataset.
    4. Calculate loss and accuracy using test dataset.
    5. Save the model.
  2. Classification of input images.
    1. Load the model.
    2. Load all the images to be classified.
    3. Preprocess loaded images.
    4. Predict images' labels.
    5. For every image check if it was predicted as crosswalk sign.
    6. Print the output.

Output

As the output, {image path} - {result} will be printed in console for each input image

Problems with this solution

  • Image that is not a traffic sign might be interpreted as one if it looks similar (the program will try to find best fitting solution).
  • Input image has to be cropped and of traffic sign to be correctly classified.
  • Large dataset is needed for model training -> my dataset wasn't that large, thus it might not work sometimes.
  • It takes a lot of time to train the model.

About

AI project (5th semester of control engineering and robotics)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages