Note: docTR 0.12.0 requires python >= 3.10
Note: docTR 0.12.0 requires either TensorFlow >= 2.15.0 or PyTorch >= 2.0.0
Warning
TensorFlow Backend Deprecation Notice
Using docTR with TensorFlow as a backend is deprecated and will be removed in the next major release (v1.0.0).
We recommend switching to the PyTorch backend, which is more actively maintained and supports the latest features and models.
Alternatively, you can use OnnxTR, which does not require TensorFlow or PyTorch.
This decision was made based on several considerations:
- Allows better focus on improving the core library
- Frees up resources to develop new features faster
- Enables more targeted optimizations with PyTorch
Warning
This release is the last minor release supporting TensorFlow as backend
What's changed
New features
- A new lightweight recognition model
viptr_tinywas added - New built-in dataset added - COCO-Text V2
- A new custom model loading interface
# NEW
model = vitstr_small(pretrained=False, pretrained_backbone=False)
model.from_pretrained("<PATH_TO>") # local path or url to .pt or .h5
# Instead of depending on the backend
reco_params = torch.load('<path_to_pt>', map_location="cpu")
reco_model.load_state_dict(reco_params)
# Or with TensorFlow
reco_model.load_weights(..)What's Changed
Breaking Changes 🛠
- [Feat] Simplify and unify model loading - from_pretrained by @felixdittrich92 in #1915
- [Build] Add TensorFlow deprecation warnings by @felixdittrich92 in #1948
New Features
- [datasets] COCO-Text V2 integration by @sarjil77 in #1888
- [references] Recognition - Allow built-in datasets usage by @sarjil77 in #1904
- [Feat] PyTorch - VIP backbone and VIPTR recognition module by @lkosh in #1912
Bug Fixes
- [Fix] Duplicated forward call in rec train scripts by @felixT2K in #1862
- [Fix] Fix invalid hOCR format & PDF/A compatiblity with the kie preditor by @felixdittrich92 in #1870
- [CI/CD] Fix conda dependency issue by @felixT2K in #1937
- [Fix] Fix merge of short strings by @Razlaw in #1947
- [bug] fix missing import by @felixT2K in #1958
- Fix: Update min_loss only on improved validation loss to ensure best … by @sneakybatman in #1961
Improvements
- [Docs] Fix typos by @jk4e in #1885
- added russian vocab by @Madhavi258 in #1902
- [FIXED] Add proper Hebrew Unicode chars vocab by @johnlockejrr in #1909
- [classification] Add PyTorch pretrained VIP checkpoints by @felixdittrich92 in #1920
- Use OpenCV instead of Shapely to compute area & length by @lachesis in #1922
- [datasets] feat: add croatian vocabulary by @cyanic-selkie in #1923
- [docs] Fix VIPTR docstring by @felixT2K in #1924
- Migrating training scripts to torchrun by @lkosh in #1933
- [datasets] Massively extend the pre-defined vocabs by @felixdittrich92 in #1928
- [datasets] Update indic & arabic & other vocabs by @felixdittrich92 in #1941
- [Fix] Improve merge for recognition of long words (#1936) by @Razlaw in #1939
- [docs] Add tools section by @felixdittrich92 in #1950
- Give instructions on how to enable GPU acceleration on apple silicon by @ulfaslak in #1955
- [models] Add viptr tiny checkpoint by @felixdittrich92 in #1963
Miscellaneous
- [misc] post release v0.11.0 & public docker cron job adjustment by @felixdittrich92 in #1860
- [misc] Avoid tf onnx test to fail the CI & mypy fixes by @felixdittrich92 in #1903
- [Docs] Fix typo in docstring by @jk4e in #1927
- [misc] Fix mypy & merge test by @felixT2K in #1945
- [docs] Add new community model (arabic) to docs by @felixT2K in #1956
- [models] Drop viptr base config by @felixT2K in #1962
- [misc] Increase minor version v0.12 by @felixT2K in #1964
New Contributors
- @jk4e made their first contribution in #1885
- @Madhavi258 made their first contribution in #1902
- @johnlockejrr made their first contribution in #1909
- @sebastianMindee made their first contribution in #1917
- @lkosh made their first contribution in #1912
- @lachesis made their first contribution in #1922
- @cyanic-selkie made their first contribution in #1923
- @ulfaslak made their first contribution in #1955
- @sneakybatman made their first contribution in #1961
Full Changelog: v0.11.0...v0.12.0
