This is official implimentation of the paper Deep-CNN based Multi-task Learning for Open-Set Recognition
- Install pytorch
- Install Matlab
- Clone this repository
git clone https://github.com/otkupjnoz/mlosr.git
- You can download the ood sets in mat format from here,
- For open-set experiments convert your datasets in matfiles (or modify the code to create your own dataloader.)
- Make sure while saving in matlab you use '-v7.3'.
- Create train, test and validation and save it by name train_label.mat, train_data.mat, test_label.mat, test_data.mat, validation_data.mat, validation_label.mat etc.
- Save all the datasets in the dataset/ folder
- set up your data as described above
- The code is running OOD experiments of the paper which uses pytorch dataloader
- make sure you have your dataset mat files in datasets/data_set_name/
make sure to add parameter.py file in master/parameters/data_set_name/
make sure to add create following folders :
save_folder/models/data_set_name/mlosr save_folder/models/data_set_name/checkpoint save_folder/results/data_set_name/encoded_images
- Use following command to run the code (make changes in the parameter file to run the code for different experiment)
sh run_train.sh
- Use following command
sh run_test.sh
- open Matlab
- run getResultsMLOSR.m file which will calculate and display the F-measure