Skip to content

Commit

Permalink
Merge pull request #61 from HabeebRahmanKT/spellfix/columsn-to-columns
Browse files Browse the repository at this point in the history
Corrected spelling mistake
  • Loading branch information
JustinShenk authored Mar 20, 2024
2 parents eea2c8e + e64a4c1 commit b46b2b1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/fer/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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]

Expand Down

0 comments on commit b46b2b1

Please sign in to comment.