You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
496 B
Python

This file contains ambiguous Unicode characters!

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需要+1TEXT从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