The repository contains pre-processed images, pre-trained models and code for visualizing deep neural decisoin forest:
- The classification models for MNIST and CIFAR-10 are released.
- Pre-processed CACD dataset is released.
- A model trained for CACD dataset is released, which achieved state-of-the-art accuracy and comsumes less memory.
Finally, this repository is version 1.0 with more comments to write.
Note how the irrelevant texture (e.g. hair) is ignored by the model during the decision making process.
| Model | Error | Memory Usage | FLOPs |
|---|---|---|---|
| DRFs (CVPR 2018) | 4.637 | 539.4MB | 16G |
| RNDF (Ours) | 4.595 | 112.4MB | 4G |
- Python 3.6 (not tested for other versions)
- PyTorch 1.0
- CUDA (Yet using CPU is possible if you want to modify the code)
You can download the pre-trained models at https://drive.google.com/drive/folders/1DM6wVSknkYBqGf1UwHQgJNUp40sYDMrv?usp=sharing and place them in the "pre-trained" folder.
After downloading the pre-trained models, go to /src and simply run
python ndf_vis.py for CIFAR-10.
For MNIST, run
python ndf_vis.py -dataset 'mnist'To visualize NDF for CACD dataset:
- Download the pre-processed images at https://drive.google.com/file/d/1OBu62cpnaMl5EX8EsjfEenRVv9rk3trt/view?usp=sharing and decompress it into the "/src/data" folder.
- Download metadata folder at https://drive.google.com/drive/folders/1s_Ml82O4FVkC34PCE4ttrYhta3EKeYdo?usp=sharing and place it under the "/src/data" folder.
- Go to /src/age_estimation and run
python ndf_vis.py Sorry about the hard-coded paths and few comments. Please refer to the similar classification code for detailed comments for now. Future updates will introduce more comments.
To train a deep neural decision forest for CIFAR-10, use
python main.pyFor MNIST, run
python main.py -dataset 'mnist' -epochs 50To train RNDF for CACD dataset: follow the same step 1 and 2 as in visualization for data preparation. Finally, go to /src/age_estimation and run
python main.py -train TrueTo test a pre-trained model for CACD, go to /src/age_estimation and run
python main.py -evaluate True -test_model_path "Your Path"The released model should give a MAE of 4.59
MIT
Please consider citing the related papers in your publications if they help your research:
@InProceedings{Li_2019_CVPR_Workshops,
author = {Li, Shichao and Cheng, Kwang-Ting},
title = {Visualizing the Decision-making Process in Deep Neural Decision Forest},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2019}
}
@article{li2019facial,
title={Facial age estimation by deep residual decision making},
author={Li, Shichao and Cheng, Kwang-Ting},
journal={arXiv preprint arXiv:1908.10737},
year={2019}
}
@inproceedings{kontschieder2015deep,
title={Deep neural decision forests},
author={Kontschieder, Peter and Fiterau, Madalina and Criminisi, Antonio and Rota Bulo, Samuel},
booktitle={Proceedings of the IEEE international conference on computer vision},
pages={1467--1475},
year={2015}
}
Links to the papers:


