Refactored version of https://github.com/M-Nauta/ProtoTree and parts of https://github.com/cfchen-duke/ProtoPNet to make them more modular and easier to use. This will probably be turned into a Python package and moved to a new repository.
requirements.txt
(e.g. pip install -r requirements.txt
).dot
from the terminal.pip install -e .
python src/run_model.py --model_type protopnet
(or --model_type prototree
).
NOTE:
src/util/args.py
has a list of all args that can be used to configure the run.
datasources/requirements-download.txt
.python datasources/cub_download.py
.python datasources/cub_preprocess.py
.BBN.iNaturalist2017.res50.180epoch.best_model.pth
) and place it in the folder src/features/state_dicts
.Currently, all these steps are only done manually on a development machine. We should set up a pipeline that does these things automatically and reproducibly.
requirements-dev.txt
.black src tests
.MYPYPATH=src mypy src tests --explicit-package-bases --check-untyped-defs
. Note that it will be helpful to run mypy --install-types
beforehand.pytest
.