-
Feat/remove reference of PageLayout.elements (#3943)
发布于
2025-03-12 15:21:21 +00:00 This PR removes usage of
PageLayout.elementsfrom partition function,
except for whenanalysis=True. This PR updates the partition logic so
thatPageLayout.elements_arrayis used everywhere to save memory and
cpu cost.
Since the analysis function is intended for investigation and not for
general document processing purposes, this part of the code is left for
a future refactor.PageLayout.elementsuses a list to store layout elements' data while
elements_arrayusesnumpyarray to store the data, which has much
lower memory requirements. Usingmemory_profilerto test the
differences is usually around 10x.下载附件