Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README Enhancement - CCTV Human Detection #486 #508

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
File renamed without changes
57 changes: 36 additions & 21 deletions CCTV-HUMAN-DETECTION/README.md → CCTV Human Detection/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
# CCTV-HUMAN-DETECTION
# CCTV Human Detection

## 🎯 Goal

The goal of this project is to identify human beings from CCTV camera footage.

![image.png](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSrLn9Zzwpzvpp2FLu0n8bdwOIR26fARzsV4A&usqp=CAU)

## 🧵 Dataset

The dataset for this project is taken from the Kaggle website. [Link](https://www.kaggle.com/datasets/jonathannield/cctv-human-pose-estimation-dataset) to the dataset. Here, you'll find various human images captured through CCTV cameras installed in different locations. However, the dataset is not suitable for training a YOLO model. Therefore, we annotated the data according to the format provided by YOLO using LabelIMG.

## 🧾 Description

This is a tutorial demonstrating how to train a YOLOv4 people detector using Darknet and the Kaggle Human dataset.

## 🧮 What I had done!

#### Setup
- Preparing training data
- Training on a local PC
- Testing the custom-trained YOLOv4 model

YOLOv4 HumaN DETECTION
==========================
## 🚀 Models Implemented

##### YOLOv4
This model fails to perform with distant and finer objects.

##### YOLOv7
This model performs much better than YOLOv4 on distant objects.

## 📚 Libraries Needed

- Darknet
- LabelIMG
- TensorFlow
- NumPy

This is a tutorial demonstrating how to train a YOLOv4 people detector using [Darknet](https://github.com/AlexeyAB/darknet) and the Kaggle Human dataset.

Process
-----------------

* [Setup](#setup)
* [Preparing training data](#preparing)
* [Training on a local PC](#training-locally)
* [Testing the custom-trained yolov4 model](#testing)

# Introduction

Expand All @@ -30,13 +54,6 @@ We used LabelIMG to annotate image.
You can refer to https://machinelearningknowledge.ai/train-custom-yolov4-model-for-object-detection-in-google-colab/ for custom data preparation.


# Goal

The goal of this project is to identify human being from CCTV camera.

# Approach

In the notebook we have implemented various Yolov4 and latest released Yolov7 and compare their accuracy with the help of dataset each approach will be divided into different section.

# Approach Using Yolov4

Expand All @@ -50,9 +67,7 @@ In the notebook we have implemented various Yolov4 and latest released Yolov7 an

### This model performs much better than Yolov4 on distant objects

# Training and Testing

Training the model requires GPU.If GPU is not there then use google colab for training the model.Refer the yolo_model.ipynb file for detailed procedure of training and testing.
## 📢 Conclusion

# Conclusion
### We have implemented two different approach Yolov4 and Yolov7 and, Yolov7 gives the best accuracy.
We have implemented two different approaches, YOLOv4 and YOLOv7. YOLOv7 gives the best accuracy for this project.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ tensorflow==2.3.0
absl-py
easydict
matplotlib
pillow
pillow
1 change: 0 additions & 1 deletion CCTV-HUMAN-DETECTION/Dataset/README.md

This file was deleted.

71 changes: 31 additions & 40 deletions Cats vs Dogs Classification using DL/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
# Cats vs Dogs Classification using DL

## PROJECT TITLE
## 🎯 Goal

Cats vs Dogs Classification using DL
Create a DL model which will identify the Cats and Dogs.

## GOAL
## 🧵 Dataset

Create a DL model which will identify the Cats and Dogs.
The link for the dataset used in this project: [Cats and Dogs Image Classification Dataset 1](https://www.kaggle.com/datasets/samuelcortinhas/cats-and-dogs-image-classification) and [Cats and Dogs Image Classification Dataset 2](https://www.kaggle.com/datasets/tongpython/cat-and-dog).

## DATASET
## 🧾 Description

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

## DESCRIPTION
This project aims to identify cats and dogs in images. It is trained on a dataset containing cats and dogs.

This project aims to identify the cats and dogs in the image. It is trained on the dataset containing cats and dogs.
## 🧮 What I had done!

## WHAT I HAD DONE

1. Data collection: From the link of the dataset given above.
2. Data preprocessing: Preprocessed the image in order to have all images in equal shape.
3. Model selection: Chose traditional CNN along with Image detection architecture VGG16 and ResNet50 for Image detection.
1. Data collection: From the links of the datasets given above.
2. Data preprocessing: Preprocessed the images to have all images in equal shape.
3. Model selection: Chose traditional CNN along with Image detection architectures VGG16 and ResNet50 for Image detection.
4. Comparative analysis: Compared the accuracy score of all the models.

## MODELS USED

1. CNN
2. VGG16
3. ResNet50
## 🚀 Models Used

- CNN
- VGG16
- ResNet50

## LIBRARIES NEEDED
## 📚 Libraries Needed

The following libraries are required to run this project:

Expand All @@ -39,34 +35,29 @@ The following libraries are required to run this project:
- matplotlib==3.6.0
- tensorflow==2.6.0

## VISUALIZATION
## 📊 Exploratory Data Analysis Results

#### Best performing model accuracy:
![val_acc3](https://github.com/achrekarom12/DL-Simplified/assets/88442486/b48589ab-83e6-4ce7-86df-eebdbe35921f)
[val_acc3](https://github.com/achrekarom12/DL-Simplified/assets/88442486/b48589ab-83e6-4ce7-86df-eebdbe35921f)

#### Best performing model loss:
![val_loss3](https://github.com/achrekarom12/DL-Simplified/assets/88442486/55072c0f-1fdb-433a-87be-c442c25d84a7)

[val_loss3](https://github.com/achrekarom12/DL-Simplified/assets/88442486/55072c0f-1fdb-433a-87be-c442c25d84a7)

## EVALUATION METRICS

The evaluation metrics I used to assess the models:
## 📈 Performance of the Models based on the Accuracy Scores

- Accuracy
- Loss


## RESULTS
Results on Val dataset:

| Model | Accuracy | Loss |
|------------|----------|---------|
| CNN | 0.728 | 1.159 |
| VGG16 | 0.925 | 0.218 |
| ResNet50 | 0.735 | 1.688 |
| Model | Accuracy | Loss |
| ------- | -------- | ----- |
| CNN | 0.728 | 1.159 |
| VGG16 | 0.925 | 0.218 |
| ResNet50| 0.735 | 1.688 |

## 📢 Conclusion

Based on the results, we can draw the following conclusions:

## CONCLUSION
Based on results we can draw following conclusions:
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.
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.
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.
- 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.
- 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.
- 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.