|
| 1 | +# Shells and Pebbles Detection |
| 2 | + |
| 3 | +**GOAL** |
| 4 | + |
| 5 | +To classify the images from the Shells and Pebbles Dataset using a Deep Learning approach. |
| 6 | + |
| 7 | +**DATASET** |
| 8 | + |
| 9 | +https://www.kaggle.com/datasets/vencerlanz09/shells-or-pebbles-an-image-classification-dataset |
| 10 | + |
| 11 | +**DESCRIPTION** |
| 12 | + |
| 13 | +The dataset contains images of 2 different classes, namely Shells and Pebbles. There are 1541 and 2743 images of each type respectively. The task is to classify the images by using a deep learning architecture. |
| 14 | + |
| 15 | +**WHAT I HAD DONE** |
| 16 | + |
| 17 | +First I imported all the required libraries and dataset for this project. Then I imported the dataset and split it into training, validation and testing sets in the ratio 70:20:10. Then I proceeded to build the model. |
| 18 | + |
| 19 | +I have developed 4 deep learning models to classify the images. First I used a ANN to classify the images. But I didn't get a good accuracy. Secondly I used a CNN to classify the images, but the model wasn't performing well. Lastly, I used a CNN with MaxPooling layers but I didn't get a satisfactory accuracy score. |
| 20 | + |
| 21 | +Then I proceeded with Transfer Learning. I used the [ResNet 50](https://tfhub.dev/google/imagenet/resnet_v2_50/feature_vector/5) model and trained this model on the images from the dataset. I first got some improvements in the accuracy, after training the model I got an accuracy score of 82.55 |
| 22 | + |
| 23 | +**MODELS USED** |
| 24 | + |
| 25 | +The models are: |
| 26 | + |
| 27 | +1. Artificial Neural Network (ANN) |
| 28 | +2. Convolutional Neural Network (CNN) |
| 29 | +3. Convolutional Neural Network (CNN) with MaxPooling layer |
| 30 | +4. Transfer Learning Model (ResNet) |
| 31 | + |
| 32 | +**LIBRARIES NEEDED** |
| 33 | + |
| 34 | +* kaggle |
| 35 | +* tensorflow |
| 36 | +* tensorflow_hub |
| 37 | +* split-folders |
| 38 | +* matplotlib |
| 39 | + |
| 40 | +**VISUALIZATION** |
| 41 | + |
| 42 | +### Images of different Rice classes |
| 43 | + |
| 44 | + |
| 45 | +### Model 1 (ANN Model) performance graphs |
| 46 | + |
| 47 | + |
| 48 | +### Model 2 (Basic CNN Model) performance graphs |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +### Model 3 (CNN Model with MaxPooling layer) performance graphs |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +### Model 4 (Transfer Learning Model (ResNet)) performance graphs |
| 57 | + |
| 58 | + |
| 59 | +### Prediction |
| 60 | + |
| 61 | +Prediction on a random image from the testing dataset. |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +**ACCURACIES** |
| 66 | + |
| 67 | +| Model | Architecture | Accuracy in % (on testing data) | |
| 68 | +| ------------- |:-------------------------:|:-------------:| |
| 69 | +| Model 1 | ANN Model |63.95 | |
| 70 | +| Model 2 | Basic CNN Model |70.69 | |
| 71 | +| Model 3 | CNN Model with MaxPooling |72.79 | |
| 72 | +| Model 4 | Transfer Learning Model (ResNet) 20 epochs |82.55 | |
| 73 | + |
| 74 | +**CONCLUSION** |
| 75 | + |
| 76 | +I was successfully able to develop a Deep Learning model that can classify images from the given Shells and Pebbles dataset of 2 classes. |
| 77 | + |
| 78 | +**Omkar Jahagirdar** |
| 79 | + |
| 80 | +Connect with me on Linkedin: https://www.linkedin.com/in/omkar-jahagirdar/ |
| 81 | + |
| 82 | +Check out my Github profile: https://github.com/omkar3602 |
0 commit comments