diff --git a/src/fer/classes.py b/src/fer/classes.py index 2d2bddb..e1ee440 100644 --- a/src/fer/classes.py +++ b/src/fer/classes.py @@ -29,7 +29,7 @@ def __init__( tempfile: Optional[str] = None, ): """Video class for extracting and saving frames for emotion detection. - :param video_file - str + param video_file - str :param outdir - str :param tempdir - str :param first_face_only - bool @@ -53,12 +53,12 @@ def __init__( @staticmethod def get_max_faces(data: list) -> int: """Get max number of faces detected in a series of frames, eg 3""" - max = 0 + max_faces = 0 for frame in data: for face in frame: - if len(face) > max: - max = len(face) - return max + if len(face) > max_faces: + max_faces = len(face) + return max_faces @staticmethod def _to_dict(data: Union[dict, list]) -> dict: @@ -117,7 +117,7 @@ def get_first_face(df: pd.DataFrame) -> pd.DataFrame: @staticmethod def get_emotions(df: pd.DataFrame) -> list: - """Get emotion columsn from results.""" + """Get emotion columns from results.""" columns = [x for x in df.columns if "box" not in x] return df[columns]