MCPcopy Create free account

hub / github.com/mindee/doctr / functions

Functions871 in github.com/mindee/doctr

Methodforward
(self, x: torch.Tensor)
doctr/models/classification/vip/layers/pytorch.py:45
Methodforward
Forward pass for PatchEmbed. Args: x: A float tensor of shape (b, c, h, w). Returns: A float tensor
doctr/models/classification/vip/layers/pytorch.py:75
Methodforward
Forward pass for Attention. Args: x: A float tensor of shape (b, n, c), where n is the sequence length and c is
doctr/models/classification/vip/layers/pytorch.py:120
Methodforward
Forward pass for MultiHeadSelfAttention. Args: x: A float tensor of shape (b, n, c). size: An optional (h, w
doctr/models/classification/vip/layers/pytorch.py:182
Methodforward
Forward pass for OverlappedSpatialReductionAttention. Args: x: A float tensor of shape (b, n, c) where n = h * w.
doctr/models/classification/vip/layers/pytorch.py:253
Methodforward
Forward pass for OSRABlock. Args: x: A float tensor of shape (b, n, c). size: A tuple (h, w) giving the heig
doctr/models/classification/vip/layers/pytorch.py:316
Methodforward
Forward pass for PatchMerging. Args: x: A float tensor of shape (b, h, w, c). Returns: A float tens
doctr/models/classification/vip/layers/pytorch.py:350
Methodforward
Forward pass for LePEAttention. Splits Q/K/V according to cross-shaped windows, computes attention, and returns the combined
doctr/models/classification/vip/layers/pytorch.py:509
Methodforward
Forward pass for CrossShapedWindowAttention. Args: x: A float tensor of shape (b, n, c), where n = h * w. si
doctr/models/classification/vip/layers/pytorch.py:592
Methodforward
( self, pages: list[np.ndarray], **kwargs: Any, )
doctr/models/kie_predictor/pytorch.py:69
Methodfrom_dict
(cls, save_dict: dict[str, Any], **kwargs)
doctr/io/elements.py:59
Methodfrom_dict
(cls, save_dict: dict[str, Any], **kwargs)
doctr/io/elements.py:136
Methodfrom_dict
(cls, save_dict: dict[str, Any], **kwargs)
doctr/io/elements.py:179
Methodfrom_dict
(cls, save_dict: dict[str, Any], **kwargs)
doctr/io/elements.py:242
Methodfrom_dict
(cls, save_dict: dict[str, Any], **kwargs)
doctr/io/elements.py:421
Methodfrom_dict
(cls, save_dict: dict[str, Any], **kwargs)
doctr/io/elements.py:593
Methodfrom_dict
(cls, save_dict: dict[str, Any], **kwargs)
doctr/io/elements.py:649
Functionfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/classification/resnet/pytorch.py:216
Functionfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/classification/vgg/pytorch.py:59
Functionfrom_pretrained
Load pretrained parameters onto the model Args: path_or_url: the path or URL to the model parameters (checkpoint) **k
doctr/models/classification/mobilenet/pytorch.py:104
Functionget_max_width_length_ratio
Get the maximum shape ratio of a contour. Args: contour: the contour from cv2.findContour Returns: the maximum shape ratio
doctr/models/_utils.py:19
Functioninplace_transfo
(x, target)
tests/common/test_datasets.py:59
Functioninvert_colors
Invert the colors of an image Args: img : torch.Tensor, the image to invert min_val : minimum value of the random shift Retu
doctr/transforms/functional/pytorch.py:20
Functionlinknet_resnet18
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:299
Functionlinknet_resnet34
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:329
Functionlinknet_resnet50
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:359
Functionlog_at_step
(train_loss=None, val_loss=None, lr=None)
references/recognition/train.py:548
Functionlog_at_step
(train_loss=None, val_loss=None, lr=None)
references/detection/train.py:506
Functionlog_at_step
(train_loss=None, val_loss=None, lr=None)
references/classification/train_orientation.py:406
Functionlog_at_step
(train_loss=None, val_loss=None, lr=None)
references/classification/train_character.py:400
Functionmagc_resnet31
Resnet31 architecture with Multi-Aspect Global Context Attention as described in `"MASTER: Multi-Aspect Non-local Network for Scene Text Recogniti
doctr/models/classification/magc_resnet/pytorch.py:143
Functionmaster
MASTER as described in paper: <https://arxiv.org/pdf/1910.02562.pdf>`_. >>> import torch >>> from doctr.models import master >>> model =
doctr/models/recognition/master/pytorch.py:318
Functionmobilenet_v3_large
MobileNetV3-Large architecture as described in `"Searching for MobileNetV3", <https://arxiv.org/pdf/1905.02244.pdf>`_. >>> import torch
doctr/models/classification/mobilenet/pytorch.py:178
Functionmobilenet_v3_large_r
MobileNetV3-Large architecture as described in `"Searching for MobileNetV3", <https://arxiv.org/pdf/1905.02244.pdf>`_, with rectangular poolin
doctr/models/classification/mobilenet/pytorch.py:204
Functionmobilenet_v3_small
MobileNetV3-Small architecture as described in `"Searching for MobileNetV3", <https://arxiv.org/pdf/1905.02244.pdf>`_. >>> import torch
doctr/models/classification/mobilenet/pytorch.py:128
Functionmobilenet_v3_small_r
MobileNetV3-Small architecture as described in `"Searching for MobileNetV3", <https://arxiv.org/pdf/1905.02244.pdf>`_, with rectangular poolin
doctr/models/classification/mobilenet/pytorch.py:151
Functionmock_artefact_image_stream
()
tests/conftest.py:87
Functionmock_bitmap
(mock_image)
tests/common/test_models.py:25
Functionmock_cocotext_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:717
Functionmock_cord_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:379
Functionmock_detection_image
(tmpdir_factory)
api/tests/conftest.py:15
Functionmock_detection_label
(tmpdir_factory)
tests/conftest.py:114
Functionmock_detection_response
()
api/tests/conftest.py:35
Functionmock_doc_artefacts
(tmpdir_factory, mock_image_stream)
tests/conftest.py:497
Functionmock_funsd_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:327
Functionmock_ic03_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:593
Functionmock_ic13
(tmpdir_factory, mock_image_stream)
tests/conftest.py:187
Functionmock_iiit5k_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:536
Functionmock_iiithws_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:648
Functionmock_image
(tmpdir_factory)
tests/common/test_models.py:14
Functionmock_image_folder
(mock_image_stream, tmpdir_factory)
tests/conftest.py:103
Functionmock_image_path
(mock_image_stream, tmpdir_factory)
tests/conftest.py:93
Functionmock_image_stream
()
tests/conftest.py:81
Functionmock_imgur5k
(tmpdir_factory, mock_image_stream)
tests/conftest.py:209
Functionmock_kie_response
()
api/tests/conftest.py:73
Functionmock_mjsynth_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:622
Functionmock_ocr_response
()
api/tests/conftest.py:151
Functionmock_ocrdataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:151
Functionmock_payslip
(tmpdir_factory)
tests/conftest.py:46
Functionmock_pdf
(tmpdir_factory)
tests/conftest.py:27
Functionmock_recognition_image
(tmpdir_factory)
api/tests/conftest.py:9
Functionmock_recognition_label
(tmpdir_factory)
tests/conftest.py:136
Functionmock_sroie_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:298
Functionmock_svhn_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:256
Functionmock_svt_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:563
Functionmock_synthtext_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:469
Functionmock_text_box
(mock_text_box_stream, tmpdir_factory)
tests/conftest.py:72
Functionmock_text_box_stream
()
tests/conftest.py:66
Functionmock_tilted_payslip
(mock_payslip, tmpdir_factory)
tests/conftest.py:57
Functionmock_txt_file
(tmpdir_factory)
api/tests/conftest.py:21
Functionmock_vocab
()
tests/conftest.py:19
Functionmock_wildreceipt_dataset
(tmpdir_factory, mock_image_stream)
tests/conftest.py:675
Functionnms
Perform non-max suppression, borrowed from <https://github.com/rbgirshick/fast-rcnn>`_. Args: boxes: np array of straight boxes: (*, 5),
doctr/utils/metrics.py:181
Methodohem_sample
(score: torch.Tensor, gt: torch.Tensor, mask: torch.Tensor)
doctr/models/detection/fast/pytorch.py:247
FunctiononLoad
()
docs/source/_static/js/custom.js:96
Functionparseq
PARSeq architecture from `"Scene Text Recognition with Permuted Autoregressive Sequence Models" <https://arxiv.org/pdf/2207.06966>`_. >>> imp
doctr/models/recognition/parseq/pytorch.py:474
Functionperform_kie
Runs docTR KIE model to analyze the input image
api/app/routes/kie.py:17
Functionperform_ocr
Runs docTR OCR model to analyze the input image
api/app/routes/ocr.py:17
Functionpolygon_to_bbox
Convert a polygon to a bounding box Args: polygon: a polygon Returns: a bounding box
doctr/utils/geometry.py:44
Methodpostprocess
(self, output: list[np.ndarray], input_images: list[list[np.ndarray]])
doctr/contrib/artefacts.py:68
Functionpre_transform_multiclass
Converts multiclass target to relative coordinates. Args: img: Image target: tuple of target polygons and their classes names
doctr/datasets/utils.py:212
Methodpreprocess
(self, img: np.ndarray)
doctr/contrib/artefacts.py:65
Methodrender
(self)
doctr/io/elements.py:62
Functionresnet18
ResNet-18 architecture as described in `"Deep Residual Learning for Image Recognition", <https://arxiv.org/pdf/1512.03385.pdf>`_. >>> import
doctr/models/classification/resnet/pytorch.py:239
Functionresnet31
Resnet31 architecture with rectangular pooling windows as described in `"Show, Attend and Read:A Simple and Strong Baseline for Irregular Text Rec
doctr/models/classification/resnet/pytorch.py:265
Functionresnet34
ResNet-34 architecture as described in `"Deep Residual Learning for Image Recognition", <https://arxiv.org/pdf/1512.03385.pdf>`_. >>> import
doctr/models/classification/resnet/pytorch.py:298
Functionresnet34_wide
ResNet-34 architecture as described in `"Deep Residual Learning for Image Recognition", <https://arxiv.org/pdf/1512.03385.pdf>`_ with twice as man
doctr/models/classification/resnet/pytorch.py:324
Functionresnet50
ResNet-50 architecture as described in `"Deep Residual Learning for Image Recognition", <https://arxiv.org/pdf/1512.03385.pdf>`_. >>> import
doctr/models/classification/resnet/pytorch.py:356
Functionrun
Returns (return-code, stdout, stderr)
scripts/collect_env.py:70
Functionsar_resnet31
SAR with a resnet-31 feature extractor as described in `"Show, Attend and Read:A Simple and Strong Baseline for Irregular Text Recognition" <https
doctr/models/recognition/sar/pytorch.py:381
Functiontest_abstractdataset
(mock_image_path)
tests/common/test_datasets.py:19
Functiontest_app_asyncio
()
api/tests/conftest.py:28
Functiontest_artefact
()
tests/common/test_io_elements.py:220
Functiontest_artefact_detection
(input_size, num_samples, rotate, mock_doc_artefacts)
tests/pytorch/test_datasets_pt.py:291
Functiontest_artefact_detector
(mock_artefact_image_stream)
tests/common/test_contrib.py:22
Functiontest_base_predictor
()
tests/common/test_contrib.py:9
Functiontest_bbox_to_polygon
()
tests/common/test_utils_geometry.py:11
Functiontest_bf16_to_float32
()
tests/pytorch/test_models_utils_pt.py:22
Functiontest_block
()
tests/common/test_io_elements.py:283
Functiontest_box_iou
(box1, box2, iou, abs_tol)
tests/common/test_utils_metrics.py:41
← previousnext →601–700 of 871, ranked by callers