Download Latest Version v0.12.0 source code.zip (4.0 MB)
Email in envelope

Get an email when there's a new version of DocTR

Home / v0.10.0
Name Modified Size InfoDownloads / Week
Parent folder
db_resnet50-a5b57aac.pt 2025-01-15 102.0 MB
vitstr_small-c692a250.weights.h5 2024-10-24 86.0 MB
vitstr_base-636fcfcf.weights.h5 2024-10-24 341.5 MB
sar_resnet31-861e9563.weights.h5 2024-10-24 229.5 MB
parseq-3a3149e7.weights.h5 2024-10-24 95.8 MB
master-bdcf6f40.weights.h5 2024-10-24 235.8 MB
crnn_vgg16_bn-41bbe57b.weights.h5 2024-10-24 63.4 MB
crnn_mobilenet_v3_small-b4bb2858.weights.h5 2024-10-24 8.8 MB
crnn_mobilenet_v3_large-1eac49ae.weights.h5 2024-10-24 18.7 MB
linknet_resnet50-fdea2b5f.weights.h5 2024-10-24 116.0 MB
db_resnet50-fe92475b.weights.h5 2024-10-24 101.7 MB
vgg16_bn_r-b4d69212.weights.h5 2024-10-24 59.3 MB
textnet_tiny-99fb9158.weights.h5 2024-10-24 43.6 MB
textnet_small-44072f65.weights.h5 2024-10-24 48.7 MB
textnet_base-a92df1c0.weights.h5 2024-10-24 55.3 MB
resnet50-82358f34.weights.h5 2024-10-24 95.8 MB
resnet34_wide-4c788e90.weights.h5 2024-10-24 341.4 MB
vit_s-d68b3d5b.weights.h5 2024-10-24 85.8 MB
vit_b-f01181f0.weights.h5 2024-10-24 341.1 MB
magc_resnet31-6c266055.weights.h5 2024-10-24 185.0 MB
mobilenet_v3_large-d857506e.weights.h5 2024-10-24 18.0 MB
mobilenet_v3_large_r-eef2e3c6.weights.h5 2024-10-24 18.0 MB
mobilenet_v3_small-3fcebad7.weights.h5 2024-10-24 7.0 MB
mobilenet_v3_small_crop_orientation-ef019b6b.weights.h5 2024-10-24 6.5 MB
mobilenet_v3_small_page_orientation-0071d55d.weights.h5 2024-10-24 6.5 MB
mobilenet_v3_small_r-dd50218d.weights.h5 2024-10-24 7.0 MB
resnet18-4138682e.weights.h5 2024-10-24 45.2 MB
resnet31-61808f41.weights.h5 2024-10-24 184.6 MB
resnet34-2288ee52.weights.h5 2024-10-24 85.8 MB
README.md 2024-10-21 5.6 kB
v0.10.0 source code.tar.gz 2024-10-21 3.6 MB
v0.10.0 source code.zip 2024-10-21 3.9 MB
Totals: 32 Items   3.0 GB 0

Note: docTR 0.10.0 requires python >= 3.9 Note: docTR 0.10.0 requires either TensorFlow >= 2.15.0 or PyTorch >= 2.0.0

What's Changed

Soft Breaking Changes (TensorFlow backend only) 🛠

  • Changed the saving format from /weights to .weights.h5

NOTE: Please update your custom trained models and HuggingFace hub uploaded models, this will be the last release supporting manual loading from /weights.

New features

  • Added numpy 2.0 support @felixdittrich92
  • New and updated notebooks was added @felixdittrich92 --> notebooks
  • Custom orientation model loading @felixdittrich92
  • Additional functionality to control the pipeline when dealing with rotated documents @milosacimovic @felixdittrich92
  • Bulit-in datasets can now be loaded directly for detection with detection_task=True comparable to the existing recognition_task=True @felixdittrich92

Disable page orientation classification

  • If you deal with documents which contains only small rotations (~ -45 to 45 degrees), you can disable the page orientation classification to speed up the inference.
  • This will only have an effect with assume_straight_pages=False and/or straighten_pages=True and/or detect_orientation=True.

    :::python from doctr.models import ocr_predictor

    model = ocr_predictor(pretrained=True, assume_straight_pages=False, disable_page_orientation=True)

Disable crop orientation classification

  • If you deal with documents which contains only horizontal text, you can disable the crop orientation classification to speed up the inference.
  • This will only have an effect with assume_straight_pages=False and/or straighten_pages=True.

    :::python from doctr.models import ocr_predictor

    model = ocr_predictor(pretrained=True, assume_straight_pages=False, disable_crop_orientation=True)

Loading custom exported orientation classification models

You can now load your custom trained orientation models, the following snippet demonstrates how:

:::python
from doctr.io import DocumentFile
from doctr.models import ocr_predictor, mobilenet_v3_small_page_orientation, mobilenet_v3_small_crop_orientation
from doctr.models.classification.zoo import crop_orientation_predictor, page_orientation_predictor

custom_page_orientation_model = mobilenet_v3_small_page_orientation("<PATH_TO_CUSTOM_EXPORTED_ONNX_MODEL>")
custom_crop_orientation_model = mobilenet_v3_small_crop_orientation("<PATH_TO_CUSTOM_EXPORTED_ONNX_MODEL>"))

predictor = ocr_predictor(pretrained=True, assume_straight_pages=False, detect_orientation=True)

# Overwrite the default orientation models
predictor.crop_orientation_predictor = crop_orientation_predictor(custom_crop_orientation_model)
predictor.page_orientation_predictor = page_orientation_predictor(custom_page_orientation_model)

What's Changed

Breaking Changes 🛠

New Features

Bug Fixes

Improvements

Miscellaneous

New Contributors

Full Changelog: https://github.com/mindee/doctr/compare/v0.9.0...v0.10.0

Source: README.md, updated 2024-10-21