There are two ways to run the notebooks in this folder:
- Preferred:
- Unzip in this folder and upload it onto Google Drive
- Download data according to the section Download data below and put it in the same folder as the code
- Run the code. Authorization to access Google Drive is required when mounting.
- Alternative:
- Download and unzip in this folder
- Create a conda environment according to
environment.yml
- Download data according to the section Download data below and put it in the same folder as the code
- Remove all Google Drive mount code cells
- Adjust all the paths to the path where data is stored, e.g:
data_dir = pathlib.Path('/content/gdrive/MyDrive/CS4243/data')
- Run the code
This folder consists of 4 notebooks:
project-resnet.ipynb
: Data preprocessing and transfer learning/finetuning ofResNet50V2
.project-inception.ipynb
: Transfer learning ofInception V3
(data pipeline is cut-and-paste fromproject-resnet.ipynb
)project-simplecnn.ipynb
: Train a simple 3-layer CNN using same data pipeline asproject-resnet.ipynb
visualization.ipynb
: Visualize and inspect model deficiencies.
Trained models are available from https://drive.google.com/drive/folders/1lKvco8M4nsq1ChyirGbFB1TBdHyhjUHt?usp=sharing
Data can be downloaded from https://drive.google.com/drive/folders/1n7yLSLjhXeUHMOcfPb2Nq57xVh3RjgiZ?usp=sharing
Input images are stored in the data
subdirectory, classfied into normal
, threat
and carrying
to utilize Tensorflow in-built preprocessing capability.