MCPcopy Index your code

hub / github.com/mindee/doctr / types & classes

Types & classes153 in github.com/mindee/doctr

↓ 32 callersClassResize
Resize the input image to the given size >>> import torch >>> from doctr.transforms import Resize >>> transfo = Resize((64, 64), preserve
doctr/transforms/modules/pytorch.py:29
↓ 8 callersClassPreProcessor
Implements an abstract preprocessor object which performs casting, resizing, batching and normalization. Args: output_size: expected size
doctr/models/preprocessor/pytorch.py:21
↓ 6 callersClassPositionwiseFeedForward
Position-wise Feed-Forward Network
doctr/models/modules/transformer/pytorch.py:58
↓ 5 callersClassMultiHeadAttention
Multi-Head Attention
doctr/models/modules/transformer/pytorch.py:73
↓ 4 callersClassKIEPredictor
Implements an object able to localize and identify text elements in a set of documents Args: det_predictor: detection module reco
doctr/models/kie_predictor/pytorch.py:23
↓ 4 callersClassLocalizationConfusion
r"""Implements common confusion metrics and mean IoU for localization evaluation. The aggregated metrics are computed as follows: .. math::
doctr/utils/metrics.py:219
↓ 4 callersClassOCRPredictor
Implements an object able to localize and identify text elements in a set of documents Args: det_predictor: detection module reco
doctr/models/predictor/pytorch.py:23
↓ 4 callersClassTextMatch
r"""Implements text match metric (word-level accuracy) for recognition task. The raw aggregated metric is computed as follows: .. math::
doctr/utils/metrics.py:44
↓ 3 callersClassDBPostProcessor
Implements a post processor for DBNet adapted from the implementation of `xuannianz <https://github.com/xuannianz/DifferentiableBinarization>`_.
doctr/models/detection/differentiable_binarization/base.py:19
↓ 3 callersClassDetectionPredictor
Implements an object able to localize text elements in a document Args: pre_processor: transform inputs for easier batched model inferenc
doctr/models/detection/predictor/pytorch.py:19
↓ 3 callersClassDropPath
DropPath (Drop Connect) layer. This is a stochastic version of the identity layer.
doctr/models/modules/layers/pytorch.py:14
↓ 3 callersClassFASTConvLayer
Convolutional layer used in the TextNet and FAST architectures
doctr/models/modules/layers/pytorch.py:62
↓ 3 callersClassFASTPostProcessor
Implements a post processor for FAST model. Args: bin_thresh: threshold used to binzarized p_map at inference time box_thresh: mi
doctr/models/detection/fast/base.py:21
↓ 3 callersClassLinkNetPostProcessor
Implements a post processor for LinkNet model. Args: bin_thresh: threshold used to binzarized p_map at inference time box_thresh:
doctr/models/detection/linknet/base.py:21
↓ 3 callersClassRecognitionDataset
Dataset implementation for text recognition tasks >>> from doctr.datasets import RecognitionDataset >>> train_set = RecognitionDataset(img_fo
doctr/datasets/recognition.py:16
↓ 3 callersClassRecognitionPredictor
Implements an object able to identify character sequences in images Args: pre_processor: transform inputs for easier batched model infere
doctr/models/recognition/predictor/pytorch.py:21
↓ 3 callersClassVIPBlock
Unified block for Local, Global, and Mixed feature mixing in VIP architecture.
doctr/models/classification/vip/pytorch.py:57
↓ 2 callersClassCharacterGenerator
Implements a character image generation dataset >>> from doctr.datasets import CharacterGenerator >>> ds = CharacterGenerator(vocab='abdef',
doctr/datasets/generator/pytorch.py:13
↓ 2 callersClassCrossShapedWindowAttention
Local mixing module, performing attention within cross-shaped windows. This captures local patterns by splitting the feature map into two cr
doctr/models/classification/vip/layers/pytorch.py:545
↓ 2 callersClassDetectionDataset
Implements a text detection dataset >>> from doctr.datasets import DetectionDataset >>> train_set = DetectionDataset(img_folder="/path/to/ima
doctr/datasets/detection.py:20
↓ 2 callersClassEarlyStopper
references/classification/utils.py:76
↓ 2 callersClassOCRMetric
r"""Implements an end-to-end OCR metric. The aggregated metrics are computed as follows: .. math:: \forall (B, L) \in \mathcal{B}^N
doctr/utils/metrics.py:312
↓ 2 callersClassOrientationDataset
Implements a basic image dataset where targets are filled with zeros. >>> from doctr.datasets import OrientationDataset >>> train_set = Orien
doctr/datasets/orientation.py:16
↓ 2 callersClassOrientationPredictor
Implements an object able to detect the reading direction of a text box or a page. 4 possible orientations: 0, 90, 180, 270 (-90) degrees counter
doctr/models/classification/predictor/pytorch.py:17
↓ 2 callersClassPositionalEncoding
Compute positional encoding
doctr/models/modules/transformer/pytorch.py:18
↓ 2 callersClassPrediction
Implements a prediction element
doctr/io/elements.py:187
↓ 2 callersClassRandomRotate
Randomly rotate a tensor image and its boxes .. image:: https://doctr-static.mindee.com/models?id=v0.4.0/rotation_illustration.png&src=0
doctr/transforms/modules/base.py:150
↓ 2 callersClassResNet
Implements a ResNet-31 architecture from `"Show, Attend and Read:A Simple and Strong Baseline for Irregular Text Recognition" <https://arxiv.org/p
doctr/models/classification/resnet/pytorch.py:84
↓ 2 callersClassWord
Implements a word element Args: value: the text string of the word confidence: the confidence associated with the text prediction
doctr/io/elements.py:66
↓ 2 callersClassWordGenerator
Implements a character image generation dataset >>> from doctr.datasets import WordGenerator >>> ds = WordGenerator(vocab='abdef', min_chars=
doctr/datasets/generator/pytorch.py:34
↓ 2 callersClass_BasePredictor
Base class for all predictors Args: batch_size: the batch size to use url: the url to use to download a model if needed
doctr/contrib/base.py:14
↓ 2 callersClass_DummyCallback
tests/pytorch/test_models_zoo_pt.py:23
↓ 1 callersClassAdaptiveAvgPool2d
Custom AdaptiveAvgPool2d implementation which is ONNX and `torch.compile` compatible.
doctr/models/modules/layers/pytorch.py:36
↓ 1 callersClassAttention
Standard multi-head attention module. This module applies self-attention across the input sequence using 'num_heads' heads. Args:
doctr/models/classification/vip/layers/pytorch.py:88
↓ 1 callersClassAttentionModule
doctr/models/recognition/sar/pytorch.py:47
↓ 1 callersClassBlock
Implements a block element as a collection of lines and artefacts Args: lines: list of line elements artefacts: list of artefacts
doctr/io/elements.py:198
↓ 1 callersClassCRNN
Implements a CRNN architecture as described in `"An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application t
doctr/models/recognition/crnn/pytorch.py:98
↓ 1 callersClassCTCPostProcessor
Postprocess raw prediction of the model (logits) to a list of words using CTC decoding Args: vocab: string containing the ordered sequenc
doctr/models/recognition/crnn/pytorch.py:48
↓ 1 callersClassChannelShuffle
Randomly shuffle channel order of a given image
doctr/transforms/modules/pytorch.py:189
↓ 1 callersClassCharEmbedding
Implements the character embedding module Args: vocab_size: size of the vocabulary d_model: dimension of the model
doctr/models/recognition/parseq/pytorch.py:38
↓ 1 callersClassClassifierHead
Classifier head for Vision Transformer Args: in_channels: number of input channels num_classes: number of output classes
doctr/models/classification/vit/pytorch.py:39
↓ 1 callersClassClassifierHead
Classification head which averages the features and applies a linear layer.
doctr/models/classification/vip/pytorch.py:46
↓ 1 callersClassColorInversion
Applies the following tranformation to a tensor (image or batch of images): convert to grayscale, colorize (shift 0-values randomly), and then inv
doctr/transforms/modules/base.py:71
↓ 1 callersClassDBNet
DBNet as described in `"Real-time Scene Text Detection with Differentiable Binarization" <https://arxiv.org/pdf/1911.08947.pdf>`_. Args:
doctr/models/detection/differentiable_binarization/pytorch.py:95
↓ 1 callersClassDecoder
Transformer Decoder
doctr/models/modules/transformer/pytorch.py:145
↓ 1 callersClassDetectionIn
api/app/schemas.py:39
↓ 1 callersClassDetectionOut
api/app/schemas.py:55
↓ 1 callersClassDocument
Implements a document element as a collection of pages Args: pages: list of page elements
doctr/io/elements.py:601
↓ 1 callersClassDocumentBuilder
Implements a document builder Args: resolve_lines: whether words should be automatically grouped into lines resolve_blocks: wheth
doctr/models/builder.py:19
↓ 1 callersClassEarlyStopper
references/recognition/utils.py:76
↓ 1 callersClassEarlyStopper
references/detection/utils.py:86
↓ 1 callersClassEncoderBlock
Transformer Encoder Block
doctr/models/modules/transformer/pytorch.py:104
↓ 1 callersClassFAST
FAST as described in `"FAST: Faster Arbitrarily-Shaped Text Detector with Minimalist Kernel Representation" <https://arxiv.org/pdf/2111.02394.pdf>
doctr/models/detection/fast/pytorch.py:101
↓ 1 callersClassFastHead
Head of the FAST architecture Args: in_channels: number of input channels num_classes: number of output classes out_chann
doctr/models/detection/fast/pytorch.py:76
↓ 1 callersClassFastNeck
Neck of the FAST architecture, composed of a series of 3x3 convolutions and upsampling layers. Args: in_channels: number of input channel
doctr/models/detection/fast/pytorch.py:47
↓ 1 callersClassFeaturePyramidNetwork
doctr/models/detection/differentiable_binarization/pytorch.py:48
↓ 1 callersClassGaussianBlur
Apply Gaussian Blur to the input tensor >>> import torch >>> from doctr.transforms import GaussianBlur >>> transfo = GaussianBlur(sigma=(
doctr/transforms/modules/pytorch.py:156
↓ 1 callersClassGaussianNoise
Adds Gaussian Noise to the input tensor >>> import torch >>> from doctr.transforms import GaussianNoise >>> transfo = GaussianNoise(0., 1
doctr/transforms/modules/pytorch.py:126
↓ 1 callersClassKIEDocument
Implements a document element as a collection of pages Args: pages: list of page elements
doctr/io/elements.py:655
↓ 1 callersClassKIEDocumentBuilder
Implements a KIE document builder Args: resolve_lines: whether words should be automatically grouped into lines resolve_blocks: w
doctr/models/builder.py:360
↓ 1 callersClassKIEElement
api/app/schemas.py:165
↓ 1 callersClassKIEIn
api/app/schemas.py:11
↓ 1 callersClassKIEOut
api/app/schemas.py:181
↓ 1 callersClassKIEPage
Implements a KIE page element as a collection of predictions Args: predictions: Dictionary with list of block elements for each detection
doctr/io/elements.py:427
↓ 1 callersClassLePEAttention
Local Enhancement Positional Encoding (LePE) Attention. This is used for computing attention in cross-shaped windows (part of CrossShapedWin
doctr/models/classification/vip/layers/pytorch.py:365
↓ 1 callersClassLine
Implements a line element as a collection of words Args: words: list of word elements geometry: bounding box of the word in forma
doctr/io/elements.py:141
↓ 1 callersClassLinkNet
LinkNet as described in `"LinkNet: Exploiting Encoder Representations for Efficient Semantic Segmentation" <https://arxiv.org/pdf/1707.03718.pdf>`
doctr/models/detection/linknet/pytorch.py:88
↓ 1 callersClassLinkNetFPN
doctr/models/detection/linknet/pytorch.py:46
↓ 1 callersClassMASTER
Implements MASTER as described in paper: <https://arxiv.org/pdf/1910.02562.pdf>`_. Implementation based on the official Pytorch implementation: <h
doctr/models/recognition/master/pytorch.py:36
↓ 1 callersClassMASTERPostProcessor
Post processor for MASTER architectures
doctr/models/recognition/master/pytorch.py:260
↓ 1 callersClassMultiHeadSelfAttention
Multi-head Self Attention block with an MLP for feed-forward processing. This block normalizes the input, applies attention mixing, adds a r
doctr/models/classification/vip/layers/pytorch.py:145
↓ 1 callersClassOCRBlock
api/app/schemas.py:85
↓ 1 callersClassOCRIn
api/app/schemas.py:28
↓ 1 callersClassOCRLine
api/app/schemas.py:68
↓ 1 callersClassOCROut
api/app/schemas.py:134
↓ 1 callersClassOCRPage
api/app/schemas.py:107
↓ 1 callersClassOCRWord
api/app/schemas.py:60
↓ 1 callersClassOSRABlock
Global token mixing block using Overlapped Spatial Reduction Attention (OSRA). Captures global dependencies by aggregating context from a wi
doctr/models/classification/vip/layers/pytorch.py:283
↓ 1 callersClassOverlappedSpatialReductionAttention
Overlapped Spatial Reduction Attention (OSRA). This attention mechanism downsamples the input according to 'sr_ratio' (spatial reduction rat
doctr/models/classification/vip/layers/pytorch.py:198
↓ 1 callersClassPARSeq
Implements a PARSeq architecture as described in `"Scene Text Recognition with Permuted Autoregressive Sequence Models" <https://arxiv.org/pdf/220
doctr/models/recognition/parseq/pytorch.py:106
↓ 1 callersClassPARSeqDecoder
Implements decoder module of the PARSeq model Args: d_model: dimension of the model num_heads: number of attention heads
doctr/models/recognition/parseq/pytorch.py:55
↓ 1 callersClassPARSeqPostProcessor
Post processor for PARSeq architecture Args: vocab: string containing the ordered sequence of supported characters
doctr/models/recognition/parseq/pytorch.py:407
↓ 1 callersClassPage
Implements a page element as a collection of blocks Args: page: image encoded as a numpy array in uint8 blocks: list of block ele
doctr/io/elements.py:251
↓ 1 callersClassPatchEmbed
Patch embedding layer for Vision Permutable Extractor. This layer reduces the spatial resolution of the input tensor by a factor of 4 in tot
doctr/models/classification/vip/layers/pytorch.py:49
↓ 1 callersClassPatchEmbedding
Compute 2D patch embeddings with cls token and positional encoding
doctr/models/modules/vision_transformer/pytorch.py:14
↓ 1 callersClassPatchMerging
Patch Merging Layer. Reduces the spatial dimension by half along the height. If the input has shape (b, h, w, c), the output shape becom
doctr/models/classification/vip/layers/pytorch.py:332
↓ 1 callersClassPermuteLayer
Custom layer to permute dimensions in a Sequential model.
doctr/models/classification/vip/layers/pytorch.py:27
↓ 1 callersClassRandomCrop
Randomly crop a tensor image and its boxes Args: scale: tuple of floats, relative (min_area, max_area) of the crop ratio: tuple o
doctr/transforms/modules/base.py:176
↓ 1 callersClassRandomHorizontalFlip
Randomly flip the input image horizontally
doctr/transforms/modules/pytorch.py:201
↓ 1 callersClassRandomResize
Randomly resize the input image and align corresponding targets >>> import torch >>> from doctr.transforms import RandomResize >>> transf
doctr/transforms/modules/pytorch.py:258
↓ 1 callersClassRandomShadow
Adds random shade to the input image >>> import torch >>> from doctr.transforms import RandomShadow >>> transfo = RandomShadow((0., 1.))
doctr/transforms/modules/pytorch.py:217
↓ 1 callersClassRecognitionIn
api/app/schemas.py:34
↓ 1 callersClassRecognitionOut
api/app/schemas.py:49
↓ 1 callersClassSAR
Implements a SAR architecture as described in `"Show, Attend and Read:A Simple and Strong Baseline for Irregular Text Recognition" <https://arxiv.
doctr/models/recognition/sar/pytorch.py:164
↓ 1 callersClassSARDecoder
Implements decoder module of the SAR model Args: rnn_units: number of hidden units in recurrent cells max_length: maximum length
doctr/models/recognition/sar/pytorch.py:80
↓ 1 callersClassSAREncoder
doctr/models/recognition/sar/pytorch.py:34
↓ 1 callersClassSARPostProcessor
Post processor for SAR architectures Args: vocab: string containing the ordered sequence of supported characters
doctr/models/recognition/sar/pytorch.py:318
↓ 1 callersClassSqueezeLayer
Custom layer to squeeze out a dimension in a Sequential model.
doctr/models/classification/vip/layers/pytorch.py:38
↓ 1 callersClassTextNet
Implements TextNet architecture from `"FAST: Faster Arbitrarily-Shaped Text Detector with Minimalist Kernel Representation" <https://arxiv.org/abs
doctr/models/classification/textnet/pytorch.py:44
↓ 1 callersClassVIPNet
VIP (Vision Permutable) encoder architecture, adapted for text recognition.
doctr/models/classification/vip/pytorch.py:126
next →1–100 of 153, ranked by callers