Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Added Mike's CNN #2

Merged
merged 4 commits into from
May 16, 2023
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
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,30 @@ The dataset for this project is available on [Kaggle](https://kaggle.com/dataset
```bash
kaggle datasets download -d miketvo/rmit-flowers -p ./data/raw/ --unzip
```

The resulting folder structure should look like this:

```
.
├── data/
│ └── raw/
│ ├── Baby/
│ ├── Calimerio/
│ ├── Chrysanthemum/
│ ...
│ └── Tana/
...
```

where each folder corresponds to a flower class, and contains images of only that class.

4. Setup for training and testing: Run [notebooks/Step2.DataPrep.ipynb](./notebooks/Step2.DataPrep.ipynb). This will clean, process, and split the raw dataset and the resulting train and test set into `data/train` and `data/test`, respectively. Clean these folders before you run this notebook:

4. Setup for training and testing: Run [notebooks/Step2.DataPrep.ipynb](./notebooks/Step2.DataPrep.ipynb). This will clean, process, and split the raw dataset and the resulting train and test set into `data/train` and `data/test`, respectively.
```bash
rmdir -r ./data/train
rmdir -r ./data/test
```


### Training
Expand Down
Empty file added __init__.py
Empty file.
45 changes: 25 additions & 20 deletions notebooks/Step1.EDA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,20 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:12:42.315314Z",
"end_time": "2023-05-15T16:12:47.676422Z"
"start_time": "2023-05-16T08:57:32.564355Z",
"end_time": "2023-05-16T08:57:36.462433Z"
},
"collapsed": true
},
"outputs": [],
"source": [
"# Imports and environmental setups\n",
"\n",
"import os, sys\n",
"module_path = os.path.abspath(os.path.join('..'))\n",
"if module_path not in sys.path:\n",
" sys.path.append(module_path)\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import imagehash\n",
"from PIL import Image\n",
Expand Down Expand Up @@ -77,8 +82,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:12:47.679430Z",
"end_time": "2023-05-15T16:12:54.248862Z"
"start_time": "2023-05-16T08:57:36.463440Z",
"end_time": "2023-05-16T08:57:50.591626Z"
}
},
"outputs": [],
Expand All @@ -91,8 +96,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:12:54.250824Z",
"end_time": "2023-05-15T16:12:54.271386Z"
"start_time": "2023-05-16T08:57:50.142564Z",
"end_time": "2023-05-16T08:57:50.614168Z"
}
},
"outputs": [
Expand All @@ -115,8 +120,8 @@
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:12:54.278899Z",
"end_time": "2023-05-15T16:12:54.330768Z"
"start_time": "2023-05-16T08:57:50.165140Z",
"end_time": "2023-05-16T08:57:50.615134Z"
}
},
"outputs": [
Expand Down Expand Up @@ -153,8 +158,8 @@
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:12:54.292194Z",
"end_time": "2023-05-15T16:12:54.346768Z"
"start_time": "2023-05-16T08:57:50.182911Z",
"end_time": "2023-05-16T08:57:50.616137Z"
}
},
"outputs": [
Expand All @@ -177,8 +182,8 @@
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:12:54.307740Z",
"end_time": "2023-05-15T16:12:56.562332Z"
"start_time": "2023-05-16T08:57:50.200500Z",
"end_time": "2023-05-16T08:57:53.043052Z"
}
},
"outputs": [
Expand Down Expand Up @@ -209,8 +214,8 @@
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:12:56.564332Z",
"end_time": "2023-05-15T16:15:12.929143Z"
"start_time": "2023-05-16T08:57:53.026518Z",
"end_time": "2023-05-16T09:00:09.800820Z"
}
},
"outputs": [
Expand Down Expand Up @@ -243,8 +248,8 @@
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:15:12.934284Z",
"end_time": "2023-05-15T16:15:12.937146Z"
"start_time": "2023-05-16T09:00:05.015957Z",
"end_time": "2023-05-16T09:00:09.809824Z"
}
},
"outputs": [
Expand Down Expand Up @@ -274,8 +279,8 @@
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:15:12.938281Z",
"end_time": "2023-05-15T16:15:13.427646Z"
"start_time": "2023-05-16T09:00:05.026098Z",
"end_time": "2023-05-16T09:00:09.813824Z"
}
},
"outputs": [
Expand Down Expand Up @@ -341,8 +346,8 @@
"execution_count": 10,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T16:15:13.436801Z",
"end_time": "2023-05-15T16:15:14.852289Z"
"start_time": "2023-05-16T09:00:05.612104Z",
"end_time": "2023-05-16T09:00:09.815852Z"
}
},
"outputs": [
Expand Down
89 changes: 47 additions & 42 deletions notebooks/Step2.DataPrep.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@
"metadata": {
"collapsed": true,
"ExecuteTime": {
"start_time": "2023-05-15T20:01:38.011764Z",
"end_time": "2023-05-15T20:01:41.500005Z"
"start_time": "2023-05-16T09:07:37.558518Z",
"end_time": "2023-05-16T09:07:42.059832Z"
}
},
"outputs": [],
"source": [
"# Imports and environmental setups\n",
"\n",
"import os, sys\n",
"module_path = os.path.abspath(os.path.join('..'))\n",
"if module_path not in sys.path:\n",
" sys.path.append(module_path)\n",
"\n",
"import os\n",
"import math\n",
"import random\n",
Expand Down Expand Up @@ -71,8 +76,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:01:41.503008Z",
"end_time": "2023-05-15T20:01:50.713879Z"
"start_time": "2023-05-16T09:07:42.059657Z",
"end_time": "2023-05-16T09:07:47.771259Z"
}
},
"outputs": [
Expand Down Expand Up @@ -110,8 +115,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:01:50.718887Z",
"end_time": "2023-05-15T20:01:51.869830Z"
"start_time": "2023-05-16T09:07:47.775951Z",
"end_time": "2023-05-16T09:07:49.004796Z"
}
},
"outputs": [
Expand Down Expand Up @@ -143,8 +148,8 @@
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:01:51.870833Z",
"end_time": "2023-05-15T20:01:53.243574Z"
"start_time": "2023-05-16T09:07:49.004796Z",
"end_time": "2023-05-16T09:07:50.463134Z"
}
},
"outputs": [
Expand Down Expand Up @@ -182,8 +187,8 @@
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:01:53.262084Z",
"end_time": "2023-05-15T20:04:05.622035Z"
"start_time": "2023-05-16T09:07:50.463134Z",
"end_time": "2023-05-16T09:09:57.888942Z"
}
},
"outputs": [
Expand Down Expand Up @@ -233,8 +238,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:04:05.624062Z",
"end_time": "2023-05-15T20:04:05.626505Z"
"start_time": "2023-05-16T09:09:57.891432Z",
"end_time": "2023-05-16T09:09:57.893942Z"
}
}
},
Expand Down Expand Up @@ -303,8 +308,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:04:05.631042Z",
"end_time": "2023-05-15T20:04:05.634583Z"
"start_time": "2023-05-16T09:09:57.896943Z",
"end_time": "2023-05-16T09:09:57.901597Z"
}
}
},
Expand All @@ -323,8 +328,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:04:05.634583Z",
"end_time": "2023-05-15T20:04:05.639894Z"
"start_time": "2023-05-16T09:09:57.902601Z",
"end_time": "2023-05-16T09:09:57.905574Z"
}
}
},
Expand All @@ -333,8 +338,8 @@
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:04:05.641904Z",
"end_time": "2023-05-15T20:04:05.644500Z"
"start_time": "2023-05-16T09:09:57.906574Z",
"end_time": "2023-05-16T09:09:57.911703Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -369,8 +374,8 @@
"execution_count": 10,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:04:05.647272Z",
"end_time": "2023-05-15T20:04:05.648785Z"
"start_time": "2023-05-16T09:09:57.913706Z",
"end_time": "2023-05-16T09:09:57.934352Z"
}
},
"outputs": [],
Expand All @@ -386,8 +391,8 @@
"execution_count": 11,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:04:05.649786Z",
"end_time": "2023-05-15T20:08:47.187564Z"
"start_time": "2023-05-16T09:09:57.922224Z",
"end_time": "2023-05-16T09:14:50.143073Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -454,8 +459,8 @@
"execution_count": 12,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:08:47.189585Z",
"end_time": "2023-05-15T20:08:51.325528Z"
"start_time": "2023-05-16T09:14:50.145077Z",
"end_time": "2023-05-16T09:14:53.724661Z"
}
},
"outputs": [],
Expand Down Expand Up @@ -483,8 +488,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:08:51.327926Z",
"end_time": "2023-05-15T20:08:51.344232Z"
"start_time": "2023-05-16T09:14:53.726623Z",
"end_time": "2023-05-16T09:14:53.742203Z"
}
}
},
Expand Down Expand Up @@ -522,8 +527,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:08:51.347303Z",
"end_time": "2023-05-15T20:08:51.479939Z"
"start_time": "2023-05-16T09:14:53.743203Z",
"end_time": "2023-05-16T09:14:53.764775Z"
}
}
},
Expand All @@ -532,8 +537,8 @@
"execution_count": 15,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:08:51.365860Z",
"end_time": "2023-05-15T20:08:52.402087Z"
"start_time": "2023-05-16T09:14:53.756263Z",
"end_time": "2023-05-16T09:14:54.930214Z"
}
},
"outputs": [
Expand Down Expand Up @@ -567,8 +572,8 @@
"execution_count": 16,
"metadata": {
"ExecuteTime": {
"start_time": "2023-05-15T20:08:52.403087Z",
"end_time": "2023-05-15T20:08:53.928109Z"
"start_time": "2023-05-16T09:14:54.932234Z",
"end_time": "2023-05-16T09:14:56.505385Z"
}
},
"outputs": [
Expand Down Expand Up @@ -604,8 +609,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:08:53.931083Z",
"end_time": "2023-05-15T20:08:55.177293Z"
"start_time": "2023-05-16T09:14:56.507901Z",
"end_time": "2023-05-16T09:14:57.384980Z"
}
}
},
Expand All @@ -629,8 +634,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:08:55.178300Z",
"end_time": "2023-05-15T20:08:55.191193Z"
"start_time": "2023-05-16T09:14:57.385979Z",
"end_time": "2023-05-16T09:14:57.397438Z"
}
}
},
Expand Down Expand Up @@ -668,8 +673,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:08:55.192189Z",
"end_time": "2023-05-15T20:08:55.200704Z"
"start_time": "2023-05-16T09:14:57.399455Z",
"end_time": "2023-05-16T09:14:57.407205Z"
}
}
},
Expand Down Expand Up @@ -704,8 +709,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:08:55.203704Z",
"end_time": "2023-05-15T20:08:56.282535Z"
"start_time": "2023-05-16T09:14:57.409318Z",
"end_time": "2023-05-16T09:14:58.545223Z"
}
}
},
Expand All @@ -728,8 +733,8 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-05-15T20:08:56.193811Z",
"end_time": "2023-05-15T20:08:58.126638Z"
"start_time": "2023-05-16T09:14:58.509183Z",
"end_time": "2023-05-16T09:15:00.016606Z"
}
}
},
Expand Down
Loading