v0.8.0
Note: doctr 0.8.0 requires either TensorFlow >= 2.11.0 or PyTorch >= 1.12.0.
What's Changed
Breaking Changes 🛠
db_resnet50_rotation
(PyTorch) andlinknet_resnet18_rotation
(TensorFlow) are removed (All models can handle rotated documents now).show(doc)
changed to.show()
New features
- All models have pretrained checkpoints now by @odulcy-mindee
- All detection models was retrained on rotated samples by @odulcy-mindee
- Improved orientation detection for documents rotated between -90 and 90 degrees by @felixdittrich92
- Conda deployment job & receipt added by @frgfm
- Official docTR docker images are added by @odulcy-mindee => docker-images
- New benchmarks and documentation improvements by @felixdittrich92
WildReceipt
dataset added by @HamzaGbada- EarlyStopping callback added to all training scripts by @SkaarFacee
- Hook mechanism added to
ocr_predictor
to maniplulate the detection predictions in the middle of the pipeline to your needs by @felixdittrich92
from doctr.model import ocr_predictor
class CustomHook:
def __call__(self, loc_preds):
# Manipulate the location predictions here
# 1. The outpout structure needs to be the same as the input location predictions
# 2. Be aware that the coordinates are relative and needs to be between 0 and 1
return loc_preds
my_hook = CustomHook()
predictor = ocr_predictor(pretrained=True)
# Add a hook in the middle of the pipeline
predictor.add_hook(my_hook)
# You can also add multiple hooks which will be executed sequentially
for hook in [my_hook, my_hook, my_hook]:
predictor.add_hook(hook)
What's Changed
Breaking Changes 🛠
- [prototype] compute orientation on segmentation map by @felixdittrich92 in #1336
New Features
- feat: ✨ Official docker images for docTR by @odulcy-mindee in #1322
- Add wildreceipt dataset by @HamzaGbada in #1359
- Added early stopping feature by @SkaarFacee in #1397
- [PT / TF] Add TextNet - FAST backbone by @felixdittrich92 in #1425
- feat: Adds conda recipe & corresponding CI jobs by @frgfm in #1414
- [prototype] Extend detection result customization by @felixdittrich92 in #1449
Bug Fixes
- [FIX] antialising in PreProcessor by @felixdittrich92 in #1324
- [Fix] prob computation for parseq and vitstr models by @felixdittrich92 in #1327
- [FIX] clip overflowing probs by @felixdittrich92 in #1335
- [Fix] PT - convert BF16 tensor to float before calling .numpy() by @chunyuan-w in #1342
- [Fix] Prob comp in vitstr and parseq for empty words by @felixT2K in #1345
- [Fix] TF - add bf16 numpy dtype conversion by @felixT2K in #1346
- [Fix] fix growing mem usage pytorch crnn by @felixdittrich92 in #1357
- [Fix] tf augmentations by @felixT2K in #1360
- Fix broken weasyprint link by @simonw in #1367
- feat: ✨ use
tqdm
instead offastprogress
in reference scripts by @odulcy-mindee in #1389 - [FIX] Fix mypy errors by @felixdittrich92 in #1419
- [FIX] db loss TF and PT also for training with rotated samples by @felixdittrich92 in #1396
- [FIX] Dice loss computation in both backends by @felixdittrich92 in #1442
- [FIX] Fix streamlit demo by @felixdittrich92 in #1447
- [Fix / Misc] Fix conda CI build and publish job and update actions by @felixdittrich92 in #1453
- [Fix] Catch Divide by zero explicit by @felixdittrich92 in #1471
Improvements
- feat: ✨ PT ViTSTR Small Checkpoint by @odulcy-mindee in #1319
- feat: ✨ PT Parseq Checkpoint by @odulcy-mindee in #1320
- [scripts] Add backbone freeze for recognition scripts and update augmentations also for DDP script by @felixdittrich92 in #1328
- [PyTorch] replace no_grad with inference_mode by @felixdittrich92 in #1323
- [transforms] update random apply to work also with targets by @felixdittrich92 in #1333
- [TF] unify detection augmentations by @felixdittrich92 in #1351
- feat: ✨ PT SAR Resnet31 Checkpoint by @odulcy-mindee in #1362
- feat: ✨ PT ViTSTR Base checkpoint by @odulcy-mindee in #1361
- TF change antialias to true by @felixT2K in #1348
- feat: ✨ PT Linknet Resnet18 Checkpoint by @odulcy-mindee in #1387
- [demo] remove limitation and update demo by @felixdittrich92 in #1390
- feat: ✨ PT Linknet Resnet50 Checkpoint by @odulcy-mindee in #1391
- feat: ✨ PT Linknet Resnet 34 Checkpoint by @odulcy-mindee in #1393
- [Fixes / docs] Add more vocabs / Fix Style / HF hub / API Dep by @felixdittrich92 in #1412
- fix: 🐛 add sqlite dependency by @odulcy-mindee in #1421
- feat: ✨ new TF Linknet Resnet checkpoints by @odulcy-mindee in #1424
- feat: ✨ PT db_resnet34 checkpoint by @odulcy-mindee in #1433
- [references] TF / PT crop & document orientation classifier train scripts by @felixdittrich92 in #1432
- [PT] remove submodule from textnet arch by @felixdittrich92 in #1436
- [references] Add poly scheduler for detection training by @felixdittrich92 in #1444
- [references] Add interval saving for detection trainings by @felixdittrich92 in #1454
- feat: ✨ PT db_resnet50 checkpoint by @odulcy-mindee in #1465
- read labels in utf-8 and log input string on vocab error by @eikaramba in #1479
- feat: ✨ tf db_resnet50 checkpoint by @odulcy-mindee in #1480
- feat: ✨ TF db mobilenet v3 large new ckpt by @odulcy-mindee in #1483
- [Docs] extend doc with DocumentBuilder options by @felixdittrich92 in #1486
- feat: ✨ TF db mobilenet v3 large new ckpt by @odulcy-mindee in #1487
Miscellaneous
- chore: apply post release modifications v0.7.0 by @felixdittrich92 in #1309
- docs: ✏️ fix images on pypi by @odulcy-mindee in #1310
- Update Dockerfile (GPU Support, Workdir, Permissions) by @ffalkenberg in #1313
- [misc] rename helper function for bf16 to float32 casting by @felixdittrich92 in #1347
- hebrew letters by @uriva in #1355
- docs: ✏️ add
WILDRECEIPT
in docs and fixREADME.md
by @odulcy-mindee in #1363 - [misc] increase to 0.8.0 and temp pin onnx by @felixT2K in #1365
- [Fix] Typo in README.md by @eltociear in #1374
- Relax Pillow and OpenCV version bounds. by @nh2 in #1373
- [misc & build] replace isort pydocstyle and black with ruff by @felixdittrich92 in #1379
- [Misc] rename char classifiation scripts and dependency pin by @felixdittrich92 in #1469
- [Docs] add PyTorch / TensorFlow benchmarks by @felixdittrich92 in #1321
- [misc] rename channel by @felixdittrich92 in #1488
New Contributors
- @ffalkenberg made their first contribution in #1313
- @chunyuan-w made their first contribution in #1342
- @uriva made their first contribution in #1355
- @simonw made their first contribution in #1367
- @nh2 made their first contribution in #1373
- @SkaarFacee made their first contribution in #1397
- @eikaramba made their first contribution in #1479
Full Changelog: v0.7.0...v0.8.0