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