Change base class's predict signature.

This commit is contained in:
h-alice 2024-12-31 14:06:33 +08:00
parent c31268463b
commit ffbba7fe83
No known key found for this signature in database
GPG Key ID: 5708F34144A70909

View File

@ -1,4 +1,4 @@
from typing import Union
from typing import Union, List
from abc import ABC, abstractmethod
import numpy as np
from deepface.commons import package_utils
@ -18,5 +18,5 @@ class Demography(ABC):
model_name: str
@abstractmethod
def predict(self, img: np.ndarray) -> Union[np.ndarray, np.float64]:
def predict(self, img: Union[np.ndarray, List[np.ndarray]]) -> Union[np.ndarray, np.float64]:
pass