Main script to train models given groundtruth and filelist