def predict(self, image_path): # load image object image = self.load_image(image_path) # get descriptor from image descriptor = get_descriptor(image) # return classifier prediction for given descriptor return self.classifier.predict([descriptor])[0]