aurooj / Hand-Segmentation-in-the-Wild

MIT License
194 stars 38 forks source link

How to train on my own datasets? #3

Closed happsky closed 6 years ago

happsky commented 6 years ago

How to train on my own datasets?

aurooj commented 6 years ago

@happsky : Sorry for being late in responding to your query. If you want to train it on your own dataset, you can follow the standard training procedure mentioned at the github repo of RefineNet You will need to create files gen_classs_info_<dataset-name>.m and my_gen_ds_info_<dataset-name>.m with information about your dataset and train, val, test splits. If your dataset also has 2 classes: hand and background, then you can use the same files from folder refinenet_files in this repo.

I hope it helps. Let me know if you have any more queries.

aurooj commented 6 years ago

To be more clear, this is what you need to do:

ds_info.class_info=gen_class_info_voc();

where the class information is specified in the function gen_class_info_voc(), and you need to follow this to write your own function.

In the file gen_network_main.m to skip this initialization, You will find this line in the file:

loss_group_info=gen_network_loss_group(train_opts, net_config, group_output_info);

add the following lines after the above line to stop the initiation of the classification layer:



% if you want to increase the learning rate for the last classification layer, uncomment this line:

% loss_group_info.net_info.ref.lr_multiplier=10;```