Skip to content

Commit 30d087a

Browse files
committed
bugfix: alignments datadict: Allow loading missing identities and masks
1 parent 6043741 commit 30d087a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/align/objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ class PNGAlignments(DataclassDict):
220220
"""The height of the bounding box"""
221221
landmarks_xy: npt.NDArray[np.float32]
222222
"""The (x, y) landmark points of the face"""
223-
mask: dict[str, MaskAlignmentsFile]
223+
mask: dict[str, MaskAlignmentsFile] = field(default_factory=dict)
224224
"""The masks stored for the face"""
225-
identity: dict[str, npt.NDArray[np.float32]]
225+
identity: dict[str, npt.NDArray[np.float32]] = field(default_factory=dict)
226226
"""The identity vectors stored for the face"""
227227

228228
def __repr__(self) -> str:

0 commit comments

Comments
 (0)