SS47816
The packages I used here are very simple:
- python >= 3.6
- scipy
- numpy
- sklearn
- opencv
- troch
- torchvision
- matplotlib
- pathlib
I am using conda
environment so you can directly install the environment from file:
conda create --name pr --file requirements.txt
or
pip install -r requirements.txt
All the training data are stored in data/
CNN model .pth
files are stored in model/
Resulted Figures are saved in pics/
TensorBoard logs are saved in runs/
Source codes are all stored in src/
cnn.py
: run this file to train and test the CNN modelsconventional.py
: run this file to test all the conventional methodscreate_dataset.py
: helper functions to split the train/test datasets (you probably won't need this)
To run the code:
# Aactivate the conda environment you just created
conda activate pr
# Run the first 4 algorithms
python3 src/conventional.py
# Run the CNN model (training and testing)
python3 src/cnn.py