used data : https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia
test samples:
- dependencies: matplotlib, torch, torchvision, sklearn, seaborn, numpy, imgaug, PIL, cv2
- download the code and create a project.
- download data to "./data/train" , "./data/val" , "./data/test"
- label your data like "./data/train/class1", "./data/train/class2..."....
- run 'train.py'
- you can edit the parameters in 'parameters.py'
- mode
- 'new': create an archive on a new branch.
- 'overlay': training continues in the target existing branch.
- 'load': training continues on a new branch.
- netend
- Variable defining terminal linear classifier for transfer-learning (you can disable)
- See networks/nets.py
- network
- Variable defining pre-trained Network
- loss_f, optimizer
- load_branch, load_num: if you use 'overlay' or 'load' mode.
- transform_set
- model_name
- params: parameters used in training and validation
- test_params: parameters used in test
- user_setting, permission
- branch_num, epoch_num: same in load_branch and load_num in 'train.py'
- netend, model: same in netend and network in 'train.py'
code for model ensemble. you have to pay attention to the order and fill the lists: <'model_list', 'branch_nums', 'epoch_nums', 'models'>
- model_list: names of the model in the weight files
- branch_nums: branch address of target weight file
- epoch_num: epoch number of target weight file
- models: model definition list
- transform_set