def main(): config = {} config['imageset'] = 'test' config['cmap']= './voc_gt_cmap.mat' config['gpuNum'] = 0 config['Path.CNN.caffe_root'] = './caffe' config['save_root'] = './results' # cache FCN-8s results config['write_file'] = 1 # used to be 1 config['Path.CNN.script_path'] = './FCN' config['Path.CNN.model_data'] = path_join(config['Path.CNN.script_path'], 'fcn-8s-pascal.caffemodel') config['Path.CNN.model_proto'] = path_join(config['Path.CNN.script_path'], 'fcn-8s-pascal-deploy.prototxt') config['im_sz'] = 500 #cache_FCN8s_results(config, VOCopts) # generate EDeconvNet+CRF results config['write_file'] = 1 config['edgebox_cache_dir'] = './data/edgebox_cached/VOC2012_TEST' config['Path.CNN.script_path'] = './DeconvNet' config['Path.CNN.model_data'] = path_join(config['Path.CNN.script_path'], 'DeconvNet_trainval_inference.caffemodel') config['Path.CNN.model_proto'] = path_join(config['Path.CNN.script_path'], 'DeconvNet_inference_deploy_modified.prototxt') config['max_proposal_num'] = 50 config['im_sz'] = 224 config['fcn_score_dir'] = './results/FCN8s' generate_EDeconvNet_CRF_results(config, VOCopts)
def main(): config = {} config['imageset'] = 'test' config['cmap'] = './voc_gt_cmap.mat' config['gpuNum'] = 0 config['Path.CNN.caffe_root'] = './caffe' config['save_root'] = './results' # cache FCN-8s results config['write_file'] = 1 # used to be 1 config['Path.CNN.script_path'] = './FCN' config['Path.CNN.model_data'] = path_join(config['Path.CNN.script_path'], 'fcn-8s-pascal.caffemodel') config['Path.CNN.model_proto'] = path_join( config['Path.CNN.script_path'], 'fcn-8s-pascal-deploy.prototxt') config['im_sz'] = 500 #cache_FCN8s_results(config, VOCopts) # generate EDeconvNet+CRF results config['write_file'] = 1 config['edgebox_cache_dir'] = './data/edgebox_cached/VOC2012_TEST' config['Path.CNN.script_path'] = './DeconvNet' config['Path.CNN.model_data'] = path_join( config['Path.CNN.script_path'], 'DeconvNet_trainval_inference.caffemodel') config['Path.CNN.model_proto'] = path_join( config['Path.CNN.script_path'], 'DeconvNet_inference_deploy_modified.prototxt') config['max_proposal_num'] = 50 config['im_sz'] = 224 config['fcn_score_dir'] = './results/FCN8s' generate_EDeconvNet_CRF_results(config, VOCopts)
def main(): # 'Full', '25', '10', '5' annotations = 'Full' config = {} config['imageset'] = 'test' config['cmap']= './voc_gt_cmap.mat' config['gpuNum'] = 0 config['Path.CNN.caffe_root'] = './caffe' config['save_root'] = './results' ## configuration config['write_file'] = 1 config['thres'] = 0.5 config['im_sz'] = 320 config['num_classes'] = 20 if annotations == 'Full': ## DecoupledNet Full annotations config['model_name'] = 'DecoupledNet_Full_anno'; config['Path.CNN.script_path'] = './DecoupledNet_Full_anno'; config['Path.CNN.model_data'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_Full_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_Full_anno_inference_deploy.prototxt') elif annotations == '25': ## DecoupledNet 25 annotations config['model_name'] = 'DecoupledNet_25_anno' config['Path.CNN.script_path'] = './DecoupledNet_25_anno' config['Path.CNN.model_data'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_25_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_25_anno_inference_deploy.prototxt') elif annotations == '10': ## DecoupledNet 10 annotations config['model_name'] = 'DecoupledNet_10_anno' config['Path.CNN.script_path'] = './DecoupledNet_10_anno' config['Path.CNN.model_data'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_10_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_10_anno_inference_deploy.prototxt') elif annotations == '5': ## DecoupledNet 5 annotations config['model_name'] = 'DecoupledNet_5_anno' config['Path.CNN.script_path'] = './DecoupledNet_5_anno' config['Path.CNN.model_data'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_5_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join(config['Path.CNN.script_path'], 'DecoupledNet_5_anno_inference_deploy.prototxt') else: print "You have to specify the number of employed annotations." exit() DecoupledNet_inference(config)
def main(): # 'Full', '25', '10', '5' annotations = 'Full' config = {} config['imageset'] = 'test' config['cmap'] = './voc_gt_cmap.mat' config['gpuNum'] = 0 config['Path.CNN.caffe_root'] = './caffe' config['save_root'] = './results' ## configuration config['write_file'] = 1 config['thres'] = 0.5 config['im_sz'] = 320 config['num_classes'] = 20 if annotations == 'Full': ## DecoupledNet Full annotations config['model_name'] = 'DecoupledNet_Full_anno' config['Path.CNN.script_path'] = './DecoupledNet_Full_anno' config['Path.CNN.model_data'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_Full_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_Full_anno_inference_deploy.prototxt') elif annotations == '25': ## DecoupledNet 25 annotations config['model_name'] = 'DecoupledNet_25_anno' config['Path.CNN.script_path'] = './DecoupledNet_25_anno' config['Path.CNN.model_data'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_25_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_25_anno_inference_deploy.prototxt') elif annotations == '10': ## DecoupledNet 10 annotations config['model_name'] = 'DecoupledNet_10_anno' config['Path.CNN.script_path'] = './DecoupledNet_10_anno' config['Path.CNN.model_data'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_10_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_10_anno_inference_deploy.prototxt') elif annotations == '5': ## DecoupledNet 5 annotations config['model_name'] = 'DecoupledNet_5_anno' config['Path.CNN.script_path'] = './DecoupledNet_5_anno' config['Path.CNN.model_data'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_5_anno_inference.caffemodel') config['Path.CNN.model_proto'] = path_join( config['Path.CNN.script_path'], 'DecoupledNet_5_anno_inference_deploy.prototxt') else: print "You have to specify the number of employed annotations." exit() DecoupledNet_inference(config)