Skip to content

Commit 79af10a

Browse files
committed
Add Shells and Pebbles Detection
1 parent 61301c3 commit 79af10a

14 files changed

+6143
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I have fetched the Shells and Pebbles Dataset from, https://www.kaggle.com/datasets/vencerlanz09/shells-or-pebbles-an-image-classification-dataset, for building and developing this Project. You guys can check out the dataset from the given link.
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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+
![Images of different Rice classes](../Images/images_from_dataset.png)
44+
45+
### Model 1 (ANN Model) performance graphs
46+
![Model 1 (ANN Model) performance graphs](../Images/model_1_plot.png)
47+
48+
### Model 2 (Basic CNN Model) performance graphs
49+
![Model 2 (Basic CNN Model) performance graphs](../Images/model_2_plot.png)
50+
51+
52+
### Model 3 (CNN Model with MaxPooling layer) performance graphs
53+
![Model 3 (CNN Model with MaxPooling layer) performance graphs](../Images/model_3_plot.png)
54+
55+
56+
### Model 4 (Transfer Learning Model (ResNet)) performance graphs
57+
![Model 4 (Transfer Learning Model (ResNet) 20 epochs) performance graphs](../Images/model_4_plot.png)
58+
59+
### Prediction
60+
61+
Prediction on a random image from the testing dataset.
62+
63+
![Prediction](../Images/prediction.png)
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

Shells and Pebbles Detection/Model/Shells_and_Pebbles_Detection.ipynb

+6,055
Large diffs are not rendered by default.
6.92 MB
Binary file not shown.
5.51 MB
Binary file not shown.
152 KB
Binary file not shown.
90.2 MB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kaggle
2+
tensorflow
3+
tensorflow_hub
4+
split-folders
5+
matplotlib

0 commit comments

Comments
 (0)