From 504cafbd5d4bba183d9943b36c60548aae34e402 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Sun, 6 Feb 2022 14:25:44 +0100 Subject: [PATCH] renaming --- scripts/annotate.py | 4 ++-- vidocp/figure_detection.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/annotate.py b/scripts/annotate.py index 10d40cc..682b8ad 100644 --- a/scripts/annotate.py +++ b/scripts/annotate.py @@ -3,7 +3,7 @@ import argparse from vidocp.table_parsing import annotate_tables_in_pdf from vidocp.redaction_detection import annotate_boxes_in_pdf from vidocp.layout_parsing import annotate_layout_in_pdf -from vidocp.figure_detection import remove_text_in_pdf +from vidocp.figure_detection import detect_figures_in_pdf def parse_args(): @@ -26,4 +26,4 @@ if __name__ == "__main__": elif args.type == "layout": annotate_layout_in_pdf(args.pdf_path, page_index=args.page_index) elif args.type == "figure": - remove_text_in_pdf(args.pdf_path, page_index=args.page_index) + detect_figures_in_pdf(args.pdf_path, page_index=args.page_index) diff --git a/vidocp/figure_detection.py b/vidocp/figure_detection.py index 46e5484..f063f1a 100644 --- a/vidocp/figure_detection.py +++ b/vidocp/figure_detection.py @@ -93,7 +93,7 @@ def detect_figures(image: np.array): return rects -def remove_text_in_pdf(pdf_path, page_index=1): +def detect_figures_in_pdf(pdf_path, page_index=1): page = pdf2image.convert_from_path(pdf_path, first_page=page_index + 1, last_page=page_index + 1)[0] page = np.array(page)