python-doctr 1.0.0__py3-none-any.whl → 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- doctr/cli/__init__.py +0 -0
- doctr/cli/main.py +506 -0
- doctr/contrib/artefacts.py +1 -1
- doctr/contrib/base.py +1 -1
- doctr/datasets/__init__.py +2 -0
- doctr/datasets/coco_text.py +5 -3
- doctr/datasets/cord.py +3 -2
- doctr/datasets/datasets/base.py +13 -25
- doctr/datasets/datasets/pytorch.py +15 -5
- doctr/datasets/detection.py +3 -2
- doctr/datasets/doc_artefacts.py +3 -2
- doctr/datasets/funsd.py +3 -2
- doctr/datasets/generator/base.py +6 -5
- doctr/datasets/generator/pytorch.py +5 -6
- doctr/datasets/ic03.py +4 -3
- doctr/datasets/ic13.py +5 -3
- doctr/datasets/iiit5k.py +3 -2
- doctr/datasets/iiithws.py +5 -3
- doctr/datasets/imgur5k.py +5 -3
- doctr/datasets/layout.py +123 -0
- doctr/datasets/mjsynth.py +5 -3
- doctr/datasets/ocr.py +3 -2
- doctr/datasets/orientation.py +3 -2
- doctr/datasets/recognition.py +3 -2
- doctr/datasets/sroie.py +3 -2
- doctr/datasets/svhn.py +3 -2
- doctr/datasets/svt.py +4 -3
- doctr/datasets/synthtext.py +3 -2
- doctr/datasets/table_structure.py +97 -0
- doctr/datasets/utils.py +15 -6
- doctr/datasets/vocabs.py +3 -1
- doctr/datasets/wildreceipt.py +5 -3
- doctr/file_utils.py +4 -2
- doctr/io/__init__.py +1 -0
- doctr/io/elements.py +253 -261
- doctr/io/exporters.py +1275 -0
- doctr/io/html.py +1 -1
- doctr/io/image/base.py +4 -3
- doctr/io/image/pytorch.py +6 -4
- doctr/io/pdf.py +1 -1
- doctr/io/reader.py +1 -1
- doctr/models/__init__.py +2 -0
- doctr/models/_utils.py +111 -25
- doctr/models/builder.py +533 -62
- doctr/models/classification/__init__.py +2 -0
- doctr/models/classification/magc_resnet/pytorch.py +2 -2
- doctr/models/classification/mobilenet/pytorch.py +7 -7
- doctr/models/classification/predictor/pytorch.py +7 -3
- doctr/models/classification/resnet/pytorch.py +6 -6
- doctr/models/classification/starnet/__init__.py +1 -0
- doctr/models/classification/starnet/pytorch.py +202 -0
- doctr/models/classification/textnet/pytorch.py +7 -6
- doctr/models/classification/vgg/pytorch.py +4 -3
- doctr/models/classification/vip/layers/pytorch.py +5 -5
- doctr/models/classification/vip/pytorch.py +5 -5
- doctr/models/classification/vit/pytorch.py +4 -4
- doctr/models/classification/vit_det/__init__.py +1 -0
- doctr/models/classification/vit_det/layers/__init__.py +1 -0
- doctr/models/classification/vit_det/layers/pytorch.py +215 -0
- doctr/models/classification/vit_det/pytorch.py +346 -0
- doctr/models/classification/zoo.py +4 -1
- doctr/models/core.py +1 -1
- doctr/models/detection/_utils/base.py +24 -8
- doctr/models/detection/_utils/pytorch.py +1 -1
- doctr/models/detection/core.py +34 -19
- doctr/models/detection/differentiable_binarization/base.py +7 -5
- doctr/models/detection/differentiable_binarization/pytorch.py +4 -4
- doctr/models/detection/fast/base.py +6 -2
- doctr/models/detection/fast/pytorch.py +4 -4
- doctr/models/detection/linknet/base.py +6 -2
- doctr/models/detection/linknet/pytorch.py +4 -4
- doctr/models/detection/predictor/pytorch.py +4 -3
- doctr/models/detection/zoo.py +3 -3
- doctr/models/factory/hub.py +72 -52
- doctr/models/kie_predictor/base.py +17 -2
- doctr/models/kie_predictor/pytorch.py +42 -11
- doctr/models/layout/__init__.py +2 -0
- doctr/models/layout/lw_detr/__init__.py +1 -0
- doctr/models/layout/lw_detr/base.py +309 -0
- doctr/models/layout/lw_detr/layers/__init__.py +1 -0
- doctr/models/layout/lw_detr/layers/pytorch.py +785 -0
- doctr/models/layout/lw_detr/pytorch.py +838 -0
- doctr/models/layout/predictor/__init__.py +1 -0
- doctr/models/layout/predictor/pytorch.py +82 -0
- doctr/models/layout/zoo.py +90 -0
- doctr/models/modules/layers/pytorch.py +140 -4
- doctr/models/modules/transformer/pytorch.py +1 -1
- doctr/models/modules/vision_transformer/pytorch.py +1 -1
- doctr/models/predictor/base.py +138 -16
- doctr/models/predictor/pytorch.py +151 -9
- doctr/models/preprocessor/pytorch.py +78 -23
- doctr/models/reading_order/__init__.py +1 -0
- doctr/models/reading_order/base.py +667 -0
- doctr/models/recognition/core.py +1 -1
- doctr/models/recognition/crnn/pytorch.py +6 -8
- doctr/models/recognition/master/base.py +1 -1
- doctr/models/recognition/master/pytorch.py +7 -8
- doctr/models/recognition/parseq/base.py +1 -1
- doctr/models/recognition/parseq/pytorch.py +5 -5
- doctr/models/recognition/predictor/_utils.py +1 -1
- doctr/models/recognition/predictor/pytorch.py +2 -2
- doctr/models/recognition/sar/pytorch.py +2 -2
- doctr/models/recognition/utils.py +9 -11
- doctr/models/recognition/viptr/pytorch.py +4 -6
- doctr/models/recognition/vitstr/base.py +1 -1
- doctr/models/recognition/vitstr/pytorch.py +6 -6
- doctr/models/recognition/zoo.py +6 -7
- doctr/models/table_structure/__init__.py +2 -0
- doctr/models/table_structure/predictor/__init__.py +1 -0
- doctr/models/table_structure/predictor/pytorch.py +80 -0
- doctr/models/table_structure/tablecenternet/__init__.py +2 -0
- doctr/models/table_structure/tablecenternet/base.py +485 -0
- doctr/models/table_structure/tablecenternet/pytorch.py +522 -0
- doctr/models/table_structure/zoo.py +82 -0
- doctr/models/utils/pytorch.py +316 -16
- doctr/models/zoo.py +91 -3
- doctr/transforms/functional/base.py +3 -2
- doctr/transforms/functional/pytorch.py +1 -1
- doctr/transforms/modules/base.py +248 -83
- doctr/transforms/modules/pytorch.py +213 -74
- doctr/utils/common_types.py +22 -2
- doctr/utils/data.py +5 -4
- doctr/utils/fonts.py +56 -17
- doctr/utils/geometry.py +136 -19
- doctr/utils/metrics.py +351 -19
- doctr/utils/multithreading.py +6 -3
- doctr/utils/reconstitution.py +697 -133
- doctr/utils/repr.py +1 -1
- doctr/utils/visualization.py +63 -4
- doctr/version.py +1 -1
- {python_doctr-1.0.0.dist-info → python_doctr-1.1.0.dist-info}/METADATA +73 -26
- python_doctr-1.1.0.dist-info/RECORD +179 -0
- {python_doctr-1.0.0.dist-info → python_doctr-1.1.0.dist-info}/WHEEL +1 -1
- python_doctr-1.1.0.dist-info/entry_points.txt +2 -0
- python_doctr-1.0.0.dist-info/RECORD +0 -149
- {python_doctr-1.0.0.dist-info → python_doctr-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {python_doctr-1.0.0.dist-info → python_doctr-1.1.0.dist-info}/top_level.txt +0 -0
- {python_doctr-1.0.0.dist-info → python_doctr-1.1.0.dist-info}/zip-safe +0 -0
doctr/utils/repr.py
CHANGED
doctr/utils/visualization.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2021-
|
|
1
|
+
# Copyright (C) 2021-2026, Mindee.
|
|
2
2
|
|
|
3
3
|
# This program is licensed under the Apache License 2.0.
|
|
4
4
|
# See LICENSE or go to <https://opensource.org/licenses/Apache-2.0> for full license details.
|
|
@@ -148,7 +148,7 @@ def get_colors(num_colors: int) -> list[tuple[float, float, float]]:
|
|
|
148
148
|
hue = i / 360.0
|
|
149
149
|
lightness = (50 + np.random.rand() * 10) / 100.0
|
|
150
150
|
saturation = (90 + np.random.rand() * 10) / 100.0
|
|
151
|
-
colors.append(colorsys.hls_to_rgb(hue, lightness, saturation))
|
|
151
|
+
colors.append(colorsys.hls_to_rgb(hue, lightness, saturation))
|
|
152
152
|
return colors
|
|
153
153
|
|
|
154
154
|
|
|
@@ -157,6 +157,7 @@ def visualize_page(
|
|
|
157
157
|
image: np.ndarray,
|
|
158
158
|
words_only: bool = True,
|
|
159
159
|
display_artefacts: bool = True,
|
|
160
|
+
display_layout: bool = True,
|
|
160
161
|
scale: float = 10,
|
|
161
162
|
interactive: bool = True,
|
|
162
163
|
add_labels: bool = True,
|
|
@@ -179,6 +180,7 @@ def visualize_page(
|
|
|
179
180
|
image: np array of the page, needs to have the same shape than page['dimensions']
|
|
180
181
|
words_only: whether only words should be displayed
|
|
181
182
|
display_artefacts: whether artefacts should be displayed
|
|
183
|
+
display_layout: whether detected layout regions should be displayed
|
|
182
184
|
scale: figsize of the largest windows side
|
|
183
185
|
interactive: whether the plot should be interactive
|
|
184
186
|
add_labels: for static plot, adds text labels on top of bounding box
|
|
@@ -199,6 +201,33 @@ def visualize_page(
|
|
|
199
201
|
if interactive:
|
|
200
202
|
artists: list[patches.Patch] = [] # instantiate an empty list of patches (to be drawn on the page)
|
|
201
203
|
|
|
204
|
+
# Draw layout regions first so text boxes are overlaid on top of them
|
|
205
|
+
if display_layout and page.get("layout"):
|
|
206
|
+
region_classes = sorted({region["type"] for region in page["layout"]})
|
|
207
|
+
layout_colors = {cls: color for color, cls in zip(get_colors(max(len(region_classes), 1)), region_classes)}
|
|
208
|
+
for region in page["layout"]:
|
|
209
|
+
rect = create_obj_patch(
|
|
210
|
+
region["geometry"],
|
|
211
|
+
page["dimensions"],
|
|
212
|
+
label=f"{region['type']} (confidence: {region['confidence']:.2%})",
|
|
213
|
+
color=layout_colors[region["type"]],
|
|
214
|
+
linewidth=2,
|
|
215
|
+
fill=False,
|
|
216
|
+
**kwargs,
|
|
217
|
+
)
|
|
218
|
+
ax.add_patch(rect)
|
|
219
|
+
if interactive:
|
|
220
|
+
artists.append(rect)
|
|
221
|
+
elif add_labels and len(region["geometry"]) == 2:
|
|
222
|
+
ax.text(
|
|
223
|
+
int(page["dimensions"][1] * region["geometry"][0][0]),
|
|
224
|
+
int(page["dimensions"][0] * region["geometry"][0][1]),
|
|
225
|
+
region["type"],
|
|
226
|
+
size=9,
|
|
227
|
+
alpha=0.7,
|
|
228
|
+
color=layout_colors[region["type"]],
|
|
229
|
+
)
|
|
230
|
+
|
|
202
231
|
for block in page["blocks"]:
|
|
203
232
|
if not words_only:
|
|
204
233
|
rect = create_obj_patch(
|
|
@@ -281,6 +310,7 @@ def visualize_kie_page(
|
|
|
281
310
|
image: np.ndarray,
|
|
282
311
|
words_only: bool = False,
|
|
283
312
|
display_artefacts: bool = True,
|
|
313
|
+
display_layout: bool = True,
|
|
284
314
|
scale: float = 10,
|
|
285
315
|
interactive: bool = True,
|
|
286
316
|
add_labels: bool = True,
|
|
@@ -303,6 +333,7 @@ def visualize_kie_page(
|
|
|
303
333
|
image: np array of the page, needs to have the same shape than page['dimensions']
|
|
304
334
|
words_only: whether only words should be displayed
|
|
305
335
|
display_artefacts: whether artefacts should be displayed
|
|
336
|
+
display_layout: whether detected layout regions should be displayed
|
|
306
337
|
scale: figsize of the largest windows side
|
|
307
338
|
interactive: whether the plot should be interactive
|
|
308
339
|
add_labels: for static plot, adds text labels on top of bounding box
|
|
@@ -323,6 +354,23 @@ def visualize_kie_page(
|
|
|
323
354
|
if interactive:
|
|
324
355
|
artists: list[patches.Patch] = [] # instantiate an empty list of patches (to be drawn on the page)
|
|
325
356
|
|
|
357
|
+
if display_layout and page.get("layout"):
|
|
358
|
+
region_classes = sorted({region["type"] for region in page["layout"]})
|
|
359
|
+
layout_colors = {cls: color for color, cls in zip(get_colors(max(len(region_classes), 1)), region_classes)}
|
|
360
|
+
for region in page["layout"]:
|
|
361
|
+
rect = create_obj_patch(
|
|
362
|
+
region["geometry"],
|
|
363
|
+
page["dimensions"],
|
|
364
|
+
label=f"{region['type']} (confidence: {region['confidence']:.2%})",
|
|
365
|
+
color=layout_colors[region["type"]],
|
|
366
|
+
linewidth=2,
|
|
367
|
+
fill=False,
|
|
368
|
+
**kwargs,
|
|
369
|
+
)
|
|
370
|
+
ax.add_patch(rect)
|
|
371
|
+
if interactive:
|
|
372
|
+
artists.append(rect)
|
|
373
|
+
|
|
326
374
|
colors = {k: color for color, k in zip(get_colors(len(page["predictions"])), page["predictions"])}
|
|
327
375
|
for key, value in page["predictions"].items():
|
|
328
376
|
for prediction in value:
|
|
@@ -340,6 +388,16 @@ def visualize_kie_page(
|
|
|
340
388
|
if interactive:
|
|
341
389
|
# add patch to cursor's artists
|
|
342
390
|
artists.append(rect)
|
|
391
|
+
elif add_labels and len(prediction["geometry"]) == 2:
|
|
392
|
+
# We draw only if boxes are in straight format
|
|
393
|
+
ax.text(
|
|
394
|
+
int(page["dimensions"][1] * prediction["geometry"][0][0]),
|
|
395
|
+
int(page["dimensions"][0] * prediction["geometry"][0][1]),
|
|
396
|
+
prediction["value"],
|
|
397
|
+
size=10,
|
|
398
|
+
alpha=0.5,
|
|
399
|
+
color=colors[key],
|
|
400
|
+
)
|
|
343
401
|
|
|
344
402
|
if interactive:
|
|
345
403
|
import mplcursors
|
|
@@ -352,13 +410,14 @@ def visualize_kie_page(
|
|
|
352
410
|
|
|
353
411
|
|
|
354
412
|
def draw_boxes(boxes: np.ndarray, image: np.ndarray, color: tuple[int, int, int] | None = None, **kwargs) -> None:
|
|
355
|
-
"""Draw an array of relative straight boxes on an image
|
|
413
|
+
"""Draw an array of relative straight boxes on an image.
|
|
356
414
|
|
|
357
415
|
Args:
|
|
358
|
-
boxes: array of relative boxes, of shape (*, 4)
|
|
416
|
+
boxes: array of relative boxes, of shape `(*, 4)`
|
|
359
417
|
image: np array, float32 or uint8
|
|
360
418
|
color: color to use for bounding box edges
|
|
361
419
|
**kwargs: keyword arguments from `matplotlib.pyplot.plot`
|
|
420
|
+
|
|
362
421
|
"""
|
|
363
422
|
h, w = image.shape[:2]
|
|
364
423
|
# Convert boxes to absolute coords
|
doctr/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = 'v1.
|
|
1
|
+
__version__ = 'v1.1.0'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-doctr
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Document Text Recognition (docTR): deep Learning for high-performance OCR on documents.
|
|
5
5
|
Author-email: Mindee <contact@mindee.com>
|
|
6
6
|
Maintainer: François-Guillaume Fernandez, Charles Gaillard, Olivier Dulcy, Felix Dittrich
|
|
@@ -219,11 +219,12 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
219
219
|
Classifier: Natural Language :: English
|
|
220
220
|
Classifier: Operating System :: OS Independent
|
|
221
221
|
Classifier: Programming Language :: Python :: 3
|
|
222
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
223
222
|
Classifier: Programming Language :: Python :: 3.11
|
|
224
223
|
Classifier: Programming Language :: Python :: 3.12
|
|
224
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
225
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
225
226
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
226
|
-
Requires-Python: <4,>=3.
|
|
227
|
+
Requires-Python: <4,>=3.11.0
|
|
227
228
|
Description-Content-Type: text/markdown
|
|
228
229
|
License-File: LICENSE
|
|
229
230
|
Requires-Dist: torch<3.0.0,>=2.0.0
|
|
@@ -232,15 +233,14 @@ Requires-Dist: onnx<3.0.0,>=1.12.0
|
|
|
232
233
|
Requires-Dist: numpy<3.0.0,>=1.16.0
|
|
233
234
|
Requires-Dist: scipy<2.0.0,>=1.4.0
|
|
234
235
|
Requires-Dist: h5py<4.0.0,>=3.1.0
|
|
235
|
-
Requires-Dist: opencv-python<
|
|
236
|
-
Requires-Dist: pypdfium2<
|
|
236
|
+
Requires-Dist: opencv-python<6.0.0,>=4.5.0
|
|
237
|
+
Requires-Dist: pypdfium2<6.0.0,>=4.11.0
|
|
237
238
|
Requires-Dist: pyclipper<2.0.0,>=1.2.0
|
|
238
239
|
Requires-Dist: shapely<3.0.0,>=1.6.0
|
|
239
240
|
Requires-Dist: langdetect<2.0.0,>=1.0.9
|
|
240
241
|
Requires-Dist: rapidfuzz<4.0.0,>=3.0.0
|
|
241
|
-
Requires-Dist: huggingface-hub<
|
|
242
|
-
Requires-Dist: Pillow>=
|
|
243
|
-
Requires-Dist: defusedxml>=0.7.0
|
|
242
|
+
Requires-Dist: huggingface-hub<2.0.0,>=0.20.0
|
|
243
|
+
Requires-Dist: Pillow>=10.1.0
|
|
244
244
|
Requires-Dist: anyascii>=0.3.2
|
|
245
245
|
Requires-Dist: validators>=0.18.0
|
|
246
246
|
Requires-Dist: tqdm>=4.30.0
|
|
@@ -252,11 +252,11 @@ Requires-Dist: mplcursors>=0.3; extra == "viz"
|
|
|
252
252
|
Provides-Extra: contrib
|
|
253
253
|
Requires-Dist: onnxruntime>=1.11.0; extra == "contrib"
|
|
254
254
|
Provides-Extra: testing
|
|
255
|
-
Requires-Dist: pytest>=
|
|
256
|
-
Requires-Dist: coverage[toml]>=4.5.4; extra == "testing"
|
|
255
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "testing"
|
|
257
256
|
Requires-Dist: onnxruntime>=1.11.0; extra == "testing"
|
|
258
257
|
Requires-Dist: requests>=2.20.0; extra == "testing"
|
|
259
258
|
Requires-Dist: psutil>=5.9.5; extra == "testing"
|
|
259
|
+
Requires-Dist: pandas>=2.0.0; extra == "testing"
|
|
260
260
|
Provides-Extra: quality
|
|
261
261
|
Requires-Dist: ruff>=0.1.5; extra == "quality"
|
|
262
262
|
Requires-Dist: mypy>=0.812; extra == "quality"
|
|
@@ -265,7 +265,7 @@ Provides-Extra: docs
|
|
|
265
265
|
Requires-Dist: sphinx!=3.5.0,>=3.0.0; extra == "docs"
|
|
266
266
|
Requires-Dist: sphinxemoji>=0.1.8; extra == "docs"
|
|
267
267
|
Requires-Dist: sphinx-copybutton>=0.3.1; extra == "docs"
|
|
268
|
-
Requires-Dist: docutils<0.
|
|
268
|
+
Requires-Dist: docutils<0.23; extra == "docs"
|
|
269
269
|
Requires-Dist: recommonmark>=0.7.1; extra == "docs"
|
|
270
270
|
Requires-Dist: sphinx-markdown-tables>=0.0.15; extra == "docs"
|
|
271
271
|
Requires-Dist: sphinx-tabs>=3.3.0; extra == "docs"
|
|
@@ -277,18 +277,18 @@ Requires-Dist: onnx<3.0.0,>=1.12.0; extra == "dev"
|
|
|
277
277
|
Requires-Dist: weasyprint>=55.0; extra == "dev"
|
|
278
278
|
Requires-Dist: matplotlib>=3.1.0; extra == "dev"
|
|
279
279
|
Requires-Dist: mplcursors>=0.3; extra == "dev"
|
|
280
|
-
Requires-Dist: pytest>=
|
|
281
|
-
Requires-Dist: coverage[toml]>=4.5.4; extra == "dev"
|
|
280
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
|
|
282
281
|
Requires-Dist: onnxruntime>=1.11.0; extra == "dev"
|
|
283
282
|
Requires-Dist: requests>=2.20.0; extra == "dev"
|
|
284
283
|
Requires-Dist: psutil>=5.9.5; extra == "dev"
|
|
284
|
+
Requires-Dist: pandas>=2.0.0; extra == "dev"
|
|
285
285
|
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
286
286
|
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
287
287
|
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
288
288
|
Requires-Dist: sphinx!=3.5.0,>=3.0.0; extra == "dev"
|
|
289
289
|
Requires-Dist: sphinxemoji>=0.1.8; extra == "dev"
|
|
290
290
|
Requires-Dist: sphinx-copybutton>=0.3.1; extra == "dev"
|
|
291
|
-
Requires-Dist: docutils<0.
|
|
291
|
+
Requires-Dist: docutils<0.23; extra == "dev"
|
|
292
292
|
Requires-Dist: recommonmark>=0.7.1; extra == "dev"
|
|
293
293
|
Requires-Dist: sphinx-markdown-tables>=0.0.15; extra == "dev"
|
|
294
294
|
Requires-Dist: sphinx-tabs>=3.3.0; extra == "dev"
|
|
@@ -299,11 +299,17 @@ Dynamic: license-file
|
|
|
299
299
|
<img src="https://github.com/mindee/doctr/raw/main/docs/images/Logo_doctr.gif" width="40%">
|
|
300
300
|
</p>
|
|
301
301
|
|
|
302
|
-
[](https://slack.mindee.com) [](LICENSE)  [](https://github.com/mindee/doctr/pkgs/container/doctr) [](https://codecov.io/gh/mindee/doctr) [](https://www.codefactor.io/repository/github/mindee/doctr) [](https://app.codacy.com/gh/mindee/doctr?utm_source=github.com&utm_medium=referral&utm_content=mindee/doctr&utm_campaign=Badge_Grade) [](https://mindee.github.io/doctr) [](https://slack.mindee.com) [](LICENSE)  [](https://github.com/mindee/doctr/pkgs/container/doctr) [](https://codecov.io/gh/mindee/doctr) [](https://www.codefactor.io/repository/github/mindee/doctr) [](https://app.codacy.com/gh/mindee/doctr?utm_source=github.com&utm_medium=referral&utm_content=mindee/doctr&utm_campaign=Badge_Grade) [](https://mindee.github.io/doctr) [](https://pypi.org/project/python-doctr/) [](https://huggingface.co/spaces/mindee/doctr) [](https://colab.research.google.com/github/mindee/notebooks/blob/main/doctr/quicktour.ipynb) [](https://gurubase.io/g/doctr)
|
|
303
303
|
|
|
304
304
|
|
|
305
305
|
**Optical Character Recognition made seamless & accessible to anyone, powered by PyTorch**
|
|
306
306
|
|
|
307
|
+
## Project responsibility
|
|
308
|
+
|
|
309
|
+
**docTR** was originally created by [Mindee](https://mindee.com). It is now actively developed and maintained by [t2k GmbH](https://www.text2knowledge.de/de).
|
|
310
|
+
|
|
311
|
+
[](https://www.text2knowledge.de/de)
|
|
312
|
+
|
|
307
313
|
What you can expect from this repository:
|
|
308
314
|
|
|
309
315
|
- efficient ways to parse textual information (localize and identify each word) from your documents
|
|
@@ -321,7 +327,7 @@ As such, you can select the architecture used for [text detection](https://minde
|
|
|
321
327
|
```python
|
|
322
328
|
from doctr.models import ocr_predictor
|
|
323
329
|
|
|
324
|
-
model = ocr_predictor(det_arch=
|
|
330
|
+
model = ocr_predictor(det_arch="db_resnet50", reco_arch="crnn_vgg16_bn", pretrained=True)
|
|
325
331
|
```
|
|
326
332
|
|
|
327
333
|
### Reading files
|
|
@@ -330,6 +336,7 @@ Documents can be interpreted from PDF or images:
|
|
|
330
336
|
|
|
331
337
|
```python
|
|
332
338
|
from doctr.io import DocumentFile
|
|
339
|
+
|
|
333
340
|
# PDF
|
|
334
341
|
pdf_doc = DocumentFile.from_pdf("path/to/your/doc.pdf")
|
|
335
342
|
# Image
|
|
@@ -355,13 +362,30 @@ doc = DocumentFile.from_pdf("path/to/your/doc.pdf")
|
|
|
355
362
|
result = model(doc)
|
|
356
363
|
```
|
|
357
364
|
|
|
365
|
+
### Detecting the document layout
|
|
366
|
+
|
|
367
|
+
You can additionally run a layout detection model as part of the pipeline by passing `detect_layout=True`. The detected regions (e.g. `Title`, `Text`, `Table`, `Page-header`, `Page-footer`) are attached to every page and rendered by `.show()`:
|
|
368
|
+
|
|
369
|
+
```python
|
|
370
|
+
from doctr.io import DocumentFile
|
|
371
|
+
from doctr.models import ocr_predictor
|
|
372
|
+
|
|
373
|
+
model = ocr_predictor(pretrained=True, detect_layout=True)
|
|
374
|
+
doc = DocumentFile.from_images("path/to/your/doc.jpg")
|
|
375
|
+
result = model(doc)
|
|
376
|
+
|
|
377
|
+
# Access the detected layout regions of the first page
|
|
378
|
+
for region in result.pages[0].layout:
|
|
379
|
+
print(region.type, region.confidence, region.geometry)
|
|
380
|
+
```
|
|
381
|
+
|
|
358
382
|
### Dealing with rotated documents
|
|
359
383
|
|
|
360
384
|
Should you use docTR on documents that include rotated pages, or pages with multiple box orientations,
|
|
361
385
|
you have multiple options to handle it:
|
|
362
386
|
|
|
363
387
|
- If you only use straight document pages with straight words (horizontal, same reading direction),
|
|
364
|
-
consider passing `
|
|
388
|
+
consider passing `assume_straight_pages=True` to the ocr_predictor. It will directly fit straight boxes
|
|
365
389
|
on your page and return straight boxes, which makes it the fastest option.
|
|
366
390
|
|
|
367
391
|
- If you want the predictor to output straight boxes (no matter the orientation of your pages, the final localizations
|
|
@@ -384,7 +408,9 @@ Or even rebuild the original document from its predictions:
|
|
|
384
408
|
import matplotlib.pyplot as plt
|
|
385
409
|
|
|
386
410
|
synthetic_pages = result.synthesize()
|
|
387
|
-
plt.imshow(synthetic_pages[0])
|
|
411
|
+
plt.imshow(synthetic_pages[0])
|
|
412
|
+
plt.axis("off")
|
|
413
|
+
plt.show()
|
|
388
414
|
```
|
|
389
415
|
|
|
390
416
|

|
|
@@ -409,7 +435,7 @@ from doctr.io import DocumentFile
|
|
|
409
435
|
from doctr.models import kie_predictor
|
|
410
436
|
|
|
411
437
|
# Model
|
|
412
|
-
model = kie_predictor(det_arch=
|
|
438
|
+
model = kie_predictor(det_arch="db_resnet50", reco_arch="crnn_vgg16_bn", pretrained=True)
|
|
413
439
|
# PDF
|
|
414
440
|
doc = DocumentFile.from_pdf("path/to/your/doc.pdf")
|
|
415
441
|
# Analyze
|
|
@@ -424,15 +450,11 @@ for class_name in predictions.keys():
|
|
|
424
450
|
|
|
425
451
|
The KIE predictor results per page are in a dictionary format with each key representing a class name and it's value are the predictions for that class.
|
|
426
452
|
|
|
427
|
-
### If you are looking for support from the Mindee team
|
|
428
|
-
|
|
429
|
-
[](https://mindee.com/product/doctr)
|
|
430
|
-
|
|
431
453
|
## Installation
|
|
432
454
|
|
|
433
455
|
### Prerequisites
|
|
434
456
|
|
|
435
|
-
Python 3.
|
|
457
|
+
Python 3.11 (or higher) and [pip](https://pip.pypa.io/en/stable/) are required to install docTR.
|
|
436
458
|
|
|
437
459
|
### Latest release
|
|
438
460
|
|
|
@@ -486,6 +508,14 @@ Credits where it's due: this repository is implementing, among others, architect
|
|
|
486
508
|
- PARSeq: [Scene Text Recognition with Permuted Autoregressive Sequence Models](https://arxiv.org/pdf/2207.06966).
|
|
487
509
|
- VIPTR: [A Vision Permutable Extractor for Fast and Efficient Scene Text Recognition](https://arxiv.org/abs/2401.10110).
|
|
488
510
|
|
|
511
|
+
### Layout Analysis
|
|
512
|
+
|
|
513
|
+
- LW-DETR: [A Transformer Replacement to YOLO for Real-Time Detection](https://arxiv.org/pdf/2406.03459v1).
|
|
514
|
+
|
|
515
|
+
### Table Structure Recognition
|
|
516
|
+
|
|
517
|
+
- TableCenterNet: [A one-stage network for table structure recognition](https://arxiv.org/abs/2504.17522).
|
|
518
|
+
|
|
489
519
|
## More goodies
|
|
490
520
|
|
|
491
521
|
### Documentation
|
|
@@ -539,7 +569,7 @@ docker run -it --gpus all ghcr.io/mindee/doctr:torch-py3.9.18-2024-10 bash
|
|
|
539
569
|
The Docker images for docTR follow a specific tag nomenclature: `<deps>-py<python_version>-<doctr_version|YYYY-MM>`. Here's a breakdown of the tag structure:
|
|
540
570
|
|
|
541
571
|
- `<deps>`: `torch`, `torch-viz-html-contrib`.
|
|
542
|
-
- `<python_version>`: `3.
|
|
572
|
+
- `<python_version>`: `3.10.13`, `3.11.8`, etc.
|
|
543
573
|
- `<doctr_version>`: a tag >= `v0.11.0`
|
|
544
574
|
- `<YYYY-MM>`: e.g. `2014-10`
|
|
545
575
|
|
|
@@ -610,7 +640,7 @@ import requests
|
|
|
610
640
|
|
|
611
641
|
params = {"det_arch": "db_resnet50", "reco_arch": "crnn_vgg16_bn"}
|
|
612
642
|
|
|
613
|
-
with open(
|
|
643
|
+
with open("/path/to/your/doc.jpg", "rb") as f:
|
|
614
644
|
files = [ # application/pdf, image/jpeg, image/png supported
|
|
615
645
|
("files", ("doc.jpg", f.read(), "image/jpeg")),
|
|
616
646
|
]
|
|
@@ -621,6 +651,7 @@ print(requests.post("http://localhost:8080/ocr", params=params, files=files).jso
|
|
|
621
651
|
|
|
622
652
|
Looking for more illustrations of docTR features? You might want to check the [Jupyter notebooks](https://github.com/mindee/doctr/tree/main/notebooks) designed to give you a broader overview.
|
|
623
653
|
|
|
654
|
+
|
|
624
655
|
## Citation
|
|
625
656
|
|
|
626
657
|
If you wish to cite this project, feel free to use this [BibTeX](http://www.bibtex.org/) reference:
|
|
@@ -635,6 +666,22 @@ If you wish to cite this project, feel free to use this [BibTeX](http://www.bibt
|
|
|
635
666
|
}
|
|
636
667
|
```
|
|
637
668
|
|
|
669
|
+
## Custom Development and Support
|
|
670
|
+
|
|
671
|
+
[t2k GmbH](https://www.text2knowledge.de/de) offers professional services around docTR : whether you are building a product or contributing to the open-source project.
|
|
672
|
+
|
|
673
|
+
### For organizations
|
|
674
|
+
|
|
675
|
+
Interested in docTR and want to develop, implement, or ship your own solution? t2k can help with:
|
|
676
|
+
|
|
677
|
+
- **Custom OCR development** : individual detection, recognition, and pipeline work built on docTR
|
|
678
|
+
- **Project implementation** : turning your ideas into production-ready docTR integrations
|
|
679
|
+
- **Technical consulting** : architecture, deployment, and integration guidance
|
|
680
|
+
- **Ongoing development** : feature extensions and implementation support tailored to your use case
|
|
681
|
+
- **Workshops & advisory** : verbal consulting, hands-on sessions, and recommendations for working with docTR
|
|
682
|
+
|
|
683
|
+
Contact [info@text2knowledge.de](mailto:info@text2knowledge.de) or visit our [home page](https://www.text2knowledge.de) to discuss your project.
|
|
684
|
+
|
|
638
685
|
## Contributing
|
|
639
686
|
|
|
640
687
|
If you scrolled down to this section, you most likely appreciate open source. Do you feel like extending the range of our supported characters? Or perhaps submitting a paper implementation? Or contributing in any other way?
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
doctr/__init__.py,sha256=sdqGeYFfPLRsRH54PsedllScz5FD8yWwyekcsOq3JNc,110
|
|
2
|
+
doctr/file_utils.py,sha256=pJf5c0q8iDx7ZDh3zqgi7AeJrTs_sJGPmXYw0pf-lbE,1036
|
|
3
|
+
doctr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
doctr/version.py,sha256=YBGth-RKTc3dBkwxvlC5TgOilAdRz6cG_DN7-IT1qWw,23
|
|
5
|
+
doctr/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
doctr/cli/main.py,sha256=uRyZAH6N39Yiah8wj76JDWf1ak3HJYhxQUJWgpZ3C-E,17790
|
|
7
|
+
doctr/contrib/__init__.py,sha256=EKeAGa3TOuJVWR4H_HJvuKO5VPEnJWXW305JMw3ufic,40
|
|
8
|
+
doctr/contrib/artefacts.py,sha256=fP-UMWBYVibCv0aMHXFd-D3HF4yQIbaWfV0EDl4_iAU,5291
|
|
9
|
+
doctr/contrib/base.py,sha256=uKV-B_9Y02jR_X6of55N3aJCcn8e1asMTHybsTQzRbw,3273
|
|
10
|
+
doctr/datasets/__init__.py,sha256=SsHwRmXzqB7ZL3gGcT-4lt-y4kRGlATbC8E52huX1vQ,557
|
|
11
|
+
doctr/datasets/coco_text.py,sha256=yz--nE6xD3CNztkyv5H7HuWV8bummJYFA9mfkUu-Kio,5586
|
|
12
|
+
doctr/datasets/cord.py,sha256=3mI9cVUQGqwUc4mdWBosacrhSWk5YStbcMnD-9tjDRA,5360
|
|
13
|
+
doctr/datasets/detection.py,sha256=7Pv7ocYsLZfGQEgPGpJB-kErbeKeNBBQDf-o1b3zP10,3576
|
|
14
|
+
doctr/datasets/doc_artefacts.py,sha256=gP9Z9rG8kIchPiQjBvoZWhV0tL8nFrOAJ8v734Z1bDM,3275
|
|
15
|
+
doctr/datasets/funsd.py,sha256=w_Q1XHrczc2bV4xZ-6C8UwWtsAmi8KoB_kx6qkFcptE,4778
|
|
16
|
+
doctr/datasets/ic03.py,sha256=b9kNOHjQggvpvdfmWmW3CaHmz_EzVKBDZVErRE_ilD4,5622
|
|
17
|
+
doctr/datasets/ic13.py,sha256=zdv6HTuXHMr-QufYZ7ApksCMMf6kCqy-h59yUgeey9U,4618
|
|
18
|
+
doctr/datasets/iiit5k.py,sha256=J4oGhqyjvNtPTkSzC-xOIgRpig0EuabmfaLz86ePiGM,4628
|
|
19
|
+
doctr/datasets/iiithws.py,sha256=SFYrdmhYTgJf2R8P9MlhP7nwsb067UeHaWlShndrhN8,2858
|
|
20
|
+
doctr/datasets/imgur5k.py,sha256=Qy6zjCNA-C_6UEWtxuEGrby6YdVWpAIX7pnQfdTw0sA,7615
|
|
21
|
+
doctr/datasets/layout.py,sha256=HWUT2ZMTJenqKbDoQpaP6CZBXJdQn73wJcSDO9cNz4o,3989
|
|
22
|
+
doctr/datasets/mjsynth.py,sha256=ZQuwAJh2jEFl4ex9pTP2UgijnK-7aFStt9JOfz5-AeU,4165
|
|
23
|
+
doctr/datasets/ocr.py,sha256=dUEmLJiBKPqMzG8vnD_sz9qWQLBy279sWjlN9Zr0Ras,2568
|
|
24
|
+
doctr/datasets/orientation.py,sha256=VWnWlCq9mrExbsVXCNUf7TeoubZLEIZvKWOxMsddiw8,1136
|
|
25
|
+
doctr/datasets/recognition.py,sha256=9SQt6SVF4VLUjL8MDRoTymYuFMgtB_o2bZH135YKi0A,1903
|
|
26
|
+
doctr/datasets/sroie.py,sha256=YXjRMdB_1ytAOUQDz-u0EA6wV5tACOLbm3Xf17HKrnc,4475
|
|
27
|
+
doctr/datasets/svhn.py,sha256=av7HNZgEIFqeViaPREcG_Odul7RSH9R9EVpLTs-ohBA,5829
|
|
28
|
+
doctr/datasets/svt.py,sha256=AuT0WolCD5uXpptSToonVlhwdb4Fe4jPaXq7HVXHDTk,5104
|
|
29
|
+
doctr/datasets/synthtext.py,sha256=ggagFQ-jsAc_ogCOIxcmfrgh4MBKOc4ZzvKzaG10MmY,6346
|
|
30
|
+
doctr/datasets/table_structure.py,sha256=Rn770m_94eHMZAc8zYcS5kivE7GqbjyHu9LDOQW8HGw,4101
|
|
31
|
+
doctr/datasets/utils.py,sha256=h5X4ebg9r6R5P4guvS71kOwtpT8hXQ3n9DdGZGALKp0,8417
|
|
32
|
+
doctr/datasets/vocabs.py,sha256=X4KKrKGdJU1u3y009_YzEICtU0_KwvCzVFVXH2y2FCI,99165
|
|
33
|
+
doctr/datasets/wildreceipt.py,sha256=KWU8TVnkSbL0V_cFgyQqTLjKZlVgZ2StlpJQ0I0VEv8,5303
|
|
34
|
+
doctr/datasets/datasets/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
35
|
+
doctr/datasets/datasets/base.py,sha256=9XokjW0EeNeD3RGw4pnxsDrWMXSuHJB8IOld3xJCIJQ,4110
|
|
36
|
+
doctr/datasets/datasets/pytorch.py,sha256=yL5eneIJ-FVa97IctebPooZQt08xCo1kuYkjKc9ie20,2277
|
|
37
|
+
doctr/datasets/generator/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
38
|
+
doctr/datasets/generator/base.py,sha256=NMlvw69MV66p3NAedKFgldqq8MGR5jtePpklaoadVEE,5661
|
|
39
|
+
doctr/datasets/generator/pytorch.py,sha256=0YgoFGOnB9ExlfQuY7Mi6Zl43ryeFfPI0AfPzutH1os,2092
|
|
40
|
+
doctr/io/__init__.py,sha256=oO9y8U_pfZfrecp6MHswa7SmUve_DvV8bDq9_Jmn2OQ,131
|
|
41
|
+
doctr/io/elements.py,sha256=Fz_MYGYPajAJndsmvZGb271e3sYYlQ2_J9su2fnstI4,24953
|
|
42
|
+
doctr/io/exporters.py,sha256=iigfisY_VhnFtCK3couh77tI1InEhdbGwwdIKsFef1k,55591
|
|
43
|
+
doctr/io/html.py,sha256=gKu4hxMYaEgRDPcd45HBlctNXw0Fnk3CY5Jgr9JZRMw,698
|
|
44
|
+
doctr/io/pdf.py,sha256=LYxPh7auAIlPh3Xdh462peVnBbCMMjB7ouDfiQq7eok,1308
|
|
45
|
+
doctr/io/reader.py,sha256=gwQmziIkF-cozyE8K4KisZYmFmtyoZUSl4LWyI_CPCI,2732
|
|
46
|
+
doctr/io/image/__init__.py,sha256=bJLj2I8OOTYLuTDjdinao0nkOIWQOLbzIuww23EX3gw,43
|
|
47
|
+
doctr/io/image/base.py,sha256=jlDqwPQrVhf7_oRxJckvoHH8gQZ9Urr5TbBpQXVLDJI,1744
|
|
48
|
+
doctr/io/image/pytorch.py,sha256=C3myo25pW4jf1VZD6f5Hqc0j17rrOjX1zPCmquxU6FA,3431
|
|
49
|
+
doctr/models/__init__.py,sha256=_Hd13a5jzbAbPtTWSA62-rUzhLAzYP7knHJZtJSjzXE,177
|
|
50
|
+
doctr/models/_utils.py,sha256=qa315rXNfXwQlANeXiw9I_qXnXv6JqJsMaUjhBxiJik,10231
|
|
51
|
+
doctr/models/builder.py,sha256=irmKYFcR5PE9h0zLCzqFb7pj6vEMeQUKdixOQalCuoI,43512
|
|
52
|
+
doctr/models/core.py,sha256=KPTn_zbiwTV7OoPDv6o-xx7Tzb-QnAfLne1HuNQlWu4,482
|
|
53
|
+
doctr/models/zoo.py,sha256=WfLJv4DFZ0iSlsRrlSM-XtJLa7Y4PoUfVX9bbhWlr78,13264
|
|
54
|
+
doctr/models/classification/__init__.py,sha256=JO0hQyBf2OEZIyfT3qGUyormb4sw1BWuq1a4IHnO3ac,219
|
|
55
|
+
doctr/models/classification/zoo.py,sha256=IUxHvPzQx1djjxPml9pLrRWgM2qaOKCyxpU2zHcgNNM,4317
|
|
56
|
+
doctr/models/classification/magc_resnet/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
57
|
+
doctr/models/classification/magc_resnet/pytorch.py,sha256=4xLJ2N18Zxb643Baoea6F-VsCLfJKwFPghIRkkw9SV8,5510
|
|
58
|
+
doctr/models/classification/mobilenet/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
59
|
+
doctr/models/classification/mobilenet/pytorch.py,sha256=zlTQt1PyTlxZ-LI6NYPestQ7ls9PlNARy2uY_Id5xHc,10006
|
|
60
|
+
doctr/models/classification/predictor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
61
|
+
doctr/models/classification/predictor/pytorch.py,sha256=hTXVF6_Ucuan6uYYBjz3OFCaMI_FjNzBqQKVULk02VI,2633
|
|
62
|
+
doctr/models/classification/resnet/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
63
|
+
doctr/models/classification/resnet/pytorch.py,sha256=Vd1zPsBbFFXxtwwKswsywQUvvn5FuIQ2XW317jkcAfE,13400
|
|
64
|
+
doctr/models/classification/starnet/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
65
|
+
doctr/models/classification/starnet/pytorch.py,sha256=Rn9HydFhCYW8PKnbu7NJIIHBaIoByuEs8ZIP125Eg1g,7302
|
|
66
|
+
doctr/models/classification/textnet/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
67
|
+
doctr/models/classification/textnet/pytorch.py,sha256=4ZLq-3IYJcH4upjuFFqaBftqvyMWfmrfwfo5qmFcTZM,10629
|
|
68
|
+
doctr/models/classification/vgg/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
69
|
+
doctr/models/classification/vgg/pytorch.py,sha256=UyjssJWHvmqDDf9Aghp81vBjefZ6mLsTiqOQ4cWG3-c,3718
|
|
70
|
+
doctr/models/classification/vip/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
71
|
+
doctr/models/classification/vip/pytorch.py,sha256=zAWxt5WoPaDWdg8bvQWHkSKfNoVA_Y4ARVtgJRIBGCw,16250
|
|
72
|
+
doctr/models/classification/vip/layers/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
73
|
+
doctr/models/classification/vip/layers/pytorch.py,sha256=wFVGlh4_0GT7WoIq4om_JUKHqZ8tvoGMmHdCZjAreyE,21015
|
|
74
|
+
doctr/models/classification/vit/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
75
|
+
doctr/models/classification/vit/pytorch.py,sha256=iBll-MjLw8rIKvXxTmsBbaUoUU1qK8oRZj5TOvVhUJU,6452
|
|
76
|
+
doctr/models/classification/vit_det/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
77
|
+
doctr/models/classification/vit_det/pytorch.py,sha256=NSF0Ftq_hat1WxxTpdSZxXQN4veHL2ETt5yOmOHfG-M,11810
|
|
78
|
+
doctr/models/classification/vit_det/layers/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
79
|
+
doctr/models/classification/vit_det/layers/pytorch.py,sha256=VnoUXCSKq7N6oWtFUdthlgIHFQCZA4LleXDhpTc34eM,6788
|
|
80
|
+
doctr/models/detection/__init__.py,sha256=RqSz5beehLiqhW0PwFLFmCfTyMjofO-0umcQJLDMHjY,105
|
|
81
|
+
doctr/models/detection/core.py,sha256=Ip7m4W4wh_pcAehgvuilM05Hj2NRG12tni_rwX2r6_I,4184
|
|
82
|
+
doctr/models/detection/zoo.py,sha256=1WdQiIRxzelGwQlsnvNKadPVpBR_m6z89J52GScAO_8,3731
|
|
83
|
+
doctr/models/detection/_utils/__init__.py,sha256=bJLj2I8OOTYLuTDjdinao0nkOIWQOLbzIuww23EX3gw,43
|
|
84
|
+
doctr/models/detection/_utils/base.py,sha256=HwIheUviu5o-ghhE9OxjuIj_UXXEzp8JwjGPLS-_mpI,3493
|
|
85
|
+
doctr/models/detection/_utils/pytorch.py,sha256=NyQxrS4e_EVQ5FriZSQYbvTvtenmAsvSC5QGFbZUhV4,1021
|
|
86
|
+
doctr/models/detection/differentiable_binarization/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
87
|
+
doctr/models/detection/differentiable_binarization/base.py,sha256=r22okzFV5ROWIrrlqH3A2uIiNvJcVqWOSpDxrt7bSAs,15834
|
|
88
|
+
doctr/models/detection/differentiable_binarization/pytorch.py,sha256=qhNBgByBniDE1JTY37DZlTuy8wkNQPy4OLSQSDkxEAY,16432
|
|
89
|
+
doctr/models/detection/fast/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
90
|
+
doctr/models/detection/fast/base.py,sha256=MF0gEXO0ltQPFvs7Ex3-yCGrSsMKQ2lhz1pweiHviX8,10330
|
|
91
|
+
doctr/models/detection/fast/pytorch.py,sha256=rergvaUtHGqlTjOSbdxcbwhQ34-V2qSvHP6_k_wG7gE,16681
|
|
92
|
+
doctr/models/detection/linknet/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
93
|
+
doctr/models/detection/linknet/base.py,sha256=LyD8ElY99zd5meqiCPHxzc7K4ssHDj1rBJKd__VTd5U,10112
|
|
94
|
+
doctr/models/detection/linknet/pytorch.py,sha256=XSaCmglhW1iBktCXkbIx0fTwcuXpjoVaGUCVD3sp5r0,14312
|
|
95
|
+
doctr/models/detection/predictor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
96
|
+
doctr/models/detection/predictor/pytorch.py,sha256=UrASufB6bnW-TlKfDHlKww0j1XsrPouudDFxSVoNFMQ,2674
|
|
97
|
+
doctr/models/factory/__init__.py,sha256=cKPoH2V2157lLMTR2zsljG3_IQHziodqR-XK_LG0D_I,19
|
|
98
|
+
doctr/models/factory/hub.py,sha256=7DVWI1cuVkyEr5LfNqI48us2jggMV99UnTivdYCClKk,7235
|
|
99
|
+
doctr/models/kie_predictor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
100
|
+
doctr/models/kie_predictor/base.py,sha256=rOaB0G5HUpKTVvJleS5i4wAjUmNHh_ySMgstZhSycGg,3106
|
|
101
|
+
doctr/models/kie_predictor/pytorch.py,sha256=xQRIVIpM6al9a6NH4nwW76BPC0JaLr96ujSA8UE8hOM,9581
|
|
102
|
+
doctr/models/layout/__init__.py,sha256=an8on0__ydTvWokrY-iuHTTdJ9Z6s_naqxszMd8LdVM,42
|
|
103
|
+
doctr/models/layout/zoo.py,sha256=HQQDMALg4fCgs3H6SXR1ePxNcv3kOlbwW0Jhl5NAEBA,3194
|
|
104
|
+
doctr/models/layout/lw_detr/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
105
|
+
doctr/models/layout/lw_detr/base.py,sha256=Cg0p6dNCR5qiREqTKEpeIoBx03ia4S0CcKHLLl9ak8g,10505
|
|
106
|
+
doctr/models/layout/lw_detr/pytorch.py,sha256=AehpSAdL1RMjoMO2kvHG-WZ32DJl_WeKsxppddaX10Q,34902
|
|
107
|
+
doctr/models/layout/lw_detr/layers/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
108
|
+
doctr/models/layout/lw_detr/layers/pytorch.py,sha256=IyCuLONNXFeFxX3gDReaEQBwmaSuyWMRZF1PiYb8cPk,31569
|
|
109
|
+
doctr/models/layout/predictor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
110
|
+
doctr/models/layout/predictor/pytorch.py,sha256=2FHjmq80SHv2pOoCjKXdvJNKGzOgqFZLA-U02OrkxxM,3065
|
|
111
|
+
doctr/models/modules/__init__.py,sha256=pouP7obVTu4p6aHkyaqa1yHKbynpvT0Hgo-LO_1U2R4,83
|
|
112
|
+
doctr/models/modules/layers/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
113
|
+
doctr/models/modules/layers/pytorch.py,sha256=-cgY1uMhhFio6EgboHU29E6tK0TDtbADe3P1afTWr1o,14732
|
|
114
|
+
doctr/models/modules/transformer/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
115
|
+
doctr/models/modules/transformer/pytorch.py,sha256=AVFeQCElFgg7ondhTYc_XFPocTKMt3uFJBHUFSEUevk,7657
|
|
116
|
+
doctr/models/modules/vision_transformer/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
117
|
+
doctr/models/modules/vision_transformer/pytorch.py,sha256=ltnBAevcfJl612yblI6WhcJAPEgUO0w-5jFL7vBhXoA,3943
|
|
118
|
+
doctr/models/predictor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
119
|
+
doctr/models/predictor/base.py,sha256=URUrmxJxNNvqoFNrP6G4xDys6UVBK6PfHydTeZwaDtE,14067
|
|
120
|
+
doctr/models/predictor/pytorch.py,sha256=0NTyi3umgPn6qGVSCliut1oPenZp4gQlwNWf0zhZyJM,14114
|
|
121
|
+
doctr/models/preprocessor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
122
|
+
doctr/models/preprocessor/pytorch.py,sha256=HBmSqz0iZdEcbdSygVyu4zaB9AQyIPk-q4a7Jwb7VoY,6744
|
|
123
|
+
doctr/models/reading_order/__init__.py,sha256=ERmmOxz_9mUkIuccNbzUa5Y6gVLLVDdyc4cCxbCCUbY,20
|
|
124
|
+
doctr/models/reading_order/base.py,sha256=Ocf0vcj77iGtBRqdtd5XfuH1sSz8FKguAaXzuUfezU0,32170
|
|
125
|
+
doctr/models/recognition/__init__.py,sha256=bgAvbwjO14Z2RQFD2XKZcSYJNsyxPa96SGHmX_nqbAQ,145
|
|
126
|
+
doctr/models/recognition/core.py,sha256=InV-HLYkbQG65B6BYIud_JCWdbeoacC2MURjPZqceoo,1524
|
|
127
|
+
doctr/models/recognition/utils.py,sha256=KXC1jSM45vNjnOp14IGbCZftXZqyCKNhOrDG3XkgiWE,3679
|
|
128
|
+
doctr/models/recognition/zoo.py,sha256=rwyiNjF5947E7LP4EBs2RYKeiXG_7K4A42OQh1Gq1rY,2957
|
|
129
|
+
doctr/models/recognition/crnn/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
130
|
+
doctr/models/recognition/crnn/pytorch.py,sha256=rB6wss6Og4RmUGUzzq28GQ_Z2PffzqA_gegyZlTOzcQ,12234
|
|
131
|
+
doctr/models/recognition/master/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
132
|
+
doctr/models/recognition/master/base.py,sha256=KU94CO3YZYyYh83gW6F65IjeJfoAkwuandY3A_DxfM8,1471
|
|
133
|
+
doctr/models/recognition/master/pytorch.py,sha256=dBgoQdpmLqe2OafVJvrdVvJ408GAWgQw2dyA54tq1C0,12758
|
|
134
|
+
doctr/models/recognition/parseq/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
135
|
+
doctr/models/recognition/parseq/base.py,sha256=SMGEETj94ZIJUdSLe2d2PhLTpeptrW5MB7cW3WtVOhQ,1465
|
|
136
|
+
doctr/models/recognition/parseq/pytorch.py,sha256=ngYYQDgoF_OdBiHi-c6aNOVGqNgsbS7sl9-UOkNEy3E,20826
|
|
137
|
+
doctr/models/recognition/predictor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
138
|
+
doctr/models/recognition/predictor/_utils.py,sha256=8q5ate9L7xeqOY-45foX1itPlHUBWw3RpLfCgYJ2ZJo,4695
|
|
139
|
+
doctr/models/recognition/predictor/pytorch.py,sha256=8onZKPElNVpaIKl_L-s-w-AXKjPkM_Tzvr_ynn8Daic,2781
|
|
140
|
+
doctr/models/recognition/sar/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
141
|
+
doctr/models/recognition/sar/pytorch.py,sha256=z_7Byq4tZKjuhALz1IR9oX9kIvxmEvHb__kKB9CrgRw,15632
|
|
142
|
+
doctr/models/recognition/viptr/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
143
|
+
doctr/models/recognition/viptr/pytorch.py,sha256=0u3hez8cEx30cy4YL8OpHvdYlL2MWe_l_qWUdDmEfxE,9369
|
|
144
|
+
doctr/models/recognition/vitstr/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
145
|
+
doctr/models/recognition/vitstr/base.py,sha256=tRMhC5i_l0S207_YFEs7wFAtkznyAJoH8sUZVMcZUBk,1419
|
|
146
|
+
doctr/models/recognition/vitstr/pytorch.py,sha256=9m0yZVscHCU6fHHqEGdIuTclzsOpLJsnpKS_uM4pZK0,10098
|
|
147
|
+
doctr/models/table_structure/__init__.py,sha256=giE94fe07idt8xnwdcQrvd6OJcp32Epftfir4SqXgI8,49
|
|
148
|
+
doctr/models/table_structure/zoo.py,sha256=NECUlCqYdnL49cqAjrOkLSO0wu0j2El_q3I3wN5clPQ,3136
|
|
149
|
+
doctr/models/table_structure/predictor/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
150
|
+
doctr/models/table_structure/predictor/pytorch.py,sha256=sb4_-qzgG0j030YcJV-ZI_I2zPkpisKfc2WZ0WyOlWU,3417
|
|
151
|
+
doctr/models/table_structure/tablecenternet/__init__.py,sha256=bJLj2I8OOTYLuTDjdinao0nkOIWQOLbzIuww23EX3gw,43
|
|
152
|
+
doctr/models/table_structure/tablecenternet/base.py,sha256=Layz3K3tDnGMPlWrygpfMp5FHwVtFzAHtY-79_Ps1Ss,21631
|
|
153
|
+
doctr/models/table_structure/tablecenternet/pytorch.py,sha256=iOYv42QywfkUkNVvpUojKV_YSF8mj5LEV_tgQuVJu5A,22467
|
|
154
|
+
doctr/models/utils/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
155
|
+
doctr/models/utils/pytorch.py,sha256=QJnFYQQtDFOECyCTfEy0A6nEND-sNHSa3bFNFUdrf3c,19399
|
|
156
|
+
doctr/transforms/__init__.py,sha256=0VHbvUZ7llFd1e_7_JdWTaxYMCvaR6KbUJaYJequmQI,23
|
|
157
|
+
doctr/transforms/functional/__init__.py,sha256=hxLu7FmRYn01ysoOQalrMa5K_qg4rLNf8OAuoemzd6I,23
|
|
158
|
+
doctr/transforms/functional/base.py,sha256=LRIM3L6nZQaZ3qyQKEFQ0ZLJRRg7rMYtshADK_ZCOi8,6851
|
|
159
|
+
doctr/transforms/functional/pytorch.py,sha256=mSToyPGn8O3WgK9rQJoGZcOHyIm06MQtWua1YA7p1kU,5102
|
|
160
|
+
doctr/transforms/modules/__init__.py,sha256=bJLj2I8OOTYLuTDjdinao0nkOIWQOLbzIuww23EX3gw,43
|
|
161
|
+
doctr/transforms/modules/base.py,sha256=TtOnJkCgd6ECqjgwQEkMlkZsggQ9rZZQ_pkKc_xPJ8s,13273
|
|
162
|
+
doctr/transforms/modules/pytorch.py,sha256=rynHNtBosZb-KWqO5rXOweEGPdmikvXokQmuAlhbTV8,17281
|
|
163
|
+
doctr/utils/__init__.py,sha256=uQY9ibZ24V896fmihIsK23QOIZdKtk0HyKoCVJ_lLuM,95
|
|
164
|
+
doctr/utils/common_types.py,sha256=S-5MjVke6onF7NMHX2y0wrjO9toaQc9Wb7yUd0w3SGE,1040
|
|
165
|
+
doctr/utils/data.py,sha256=z4kHnaotY_4IUZ-LiOT0pj68AaUUbKuCzhLcdmViuec,4210
|
|
166
|
+
doctr/utils/fonts.py,sha256=YpiBJsSQ64BsT5jbefj6p-rTd5MCT20TZY3Y6izhd4k,2314
|
|
167
|
+
doctr/utils/geometry.py,sha256=LRMGCtAVI6zcH_MoN0WLief9KG7Z4vc3IzX30ikQ7ZA,23548
|
|
168
|
+
doctr/utils/metrics.py,sha256=oaKVHy5k9CURVJupai2ULFwqjvuZjuXdFuGbWWSDoDs,32235
|
|
169
|
+
doctr/utils/multithreading.py,sha256=oncX4uA81Vkg42xYEpgtBwnsstjQ-1S8mCZpk9ujG00,2169
|
|
170
|
+
doctr/utils/reconstitution.py,sha256=CiRq9QYAwPc88dsIiSS43mywClnw47p__Xlb3mioj1w,32937
|
|
171
|
+
doctr/utils/repr.py,sha256=ShDOvCiPjdj1_v1AfLQ7AN_tunu07p0S_scFZYip7GY,2087
|
|
172
|
+
doctr/utils/visualization.py,sha256=j6M7tBsMjqgrh4Py9lVHfVWg02SCipLZLV36coe_N8Q,15743
|
|
173
|
+
python_doctr-1.1.0.dist-info/licenses/LICENSE,sha256=75RTSsXOsAYhGpxsHc9U41ep6GS7vrUPufeekgoeOXM,11336
|
|
174
|
+
python_doctr-1.1.0.dist-info/METADATA,sha256=XKwjX4b7MN_8g6j60pskUwvN_FwTiyn6aq-GJ9b8334,34145
|
|
175
|
+
python_doctr-1.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
176
|
+
python_doctr-1.1.0.dist-info/entry_points.txt,sha256=mpju95_gCTMZUSh14hIWfwfT0XdcEsR0PRTz_h2TGJM,50
|
|
177
|
+
python_doctr-1.1.0.dist-info/top_level.txt,sha256=lCgp4pmjPI3HYph62XhfzA3jRwM715kGtJPmqIUJ9t8,6
|
|
178
|
+
python_doctr-1.1.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
179
|
+
python_doctr-1.1.0.dist-info/RECORD,,
|