diff --git a/Simple Object Detection/Dataset/README.md b/Simple Object Detection/Dataset/README.md
new file mode 100644
index 000000000..30b8cf1d6
--- /dev/null
+++ b/Simple Object Detection/Dataset/README.md
@@ -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.
\ No newline at end of file
diff --git a/Simple Object Detection/Dataset/archive.zip b/Simple Object Detection/Dataset/archive.zip
new file mode 100644
index 000000000..ae2bb6278
Binary files /dev/null and b/Simple Object Detection/Dataset/archive.zip differ
diff --git a/Simple Object Detection/Images/ANN_loss.png b/Simple Object Detection/Images/ANN_loss.png
new file mode 100644
index 000000000..ced6c3df7
Binary files /dev/null and b/Simple Object Detection/Images/ANN_loss.png differ
diff --git a/Simple Object Detection/Images/ANN_mae.png b/Simple Object Detection/Images/ANN_mae.png
new file mode 100644
index 000000000..8da412a30
Binary files /dev/null and b/Simple Object Detection/Images/ANN_mae.png differ
diff --git a/Simple Object Detection/Images/CNN_loss.png b/Simple Object Detection/Images/CNN_loss.png
new file mode 100644
index 000000000..57816f7c1
Binary files /dev/null and b/Simple Object Detection/Images/CNN_loss.png differ
diff --git a/Simple Object Detection/Images/CNN_mae.png b/Simple Object Detection/Images/CNN_mae.png
new file mode 100644
index 000000000..56822827b
Binary files /dev/null and b/Simple Object Detection/Images/CNN_mae.png differ
diff --git a/Simple Object Detection/Images/DNN_loss.png b/Simple Object Detection/Images/DNN_loss.png
new file mode 100644
index 000000000..95203e0a6
Binary files /dev/null and b/Simple Object Detection/Images/DNN_loss.png differ
diff --git a/Simple Object Detection/Images/DNN_mae.png b/Simple Object Detection/Images/DNN_mae.png
new file mode 100644
index 000000000..0961f9ec5
Binary files /dev/null and b/Simple Object Detection/Images/DNN_mae.png differ
diff --git a/Simple Object Detection/Images/Distribution.png b/Simple Object Detection/Images/Distribution.png
new file mode 100644
index 000000000..4d35c3eb8
Binary files /dev/null and b/Simple Object Detection/Images/Distribution.png differ
diff --git a/Simple Object Detection/Images/LSTM_loss.png b/Simple Object Detection/Images/LSTM_loss.png
new file mode 100644
index 000000000..023b3d5b6
Binary files /dev/null and b/Simple Object Detection/Images/LSTM_loss.png differ
diff --git a/Simple Object Detection/Images/LSTM_mae.png b/Simple Object Detection/Images/LSTM_mae.png
new file mode 100644
index 000000000..1b54c5252
Binary files /dev/null and b/Simple Object Detection/Images/LSTM_mae.png differ
diff --git a/Simple Object Detection/Images/RNN_loss.png b/Simple Object Detection/Images/RNN_loss.png
new file mode 100644
index 000000000..7d7006b8e
Binary files /dev/null and b/Simple Object Detection/Images/RNN_loss.png differ
diff --git a/Simple Object Detection/Images/RNN_mae.png b/Simple Object Detection/Images/RNN_mae.png
new file mode 100644
index 000000000..e24129f94
Binary files /dev/null and b/Simple Object Detection/Images/RNN_mae.png differ
diff --git a/Simple Object Detection/Images/box-size-didtribution.png b/Simple Object Detection/Images/box-size-didtribution.png
new file mode 100644
index 000000000..63cf26fd8
Binary files /dev/null and b/Simple Object Detection/Images/box-size-didtribution.png differ
diff --git a/Simple Object Detection/Images/comparison_bar_graph_val_loss.png b/Simple Object Detection/Images/comparison_bar_graph_val_loss.png
new file mode 100644
index 000000000..c1a940de4
Binary files /dev/null and b/Simple Object Detection/Images/comparison_bar_graph_val_loss.png differ
diff --git a/Simple Object Detection/Images/comparison_bar_graph_val_mae.png b/Simple Object Detection/Images/comparison_bar_graph_val_mae.png
new file mode 100644
index 000000000..31787c174
Binary files /dev/null and b/Simple Object Detection/Images/comparison_bar_graph_val_mae.png differ
diff --git a/Simple Object Detection/Images/histogram-xmax.png b/Simple Object Detection/Images/histogram-xmax.png
new file mode 100644
index 000000000..3d6056727
Binary files /dev/null and b/Simple Object Detection/Images/histogram-xmax.png differ
diff --git a/Simple Object Detection/Images/histogram-xmin.png b/Simple Object Detection/Images/histogram-xmin.png
new file mode 100644
index 000000000..5757927a7
Binary files /dev/null and b/Simple Object Detection/Images/histogram-xmin.png differ
diff --git a/Simple Object Detection/Images/histogram-ymax.png b/Simple Object Detection/Images/histogram-ymax.png
new file mode 100644
index 000000000..e57c0c225
Binary files /dev/null and b/Simple Object Detection/Images/histogram-ymax.png differ
diff --git a/Simple Object Detection/Images/histogram-ymin.png b/Simple Object Detection/Images/histogram-ymin.png
new file mode 100644
index 000000000..c943367d4
Binary files /dev/null and b/Simple Object Detection/Images/histogram-ymin.png differ
diff --git a/Simple Object Detection/Images/plot.png b/Simple Object Detection/Images/plot.png
new file mode 100644
index 000000000..1e64314cb
Binary files /dev/null and b/Simple Object Detection/Images/plot.png differ
diff --git a/Simple Object Detection/Images/size-location.png b/Simple Object Detection/Images/size-location.png
new file mode 100644
index 000000000..0b3f3df49
Binary files /dev/null and b/Simple Object Detection/Images/size-location.png differ
diff --git a/Simple Object Detection/Model/README.md b/Simple Object Detection/Model/README.md
new file mode 100644
index 000000000..3e4a9b796
--- /dev/null
+++ b/Simple Object Detection/Model/README.md
@@ -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]
diff --git a/Simple Object Detection/Model/Simple_object_detection_ann_cnn_dnn_lstm_rnn.ipynb b/Simple Object Detection/Model/Simple_object_detection_ann_cnn_dnn_lstm_rnn.ipynb
new file mode 100644
index 000000000..819da3f6b
--- /dev/null
+++ b/Simple Object Detection/Model/Simple_object_detection_ann_cnn_dnn_lstm_rnn.ipynb
@@ -0,0 +1,2366 @@
+{
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "name": "python3"
+ },
+ "language_info": {
+ "pygments_lexer": "ipython3",
+ "nbconvert_exporter": "python",
+ "version": "3.6.4",
+ "file_extension": ".py",
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "name": "python",
+ "mimetype": "text/x-python"
+ },
+ "kaggle": {
+ "accelerator": "gpu",
+ "dataSources": [
+ {
+ "sourceId": 1547420,
+ "sourceType": "datasetVersion",
+ "datasetId": 913037
+ }
+ ],
+ "dockerImageVersionId": 30121,
+ "isInternetEnabled": true,
+ "language": "python",
+ "sourceType": "notebook",
+ "isGpuEnabled": true
+ },
+ "colab": {
+ "provenance": [],
+ "toc_visible": true,
+ "gpuType": "T4"
+ },
+ "accelerator": "GPU"
+ },
+ "nbformat_minor": 0,
+ "nbformat": 4,
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Importing Libraries"
+ ],
+ "metadata": {
+ "id": "Z51WBHI2J6DI"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "import os\n",
+ "import pandas as pd\n",
+ "import numpy as np\n",
+ "import seaborn as sns\n",
+ "from bs4 import BeautifulSoup\n",
+ "import matplotlib.pyplot as plt\n",
+ "import tensorflow as tf\n",
+ "import matplotlib.patches as mpatches"
+ ],
+ "metadata": {
+ "execution": {
+ "iopub.status.busy": "2021-08-07T05:02:48.685095Z",
+ "iopub.execute_input": "2021-08-07T05:02:48.685435Z",
+ "iopub.status.idle": "2021-08-07T05:02:53.491802Z",
+ "shell.execute_reply.started": "2021-08-07T05:02:48.685357Z",
+ "shell.execute_reply": "2021-08-07T05:02:53.491014Z"
+ },
+ "trusted": true,
+ "id": "9HVuTFYpJs86"
+ },
+ "execution_count": 1,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# Loading Dataset"
+ ],
+ "metadata": {
+ "id": "UfvlqFc3J_Uj"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "!unzip /content/archive.zip"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "collapsed": true,
+ "id": "Tw_nd-mWJ0I2",
+ "outputId": "921a8801-9629-45e8-ef5d-e5aaa4582658"
+ },
+ "execution_count": 2,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Archive: /content/archive.zip\n",
+ " inflating: datasets/annotations/a (1).xml \n",
+ " inflating: datasets/annotations/a (10).xml \n",
+ " inflating: datasets/annotations/a (100).xml \n",
+ " inflating: datasets/annotations/a (101).xml \n",
+ " inflating: datasets/annotations/a (102).xml \n",
+ " inflating: datasets/annotations/a (103).xml \n",
+ " inflating: datasets/annotations/a (104).xml \n",
+ " inflating: datasets/annotations/a (105).xml \n",
+ " inflating: datasets/annotations/a (106).xml \n",
+ " inflating: datasets/annotations/a (107).xml \n",
+ " inflating: datasets/annotations/a (108).xml \n",
+ " inflating: datasets/annotations/a (109).xml \n",
+ " inflating: datasets/annotations/a (11).xml \n",
+ " inflating: datasets/annotations/a (110).xml \n",
+ " inflating: datasets/annotations/a (111).xml \n",
+ " inflating: datasets/annotations/a (112).xml \n",
+ " inflating: datasets/annotations/a (12).xml \n",
+ " inflating: datasets/annotations/a (13).xml \n",
+ " inflating: datasets/annotations/a (14).xml \n",
+ " inflating: datasets/annotations/a (15).xml \n",
+ " inflating: datasets/annotations/a (16).xml \n",
+ " inflating: datasets/annotations/a (17).xml \n",
+ " inflating: datasets/annotations/a (18).xml \n",
+ " inflating: datasets/annotations/a (19).xml \n",
+ " inflating: datasets/annotations/a (2).xml \n",
+ " inflating: datasets/annotations/a (20).xml \n",
+ " inflating: datasets/annotations/a (21).xml \n",
+ " inflating: datasets/annotations/a (22).xml \n",
+ " inflating: datasets/annotations/a (23).xml \n",
+ " inflating: datasets/annotations/a (24).xml \n",
+ " inflating: datasets/annotations/a (25).xml \n",
+ " inflating: datasets/annotations/a (26).xml \n",
+ " inflating: datasets/annotations/a (27).xml \n",
+ " inflating: datasets/annotations/a (28).xml \n",
+ " inflating: datasets/annotations/a (29).xml \n",
+ " inflating: datasets/annotations/a (3).xml \n",
+ " inflating: datasets/annotations/a (30).xml \n",
+ " inflating: datasets/annotations/a (31).xml \n",
+ " inflating: datasets/annotations/a (32).xml \n",
+ " inflating: datasets/annotations/a (33).xml \n",
+ " inflating: datasets/annotations/a (34).xml \n",
+ " inflating: datasets/annotations/a (35).xml \n",
+ " inflating: datasets/annotations/a (36).xml \n",
+ " inflating: datasets/annotations/a (37).xml \n",
+ " inflating: datasets/annotations/a (38).xml \n",
+ " inflating: datasets/annotations/a (39).xml \n",
+ " inflating: datasets/annotations/a (4).xml \n",
+ " inflating: datasets/annotations/a (40).xml \n",
+ " inflating: datasets/annotations/a (41).xml \n",
+ " inflating: datasets/annotations/a (42).xml \n",
+ " inflating: datasets/annotations/a (43).xml \n",
+ " inflating: datasets/annotations/a (44).xml \n",
+ " inflating: datasets/annotations/a (45).xml \n",
+ " inflating: datasets/annotations/a (46).xml \n",
+ " inflating: datasets/annotations/a (47).xml \n",
+ " inflating: datasets/annotations/a (48).xml \n",
+ " inflating: datasets/annotations/a (49).xml \n",
+ " inflating: datasets/annotations/a (5).xml \n",
+ " inflating: datasets/annotations/a (50).xml \n",
+ " inflating: datasets/annotations/a (51).xml \n",
+ " inflating: datasets/annotations/a (52).xml \n",
+ " inflating: datasets/annotations/a (53).xml \n",
+ " inflating: datasets/annotations/a (54).xml \n",
+ " inflating: datasets/annotations/a (55).xml \n",
+ " inflating: datasets/annotations/a (56).xml \n",
+ " inflating: datasets/annotations/a (57).xml \n",
+ " inflating: datasets/annotations/a (58).xml \n",
+ " inflating: datasets/annotations/a (59).xml \n",
+ " inflating: datasets/annotations/a (6).xml \n",
+ " inflating: datasets/annotations/a (60).xml \n",
+ " inflating: datasets/annotations/a (61).xml \n",
+ " inflating: datasets/annotations/a (62).xml \n",
+ " inflating: datasets/annotations/a (63).xml \n",
+ " inflating: datasets/annotations/a (64).xml \n",
+ " inflating: datasets/annotations/a (65).xml \n",
+ " inflating: datasets/annotations/a (66).xml \n",
+ " inflating: datasets/annotations/a (67).xml \n",
+ " inflating: datasets/annotations/a (68).xml \n",
+ " inflating: datasets/annotations/a (69).xml \n",
+ " inflating: datasets/annotations/a (7).xml \n",
+ " inflating: datasets/annotations/a (70).xml \n",
+ " inflating: datasets/annotations/a (71).xml \n",
+ " inflating: datasets/annotations/a (72).xml \n",
+ " inflating: datasets/annotations/a (73).xml \n",
+ " inflating: datasets/annotations/a (74).xml \n",
+ " inflating: datasets/annotations/a (75).xml \n",
+ " inflating: datasets/annotations/a (76).xml \n",
+ " inflating: datasets/annotations/a (77).xml \n",
+ " inflating: datasets/annotations/a (78).xml \n",
+ " inflating: datasets/annotations/a (79).xml \n",
+ " inflating: datasets/annotations/a (8).xml \n",
+ " inflating: datasets/annotations/a (80).xml \n",
+ " inflating: datasets/annotations/a (81).xml \n",
+ " inflating: datasets/annotations/a (82).xml \n",
+ " inflating: datasets/annotations/a (83).xml \n",
+ " inflating: datasets/annotations/a (84).xml \n",
+ " inflating: datasets/annotations/a (85).xml \n",
+ " inflating: datasets/annotations/a (86).xml \n",
+ " inflating: datasets/annotations/a (87).xml \n",
+ " inflating: datasets/annotations/a (88).xml \n",
+ " inflating: datasets/annotations/a (89).xml \n",
+ " inflating: datasets/annotations/a (9).xml \n",
+ " inflating: datasets/annotations/a (90).xml \n",
+ " inflating: datasets/annotations/a (91).xml \n",
+ " inflating: datasets/annotations/a (92).xml \n",
+ " inflating: datasets/annotations/a (93).xml \n",
+ " inflating: datasets/annotations/a (94).xml \n",
+ " inflating: datasets/annotations/a (95).xml \n",
+ " inflating: datasets/annotations/a (96).xml \n",
+ " inflating: datasets/annotations/a (97).xml \n",
+ " inflating: datasets/annotations/a (98).xml \n",
+ " inflating: datasets/annotations/a (99).xml \n",
+ " inflating: datasets/images/a (1).jpg \n",
+ " inflating: datasets/images/a (10).jpg \n",
+ " inflating: datasets/images/a (100).jpg \n",
+ " inflating: datasets/images/a (101).jpg \n",
+ " inflating: datasets/images/a (102).jpg \n",
+ " inflating: datasets/images/a (103).jpg \n",
+ " inflating: datasets/images/a (104).jpg \n",
+ " inflating: datasets/images/a (105).jpg \n",
+ " inflating: datasets/images/a (106).jpg \n",
+ " inflating: datasets/images/a (107).jpg \n",
+ " inflating: datasets/images/a (108).jpg \n",
+ " inflating: datasets/images/a (109).jpg \n",
+ " inflating: datasets/images/a (11).jpg \n",
+ " inflating: datasets/images/a (110).jpg \n",
+ " inflating: datasets/images/a (111).jpg \n",
+ " inflating: datasets/images/a (112).jpg \n",
+ " inflating: datasets/images/a (12).jpg \n",
+ " inflating: datasets/images/a (13).jpg \n",
+ " inflating: datasets/images/a (14).jpg \n",
+ " inflating: datasets/images/a (15).jpg \n",
+ " inflating: datasets/images/a (16).jpg \n",
+ " inflating: datasets/images/a (17).jpg \n",
+ " inflating: datasets/images/a (18).jpg \n",
+ " inflating: datasets/images/a (19).jpg \n",
+ " inflating: datasets/images/a (2).jpg \n",
+ " inflating: datasets/images/a (20).jpg \n",
+ " inflating: datasets/images/a (21).jpg \n",
+ " inflating: datasets/images/a (22).jpg \n",
+ " inflating: datasets/images/a (23).jpg \n",
+ " inflating: datasets/images/a (24).jpg \n",
+ " inflating: datasets/images/a (25).jpg \n",
+ " inflating: datasets/images/a (26).jpg \n",
+ " inflating: datasets/images/a (27).jpg \n",
+ " inflating: datasets/images/a (28).jpg \n",
+ " inflating: datasets/images/a (29).jpg \n",
+ " inflating: datasets/images/a (3).jpg \n",
+ " inflating: datasets/images/a (30).jpg \n",
+ " inflating: datasets/images/a (31).jpg \n",
+ " inflating: datasets/images/a (32).jpg \n",
+ " inflating: datasets/images/a (33).jpg \n",
+ " inflating: datasets/images/a (34).jpg \n",
+ " inflating: datasets/images/a (35).jpg \n",
+ " inflating: datasets/images/a (36).jpg \n",
+ " inflating: datasets/images/a (37).jpg \n",
+ " inflating: datasets/images/a (38).jpg \n",
+ " inflating: datasets/images/a (39).jpg \n",
+ " inflating: datasets/images/a (4).jpg \n",
+ " inflating: datasets/images/a (40).jpg \n",
+ " inflating: datasets/images/a (41).jpg \n",
+ " inflating: datasets/images/a (42).jpg \n",
+ " inflating: datasets/images/a (43).jpg \n",
+ " inflating: datasets/images/a (44).jpg \n",
+ " inflating: datasets/images/a (45).jpg \n",
+ " inflating: datasets/images/a (46).jpg \n",
+ " inflating: datasets/images/a (47).jpg \n",
+ " inflating: datasets/images/a (48).jpg \n",
+ " inflating: datasets/images/a (49).jpg \n",
+ " inflating: datasets/images/a (5).jpg \n",
+ " inflating: datasets/images/a (50).jpg \n",
+ " inflating: datasets/images/a (51).jpg \n",
+ " inflating: datasets/images/a (52).jpg \n",
+ " inflating: datasets/images/a (53).jpg \n",
+ " inflating: datasets/images/a (54).jpg \n",
+ " inflating: datasets/images/a (55).jpg \n",
+ " inflating: datasets/images/a (56).jpg \n",
+ " inflating: datasets/images/a (57).jpg \n",
+ " inflating: datasets/images/a (58).jpg \n",
+ " inflating: datasets/images/a (59).jpg \n",
+ " inflating: datasets/images/a (6).jpg \n",
+ " inflating: datasets/images/a (60).jpg \n",
+ " inflating: datasets/images/a (61).jpg \n",
+ " inflating: datasets/images/a (62).jpg \n",
+ " inflating: datasets/images/a (63).jpg \n",
+ " inflating: datasets/images/a (64).jpg \n",
+ " inflating: datasets/images/a (65).jpg \n",
+ " inflating: datasets/images/a (66).jpg \n",
+ " inflating: datasets/images/a (67).jpg \n",
+ " inflating: datasets/images/a (68).jpg \n",
+ " inflating: datasets/images/a (69).jpg \n",
+ " inflating: datasets/images/a (7).jpg \n",
+ " inflating: datasets/images/a (70).jpg \n",
+ " inflating: datasets/images/a (71).jpg \n",
+ " inflating: datasets/images/a (72).jpg \n",
+ " inflating: datasets/images/a (73).jpg \n",
+ " inflating: datasets/images/a (74).jpg \n",
+ " inflating: datasets/images/a (75).jpg \n",
+ " inflating: datasets/images/a (76).jpg \n",
+ " inflating: datasets/images/a (77).jpg \n",
+ " inflating: datasets/images/a (78).jpg \n",
+ " inflating: datasets/images/a (79).jpg \n",
+ " inflating: datasets/images/a (8).jpg \n",
+ " inflating: datasets/images/a (80).jpg \n",
+ " inflating: datasets/images/a (81).jpg \n",
+ " inflating: datasets/images/a (82).jpg \n",
+ " inflating: datasets/images/a (83).jpg \n",
+ " inflating: datasets/images/a (84).jpg \n",
+ " inflating: datasets/images/a (85).jpg \n",
+ " inflating: datasets/images/a (86).jpg \n",
+ " inflating: datasets/images/a (87).jpg \n",
+ " inflating: datasets/images/a (88).jpg \n",
+ " inflating: datasets/images/a (89).jpg \n",
+ " inflating: datasets/images/a (9).jpg \n",
+ " inflating: datasets/images/a (90).jpg \n",
+ " inflating: datasets/images/a (91).jpg \n",
+ " inflating: datasets/images/a (92).jpg \n",
+ " inflating: datasets/images/a (93).jpg \n",
+ " inflating: datasets/images/a (94).jpg \n",
+ " inflating: datasets/images/a (95).jpg \n",
+ " inflating: datasets/images/a (96).jpg \n",
+ " inflating: datasets/images/a (97).jpg \n",
+ " inflating: datasets/images/a (98).jpg \n",
+ " inflating: datasets/images/a (99).jpg \n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# Define Directory\n",
+ "images_directory = \"/content/datasets/images\"\n",
+ "annotations_directory=\"/content/datasets/annotations\"\n",
+ "\n",
+ "img_paths = sorted([os.path.join(images_directory, fname) for fname in os.listdir(images_directory) if fname.endswith(\".jpg\")])\n",
+ "label_paths = sorted([os.path.join(annotations_directory, fname) for fname in os.listdir(annotations_directory) if fname.endswith(\".xml\")])\n",
+ "\n",
+ "k = len(img_paths)\n",
+ "\n",
+ "data_list = []\n",
+ "\n",
+ "for i in range(k):\n",
+ " annotation_file=label_paths[i]\n",
+ " ds = BeautifulSoup(open(annotation_file).read(), \"html.parser\")\n",
+ "\n",
+ " # Iterating over each object elements\n",
+ " for o in ds.find_all(\"object\"):\n",
+ "\n",
+ " x_min = max(0, int(float(o.find(\"xmin\").string)))\n",
+ " y_min = max(0, int(float(o.find(\"ymin\").string)))\n",
+ " x_max = min(int(ds.find(\"width\").string), int(float(o.find(\"xmax\").string)))\n",
+ " y_max = min(int(ds.find(\"height\").string), int(float(o.find(\"ymax\").string)))\n",
+ "\n",
+ " # in case the boundary goes above its limis, providing some restrictions.\n",
+ " if x_min >= x_max or y_min >= y_max:\n",
+ " continue\n",
+ " elif x_max <= x_min or y_max <= y_min:\n",
+ " continue\n",
+ "\n",
+ " sample = [str(img_paths[i]), x_min, y_min, x_max, y_max]\n",
+ "\n",
+ " data_list.append(sample)\n",
+ "\n",
+ "data = pd.DataFrame(data_list)"
+ ],
+ "metadata": {
+ "execution": {
+ "iopub.status.busy": "2021-08-07T05:06:17.508034Z",
+ "iopub.execute_input": "2021-08-07T05:06:17.50837Z",
+ "iopub.status.idle": "2021-08-07T05:06:18.390511Z",
+ "shell.execute_reply.started": "2021-08-07T05:06:17.508338Z",
+ "shell.execute_reply": "2021-08-07T05:06:18.389703Z"
+ },
+ "trusted": true,
+ "id": "lBNBbzYXJs88"
+ },
+ "execution_count": 3,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "# EDA"
+ ],
+ "metadata": {
+ "id": "Dd1IQdGsJs89"
+ }
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "data.head()"
+ ],
+ "metadata": {
+ "execution": {
+ "iopub.status.busy": "2021-08-07T05:06:56.257092Z",
+ "iopub.execute_input": "2021-08-07T05:06:56.257419Z",
+ "iopub.status.idle": "2021-08-07T05:06:56.276996Z",
+ "shell.execute_reply.started": "2021-08-07T05:06:56.25739Z",
+ "shell.execute_reply": "2021-08-07T05:06:56.275936Z"
+ },
+ "trusted": true,
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 206
+ },
+ "id": "f8J2O8sFJs8-",
+ "outputId": "469e0bf3-753f-4a39-92b4-5e9ccd9486a3"
+ },
+ "execution_count": 4,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ " 0 1 2 3 4\n",
+ "0 /content/datasets/images/a (1).jpg 38 54 179 173\n",
+ "1 /content/datasets/images/a (10).jpg 58 14 155 117\n",
+ "2 /content/datasets/images/a (100).jpg 86 18 182 125\n",
+ "3 /content/datasets/images/a (101).jpg 23 16 120 115\n",
+ "4 /content/datasets/images/a (102).jpg 33 30 166 173"
+ ],
+ "text/html": [
+ "\n",
+ "
\n",
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " 0 | \n",
+ " 1 | \n",
+ " 2 | \n",
+ " 3 | \n",
+ " 4 | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " /content/datasets/images/a (1).jpg | \n",
+ " 38 | \n",
+ " 54 | \n",
+ " 179 | \n",
+ " 173 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " /content/datasets/images/a (10).jpg | \n",
+ " 58 | \n",
+ " 14 | \n",
+ " 155 | \n",
+ " 117 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " /content/datasets/images/a (100).jpg | \n",
+ " 86 | \n",
+ " 18 | \n",
+ " 182 | \n",
+ " 125 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " /content/datasets/images/a (101).jpg | \n",
+ " 23 | \n",
+ " 16 | \n",
+ " 120 | \n",
+ " 115 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " /content/datasets/images/a (102).jpg | \n",
+ " 33 | \n",
+ " 30 | \n",
+ " 166 | \n",
+ " 173 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ "
\n"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "dataframe",
+ "variable_name": "data",
+ "summary": "{\n \"name\": \"data\",\n \"rows\": 112,\n \"fields\": [\n {\n \"column\": 0,\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 112,\n \"samples\": [\n \"/content/datasets/images/a (34).jpg\",\n \"/content/datasets/images/a (57).jpg\",\n \"/content/datasets/images/a (102).jpg\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 1,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 40,\n \"min\": 1,\n \"max\": 161,\n \"num_unique_values\": 70,\n \"samples\": [\n 24,\n 38,\n 95\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 2,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 48,\n \"min\": 1,\n \"max\": 177,\n \"num_unique_values\": 81,\n \"samples\": [\n 55,\n 54,\n 45\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 3,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 42,\n \"min\": 55,\n \"max\": 222,\n \"num_unique_values\": 77,\n \"samples\": [\n 166,\n 183,\n 178\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": 4,\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 38,\n \"min\": 100,\n \"max\": 224,\n \"num_unique_values\": 69,\n \"samples\": [\n 167,\n 173,\n 205\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
+ }
+ },
+ "metadata": {},
+ "execution_count": 4
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "img = plt.imread(data[0][0])\n",
+ "plt.imshow(img)\n",
+ "print('xmin', data[1][0], 'ymin',data[2][0],'xmax',data[3][0],'ymax',data[4][0])"
+ ],
+ "metadata": {
+ "execution": {
+ "iopub.status.busy": "2021-08-07T05:06:58.523352Z",
+ "iopub.execute_input": "2021-08-07T05:06:58.523693Z",
+ "iopub.status.idle": "2021-08-07T05:06:58.755975Z",
+ "shell.execute_reply.started": "2021-08-07T05:06:58.523659Z",
+ "shell.execute_reply": "2021-08-07T05:06:58.754887Z"
+ },
+ "trusted": true,
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 451
+ },
+ "id": "0hUl1AoqJs8-",
+ "outputId": "34e28b85-cab4-4dac-bc04-1ee390ce5878"
+ },
+ "execution_count": 5,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "xmin 38 ymin 54 xmax 179 ymax 173\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "