Visual Bounding Box Rendering (reanimator.visualization)#
Rendering bounding box overlays onto document page images.
draw_bounding_boxes#
def draw_bounding_boxes(
image: PIL.Image.Image,
elements_or_doc: Union[Document, List[Dict[str, Any]], List[Any]],
page_num: int = 1,
line_width: int = 4,
font_size: int = 22,
) -> PIL.Image.Image
Color Legend#
🟢 Tables: Green (
#2ECC71)🔵 Figures: Blue (
#3498DB)🟣 Formulas: Purple (
#9B59B6)🟠Captions: Amber Orange (
#F39C12) with target object tagging (e.g.Caption (Table 1),Caption (Figure 4))