def evaluator_animals_mobilenet_class_inference_initialized(test_animals_dataset_path, test_animals_mobilenet_path, test_animals_dictionary_path): evaluator = Evaluator( model_path=test_animals_mobilenet_path, concept_dictionary_path=test_animals_dictionary_path, batch_size=1 ) evaluator.data_dir = test_animals_dataset_path evaluator.concepts = utils.get_dictionary_concepts(test_animals_dictionary_path) group_concepts = utils.get_default_concepts(evaluator.data_dir) evaluator.concept_labels = utils.get_concept_items(concepts=group_concepts, key='label') return evaluator
def evaluator_animals_ensemble_class_inference_initialized(test_animals_dataset_path, test_animals_ensemble_path, test_animals_dictionary_path): evaluator = Evaluator( ensemble_models_dir=test_animals_ensemble_path, concept_dictionary_path=test_animals_dictionary_path, combination_mode='arithmetic', batch_size=1 ) evaluator.data_dir = test_animals_dataset_path evaluator.concepts = utils.get_dictionary_concepts(test_animals_dictionary_path) group_concepts = utils.get_default_concepts(evaluator.data_dir) evaluator.concept_labels = utils.get_concept_items(concepts=group_concepts, key='label') return evaluator
def evaluator_animals_mobilenet_class_inference(test_animals_dataset_path, test_animals_mobilenet_path, test_animals_dictionary_path): evaluator = Evaluator( data_dir=test_animals_dataset_path, model_path=test_animals_mobilenet_path, concept_dictionary_path=test_animals_dictionary_path, batch_size=1 ) return evaluator
def evaluator_animals_ensemble_class_inference(test_animals_dataset_path, test_animals_ensemble_path, test_animals_dictionary_path): evaluator = Evaluator( data_dir=test_animals_dataset_path, ensemble_models_dir=test_animals_ensemble_path, concept_dictionary_path=test_animals_dictionary_path, combination_mode='arithmetic', batch_size=1 ) return evaluator
def evaluator_catdog_mobilenet(test_catdog_mobilenet_model): return Evaluator( batch_size=1, model_path=test_catdog_mobilenet_model )
def evaluator_catdog_ensemble(test_catdog_ensemble_path): return Evaluator( ensemble_models_dir=test_catdog_ensemble_path, combination_mode='arithmetic', batch_size=1 )
def evaluator_catdog_mobilenet_data_augmentation(test_catdog_mobilenet_model): return Evaluator( batch_size=1, model_path=test_catdog_mobilenet_model, data_augmentation={'scale_sizes': [256], 'transforms': ['horizontal_flip'], 'crop_original': 'center_crop'} )