Skip to content

The code of paper Risk-Controlled Selective Prediction for Regression deep neural nwtwork models.

License

Notifications You must be signed in to change notification settings

Wenming-Jiang/Selective-regression-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selective-regression-model

The codes of paper "Risk-Controlled Selective Prediction for Regression Deep Neural Network Models". (We are still updating this code repository.)

Tropic Cyclone (TC) Intensity Estimation

Dataset of Tropical Cyclone for Image-to-intensity Regression (TCIR) 1 was put forward by Boyo Chen, BuoFu Chen and Hsuan-Tien Lin. Please browse web page TCIR for detail. Single image in the TCIR dataset has the size of 201 (height) * 201 (width) * 4 (channels). Four channels are Infrared, Water vapor, Visible and Passive microwave, respectively. We just use Infrared and Passive microwave channels.

File TCIntensityEstimation has all the file about tropic cyclone intensity estimation problem, including source code, "how to get data" and a trianed model weights file.

  • download source dataset (~13GB) and unzip
wget https://learner.csie.ntu.edu.tw/~boyochen/TCIR/TCIR-ALL_2017.h5.tar.gz
wget https://learner.csie.ntu.edu.tw/~boyochen/TCIR/TCIR-ATLN_EPAC_WPAC.h5.tar.gz
wget https://learner.csie.ntu.edu.tw/~boyochen/TCIR/TCIR-CPAC_IO_SH.h5.tar.gz

Unzip the compressed files and save the data into the dir Selective-regression-model/TCIntensityEstimation/data.

  • preprocessing
cd Selective-regression-model/TCIntensityEstimation/Src
python preprocess.py 

This step need more than 32GB computer memory.

  • running
python clean_rotated_Sel_PostNet.py

Trained model will be saved in dir Selective-regression-model/TCIntensityEstimation/result_model/. In result_model/, weightsV2-improvement-450.hdf5 is a trained model weight file.

Apparent Age Estimation

File ApparentAgeEstimation has all the file about apparent age estimation problem, including model .prototxt, mean file, "how to get data" and a trianed model weights file, validation dataset, test dataset and "how to download a trained model".

Apparent age estimation, which tries to estimate the age as perceived by other humans from a facial image, is different from the biological (real) age prediction. You could get more detail about dataset and model from ApparentAgeEstimation 2. The code of Apparent Age Estimation Model has a lot hard codes, which need to change depended on own enviroment.

  • download validation and test dataset (face only)
wget https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/static/wiki_crop.tar
  • download trained caffe model
wget https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/static/dex_chalearn_iccv2015.caffemodel
  • running (need Caffe installed)
cd Selective-regression-model/ApparentAgeEstimation/
python LAPClassification.py

###Draw Figures in the Paper The steps to rebuild the models and results in the paper is easy but fussy. The source dataset and neural network models need be downloaded, and the softwares TensorFlow and Caffe should be installed. So, we open the results (.npy files and .csv files in the dir ./DrawFigures/), including the following information.

Blend-Var or MC-dropout dy (y-f(x)) MSE or MAE the gap t (MSE or MAE) +t

If you want to draw the figures in the paper:

cd ./DrawFigures/AGE/
python draw_all_figures.py

The figures will be save into dir ./DrawFigures/AGE/Figure/.

If you still have some questions, welcome to contact me. My email address : [email protected].

Footnotes

  1. Boyo Chen, Buo-Fu Chen, and Hsuan-Tien Lin. Rotation-blended CNNs on a new open dataset for tropical cyclone image-to-intensity regression. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), August 2018.

  2. Rothe R, Timofte R, Van Gool L. Dex: Deep expectation of apparent age from a single image[C]//Proceedings of the IEEE international conference on computer vision workshops. 2015: 10-15.

About

The code of paper Risk-Controlled Selective Prediction for Regression deep neural nwtwork models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages