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

Simple object Detection #770

Merged
merged 3 commits into from
Jun 11, 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
60 changes: 60 additions & 0 deletions Simple Object Detection/Dataset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

---

# Simple Object Detection Dataset

## Overview

This dataset contains images and corresponding annotations for a simple object detection task. The goal of the task is to detect and localize objects within the images. The dataset is intended for educational purposes and small-scale experiments in object detection.

## Content

The dataset consists of the following components:

1. **Images**: The dataset contains a collection of images in JPEG format. These images serve as the input for the object detection task. Each image may contain one or more objects of interest.

2. **Annotations**: Annotations are provided in XML format using the PASCAL VOC format. Each annotation file corresponds to an image and contains information about the objects present in the image, including their class labels and bounding box coordinates.

## Data Format

### Images

The images are stored in the `images` directory. Each image is named with a unique identifier and has the `.jpg` file extension.

### Annotations

The annotations are stored in the `annotations` directory. Each annotation file is named to match the corresponding image file and has the `.xml` file extension. The XML files follow the PASCAL VOC format and contain the following information for each object in the image:

- Object class label
- Bounding box coordinates (xmin, ymin, xmax, ymax)

## Usage

This dataset can be used for various tasks related to object detection, including:

- Training and evaluating object detection models
- Experimenting with different object detection algorithms and techniques
- Educational purposes, such as learning about computer vision and deep learning

## Citation

If you use this dataset in your work, please consider citing the dataset source on Kaggle:

```
@misc{kishanj/simple-object-detection,
author = {Kishan J},
title = {Simple Object Detection Dataset},
year = {2022},
publisher = {Kaggle},
journal = {Kaggle Datasets},
howpublished = {\url{https://www.kaggle.com/datasets/kishanj/simple-object-detection}}
}
```

## License

This dataset is provided under the [CC0: Public Domain](https://creativecommons.org/publicdomain/zero/1.0/) license, allowing for unrestricted use and redistribution.

---

Feel free to modify and expand this README to provide additional details or instructions as needed.
Binary file added Simple Object Detection/Dataset/archive.zip
Binary file not shown.
Binary file added Simple Object Detection/Images/ANN_loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/ANN_mae.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/CNN_loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/CNN_mae.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/DNN_loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/DNN_mae.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/Distribution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/LSTM_loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/LSTM_mae.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/RNN_loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/RNN_mae.png
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.
Binary file added Simple Object Detection/Images/histogram-xmax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/histogram-xmin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/histogram-ymax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/histogram-ymin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Simple Object Detection/Images/size-location.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 139 additions & 0 deletions Simple Object Detection/Model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
## **Simple Object Detection**

### 🎯 **Goal**

The primary objective of this project is to analyze and experiment with object detection techniques using a simple dataset. The aim is to explore different models and algorithms for object detection tasks and compare their performance.

### 🧵 **Dataset**

The dataset used for this analysis is the [Simple Object Detection Dataset](https://www.kaggle.com/datasets/kishanj/simple-object-detection/data), available on Kaggle. It comprises images and annotations for a simple object detection task.

### 🧾 **Description**

This project involves analyzing the Simple Object Detection Dataset to understand the characteristics of the data, preprocess it for training, implement various object detection models, and evaluate their performance. The focus is on exploring different neural network architectures and techniques for object detection.

### 🧮 **What I had done!**

1. **Data Loading and Exploration**: Loaded the dataset, examined the images and annotations, and understood the structure of the data.
2. **Data Preprocessing**: Prepared the data for training by resizing images, encoding annotations, and splitting the dataset into training and validation sets.
3. **Model Implementation**: Implemented various object detection models including Artificial Neural Networks (ANN), Convolutional Neural Networks (CNN), Deep Neural Networks (DNN), Long Short-Term Memory (LSTM), and Recurrent Neural Networks (RNN).
4. **Training and Evaluation**: Trained the models on the training data, evaluated their performance on the validation set, and compared their accuracy and speed.
5. **Visualization**: Visualized the predictions made by the models on sample images to understand their effectiveness in detecting objects.
6. **Performance Comparison**: Compared the performance of different models based on metrics such as mean Average Precision (mAP), accuracy, and inference speed.

### 🚀 **Models Implemented**

- **ANN (Artificial Neural Network)**: Basic neural network architecture used for object detection.
- **CNN (Convolutional Neural Network)**: Widely used for image-related tasks, including object detection.
- **DNN (Deep Neural Network)**: Deeper neural network architecture for more complex feature extraction.
- **LSTM (Long Short-Term Memory)**: Recurrent neural network architecture with memory cells, suitable for sequential data like object detection.
- **RNN (Recurrent Neural Network)**: Another type of recurrent neural network architecture, effective for sequential data processing.

### 📚 **Libraries Needed**

- **TensorFlow**
- **Keras**
- **OpenCV**
- **Matplotlib**
- **NumPy**
- **Pandas**
- **Seaborn**

### 📊 **Exploratory Data Analysis Results**




## Distribution

![Distribution](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/Distribution.png)



## Box Size Distribution

![Box Size Distribution](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/box-size-didtribution.png)

## Histogram of X-Max

![Histogram of X-Max](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/histogram-xmax.png)

## Histogram of X-Min

![Histogram of X-Min](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/histogram-xmin.png)

## Histogram of Y-Max

![Histogram of Y-Max](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/histogram-ymax.png)

## Histogram of Y-Min

![Histogram of Y-Min](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/histogram-ymin.png)

## Plot

![Plot](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/plot.png)

## Size Location

![Size Location](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/size-location.png)



### 📈 **Performance of the Models**

## ANN Loss

![ANN Loss](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/ANN_loss.png)

## ANN Mean Absolute Error

![ANN Mean Absolute Error](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/ANN_mae.png)

## CNN Loss

![CNN Loss](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/CNN_loss.png)

## CNN Mean Absolute Error

![CNN Mean Absolute Error](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/CNN_mae.png)

## DNN Loss

![DNN Loss](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/DNN_loss.png)

## DNN Mean Absolute Error

![DNN Mean Absolute Error](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/DNN_mae.png)

## LSTM Loss

![LSTM Loss](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/LSTM_loss.png)

## LSTM Mean Absolute Error

![LSTM Mean Absolute Error](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/LSTM_mae.png)

## RNN Loss

![RNN Loss](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/RNN_loss.png)

## RNN Mean Absolute Error

![RNN Mean Absolute Error](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/RNN_mae.png)

### 📢 **Conclusion**

The project successfully explored various object detection models and techniques using the Simple Object Detection Dataset. By comparing the performance of different models, valuable insights were gained into their strengths and weaknesses, aiding in informed decision-making for future object detection tasks.

## Comparison Bar Graph - Validation Loss

![Comparison Bar Graph - Validation Loss](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/comparison_bar_graph_val_loss.png)

## Comparison Bar Graph - Validation Mean Absolute Error

![Comparison Bar Graph - Validation Mean Absolute Error](https://github.com/manishh12/DL-Simplified/blob/main/Simple%20Object%20Detection/Images/comparison_bar_graph_val_mae.png)

### ✒️ **Your Signature**

[Manish Kumar Gupta]
Loading
Loading