MCPcopy Index your code

hub / github.com/mindee/doctr / functions

Functions871 in github.com/mindee/doctr

↓ 1 callersFunction_split_horizontally
Horizontally split a single image with overlapping regions. Args: image: The image to split (H, W, C). split_width: Width of
doctr/models/recognition/predictor/_utils.py:71
↓ 1 callersFunction_test_classification
(model, input_shape, output_size, batch_size=2)
tests/pytorch/test_models_classification_pt.py:15
↓ 1 callersMethod_upsample
(self, x: torch.Tensor, y: torch.Tensor)
doctr/models/detection/fast/pytorch.py:65
↓ 1 callersFunction_vgg
( arch: str, pretrained: bool, tv_arch: str, num_rect_pools: int = 3, ignore_keys: list[st
doctr/models/classification/vgg/pytorch.py:31
↓ 1 callersFunction_viptr
( arch: str, pretrained: bool, backbone_fn: Callable[[bool], nn.Module], layer: str, pretr
doctr/models/recognition/viptr/pytorch.py:216
↓ 1 callersFunctionaddGithubButton
()
docs/source/_static/js/custom.js:15
↓ 1 callersFunctionaddVersionControl
()
docs/source/_static/js/custom.js:28
↓ 1 callersMethodbatch_inputs
Gather samples into batches for inference purposes Args: samples: list of samples of shape (C, H, W) Returns:
doctr/models/preprocessor/pytorch.py:46
↓ 1 callersMethodbitmap_to_boxes
( self, pred: np.ndarray, bitmap: np.ndarray, )
doctr/models/detection/core.py:60
↓ 1 callersMethodbuild_target
Encode a list of gts sequences into a np array and gives the corresponding* sequence lengths. Args: gts: list of ground-t
doctr/models/recognition/master/base.py:17
↓ 1 callersMethodbuild_target
Build the target, and it's mask to be used from loss computation. Args: target: target coming from dataset output_sha
doctr/models/detection/linknet/base.py:155
↓ 1 callersMethodbuild_target
Build the target, and it's mask to be used from loss computation. Args: target: target coming from dataset output_sha
doctr/models/detection/fast/base.py:152
↓ 1 callersMethodbuild_target
( self, target: list[dict[str, np.ndarray]], output_shape: tuple[int, int, int], )
doctr/models/detection/differentiable_binarization/base.py:268
↓ 1 callersFunctioncheck_release_file
(run_lambda)
scripts/collect_env.py:192
↓ 1 callersFunctionclearml_log_at_step
(train_loss=None, val_loss=None, lr=None)
references/recognition/train.py:524
↓ 1 callersFunctionclearml_log_at_step
(train_loss=None, val_loss=None, lr=None)
references/detection/train.py:481
↓ 1 callersFunctionclearml_log_at_step
(train_loss=None, val_loss=None, lr=None)
references/classification/train_orientation.py:381
↓ 1 callersFunctionclearml_log_at_step
(train_loss=None, val_loss=None, lr=None)
references/classification/train_character.py:375
↓ 1 callersMethodcompute_distance
Compute the distance for each point of the map (xs, ys) to the (a, b) segment Args: xs : map of x coordinates (height, width)
doctr/models/detection/differentiable_binarization/base.py:171
↓ 1 callersMethodcompute_loss
Compute categorical cross-entropy loss for the model. Sequences are masked after the EOS character. Args: model_output: p
doctr/models/recognition/sar/pytorch.py:288
↓ 1 callersMethodcompute_loss
Compute CTC loss for the model. Args: model_output: predicted logits of the model target: list of target strings
doctr/models/recognition/crnn/pytorch.py:167
↓ 1 callersMethodcompute_loss
Compute categorical cross-entropy loss for the model. Sequences are masked after the EOS character. Args: gt: the encoded
doctr/models/recognition/master/pytorch.py:124
↓ 1 callersMethodcompute_loss
Compute CTC loss for the model. Args: model_output: predicted logits of the model gt: ground truth tensor
doctr/models/recognition/viptr/pytorch.py:182
↓ 1 callersMethodcompute_loss
Compute categorical cross-entropy loss for the model. Sequences are masked after the EOS character. Args: model_output: p
doctr/models/recognition/vitstr/pytorch.py:133
↓ 1 callersMethodcompute_loss
Compute linknet loss, BCE with boosted box edges or focal loss. Focal loss implementation based on <https://github.com/tensorflow/addons/>`_.
doctr/models/detection/linknet/pytorch.py:212
↓ 1 callersMethodcompute_loss
Compute fast loss, 2 x Dice loss where the text kernel loss is scaled by 0.5. Args: out_map: output feature map of the model of s
doctr/models/detection/fast/pytorch.py:225
↓ 1 callersMethodcompute_loss
Compute a batch of gts, masks, thresh_gts, thresh_masks from a list of boxes and a list of masks for each image. From there it computes the lo
doctr/models/detection/differentiable_binarization/pytorch.py:235
↓ 1 callersFunctioncreate_shadow_mask
Creates a random shadow mask Args: target_shape: the target shape (H, W) min_base_width: the relative minimum shadow base width
doctr/transforms/functional/base.py:109
↓ 1 callersFunctioncrop_boxes
Crop localization boxes Args: boxes: ndarray of shape (N, 4) in relative or abs coordinates crop_box: box (xmin, ymin, xmax, ymax
doctr/transforms/functional/base.py:15
↓ 1 callersMethodctc_best_path
Implements best path decoding as shown by Graves (Dissertation, p63), highly inspired from <https://github.com/githubharald/CTCDecoder>`_.
doctr/models/recognition/crnn/pytorch.py:56
↓ 1 callersMethodctc_best_path
Implements best path decoding as shown by Graves (Dissertation, p63), highly inspired from <https://github.com/githubharald/CTCDecoder>`_.
doctr/models/recognition/viptr/pytorch.py:44
↓ 1 callersMethoddecode
Decode function for prediction Args: encoded: input tensor Returns: A tuple of torch.Tensor: predictions, lo
doctr/models/recognition/master/pytorch.py:231
↓ 1 callersMethoddecoder_block
Creates a LinkNet decoder block
doctr/models/detection/linknet/pytorch.py:63
↓ 1 callersFunctiondilate
Performs dilation on a given tensor Args: x: boolean tensor of shape (N, C, H, W) kernel_size: the size of the kernel to use for
doctr/models/detection/_utils/pytorch.py:27
↓ 1 callersMethoddraw_thresh_map
Draw a polygon threshold map on a canvas, as described in the DB paper Args: polygon : array of coord., to draw the boundary of t
doctr/models/detection/differentiable_binarization/base.py:202
↓ 1 callersMethodearly_stop
(self, validation_loss: float)
references/recognition/utils.py:83
↓ 1 callersMethodearly_stop
(self, validation_loss: float)
references/detection/utils.py:93
↓ 1 callersFunctionerode
Performs erosion on a given tensor Args: x: boolean tensor of shape (N, C, H, W) kernel_size: the size of the kernel to use for e
doctr/models/detection/_utils/pytorch.py:12
↓ 1 callersFunctionestimate_page_angle
Takes a batch of rotated previously ORIENTED polys (N, 4, 2) (rectified by the classifier) and return the estimated angle ccw in degrees
doctr/utils/geometry.py:350
↓ 1 callersFunctionevaluate
(model, val_loader, batch_transforms, val_metric, amp=False)
references/recognition/evaluate.py:27
↓ 1 callersFunctionevaluate
(model, val_loader, batch_transforms, val_metric, amp=False)
references/detection/evaluate.py:29
↓ 1 callersMethodexport_as_xml
Export the document as XML (hOCR-format) Args: **kwargs: additional keyword arguments passed to the Page.export_as_xml method
doctr/io/elements.py:637
↓ 1 callersMethodextra_repr
(self)
doctr/utils/repr.py:29
↓ 1 callersMethodextra_repr
(self)
doctr/datasets/datasets/base.py:75
↓ 1 callersFunctionfit_one_epoch
(model, device, train_loader, batch_transforms, optimizer, scheduler, amp=False, log=None, rank=0)
references/recognition/train.py:113
↓ 1 callersFunctionfit_one_epoch
(model, train_loader, batch_transforms, optimizer, scheduler, amp=False, log=None, rank=0)
references/detection/train.py:108
↓ 1 callersFunctionfit_one_epoch
(model, train_loader, batch_transforms, optimizer, scheduler, amp=False, log=None)
references/classification/train_orientation.py:121
↓ 1 callersFunctionfit_one_epoch
(model, train_loader, batch_transforms, optimizer, scheduler, amp=False, log=None)
references/classification/train_character.py:110
↓ 1 callersMethodformat_polygons
Format polygons into an array Args: polygons: the bounding boxes use_polygons: whether polygons should be considered
doctr/datasets/detection.py:66
↓ 1 callersFunctionforward_image
Forward an image through the predictor Args: predictor: instance of OCRPredictor image: image to process device: torch.de
demo/backend/pytorch.py:81
↓ 1 callersFunctionfrom_hub
Instantiate & load a pretrained model from HF hub. >>> from doctr.models import from_hub >>> model = from_hub("mindee/fasterrcnn_mobilenet_v3
doctr/models/factory/hub.py:181
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/recognition/parseq/pytorch.py:174
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/recognition/crnn/pytorch.py:158
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/recognition/master/pytorch.py:154
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/recognition/viptr/pytorch.py:129
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/recognition/vitstr/pytorch.py:77
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/detection/linknet/pytorch.py:163
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/detection/fast/pytorch.py:173
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/detection/differentiable_binarization/pytorch.py:182
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/classification/vit/pytorch.py:101
↓ 1 callersMethodfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/classification/textnet/pytorch.py:96
↓ 1 callersMethodfrom_url
Interpret a web page as a PDF document >>> from doctr.io import DocumentFile >>> doc = DocumentFile.from_url("https://www.yoursite.co
doctr/io/reader.py:41
↓ 1 callersMethodgenerate_permutations
(self, seqlen: torch.Tensor)
doctr/models/recognition/parseq/pytorch.py:194
↓ 1 callersMethodgenerate_permutations_attention_masks
(self, permutation: torch.Tensor)
doctr/models/recognition/parseq/pytorch.py:236
↓ 1 callersFunctionget_colors
Generate num_colors color for matplotlib Args: num_colors: number of colors to generate Returns: colors: list of generated c
doctr/utils/visualization.py:137
↓ 1 callersFunctionget_cudnn_version
This will return a list of libcudnn.so; it's hard to tell which one is being used
scripts/collect_env.py:125
↓ 1 callersFunctionget_env_info
()
scripts/collect_env.py:225
↓ 1 callersFunctionget_gpu_info
(run_lambda)
scripts/collect_env.py:109
↓ 1 callersMethodget_lepe
Compute the learnable position encoding via depthwise convolution. Args: x: A float tensor of shape (b, n, c).
doctr/models/classification/vip/layers/pytorch.py:483
↓ 1 callersFunctionget_lsb_version
(run_lambda)
scripts/collect_env.py:188
↓ 1 callersFunctionget_mac_version
(run_lambda)
scripts/collect_env.py:180
↓ 1 callersFunctionget_nvidia_driver_version
(run_lambda)
scripts/collect_env.py:101
↓ 1 callersFunctionget_os
(run_lambda)
scripts/collect_env.py:196
↓ 1 callersFunctionget_pretty_env_info
Collects environment information for debugging purposes Returns: str: environment information
scripts/collect_env.py:305
↓ 1 callersFunctionget_running_cuda_version
(run_lambda)
scripts/collect_env.py:121
↓ 1 callersMethodget_text
(text_pred: dict)
doctr/models/kie_predictor/pytorch.py:180
↓ 1 callersFunctionget_windows_version
(run_lambda)
scripts/collect_env.py:184
↓ 1 callersMethodimg2windows
Slice an image into windows of shape (h_sp, w_sp). Args: img: A float tensor of shape (b, c, h, w). h_sp: Th
doctr/models/classification/vip/layers/pytorch.py:405
↓ 1 callersMethodinterpolate_pos_encoding
100 % borrowed from: https://github.com/huggingface/transformers/blob/main/src/transformers/models/vit/modeling_vit.py This method al
doctr/models/modules/vision_transformer/pytorch.py:29
↓ 1 callersFunctionk
(t,r)
docs/source/_static/js/custom.js:94
↓ 1 callersFunctionload_predictor
Load a predictor from doctr.models Args: det_arch: detection architecture reco_arch: recognition architecture assume_stra
demo/backend/pytorch.py:36
↓ 1 callersFunctionmain
(args)
scripts/analyze.py:11
↓ 1 callersFunctionmain
(args)
scripts/detect_text.py:50
↓ 1 callersFunctionmain
(args)
scripts/evaluate_kie.py:22
↓ 1 callersFunctionmain
(args)
scripts/evaluate.py:22
↓ 1 callersFunctionmain
()
scripts/collect_env.py:313
↓ 1 callersFunctionmain
(args)
references/recognition/train.py:193
↓ 1 callersFunctionmain
(args)
references/recognition/latency.py:18
↓ 1 callersFunctionmain
(args)
references/recognition/evaluate.py:63
↓ 1 callersFunctionmain
(args)
references/detection/train.py:191
↓ 1 callersFunctionmain
(args)
references/detection/latency.py:18
↓ 1 callersFunctionmain
(args)
references/detection/evaluate.py:61
↓ 1 callersFunctionmain
(args)
references/classification/train_orientation.py:200
↓ 1 callersFunctionmain
(args)
references/classification/latency.py:18
↓ 1 callersFunctionmain
(args)
references/classification/train_character.py:189
↓ 1 callersFunctionmain
Build a streamlit layout
demo/app.py:19
↓ 1 callersFunctionmaybe_start_on_next_line
(string)
scripts/collect_env.py:285
↓ 1 callersMethodmerge_dataset
(self, ds: AbstractDataset)
doctr/datasets/recognition.py:48
↓ 1 callersFunctionparseGithubButtons
* modified to run programmatically
docs/source/_static/js/custom.js:94
↓ 1 callersFunctionparse_args
()
scripts/analyze.py:25
← previousnext →201–300 of 871, ranked by callers