def __call__(self, img, return_prob=False):
    if isinstance(img, np.ndarray):
        img = Image.fromarray(img)
    return self.model.predict(img, return_prob)
def __call__(self, img, return_prob=False):
    if isinstance(img, np.ndarray):
        img = Image.fromarray(img)
    return self.model.predict(img, return_prob)