Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
Feat: add func that get all faces
Browse files Browse the repository at this point in the history
  • Loading branch information
asheswook committed May 31, 2023
1 parent 67c1a71 commit eed62b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VisageSnap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.1"
__version__ = "0.3.2"
__author__ = "asheswook"
__license__ = "MIT"

Expand Down
9 changes: 7 additions & 2 deletions VisageSnap/processor/faceprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

logger = logging.getLogger(__name__)


class FaceProcessor:
def __init__(self, globalState: GlobalState):
self.__state = globalState
Expand Down Expand Up @@ -78,7 +79,8 @@ def get_faceObject(self, target: str, value: str) -> Face:
value (str) : value of the target.
"""
assert isinstance(target, str), "target must be 'From.LABEL' or 'From.FILENAME'."
assert isinstance(
target, str), "target must be 'From.LABEL' or 'From.FILENAME'."
assert isinstance(value, str), "value must be a string."

for face in self.gen_faces():
Expand All @@ -88,4 +90,7 @@ def get_faceObject(self, target: str, value: str) -> Face:
elif target == "Filename":
if value in face.filenames:
return face
return None
return None

def get_faces(self) -> list[Face]:
return self.__state.faces
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setuptools.setup(
name='VisageSnap',
version='0.3.1',
version='0.3.2',
author='Jaewook Lee',
author_email='[email protected]',
description='Face Classification package',
Expand Down

0 comments on commit eed62b3

Please sign in to comment.