Skip to content

Commit 31e7edf

Browse files
authored
Update README.md
1 parent 448a77c commit 31e7edf

File tree

1 file changed

+62
-36
lines changed
  • Cats vs Dogs Classification using DL

1 file changed

+62
-36
lines changed

Cats vs Dogs Classification using DL/README.md

+62-36
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,48 @@
44

55
Cats vs Dogs Classification using DL
66

7-
## GOAL
7+
## 🎯 Goal
88

9-
Create a DL model which will identify the Cats and Dogs.
9+
The aim is to create a deep-learning model that will identify cats and dogs in the image.
1010

11-
## DATASET
11+
## 🧵 Dataset
1212

1313
The link for the dataset used in this project: https://www.kaggle.com/datasets/samuelcortinhas/cats-and-dogs-image-classification and https://www.kaggle.com/datasets/tongpython/cat-and-dog
1414

15-
## DESCRIPTION
16-
17-
This project aims to identify the cats and dogs in the image. It is trained on the dataset containing cats and dogs.
18-
19-
## WHAT I HAD DONE
20-
21-
1. Data collection: From the link of the dataset given above.
22-
2. Data preprocessing: Preprocessed the image in order to have all images in equal shape.
23-
3. Model selection: Chose traditional CNN along with Image detection architecture VGG16 and ResNet50 for Image detection.
24-
4. Comparative analysis: Compared the accuracy score of all the models.
25-
26-
## MODELS USED
27-
28-
1. CNN
29-
2. VGG16
30-
3. ResNet50
31-
32-
33-
## LIBRARIES NEEDED
15+
## 🧾 Description
16+
The main goal of the project is to develop a deep-learning model that can accurately predict and identify cats and dogs in the given image based on various features.
17+
18+
## 🧮 What I had done!
19+
20+
1. Data collection: The data is loaded from the links provided above and its structure is
21+
explore
22+
2. Data preprocessing: The data is then preprocessed, where steps such as setting batch
23+
size, and image size, converting the image type to a specific type, and scaling are
24+
done
25+
to prepare the data for model training
26+
3. Model selection: Three models were developed: Convolutional Neural Network (CNN) with
27+
Visual Geometry Group 16 (VGG16) and Residual Network with 50 layers (ResNet50) for
28+
image detection.
29+
4. Comparative analysis: The developed models are compared based on their accuracy.
30+
31+
## 🚀 MODELS USED
32+
33+
1. CNN: CNN is chosen for classifying cats and dogs because of their ability to learn
34+
hierarchical features from raw pixel data automatically. CNN networks are built
35+
for capturing significant spatial patterns as well as characteristics and so are
36+
designed for tasks relating to image comprehension. As a result of their property of
37+
spatial invariance, the variation of an object’s size or position can be handled
38+
easily.
39+
2. VGG16: VGG16 learns intricate hierarchical features from raw pixel data, enabling
40+
discrimination between visual categories. It uses small convolutional filters which
41+
maintains its simplicity and effectiveness for tasks like distinguishing between cats
42+
and dogs.
43+
3. ResNet50: ResNet50 has a unique architecture comprising 50 layers which helps it to
44+
effectively capture complex hierarchical features from images, making them adaptable to
45+
discriminate between images like cats and dogs.
46+
47+
48+
## 📚 LIBRARIES NEEDED
3449

3550
The following libraries are required to run this project:
3651

@@ -39,34 +54,45 @@ The following libraries are required to run this project:
3954
- matplotlib==3.6.0
4055
- tensorflow==2.6.0
4156

42-
## VISUALIZATION
43-
#### Best performing model accuracy:
44-
![val_acc3](https://github.com/achrekarom12/DL-Simplified/assets/88442486/b48589ab-83e6-4ce7-86df-eebdbe35921f)
57+
## 📊 Exploratory Data Analysis Results
58+
#### Accuracy of CNN model:
59+
![val_acc2](https://github.com/abhisheks008/DL-Simplified/blob/main/Cats%20vs%20Dogs%20Classification%20using%20DL/Images/val_acc2.JPG)
4560

46-
#### Best performing model loss:
47-
![val_loss3](https://github.com/achrekarom12/DL-Simplified/assets/88442486/55072c0f-1fdb-433a-87be-c442c25d84a7)
61+
#### Loss of CNN model:
62+
![val_loss2](https://github.com/abhisheks008/DL-Simplified/blob/main/Cats%20vs%20Dogs%20Classification%20using%20DL/Images/val_loss2.JPG)
4863

64+
#### Accuracy of VGG16 model:
65+
![val_acc3](https://github.com/abhisheks008/DL-Simplified/blob/main/Cats%20vs%20Dogs%20Classification%20using%20DL/Images/val_acc3.JPG)
4966

50-
## EVALUATION METRICS
67+
#### Loss of VGG16 model:
68+
![val_loss3](https://github.com/abhisheks008/DL-Simplified/blob/main/Cats%20vs%20Dogs%20Classification%20using%20DL/Images/val_loss3.JPG)
5169

70+
#### Accuracy of ResNet50 model:
71+
![val_acc1](https://github.com/abhisheks008/DL-Simplified/blob/main/Cats%20vs%20Dogs%20Classification%20using%20DL/Images/val_acc1.JPG)
72+
73+
#### Loss of ResNet50 model:
74+
![val_loss1](https://github.com/abhisheks008/DL-Simplified/blob/main/Cats%20vs%20Dogs%20Classification%20using%20DL/Images/val_loss1.JPG)
75+
76+
77+
## 📈 Performance of the Models based on the Accuracy Scores
5278
The evaluation metrics I used to assess the models:
5379

5480
- Accuracy
5581
- Loss
5682

57-
58-
## RESULTS
59-
Results on Val dataset:
60-
6183
| Model | Accuracy | Loss |
6284
|------------|----------|---------|
6385
| CNN | 0.728 | 1.159 |
6486
| VGG16 | 0.925 | 0.218 |
6587
| ResNet50 | 0.735 | 1.688 |
6688

6789

68-
## CONCLUSION
69-
Based on results we can draw following conclusions:
90+
## 📢 Conclusion
91+
Based on the results we can draw the following conclusions:
7092
1. CNN: The CNN model achieved an accuracy of 0.728 and a loss of 1.159. It performed reasonably well, but there is room for improvement.
71-
2. VGG16: The VGG16 model achieved a higher accuracy of 0.925 and a lower loss of 0.218. It outperformed the basic CNN model, indicating that the deeper architecture of VGG16 with more trainable parameters was able to capture more complex features and generalize better.
72-
3. ResNet50: The ResNet50 model achieved an accuracy of 0.735 and a loss of 1.688. It performed slightly better than the basic CNN model but was outperformed by VGG16. ResNet50's residual connections helped in mitigating the vanishing gradient problem and allowed for the training of deeper networks.
93+
2. VGG16: The VGG16 model achieved a higher accuracy of 0.925 and a lower loss of 0.218. It outperformed the basic CNN model, indicating that the deeper architecture of VGG16 with more trainable parameters could capture more complex features and generalize better.
94+
3. ResNet50: The ResNet50 model achieved an accuracy of 0.735 and a loss of 1.688. It performed slightly better than the basic CNN model but was outperformed by VGG16. ResNet50's residual connections helped mitigate the vanishing gradient problem and allowed for the training of deeper networks.
95+
96+
✒️ Author
97+
##### Code contributed by: Abhishek Sharma
98+
##### Email: [email protected]

0 commit comments

Comments
 (0)