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

Added Human Detection Project #72

Merged
merged 9 commits into from
Oct 3, 2024
Merged
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
7 changes: 7 additions & 0 deletions Neural Networks/Human Detection Project/Dataset/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The link for the dataset used in this project: https://www.kaggle.com/datasets/constantinwerner/human-detection-dataset

- Dataset contains CCTV footage images(as indoor as outdoor), a half of them w humans and a half of them is w/o humans. Images is marked as follow:

0_n.png or 1_n.png

- The first digit is a class of image, 0 means a scene without humans, and 1 means a scene with humans.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions Neural Networks/Human Detection Project/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Human Detection Project

## PROJECT TITLE

Human Detection Project

## GOAL

To create a DL model which will identify the humans in given image.

## DATASET

The dataset used for this project can be found at [link to dataset](https://www.kaggle.com/datasets/constantinwerner/human-detection-dataset).

## DESCRIPTION

This project aims to identify the humans in the image. It is trained on the dataset containing CCTV footage images(as indoor as outdoor).

## WHAT I HAD DONE

1. Data collection: From the link of the dataset given above.
2. Data preprocessing: Created a Image generators which helped to generate more images in order to increase the accuracy.
3. Model selection: Chose traditional CNN along with Image detection architecture VGG16, Inception and Xception for Image detection.
4. Comparative analysis: Compared the accuracy score of all the models.

## MODELS USED

1. CNN
2. VGG16
3. Inception
4. Xception


## LIBRARIES NEEDED

The following libraries are required to run this project:

- numpy==1.24.3
- pandas==1.5.0
- matplotlib==3.6.0
- tensorflow==2.6.0


## EVALUATION METRICS

The evaluation metrics I used to assess the models:

- Accuracy
- Loss
- Confusion Matrix

## RESULTS
Results on Val dataset:

| Model | Accuracy | Loss |
|------------|----------|---------|
| CNN | 0.756 | 0.591 |
| VGG16 | 0.859 | 0.304 |
| Inception | 0.886 | 0.33 |
| Xception | 0.843 | 0.481 |
| Fine-tuned Inception | 0.902 | 0.312 |


## CONCLUSION
Based on results we can draw following conclusions:
1. CNN Model: The CNN model achieved an accuracy of 75.6% and a loss of 0.591. While it demonstrates reasonable performance, there is room for improvement compared to the other models.

2. VGG16 Model: The VGG16 model outperformed the CNN model with an accuracy of 85.9% and a lower loss of 0.304. It shows the effectiveness of using a pre-trained model like VGG16 for human detection, achieving a higher accuracy and lower loss than the CNN model.

3. Inception Model: The Inception model achieved an accuracy of 88.6% and a loss of 0.33. It performs well, with a higher accuracy than both the CNN and VGG16 models. This suggests that the Inception architecture is effective in capturing human features and distinguishing them from non-human objects.

4. Xception Model: The Xception model achieved an accuracy of 84.3% and a loss of 0.481. While it performs decently, it is slightly behind the VGG16 and Inception models in terms of accuracy.

5. Fine-tuned Inception: The fine-tuned Inception model showed further improvement with an accuracy of 90.2% and a loss of 0.312. Fine-tuning the Inception model likely helped to adapt it more specifically to the task of human image detection, resulting in increased accuracy.
5 changes: 5 additions & 0 deletions Neural Networks/Human Detection Project/Requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy==1.24.3
pandas==1.5.0
matplotlib==3.6.0
tensorflow==2.6.0
seabor==0.11.2
Loading