{ "cells": [ { "cell_type": "markdown", "id": "9b10cf68", "metadata": { "papermill": { "duration": 0.009368, "end_time": "2023-09-03T09:54:26.123203", "exception": false, "start_time": "2023-09-03T09:54:26.113835", "status": "completed" }, "tags": [] }, "source": [ "# Import Libraries and Load Data" ] }, { "cell_type": "code", "execution_count": 1, "id": "82a4c58c", "metadata": { "execution": { "iopub.execute_input": "2023-09-03T09:54:26.143814Z", "iopub.status.busy": "2023-09-03T09:54:26.143453Z", "iopub.status.idle": "2023-09-03T09:54:38.437851Z", "shell.execute_reply": "2023-09-03T09:54:38.436857Z" }, "papermill": { "duration": 12.307795, "end_time": "2023-09-03T09:54:38.440372", "exception": false, "start_time": "2023-09-03T09:54:26.132577", "status": "completed" }, "tags": [] }, "outputs": [], "source": [ "## Remove Warnings ## \n", "import warnings\n", "warnings.filterwarnings(\"ignore\")\n", "\n", "## Data ## \n", "import numpy as np\n", "import pandas as pd \n", "import os \n", "\n", "## Visualization ## \n", "import matplotlib.pyplot as plt \n", "import plotly.express as px\n", "import seaborn as sns\n", "import plotly.graph_objects as go \n", "\n", "## Image ## \n", "import cv2\n", "from tensorflow.keras.preprocessing.image import ImageDataGenerator \n", "\n", "## Tensorflow ## \n", "from tensorflow.keras.models import Sequential, Model\n", "from tensorflow.keras.layers import Input, Dense , Conv2D , Dropout , Flatten , Activation, MaxPooling2D , GlobalAveragePooling2D\n", "from tensorflow.keras.optimizers import Adam , RMSprop \n", "from tensorflow.keras.layers import BatchNormalization\n", "from tensorflow.keras.callbacks import ReduceLROnPlateau , EarlyStopping , ModelCheckpoint , LearningRateScheduler\n", "from tensorflow.keras.applications import ResNet50V2" ] }, { "cell_type": "code", "execution_count": 2, "id": "1906bacd", "metadata": { "execution": { "iopub.execute_input": "2023-09-03T09:54:38.462010Z", "iopub.status.busy": "2023-09-03T09:54:38.461382Z", "iopub.status.idle": "2023-09-03T09:54:38.530886Z", "shell.execute_reply": "2023-09-03T09:54:38.529893Z" }, "papermill": { "duration": 0.082889, "end_time": "2023-09-03T09:54:38.533290", "exception": false, "start_time": "2023-09-03T09:54:38.450401", "status": "completed" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", " | class id | \n", "filepaths | \n", "labels | \n", "data set | \n", "
---|---|---|---|---|
0 | \n", "0 | \n", "C:/Users/kamel/Documents/Image Classification/... | \n", "ADONIS | \n", "train | \n", "
1 | \n", "0 | \n", "C:/Users/kamel/Documents/Image Classification/... | \n", "ADONIS | \n", "train | \n", "
2 | \n", "0 | \n", "C:/Users/kamel/Documents/Image Classification/... | \n", "ADONIS | \n", "train | \n", "
3 | \n", "0 | \n", "C:/Users/kamel/Documents/Image Classification/... | \n", "ADONIS | \n", "train | \n", "
4 | \n", "0 | \n", "C:/Users/kamel/Documents/Image Classification/... | \n", "ADONIS | \n", "train | \n", "