- Clone the repository and navigate to the downloaded folder.
git clone git@github.com:crawlik/whale-id.git
cd whale-id
- Create and activate a new environment.
conda create -y -n whale-id python=3.6
source activate whale-id
pip install -r requirements.txt
# If running on GPU
pip install -r requirements-gpu.txt
# Optional: install optimized TF from https://github.com/lakshayg/tensorflow-build
# 2.9 GHz Intel Core i7, OSX Sierra
pip install --ignore-installed --upgrade "https://github.com/lakshayg/tensorflow-build/raw/master/tensorflow-1.8.0-cp36-cp36m-macosx_10_7_x86_64.whl"
- Download the data
You may need to install Kaggle API key.
kaggle competitions download -c whale-categorization-playground --wp
unzip train.zip
unzip test.zip
- Create an IPython kernel for the
whale-id
environment.
python -m ipykernel install --user --name whale-id --display-name "whale-id"
- Open training notebook.
jupyter notebook whale-id-all.ipynb
Running notebook remotely on a headless server.
jupyter notebook --ip=0.0.0.0 --no-browser whale-id-all.ipynb
Training logs to tensordboard and data can be viewed by
tensorboard --logdir=./logs/
-
Before running code, change the kernel to match the
whale-id
environment by using the drop-down menu (Kernel > Change kernel > whale-id). Then, follow the instructions in the notebook. -
Open classification notebook
jupyter notebook classify.ipynb
- Generate report
jupyter notebook report.ipynb
- Run attention and CNN visualization
jupyter notebook attention.ipynb
jupyter notebook keras-vis.ipynb
pip install -r requirements.txt