From a659425ea30324bb8d1e5f742dbfe79a12024354 Mon Sep 17 00:00:00 2001 From: Fabioomega <127808270+Fabioomega@users.noreply.github.com> Date: Mon, 29 Jul 2024 03:54:08 -0300 Subject: [PATCH] [Bug] Fixed assume_straight_pages for custom models (#1681) --- doctr/models/detection/zoo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doctr/models/detection/zoo.py b/doctr/models/detection/zoo.py index 3cab59e381..e89009fd8d 100644 --- a/doctr/models/detection/zoo.py +++ b/doctr/models/detection/zoo.py @@ -61,6 +61,7 @@ def _predictor(arch: Any, pretrained: bool, assume_straight_pages: bool = True, _model = arch _model.assume_straight_pages = assume_straight_pages + _model.postprocessor.assume_straight_pages = assume_straight_pages kwargs.pop("pretrained_backbone", None)