dawsonia.label#
Labelling CLI and GUI
Module Contents#
Functions#
Label PDF images to create raw training data. |
|
GUI for manually entering labels to detected table cells. |
|
Save input label as the filename of image. |
|
Convert chosen page to image, label the detected cells and save it in
|
|
Crop image to extract table cells based on its positions and (non-)interactively save images. |
Data#
API#
- dawsonia.label.logger#
‘getLogger(…)’
- dawsonia.label.app#
‘Typer(…)’
- dawsonia.label.command(path_file: pathlib.Path, first_page: typing.Annotated[int, typer.Option('-f', '--first-page')] = 0, last_page: typing.Annotated[int, typer.Option('-l', '--last-page')] = 0, page_middle: typing.Annotated[int, typer.Option('-m', '--page-middle', help='X coordinate of middle of page to help the rotation correction')] = -1, size_cell: tuple[float, float, float, float] = (1.0, 1.0, 1.0, 1.0), interactive: bool = True, table_fmt_dir: pathlib.Path = Path('table_formats'), output_path: pathlib.Path = Path('output', 'label'), config: pathlib.Path = typer.Option('dawsonia.toml', *config_cli_names, **config_kwargs))#
Label PDF images to create raw training data.
- dawsonia.label.labelling_gui(output_path: pathlib.Path, key_name)#
GUI for manually entering labels to detected table cells.
- dawsonia.label.save_labelled_image(entry1: tkinter.Entry, key_name: str, root: tkinter.Tk, output_path: pathlib.Path)#
Save input label as the filename of image.
- dawsonia.label.label_page(book: dawsonia.io.Book, page_number: int, output_path: pathlib.Path, interactive: bool)#
Convert chosen page to image, label the detected cells and save it in
output_path.
- dawsonia.label.label_table(book: dawsonia.io.Book, image_page: dawsonia.typing.NDArray, output_path: pathlib.Path, interactive: bool, page_number: int, table_nb: int, table_size: collections.abc.Sequence[int], table_pos_array: dawsonia.typing.NDArray)#
Crop image to extract table cells based on its positions and (non-)interactively save images.