MCPcopy Create free account

hub / github.com/PellelNitram/xournalpp_htr / functions

Functions308 in github.com/PellelNitram/xournalpp_htr

↓ 36 callersFunction$
(sel)
tools/data_annotation_tool/app.js:83
↓ 21 callersFunctionrender
()
tools/data_annotation_tool/app.js:391
↓ 11 callersMethodclip
(self, clip_aabb: "BoundingBox")
xournalpp_htr/training/shared/bounding_box.py:77
↓ 11 callersFunctiongt
(text="word", xmin=0.0, ymin=0.0, xmax=10.0, ymax=10.0, page_index=0)
tests/test_benchmark.py:7
↓ 11 callersFunctionpred
(text="word", xmin=0.0, ymin=0.0, xmax=10.0, ymax=10.0)
tests/test_benchmark.py:13
↓ 9 callersFunctionrenderAnnotationList
()
tools/data_annotation_tool/app.js:775
↓ 8 callersFunctionupdateSelectionUI
()
tools/data_annotation_tool/app.js:762
↓ 7 callersFunction_match
Greedy IoU matching: highest IoU pairs are matched first.
xournalpp_htr/benchmark.py:95
↓ 7 callersFunctionrenderClassList
()
tools/data_annotation_tool/app.js:610
↓ 7 callersMethodresize
(containerWidth, containerHeight)
tools/data_annotation_tool/renderer.js:15
↓ 7 callersMethodscale
Scale the bounding box by ``sx`` and ``sy``.
xournalpp_htr/training/shared/bounding_box.py:47
↓ 7 callersFunctionupdateGlobalStats
()
tools/data_annotation_tool/app.js:348
↓ 6 callersFunction_cer
Character error rate between two strings via edit distance.
xournalpp_htr/benchmark.py:80
↓ 6 callersFunctioncurrentPage
()
tools/data_annotation_tool/app.js:922
↓ 6 callersFunctionget_document
Loads a document from a given file path based on the file extension. This function determines the appropriate document type to load by e
xournalpp_htr/documents.py:197
↓ 6 callersFunctionget_env_variable
Retrieve the value of an environment variable. Args: name (str): The name of the environment variable to retrieve. default (
xournalpp_htr/utils.py:115
↓ 6 callersFunctionsave
()
tools/data_annotation_tool/app.js:930
↓ 6 callersFunctionsetTool
(tool)
tools/data_annotation_tool/app.js:592
↓ 6 callersFunctionupdateZoom
()
tools/data_annotation_tool/app.js:387
↓ 5 callersFunctioncluster_aabbs
Cluster aabbs with DBSCAN on the Jaccard distance between boxes.
xournalpp_htr/training/shared/postprocessing.py:127
↓ 5 callersFunctiondecode
( nn_prediction, scale=1.0, comp_fg=fg_by_threshold(0.5), # noqa: B008 )
xournalpp_htr/training/shared/postprocessing.py:77
↓ 5 callersMethodzoom
(delta, centerX, centerY)
tools/data_annotation_tool/renderer.js:39
↓ 4 callersFunction_iou
(a: GroundTruthWord, b: WordPrediction)
xournalpp_htr/benchmark.py:67
↓ 4 callersMethodarea
Return the area of the bounding box.
xournalpp_htr/training/shared/bounding_box.py:86
↓ 4 callersFunctionchangePage
(delta)
tools/data_annotation_tool/app.js:900
↓ 4 callersFunctioncompute_iou
Intersection over union of two axis-aligned rectangles.
xournalpp_htr/training/shared/postprocessing.py:95
↓ 4 callersFunctionlog_interaction
( session_id: str, donate_data: bool, interaction: str, document_path: str | None, )
scripts/demo.py:44
↓ 4 callersFunctionnormalize_image_transform
Normalise a grayscale image to roughly ``[-0.5, 0.5]``.
xournalpp_htr/training/shared/postprocessing.py:177
↓ 4 callersFunctionpushUndoState
()
tools/data_annotation_tool/app.js:55
↓ 4 callersMethodsave_page_as_image
Save document page as image. #TODO: I am using `matplotlib` here. Alternatively, OpenCV could do the trick as well. :param
xournalpp_htr/documents.py:53
↓ 4 callersMethodscale_shape
(s, f)
xournalpp_htr/training/word_detector/network.py:96
↓ 4 callersMethodtranslate
Translate the bounding box by ``(dx, dy)``.
xournalpp_htr/training/shared/bounding_box.py:37
↓ 3 callersMethodas_type
(self, new_type)
xournalpp_htr/training/shared/bounding_box.py:57
↓ 3 callersFunctioncompute_predictions
Run HTR on a document and return word-level predictions. Bounding box coordinates are always in document units (72 DPI), regardless of the in
xournalpp_htr/models.py:27
↓ 3 callersFunctionexport
Export ``checkpoint`` to ``output_dir`` as ``model.onnx`` + ``config.json``.
xournalpp_htr/training/simple_htr/export.py:45
↓ 3 callersFunctionexport_xournalpp_to_pdf_with_htr
Main function that performs HTR. This function exports an Xournal(++) file to a PDF file, performs Handwritten Text Recognition (HTR) on the file
xournalpp_htr/shortcuts.py:7
↓ 3 callersFunctionfg_by_cc
Take a max number of pixels per connected component (>=3 for DBSCAN).
xournalpp_htr/training/shared/postprocessing.py:58
↓ 3 callersFunctionfitToView
()
tools/data_annotation_tool/app.js:379
↓ 3 callersFunctionget_device
Resolve a device string, with auto-detection for ``"auto"``.
xournalpp_htr/training/word_detector/utils.py:17
↓ 3 callersFunctionparse_arguments
Parse arguments from command line.
xournalpp_htr/utils.py:58
↓ 3 callersFunctionsaveAnnotatorId
(id)
tools/data_annotation_tool/storage.js:22
↓ 3 callersMethodscreenToDoc
(sx, sy)
tools/data_annotation_tool/renderer.js:56
↓ 3 callersFunctionupdateActiveClassUI
()
tools/data_annotation_tool/app.js:647
↓ 3 callersFunctionupdateCursor
()
tools/data_annotation_tool/app.js:600
↓ 2 callersMethod__init__
(self)
xournalpp_htr/training/word_detector/network.py:83
↓ 2 callersMethod_init_charset
(self, charset: List[str])
xournalpp_htr/training/simple_htr/dataset.py:164
↓ 2 callersFunctionassignStrokesToClass
(className, text)
tools/data_annotation_tool/app.js:694
↓ 2 callersFunctionbinary_classification_metrics
( gt_aabbs: List[BoundingBox], pred_aabbs: List[BoundingBox] )
xournalpp_htr/training/shared/postprocessing.py:162
↓ 2 callersFunctionbuildExportData
(fileName, state)
tools/data_annotation_tool/storage.js:154
↓ 2 callersFunctionclearSelection
()
tools/data_annotation_tool/app.js:766
↓ 2 callersMethodcompute
TODO. These are the steps performed: 1. Loop over `self.positions` to obtain index and location. 2. Get sample from dataset.
xournalpp_htr/training/data/datasets.py:406
↓ 2 callersFunctioncompute_ctc_loss
( log_probs: torch.Tensor, targets: torch.Tensor, target_lengths: torch.Tensor, blank: int, )
xournalpp_htr/training/simple_htr/network.py:92
↓ 2 callersFunctioncompute_loss
(y, gt_map)
xournalpp_htr/training/word_detector/network.py:123
↓ 2 callersMethoddetect
Detect word bounding boxes in a grayscale image. The returned boxes are in the pixel coordinate system of the *passed* image (the int
xournalpp_htr/inference_models.py:87
↓ 2 callersFunctiondraw_bboxes_on_image
Draw bounding boxes on a (possibly normalised, grayscale) image.
xournalpp_htr/training/shared/postprocessing.py:182
↓ 2 callersMethodenlarge_to_int_grid
(self)
xournalpp_htr/training/shared/bounding_box.py:90
↓ 2 callersFunctionexport_to_pdf_with_xournalpp
Export a Xournal(++) file to PDF using Xournal++. This function uses the `xournalpp` command-line tool to convert a Xournal(++) file specifie
xournalpp_htr/utils.py:7
↓ 2 callersMethodfrom_pretrained
(cls, revision: str = "main")
xournalpp_htr/inference_models.py:143
↓ 2 callersFunctiongetStorageKey
(fileName)
tools/data_annotation_tool/storage.js:28
↓ 2 callersFunctionget_device
Resolve a device string, with auto-detection for ``"auto"``.
xournalpp_htr/training/simple_htr/utils.py:14
↓ 2 callersMethodget_file_name
Generate a file name based on an index and a file type. This method returns a string in the format: `"{file_type}_{idx:06}.png"`,
xournalpp_htr/training/data/datasets.py:557
↓ 2 callersFunctionget_path_of_exported_pdf
(session_id: str)
scripts/demo.py:36
↓ 2 callersFunctionget_path_of_pdf_with_htr
(session_id: str)
scripts/demo.py:40
↓ 2 callersFunctionget_temporary_directory
()
scripts/demo.py:32
↓ 2 callersFunctiongreedy_decode
Best-path CTC decoding. Args: log_probs: (seq_len, batch, num_classes) from ``forward()``. charset: list of characters (blank ind
xournalpp_htr/training/simple_htr/network.py:104
↓ 2 callersMethodhitTestStroke
(strokes, sx, sy, tolerance)
tools/data_annotation_tool/renderer.js:177
↓ 2 callersFunctionload_IAM_DB_dataset
Return path to the IAM-DB dataset, downloading from HuggingFace Hub if needed. The IAM Handwriting Database (offline forms) is stored as raw file
xournalpp_htr/xio.py:168
↓ 2 callersFunctionload_benchmark
Return benchmark samples from the xournalpp_htr_benchmark HuggingFace dataset.
xournalpp_htr/xio.py:125
↓ 2 callersFunctionload_charset
(model_path: Path)
xournalpp_htr/training/simple_htr/infer.py:20
↓ 2 callersFunctionload_examples
(exclude_empty: bool = False)
xournalpp_htr/xio.py:196
↓ 2 callersFunctionload_model_config
Load ``ModelConfig`` from a training run's ``config.yaml``.
xournalpp_htr/training/simple_htr/config.py:61
↓ 2 callersFunctionpreprocess_image
( img: np.ndarray, target_height: int, target_width: int )
xournalpp_htr/training/simple_htr/dataset.py:36
↓ 2 callersMethodrecognize
Recognise text in a grayscale word image. The image is resized to the network's expected input dimensions (uniform scale, centered on
xournalpp_htr/inference_models.py:154
↓ 2 callersMethodrender_page_and_mask
TODO. Steps that are performed: TODO. TODO: Determine page sizes etc & adjust rendering
xournalpp_htr/training/data/datasets.py:452
↓ 2 callersFunctionresizeCanvas
()
tools/data_annotation_tool/app.js:375
↓ 2 callersFunctionrestoreState
(savedData, pages, expectedSha256 = null)
tools/data_annotation_tool/storage.js:237
↓ 2 callersMethodscale_around_center
(self, sx, sy)
xournalpp_htr/training/shared/bounding_box.py:66
↓ 2 callersFunctionsubsample
Restrict foreground indices to a maximum number.
xournalpp_htr/training/shared/postprocessing.py:36
↓ 2 callersFunctionupdatePageNav
()
tools/data_annotation_tool/app.js:914
↓ 2 callersFunctionvalidateExportData
(data)
tools/data_annotation_tool/storage.js:62
↓ 2 callersFunctionwrite_predictions_to_PDF
Writes handwritten text predictions to a PDF file. This function reads an input PDF file using PyMuPDF, extracts each page from the PDF, and
xournalpp_htr/xio.py:26
↓ 1 callersMethod__init__
(self, session: ort.InferenceSession, config: dict, revision: str)
xournalpp_htr/inference_models.py:135
↓ 1 callersMethod_adjust_to_input_size
( self, img: np.ndarray, gt: List[BoundingBox] )
xournalpp_htr/training/word_detector/dataset.py:284
↓ 1 callersFunction_apply_augmentation
(img: np.ndarray)
xournalpp_htr/training/simple_htr/dataset.py:52
↓ 1 callersFunction_apply_geometric_augmentation
( img: np.ndarray, aabbs: List[BoundingBox] )
xournalpp_htr/training/word_detector/dataset.py:74
↓ 1 callersFunction_apply_photometric_augmentation
(img: np.ndarray)
xournalpp_htr/training/word_detector/dataset.py:103
↓ 1 callersMethod_crop_page_to_content
( self, img: np.ndarray, gt: List[BoundingBox] )
xournalpp_htr/training/word_detector/dataset.py:272
↓ 1 callersFunction_decode_and_evaluate_sample
(y_element, img_np, gt_bboxes, scale, cfg_detection)
xournalpp_htr/training/word_detector/train.py:138
↓ 1 callersFunction_find_example
(file_paths: list[str], name: str)
tests/test_empty_file_crash.py:9
↓ 1 callersMethod_forward_impl
(self, x: torch.Tensor)
xournalpp_htr/training/word_detector/network.py:42
↓ 1 callersMethod_load_from_cache
(self, cache_path: Path)
xournalpp_htr/training/simple_htr/dataset.py:169
↓ 1 callersMethod_load_from_cache
(self, cache_path: Path)
xournalpp_htr/training/word_detector/dataset.py:204
↓ 1 callersFunction_load_gt_words
(gt_path, document)
xournalpp_htr/benchmark.py:38
↓ 1 callersMethod_parse_gt
(self, fn_gt: Path)
xournalpp_htr/training/word_detector/dataset.py:246
↓ 1 callersMethod_parse_words_file
(words_file: Path)
xournalpp_htr/training/simple_htr/dataset.py:225
↓ 1 callersFunction_plot_ctc_matrix
Visualise the CTC output matrix, showing only the top-k characters.
xournalpp_htr/training/simple_htr/demo.py:21
↓ 1 callersMethod_preprocess_and_cache
(self, cache_path: Path)
xournalpp_htr/training/simple_htr/dataset.py:179
↓ 1 callersMethod_preprocess_and_cache
(self, cache_path: Path)
xournalpp_htr/training/word_detector/dataset.py:213
↓ 1 callersFunctionassignNonText
()
tools/data_annotation_tool/app.js:685
↓ 1 callersFunctionassignTextClass
()
tools/data_annotation_tool/app.js:670
next →1–100 of 308, ranked by callers