This repository contains the source code and demonstration of Improved Trainable Calibration Method for Neural Networks on Medical Imaging Classification (project page), which is accepted to BMVC2020.
In this work, we propose to use DCA as an auxiliary loss term for classification network calibration. DCA integrates network calibration into the classification training stage. Thus, no explicit training round for calibration is required.
We recommended the following dependencies.
- Python 3.7
- PyTorch 1.4
- demo_dca.ipynb shows a demonstartion of the proposed method using the AlexNet backbone and Mendeley V2.
- loss_fn.py defines the proposed classificaiton loss, i.e., cross-entropy loss + DCA auxiliary loss
- demo_uncalibrated.ipynb shows a demonstartion of the uncalibrated method using the AlexNet backbone and Mendeley V2.
If you find this paper or code helpful, please cite this paper:
@inproceedings{liang2020imporved,
title={Improved Trainable Calibration Method for Neural Networks on Medical Imaging Classification},
author={Liang, Gongbo and Zhang, Yu and Wang, Xiaoqin and Jacobs, Nathan},
booktitle={British Machine Vision Conference (BMVC)},
year={2020}
}
The code is provided for academic purposes only without any guarantees.
The Mendeley V2 dataset can be downloaded here.
Part of the code that is used in this repo. is based on temperature_scaling
For more detail of temperature scaling, pleae visit their project page