Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PellelNitram/xournalpp_htr
/ functions
Functions
308 in github.com/PellelNitram/xournalpp_htr
⨍
Functions
308
◇
Types & classes
50
↓ 36 callers
Function
$
(sel)
tools/data_annotation_tool/app.js:83
↓ 21 callers
Function
render
()
tools/data_annotation_tool/app.js:391
↓ 11 callers
Method
clip
(self, clip_aabb: "BoundingBox")
xournalpp_htr/training/shared/bounding_box.py:77
↓ 11 callers
Function
gt
(text="word", xmin=0.0, ymin=0.0, xmax=10.0, ymax=10.0, page_index=0)
tests/test_benchmark.py:7
↓ 11 callers
Function
pred
(text="word", xmin=0.0, ymin=0.0, xmax=10.0, ymax=10.0)
tests/test_benchmark.py:13
↓ 9 callers
Function
renderAnnotationList
()
tools/data_annotation_tool/app.js:775
↓ 8 callers
Function
updateSelectionUI
()
tools/data_annotation_tool/app.js:762
↓ 7 callers
Function
_match
Greedy IoU matching: highest IoU pairs are matched first.
xournalpp_htr/benchmark.py:95
↓ 7 callers
Function
renderClassList
()
tools/data_annotation_tool/app.js:610
↓ 7 callers
Method
resize
(containerWidth, containerHeight)
tools/data_annotation_tool/renderer.js:15
↓ 7 callers
Method
scale
Scale the bounding box by ``sx`` and ``sy``.
xournalpp_htr/training/shared/bounding_box.py:47
↓ 7 callers
Function
updateGlobalStats
()
tools/data_annotation_tool/app.js:348
↓ 6 callers
Function
_cer
Character error rate between two strings via edit distance.
xournalpp_htr/benchmark.py:80
↓ 6 callers
Function
currentPage
()
tools/data_annotation_tool/app.js:922
↓ 6 callers
Function
get_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 callers
Function
get_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 callers
Function
save
()
tools/data_annotation_tool/app.js:930
↓ 6 callers
Function
setTool
(tool)
tools/data_annotation_tool/app.js:592
↓ 6 callers
Function
updateZoom
()
tools/data_annotation_tool/app.js:387
↓ 5 callers
Function
cluster_aabbs
Cluster aabbs with DBSCAN on the Jaccard distance between boxes.
xournalpp_htr/training/shared/postprocessing.py:127
↓ 5 callers
Function
decode
( nn_prediction, scale=1.0, comp_fg=fg_by_threshold(0.5), # noqa: B008 )
xournalpp_htr/training/shared/postprocessing.py:77
↓ 5 callers
Method
zoom
(delta, centerX, centerY)
tools/data_annotation_tool/renderer.js:39
↓ 4 callers
Function
_iou
(a: GroundTruthWord, b: WordPrediction)
xournalpp_htr/benchmark.py:67
↓ 4 callers
Method
area
Return the area of the bounding box.
xournalpp_htr/training/shared/bounding_box.py:86
↓ 4 callers
Function
changePage
(delta)
tools/data_annotation_tool/app.js:900
↓ 4 callers
Function
compute_iou
Intersection over union of two axis-aligned rectangles.
xournalpp_htr/training/shared/postprocessing.py:95
↓ 4 callers
Function
log_interaction
( session_id: str, donate_data: bool, interaction: str, document_path: str | None, )
scripts/demo.py:44
↓ 4 callers
Function
normalize_image_transform
Normalise a grayscale image to roughly ``[-0.5, 0.5]``.
xournalpp_htr/training/shared/postprocessing.py:177
↓ 4 callers
Function
pushUndoState
()
tools/data_annotation_tool/app.js:55
↓ 4 callers
Method
save_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 callers
Method
scale_shape
(s, f)
xournalpp_htr/training/word_detector/network.py:96
↓ 4 callers
Method
translate
Translate the bounding box by ``(dx, dy)``.
xournalpp_htr/training/shared/bounding_box.py:37
↓ 3 callers
Method
as_type
(self, new_type)
xournalpp_htr/training/shared/bounding_box.py:57
↓ 3 callers
Function
compute_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 callers
Function
export
Export ``checkpoint`` to ``output_dir`` as ``model.onnx`` + ``config.json``.
xournalpp_htr/training/simple_htr/export.py:45
↓ 3 callers
Function
export_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 callers
Function
fg_by_cc
Take a max number of pixels per connected component (>=3 for DBSCAN).
xournalpp_htr/training/shared/postprocessing.py:58
↓ 3 callers
Function
fitToView
()
tools/data_annotation_tool/app.js:379
↓ 3 callers
Function
get_device
Resolve a device string, with auto-detection for ``"auto"``.
xournalpp_htr/training/word_detector/utils.py:17
↓ 3 callers
Function
parse_arguments
Parse arguments from command line.
xournalpp_htr/utils.py:58
↓ 3 callers
Function
saveAnnotatorId
(id)
tools/data_annotation_tool/storage.js:22
↓ 3 callers
Method
screenToDoc
(sx, sy)
tools/data_annotation_tool/renderer.js:56
↓ 3 callers
Function
updateActiveClassUI
()
tools/data_annotation_tool/app.js:647
↓ 3 callers
Function
updateCursor
()
tools/data_annotation_tool/app.js:600
↓ 2 callers
Method
__init__
(self)
xournalpp_htr/training/word_detector/network.py:83
↓ 2 callers
Method
_init_charset
(self, charset: List[str])
xournalpp_htr/training/simple_htr/dataset.py:164
↓ 2 callers
Function
assignStrokesToClass
(className, text)
tools/data_annotation_tool/app.js:694
↓ 2 callers
Function
binary_classification_metrics
( gt_aabbs: List[BoundingBox], pred_aabbs: List[BoundingBox] )
xournalpp_htr/training/shared/postprocessing.py:162
↓ 2 callers
Function
buildExportData
(fileName, state)
tools/data_annotation_tool/storage.js:154
↓ 2 callers
Function
clearSelection
()
tools/data_annotation_tool/app.js:766
↓ 2 callers
Method
compute
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 callers
Function
compute_ctc_loss
( log_probs: torch.Tensor, targets: torch.Tensor, target_lengths: torch.Tensor, blank: int, )
xournalpp_htr/training/simple_htr/network.py:92
↓ 2 callers
Function
compute_loss
(y, gt_map)
xournalpp_htr/training/word_detector/network.py:123
↓ 2 callers
Method
detect
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 callers
Function
draw_bboxes_on_image
Draw bounding boxes on a (possibly normalised, grayscale) image.
xournalpp_htr/training/shared/postprocessing.py:182
↓ 2 callers
Method
enlarge_to_int_grid
(self)
xournalpp_htr/training/shared/bounding_box.py:90
↓ 2 callers
Function
export_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 callers
Method
from_pretrained
(cls, revision: str = "main")
xournalpp_htr/inference_models.py:143
↓ 2 callers
Function
getStorageKey
(fileName)
tools/data_annotation_tool/storage.js:28
↓ 2 callers
Function
get_device
Resolve a device string, with auto-detection for ``"auto"``.
xournalpp_htr/training/simple_htr/utils.py:14
↓ 2 callers
Method
get_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 callers
Function
get_path_of_exported_pdf
(session_id: str)
scripts/demo.py:36
↓ 2 callers
Function
get_path_of_pdf_with_htr
(session_id: str)
scripts/demo.py:40
↓ 2 callers
Function
get_temporary_directory
()
scripts/demo.py:32
↓ 2 callers
Function
greedy_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 callers
Method
hitTestStroke
(strokes, sx, sy, tolerance)
tools/data_annotation_tool/renderer.js:177
↓ 2 callers
Function
load_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 callers
Function
load_benchmark
Return benchmark samples from the xournalpp_htr_benchmark HuggingFace dataset.
xournalpp_htr/xio.py:125
↓ 2 callers
Function
load_charset
(model_path: Path)
xournalpp_htr/training/simple_htr/infer.py:20
↓ 2 callers
Function
load_examples
(exclude_empty: bool = False)
xournalpp_htr/xio.py:196
↓ 2 callers
Function
load_model_config
Load ``ModelConfig`` from a training run's ``config.yaml``.
xournalpp_htr/training/simple_htr/config.py:61
↓ 2 callers
Function
preprocess_image
( img: np.ndarray, target_height: int, target_width: int )
xournalpp_htr/training/simple_htr/dataset.py:36
↓ 2 callers
Method
recognize
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 callers
Method
render_page_and_mask
TODO. Steps that are performed: TODO. TODO: Determine page sizes etc & adjust rendering
xournalpp_htr/training/data/datasets.py:452
↓ 2 callers
Function
resizeCanvas
()
tools/data_annotation_tool/app.js:375
↓ 2 callers
Function
restoreState
(savedData, pages, expectedSha256 = null)
tools/data_annotation_tool/storage.js:237
↓ 2 callers
Method
scale_around_center
(self, sx, sy)
xournalpp_htr/training/shared/bounding_box.py:66
↓ 2 callers
Function
subsample
Restrict foreground indices to a maximum number.
xournalpp_htr/training/shared/postprocessing.py:36
↓ 2 callers
Function
updatePageNav
()
tools/data_annotation_tool/app.js:914
↓ 2 callers
Function
validateExportData
(data)
tools/data_annotation_tool/storage.js:62
↓ 2 callers
Function
write_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 callers
Method
__init__
(self, session: ort.InferenceSession, config: dict, revision: str)
xournalpp_htr/inference_models.py:135
↓ 1 callers
Method
_adjust_to_input_size
( self, img: np.ndarray, gt: List[BoundingBox] )
xournalpp_htr/training/word_detector/dataset.py:284
↓ 1 callers
Function
_apply_augmentation
(img: np.ndarray)
xournalpp_htr/training/simple_htr/dataset.py:52
↓ 1 callers
Function
_apply_geometric_augmentation
( img: np.ndarray, aabbs: List[BoundingBox] )
xournalpp_htr/training/word_detector/dataset.py:74
↓ 1 callers
Function
_apply_photometric_augmentation
(img: np.ndarray)
xournalpp_htr/training/word_detector/dataset.py:103
↓ 1 callers
Method
_crop_page_to_content
( self, img: np.ndarray, gt: List[BoundingBox] )
xournalpp_htr/training/word_detector/dataset.py:272
↓ 1 callers
Function
_decode_and_evaluate_sample
(y_element, img_np, gt_bboxes, scale, cfg_detection)
xournalpp_htr/training/word_detector/train.py:138
↓ 1 callers
Function
_find_example
(file_paths: list[str], name: str)
tests/test_empty_file_crash.py:9
↓ 1 callers
Method
_forward_impl
(self, x: torch.Tensor)
xournalpp_htr/training/word_detector/network.py:42
↓ 1 callers
Method
_load_from_cache
(self, cache_path: Path)
xournalpp_htr/training/simple_htr/dataset.py:169
↓ 1 callers
Method
_load_from_cache
(self, cache_path: Path)
xournalpp_htr/training/word_detector/dataset.py:204
↓ 1 callers
Function
_load_gt_words
(gt_path, document)
xournalpp_htr/benchmark.py:38
↓ 1 callers
Method
_parse_gt
(self, fn_gt: Path)
xournalpp_htr/training/word_detector/dataset.py:246
↓ 1 callers
Method
_parse_words_file
(words_file: Path)
xournalpp_htr/training/simple_htr/dataset.py:225
↓ 1 callers
Function
_plot_ctc_matrix
Visualise the CTC output matrix, showing only the top-k characters.
xournalpp_htr/training/simple_htr/demo.py:21
↓ 1 callers
Method
_preprocess_and_cache
(self, cache_path: Path)
xournalpp_htr/training/simple_htr/dataset.py:179
↓ 1 callers
Method
_preprocess_and_cache
(self, cache_path: Path)
xournalpp_htr/training/word_detector/dataset.py:213
↓ 1 callers
Function
assignNonText
()
tools/data_annotation_tool/app.js:685
↓ 1 callers
Function
assignTextClass
()
tools/data_annotation_tool/app.js:670
next →
1–100 of 308, ranked by callers