FileStructure
- class lib.align.updater.FileStructure(alignments: dict[str, Any], version: float)
Bases:
_UpdaterAlignments were structured: {frame_name: <list of faces>}. We need to be able to store information at the frame level, so new structure is: {frame_name: {faces: <list of faces>}}
Attributes Summary
Trueif this updater has been run otherwiseFalseMethods Summary
test()Test whether the alignments file is laid out in the old structure of {frame_name: [faces]}
update()Update legacy alignments files from the format {frame_name: [faces} to the format {frame_name: {faces: [faces]}.
Attributes Documentation
- Parameters:
alignments (dict[str, T.Any])
version (float)
- is_updated
Trueif this updater has been run otherwiseFalse
Methods Documentation
- test() bool
Test whether the alignments file is laid out in the old structure of {frame_name: [faces]}
- Return type:
Trueif the file has legacy structure otherwiseFalse
- update() int
Update legacy alignments files from the format {frame_name: [faces} to the format {frame_name: {faces: [faces]}.
- Return type:
The number of items that were updated
- test() bool
Test whether the alignments file is laid out in the old structure of {frame_name: [faces]}
- Return type:
Trueif the file has legacy structure otherwiseFalse
- update() int
Update legacy alignments files from the format {frame_name: [faces} to the format {frame_name: {faces: [faces]}.
- Return type:
The number of items that were updated