This repo contains the code to run experiments with Deep Learning using the Cumulative Link Models and the Quadratic Weighted Kappa loss for the Diabetic Retinopathy, Adience and FGNet datasets. The CLM implementation includes three different link functions used in this work and listed below:
This repo basically requires:
To install the requirements, use:
Install for CPU
pip install -r requirements.txt
Install for GPU
pip install -r requirements_gpu.txt
Contributions are welcome. Pull requests are encouraged to be formatted according to PEP8, e.g., using yapf.
You can run all the experiments by running:
python main_experiment.py experiment -f ../exp/all_experiments.json
Note that the Retinopathy dataset must be stored under ../datasets/retinopathy/data128
and the Adience dataset under ../datasets/adience/data256
. This path can be changed by settings the enviroment variable DATASETS_DIR in the execution line:
DATASETS_DIR=whatever python main_experiment.py experiment -f ../exp/all_experiments.json
The .json
files contain all the details about the experiments settings.
After running the experiments, you can use tools.py
to watch the results:
python tools.py
The paper titled "Cumulative link models for deep ordinal classification" has been published in Neurocomputing. If you use this code, please cite the following paper:
@article{vargas2020cumulative,
title={Cumulative link models for deep ordinal classification},
author={Vargas, V{\'\i}ctor Manuel and Guti{\'e}rrez, Pedro Antonio and Herv{\'a}s-Mart{\'\i}nez, C{\'e}sar},
journal={Neurocomputing},
year={2020},
publisher={Elsevier},
doi={10.1016/j.neucom.2020.03.034}
}