This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import enum
class PageDetectionEnum(enum.Enum):
# 注意:使用训练后的权重时,id需要+1,TEXT从1开始,使用预训练权重时,TEXT从0开始
TEXT = 1
TITLE = 2
FIGURE = 3
FIGURE_CAPTION = 4
TABLE = 5
TABLE_CAPTION = 6
HEADER = 7
FOOTER = 8
REFERENCE = 9
EQUATION = 10
SCANNED_DOCUMENT = 11
@property
def label(self):
return self.name.lower()
class PDFAnalysisStatus(enum.Enum):
SUCCESS = 2
FAIL = 3