nn/basicNetwork.py
def evaluate(self, file_list, input_size, tile_size, batch_size, img_mean,
                 model_dir, gpu=None, save_result_parent_dir=None, name='nn_estimator_segment',
                 verb=True, ds_name='default', load_epoch_num=None, best_model=False,
                 truth_val=1, force_run=False, score_results=True, split_char='_', **kwargs):
        """
        Evaluate model on given validation set
        :param file_list: evaluation file list
        :param input_size: dimension of the input to the network
        :param tile_size: dimension of the single evaluation file
        :param batch_size: batch size
        :param img_mean: mean of each channel
        :param model_dir: path to the pretrained model
        :param gpu: which gpu to run the model, default to use all the gpus available
        :param save_result_parent_dir: parent directory to where the result will be stored
        :param name: name of the process
        :param verb: if True, print out message when evaluating
        :param ds_name: name of the dataset
        :param load_epoch_num: which epoch's ckpt to load
        :param best_model: if True, load the model with best performance on the validation set
        :param truth_val: value of H1 pixel in gt
        :param force_run: if True, run the evaluation even if results already exist
        :param kwargs: other parameters
        :param score_result: if False, no gt used to score results
        :param split_char: character used to split file name
        :return: tile based iou, field based iou and overall iou
        """
        estimator = nn_processor.NNEstimatorSegment(
            self, file_list, input_size, tile_size, batch_size, img_mean, model_dir, ds_name, save_result_parent_dir,
            name=name, gpu=gpu, verb=verb, load_epoch_num=load_epoch_num, best_model=best_model, truth_val=truth_val,
            score_results=score_results, split_char=split_char, **kwargs)
        if score_results:
            tile_dict, field_dict, overall = estimator.run(force_run=force_run).load_results()
            return tile_dict, field_dict, overall
        else:
            estimator.run(force_run=force_run)
            return estimator.score_save_dir

        Evaluate model on given validation set
        :param file_list: evaluation file list
        :param input_size: dimension of the input to the network
        :param tile_size: dimension of the single evaluation file
        :param batch_size: batch size
        :param img_mean: mean of each channel
        :param model_dir: path to the pretrained model
        :param gpu: which gpu to run the model, default to use all the gpus available
        :param save_result_parent_dir: parent directory to where the result will be stored
        :param name: name of the process
        :param verb: if True, print out message when evaluating
        :param ds_name: name of the dataset
        :param load_epoch_num: which epoch's ckpt to load
        :param best_model: if True, load the model with best performance on the validation set
        :param truth_val: value of H1 pixel in gt
        :param force_run: if True, run the evaluation even if results already exist
        :param kwargs: other parameters
        :param score_result: if False, no gt used to score results
        :param split_char: character used to split file name
        :return: tile based iou, field based iou and overall iou
        
Evaluate model on given validation set
Evaluate model on given validation set
def evaluate(self, file_list, input_size, tile_size, batch_size, img_mean,
                 model_dir, gpu=None, save_result_parent_dir=None, name='nn_estimator_segment',
                 verb=True, ds_name='default', load_epoch_num=None, best_model=False,
                 truth_val=1, force_run=False, score_results=True, split_char='_', **kwargs):
        estimator = nn_processor.NNEstimatorSegment(
            self, file_list, input_size, tile_size, batch_size, img_mean, model_dir, ds_name, save_result_parent_dir,
            name=name, gpu=gpu, verb=verb, load_epoch_num=load_epoch_num, best_model=best_model, truth_val=truth_val,
            score_results=score_results, split_char=split_char, **kwargs)
        if score_results:
            tile_dict, field_dict, overall = estimator.run(force_run=force_run).load_results()
            return tile_dict, field_dict, overall
        else:
            estimator.run(force_run=force_run)
            return estimator.score_save_dir
def evaluate ( self , file_list , input_size , tile_size , batch_size , img_mean , model_dir , gpu = None , save_result_parent_dir = None , name = 'nn_estimator_segment' , verb = True , ds_name = 'default' , load_epoch_num = None , best_model = False , truth_val = 1 , force_run = False , score_results = True , split_char = '_' , ** kwargs ) : estimator = nn_processor . NNEstimatorSegment ( self , file_list , input_size , tile_size , batch_size , img_mean , model_dir , ds_name , save_result_parent_dir , name = name , gpu = gpu , verb = verb , load_epoch_num = load_epoch_num , best_model = best_model , truth_val = truth_val , score_results = score_results , split_char = split_char , ** kwargs ) if score_results : tile_dict , field_dict , overall = estimator . run ( force_run = force_run ) . load_results ( ) return tile_dict , field_dict , overall else : estimator . run ( force_run = force_run ) return estimator . score_save_dir
Evaluate model on given validation set
Evaluate model on given validation set
"""
        Evaluate model on given validation set
        :param file_list: evaluation file list
        :param input_size: dimension of the input to the network
        :param tile_size: dimension of the single evaluation file
        :param batch_size: batch size
        :param img_mean: mean of each channel
        :param model_dir: path to the pretrained model
        :param gpu: which gpu to run the model, default to use all the gpus available
        :param save_result_parent_dir: parent directory to where the result will be stored
        :param name: name of the process
        :param verb: if True, print out message when evaluating
        :param ds_name: name of the dataset
        :param load_epoch_num: which epoch's ckpt to load
        :param best_model: if True, load the model with best performance on the validation set
        :param truth_val: value of H1 pixel in gt
        :param force_run: if True, run the evaluation even if results already exist
        :param kwargs: other parameters
        :param score_result: if False, no gt used to score results
        :param split_char: character used to split file name
        :return: tile based iou, field based iou and overall iou
        """
None
self
file_list
evaluation file list
evaluation file list
input_size
dimension of the input to the network
dimension of the input to the network
tile_size
dimension of the single evaluation file
dimension of the single evaluation file
batch_size
None
img_mean
mean of each channel
mean of each channel
model_dir
path to the pretrained model
path to the pretrained model
gpu
which gpu to run the model, default to use all the gpus available
which gpu to run the model default to use all the gpus available
save_result_parent_dir
parent directory to where the result will be stored
parent directory to where the result will be stored
name
name of the process
name of the process
verb
if True, print out message when evaluating
if True print out message when evaluating
ds_name
name of the dataset
name of the dataset
load_epoch_num
which epoch's ckpt to load
which epoch ' s ckpt to load
best_model
if True, load the model with best performance on the validation set
if True load the model with best performance on the validation set
truth_val
value of H1 pixel in gt
value of H1 pixel in gt
force_run
if True, run the evaluation even if results already exist
if True run the evaluation even if results already exist
score_results
split_char
character used to split file name
character used to split file name
kwargs
None
score_result
if False, no gt used to score results
if False no gt used to score results