Skip to content

Commit

Permalink
add people photo
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng.shen committed Jan 22, 2025
1 parent 6d51775 commit 50da097
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions repo_metadata/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class PrivatePropertyKeys:
FACE_VECTORS = '_face_vectors'
FACE_LINKS = '_face_links'
EXCLUDED_FACE_LINKS = '_excluded_face_links'
INCLUDED_FACE_LINKS = '_included_face_links'
TAGS = '_tags'
OCR = '_ocr'

Expand Down Expand Up @@ -189,6 +190,7 @@ def __init__(self):
self.face_vectors = MetadataColumn(PrivatePropertyKeys.FACE_VECTORS, '_face_vectors', PropertyTypes.LONG_TEXT)
self.face_links = MetadataColumn(PrivatePropertyKeys.FACE_LINKS, '_face_links', PropertyTypes.LINK)
self.excluded_face_links = MetadataColumn(PrivatePropertyKeys.EXCLUDED_FACE_LINKS, '_excluded_face_links', PropertyTypes.LINK)
self.included_face_links = MetadataColumn(PrivatePropertyKeys.INCLUDED_FACE_LINKS, '_included_face_links', PropertyTypes.LINK)

# tag
self.tags = MetadataColumn(PrivatePropertyKeys.TAGS, '_tags', PropertyTypes.LINK)
Expand Down Expand Up @@ -221,9 +223,10 @@ def to_dict(self, data=None):

# faces table
class FacesTable(object):
def __init__(self, name, face_link_id, excluded_face_link_id):
def __init__(self, name, face_link_id, excluded_face_link_id, included_face_link_id):
self.face_link_id = face_link_id
self.excluded_face_link_id = excluded_face_link_id
self.included_face_link_id = included_face_link_id
self.name = name

@property
Expand All @@ -237,6 +240,7 @@ def __init__(self):
self.name = MetadataColumn('_name', '_name', PropertyTypes.TEXT)
self.photo_links = MetadataColumn('_photo_links', '_photo_links', PropertyTypes.LINK)
self.excluded_photo_links = MetadataColumn('_excluded_photo_links', '_excluded_photo_links', PropertyTypes.LINK)
self.included_photo_links = MetadataColumn('_included_photo_links', '_included_photo_links', PropertyTypes.LINK)
self.vector = MetadataColumn('_vector', '_vector', PropertyTypes.LONG_TEXT)


Expand Down Expand Up @@ -281,7 +285,7 @@ def __init__(self):
]


FACES_TABLE = FacesTable('faces', '0001', '0004')
FACES_TABLE = FacesTable('faces', '0001', '0004', '0005')

TAGS_TABLE = TagsTable('tags', '0002', '0003')

Expand Down

0 comments on commit 50da097

Please sign in to comment.